Skip to main content

Module fndsa

Module fndsa 

Source
Expand description

FN-DSA object sizes (bytes) shared across the workspace.

Unlike the other families in this crate, these ARE genuinely derived at compile time from lib-q-fn-dsa-comm’s own const fn formulas (sign_key_size / vrfy_key_size / signature_size), not hand-maintained literals. lib-q-fn-dsa-comm has no dependency on lib-q-types or lib-q-core (only rand_core / cpufeatures), so this edge is acyclic.

This closes the exact bug class that motivated this module: lib-q-core’s SecurityConstants once hand-copied sign_key_size(10) as the literal 2561, which is sign_key_size evaluated with logn=9’s nbits_fg branch instead of logn=10’s – the real value is 2305. A hand-copied literal can silently drift from the formula; a const initialized directly by calling the formula cannot.

Constants§

FNDSA512_PUBLIC_KEY_BYTES
FN-DSA-512 (logn = 9) public (verifying) key length.
FNDSA512_SECRET_KEY_BYTES
FN-DSA-512 (logn = 9) secret (signing) key length.
FNDSA512_SIGNATURE_BYTES
FN-DSA-512 (logn = 9) signature length.
FNDSA1024_PUBLIC_KEY_BYTES
FN-DSA-1024 (logn = 10) public (verifying) key length.
FNDSA1024_SECRET_KEY_BYTES
FN-DSA-1024 (logn = 10) secret (signing) key length.
FNDSA1024_SIGNATURE_BYTES
FN-DSA-1024 (logn = 10) signature length.