Skip to main content

Module param

Module param 

Source
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.

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§

Eta
Range of the uniform distribution to be used in sampling.

Traits§

MaskSamplingSize
An integer that describes a mask sampling size.
MlDsaParams
An instance of MlDsaParams defines all of the parameters necessary for ML-DSA operations. Typically this is done by implementing ParameterSet with values that will fit into the blanket implementations of SigningKeyParams, VerifyingKeyParams, and SignatureParams.
ParameterSet
A ParameterSet captures the parameters that describe a particular instance of ML-DSA. There are three variants, corresponding to three different security levels.
SamplingSize
An integer that describes a bit length to be used in sampling.
SignatureParams
SigningKeyParams
VerifyingKeyParams

Type Aliases§

BitlenQMinusD 🔒
EncodedCTilde 🔒
EncodedHint 🔒
EncodedHintCuts 🔒
EncodedHintIndices 🔒
EncodedS1 🔒
EncodedS2 🔒
EncodedSignature
A signature encoded as a byte array
EncodedT0 🔒
EncodedT1 🔒
EncodedVerifyingKey
A verifying key encoded as a byte array
EncodedW1 🔒
EncodedZ 🔒
ExpandedSigningKeyBytes
A signing key encoded as a byte array
Pow2DMinus1 🔒
Pow2DMinus1Minus1 🔒
QMinus1 🔒
SignatureSize 🔒
SigningKeySize 🔒
SpecD 🔒
SpecQ 🔒
Some useful compile-time constants
VerifyingKeySize 🔒