Expand description
This module encapsulates all of the compile-time logic related to parameter-set dependent sizes
of objects. ParameterSet captures the parameters in the form described by the ML-KEM
specification. EncodingSize, VectorEncodingSize, and CbdSamplingSize are “upstream” of
ParameterSet; they provide basic logic about the size of encoded objects. PkeParams and
KemParams are “downstream” of ParameterSet; they define derived parameters relevant to
K-PKE and ML-KEM.
While the primary purpose of these traits is to describe the sizes of objects, in order to
avoid leakage of complicated trait bounds, they also need to provide any logic that needs to
know any details about object sizes. For example, VectorEncodingSize::flatten needs to know
that the size of an encoded vector is K times the size of an encoded polynomial.
Enums§
Traits§
- Mask
Sampling Size - An integer that describes a mask sampling size
- MlDsa
Params - An instance of
MlDsaParamsdefines all of the parameters necessary for ML-DSA operations. Typically this is done by implementingParameterSetwith values that will fit into the blanket implementations ofSigningKeyParams,VerifyingKeyParams, andSignatureParams. - Parameter
Set - A
ParameterSetcaptures the parameters that describe a particular instance of ML-DSA. There are three variants, corresponding to three different security levels. - Sampling
Size - An integer that describes a bit length to be used in sampling
- Signature
Params - Signing
KeyParams - Verifying
KeyParams
Type Aliases§
- BitlenQ
MinusD - EncodedC
Tilde - Encoded
Hint - Encoded
Hint Cuts - Encoded
Hint Indices - Encoded
S1 - Encoded
S2 - Encoded
Signature - A signature encoded as a byte array
- Encoded
Signing Key - A signing key encoded as a byte array
- Encoded
T0 - Encoded
T1 - Encoded
Verifying Key - A verifying key encoded as a byte array
- Encoded
W1 - EncodedZ
- Pow2D
Minus1 - Pow2D
Minus1 Minus1 - QMinus1
- Signature
Size - Signing
KeySize - SpecD
- SpecQ
- Some useful compile-time constants
- Verifying
KeySize