How are two signatures bound to the same software update?
Suppose you want to verify a software update’s publisher using both the established Ed25519 scheme and the post-quantum ML-DSA-65 scheme. MLDSA65-Ed25519-SHA512 defines a composite scheme with a dedicated pair of component keys, a shared procedure for preparing the message to sign, and a single rule for accepting the result. The verifier starts with one composite public key already associated with the publisher. RFC 10073
Giving both schemes the same message to sign
Suppose you use the same file for a test build and a production release. The file’s contents alone cannot distinguish those uses. The signer reduces the message to a 64-byte SHA-512 digest and prefixes it with information identifying the scheme and the intended use. The result is the message M′ passed to both signing algorithms.
M′ = common prefix || algorithm label || context length (1 byte) || context || SHA-512(message)
The || operator concatenates the byte strings. Changing the context from “test” to “release” changes M′ even when the file hash stays the same. ML-DSA-65 signs M′ with the algorithm label as its internal context. Ed25519 also signs M′. SHA-512 is a SHA-2 hash function that processes 1,024-bit blocks using 64-bit words. Even for a large file, the part of the input derived from the message has a fixed length for both signing operations. The SHA-2 structure in SHA-256 · FIPS 180-4
What Ed25519 checks
Start with the base point B. The public key is the point A obtained by multiplying B by the secret scalar a. The signer derives a nonce r from secret material and M′, then computes the point R = rB. The signer hashes R, A, and M′ to obtain a scalar k and computes S = r + k·a modulo the order of the group generated by B. Verification relies on the relation SB = R + kA. Expanding the left-hand side yields the same point as the right-hand side, so the verifier can check that the signature matches the message without knowing a. RFC 8032 §5.1
When the composite signature is accepted
Of the 3,373 bytes received, the first 3,309 are the ML-DSA-65 signature and the last 64 are the Ed25519 signature. The verifier reconstructs M′ from the message and context it has and verifies each signature with its corresponding public key component. Acceptance requires both checks to pass, so a forgery must satisfy both checks for the same signing input. Generate component keys specifically for this combination to keep standalone and composite signing separate. How to use composite signatures · How ML-DSA verifies signatures
- Signer · Hash the messageCompute the 64-byte SHA-512 digest.
- Bind the algorithm and contextM′ = fixed prefix || algorithm label || context length (1 byte) || context || SHA-512(message)
-
Sign with the ML-DSA-65 keySign M′ with the ML-DSA-65 private key and the algorithm label as the internal context.Sign with the Ed25519 keySign M′ with the Ed25519 private key.
- Publish the message and composite signatureThe 3,373-byte signature is the ML-DSA-65 signature (3,309 bytes) followed by the Ed25519 signature (64 bytes).
-
Verifier · Rebuild M′Hash the received message with SHA-512 and bind the same prefix, algorithm label, and expected context.Verifier · Read the two componentsSplit the received signature and the trusted composite public key into their ML-DSA-65 and Ed25519 components.
-
Check the ML-DSA-65 signatureVerify against M′ with the ML-DSA-65 public key and the algorithm label as the internal context.Check the Ed25519 signatureVerify against M′ with the Ed25519 public key.
- Accept only if both checks passReject if either signature fails verification.