Module param

Module param 

Source
Expand description

Section 7. Parameter Sets 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.

Traits§

ArraySize
An array length with other useful properties
CbdSamplingSize
An integer that describes a bit length to be used in CBD sampling
EncodingSize
An integer that can be used as a length for encoded values.
KemParams
Derived parameters relevant to ML-KEM
ParameterSet
A ParameterSet captures the parameters that describe a particular instance of ML-KEM. There are three variants, corresponding to three different security levels.
PkeParams
Derived parameter relevant to K-PKE
VectorEncodingSize
An integer that can describe encoded vectors.

Functions§

ones_array 🔒

Type Aliases§

DecapsulationKeySize
EncapsulationKeySize
EncodedCiphertext
EncodedDecapsulationKey
EncodedDecryptionKey
EncodedEncryptionKey
EncodedNttVector
EncodedPolynomial
EncodedPolynomialSize
EncodedPolynomialVector
EncodedPolynomialVectorSize
EncodedU 🔒
EncodedUSize 🔒
EncodedV 🔒
EncodedVSize 🔒
EncodingUnit 🔒