Definitions of FIPS 204 signing and the strong chosen-message forgery experiment #
FIPS 204, Algorithms 2, 6 and 7. The external signer accepts the encoded
private key, a bit-string message, a byte context and 32 bytes of randomness. A zero randomness
string selects deterministic signing. The bounded loop uses the 814-attempt option of Appendix C.
The adaptive strong-unforgeability experiment draws fresh hedging randomness for each signature
and records the context, message and exact bytes of every successful reply. Its sole external
service is signing. The sufCmaGame specialization evaluates FIPS 202 SHAKE in both signing and
verification. Its zero-signing-query lemma recovers the byte-level key-only experiment.
verify_of_sign proves that every successful signature under a generated key passes
Algorithm 3. On a fresh verifying triple whose digest occurs in the log, the extractor
finds a previous reply and computes two colliding SHAKE256 inputs or an integer MSIS vector.
refreshFirstRequest_sufCmaGame gives a classical resampling identity for the first request
and its first internal attempt. The requester may use the known SHAKE256 prefix at every raw
address. The signer consumes the refreshed Algorithm 29 bytes and uses the resulting table
through its retries, later signing requests and final verification.
Bytes consumed by Algorithm 34 for one mask polynomial, 576 at ML-DSA-44 and 640 at ML-DSA-65 and ML-DSA-87.
The Algorithm 34 mask at counter κ from private bytes indexed by its two-byte nonce.
Complete Algorithm 7 using the sampled challenge and digest. XOF exhaustion is fatal, a failed norm or hint check rejects the mask, and success returns the encoded signature.
The length of every successful reply, including for decoded keys outside KeyGen's image.
Algorithm 7's 814-attempt loop with an explicit mask at each retry counter. The ambient XOF supplies the commitment digests and sparse challenges.
Raw SHAKE256 input for the private mask seed in Algorithm 7, line 7.
The 32-byte hedge contributes 256 bits between the key and representative.
Algorithm 7 on encoded secret keys, formatted bit-string messages and 32 hedging bytes. The signer distinguishes a rejected attempt (advance κ by ℓ) from XOF exhaustion (abort). After 814 rejected attempts it returns the single error of Appendix C.
FIPS 202 specialization of Xofs.signInternal.
Pure ML-DSA.Sign (Algorithm 2) with explicit hedging randomness. The deterministic variant uses 32 zero bytes. Contexts longer than 255 bytes return an error.
ExpandMask (Algorithm 34). Each of the ℓ rows queries the same seed with its own two-byte little-endian counter. All rows share their raw XOF with every other signing role.
Evaluating expandMaskReads against a stream answerer computes Xofs.expandMask.
The capped signing loop. Each attempt reads all ExpandMask rows, the commitment digest and the 221 SampleInBall bytes. Every request goes to one raw SHAKE256 interface.
The full internal signer. Matrix expansion uses SHAKE128; every use of SHAKE256, from the message representative and masking seed through the rejection loop, is an oracle call.
Each FIPS trial uses ℓ mask-row reads, one commitment read and one challenge-expansion read. Rejection and fatal expansion consume these reads before the result is examined.
Two prelude reads for the representative and hedging seed, followed by at most 814 trials.
Evaluating signingQueries against a stream answerer applies reply to the id
evaluation of the same loop.
Evaluating one trial of signingQueries executes finishSigningAttempt on the ambient
XOF's mask, commitment digest, and challenge bytes, terminating on failure or acceptance and
advancing the counter by ℓ on mask rejection.
Evaluating signInternalReads against a stream answerer applies reply to
Xofs.signInternal whenever both XOF pairs agree on SHAKE128.
Evaluating signInternalReads with id recovers Xofs.signInternal.
Every accepted output of signingQueries at id has length signatureBytes s.
Every signature returned by Xofs.signInternal has length signatureBytes s, including
for decoded keys outside keyGen's image.
For any fixed pair of XOFs, Algorithm 3 accepts every successful signature produced under a key generated with those same XOFs. This includes deterministic and hedged randomness.
An adaptive randomized adversary whose signing calls may return the FIPS error.
Keep each successful signature with the exact context and message presented to the signer.
Run the forger against the actual signed responses with 32 independent byte draws per request. The program returns the adversary's output and the full successful signing log.
The closed program produces the same joint transcript as the signing oracle in the strong chosen-message experiment.
A hedged signing call under a generated key preserves verification of every logged triple.
Every signature in the actual adaptive signing transcript passes the FIPS byte verifier under the public key returned by the same seed.
Search the actual signing log for a reply sharing the forgery's digest, then extract from the two triples using the public bytes and the matrix supplied to the solver.
A fresh verifying triple and a verified signing log at the same public matrix give a computed witness whenever the full challenge digest occurs in the log.
Every fresh accepted forgery with a previously signed digest yields a valid computed witness. Key generation, the adaptive hedged signing service, verification and extraction use one XOF pair. The public matrix is the one obtained from the seed in the generated public key.
The strong chosen-message forgery experiment for FIPS 204's finite parameter sets: generate both keys from one uniform seed, answer adaptive signing calls with the secret key, and accept a verifying triple precisely when the signer never returned it.
FIPS 202 specialization of the strong chosen-message game.
A 221-byte suffix window after the previous read prefix at each SHAKE256 digest input. SHAKE128 and all other SHAKE256 words retain their background streams.
Answer the distinguished first request by feeding fresh bytes into its actual first Algorithm 29 expansion. The returned table is used by all later signing calls and verification. Malformed requests return the FIPS error. A rejected response retries with the next counter.
The continuation of an actual signing request. It receives the byte reply or failure and can make more randomized, adaptive signing requests before returning its forgery.
Deliver the first signing reply, log its successful triple, then run the remaining chosen-message program and check freshness and verification under the same XOFs.
Refresh the Algorithm 29 row in the first signing request of a chosen-message run. The adversary chooses the query from the generated public key and earlier raw SHAKE256 prefixes. The oracle draws a uniform hedge. The refreshed bytes drive the first attempt with counter zero. Rejection executes the remaining 813 attempts; success or failure is delivered to the continuation with the actual signing log. Subsequent signing and final verification use the updated table. The raw-prefix view is classical.