Module fips204::traits

source ·
Expand description

All functionality is covered by traits, such that consumers can utilize trait objects as desired.

Traits§

  • The KeyGen trait is defined to allow trait objects for keygen.
  • The SerDes trait provides for validated serialization and deserialization of fixed- and correctly-size elements. Note that FIPS 204 currently states that outside of exact length checks “ML-DSA is not designed to require any additional public-key validity checks” (perhaps “…designed not to require…” would be better). Nonetheless, a Result() is returned during all deserialization operations to preserve the ability to add future checks (and for symmetry across structures). Note that for the current implementation, both of the private and public key deserialization routines invoke an internal decode that catches over-sized coefficients (for early detection).
  • The Signer trait is implemented for the PrivateKey struct on each of the security parameter sets.
  • The Verifier trait is implemented for PublicKey on each of the security parameter sets.