java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.pqc.crypto.mlkem.MLKEMKeyParameters
org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters
- All Implemented Interfaces:
CipherParameters
Public key parameters for ML-KEM (Module-Lattice Key Encapsulation Mechanism). Contains public key components including polynomial coefficients for cryptographic operations.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionMLKEMPublicKeyParameters(MLKEMParameters params, byte[] encoding) Create public key parameters from an encoded byte array.MLKEMPublicKeyParameters(MLKEMParameters params, byte[] t, byte[] rho) Create public key parameters from individual components.Method Summary
Modifier and TypeMethodDescriptionbyte[]Get the encoded public key.(package private) static byte[]getEncoded(byte[] t, byte[] rho) Concatenate t and rho into a single encoding.byte[]getRho()Get the random seed.byte[]getT()Get the polynomial coefficients.Methods inherited from class MLKEMKeyParameters
getParametersModifier and TypeMethodDescriptionReturns the ML-KEM parameter set this key was created with.Methods inherited from class AsymmetricKeyParameter
isPrivate
Field Details
t
final byte[] tPolynomial coefficientsrho
final byte[] rhoRandom seed
Constructor Details
MLKEMPublicKeyParameters
Create public key parameters from individual components.- Parameters:
params- the ML-KEM parameterst- the polynomial coefficientsrho- the random seed
MLKEMPublicKeyParameters
Create public key parameters from an encoded byte array.- Parameters:
params- the ML-KEM parametersencoding- the encoded public key
Method Details
getEncoded
static byte[] getEncoded(byte[] t, byte[] rho) Concatenate t and rho into a single encoding.- Parameters:
t- the polynomial coefficientsrho- the random seed- Returns:
- the concatenated encoding
getEncoded
public byte[] getEncoded()Get the encoded public key.- Returns:
- the encoded public key
getRho
public byte[] getRho()Get the random seed.- Returns:
- the random seed
getT
public byte[] getT()Get the polynomial coefficients.- Returns:
- the polynomial coefficients