java.lang.Object
org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters
- All Implemented Interfaces:
CipherParameters, KEMParameters
Parameters for ML-KEM (Module-Lattice Key Encapsulation Mechanism) algorithms. Defines configuration for different ML-KEM security levels and variants.
Field Summary
Modifier and TypeFieldDescriptionprivate final intThe security parameter k of the set.static final MLKEMParametersml_kem_1024.static final MLKEMParametersml_kem_512.static final MLKEMParametersml_kem_768.private final StringName of the parameter set.private final intSession key length of the set, in bytes.Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMLKEMParameters(String name, int k, int sessionKeySize) Names one parameter set.Method Summary
All MethodsModifier and TypeMethodDescriptionCreate an ML-KEM engine for this parameter set.getName()Return the standardized parameter-set name.intReturn the encapsulated shared-secret size.
Field Details
ml_kem_512
ml_kem_512.ml_kem_768
ml_kem_768.ml_kem_1024
ml_kem_1024.name
Name of the parameter set.k
private final int kThe security parameter k of the set.sessionKeySize
private final int sessionKeySizeSession key length of the set, in bytes.
Constructor Details
MLKEMParameters
Names one parameter set.- Parameters:
name- the set's namek- the security parametersessionKeySize- the session key length in bytes
Method Details
getName
Return the standardized parameter-set name.- Returns:
- the standardized name, for example ML-KEM-1024
getEngine
Create an ML-KEM engine for this parameter set.- Returns:
- a new engine sized for this parameter set's K value
getSessionKeySize
public int getSessionKeySize()Return the encapsulated shared-secret size.- Returns:
- the size of the encapsulated shared secret in bytes