Bouncy Castle Cryptography Library 1.87

org.bouncycastle.jcajce.spec
Class KMACKDFParameterSpec

java.lang.Object
  extended byorg.bouncycastle.jcajce.spec.KMACKDFParameterSpec
All Implemented Interfaces:
java.security.spec.AlgorithmParameterSpec

public class KMACKDFParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec

Derivation parameters for the KMAC-based KDF of the CMS KEMRecipientInfo profiles (RFC 9629 with id-Kmac128 / id-Kmac256, as used by RFC 9935 for ML-KEM): the derived key is KMAC(secret, context, L, customization) with L the output length ( or "KMAC256-KDF"). The customization is the Customization octet string the KDF's algorithm identifier parameters may carry, empty when absent.


Constructor Summary
KMACKDFParameterSpec(byte[] secret, byte[] context, byte[] customization, int outputLength)
           
KMACKDFParameterSpec(byte[] secret, byte[] context, int outputLength)
           
 
Method Summary
 byte[] getContext()
           
 byte[] getCustomization()
           
 int getOutputLength()
           
 byte[] getSecret()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KMACKDFParameterSpec

public KMACKDFParameterSpec(byte[] secret,
                            byte[] context,
                            int outputLength)

KMACKDFParameterSpec

public KMACKDFParameterSpec(byte[] secret,
                            byte[] context,
                            byte[] customization,
                            int outputLength)
Parameters:
secret - the KMAC key, the KEM shared secret in RFC 9629.
context - the KMAC message, the CMSORIforKEMOtherInfo encoding in RFC 9629; may be null.
customization - the KMAC customization string, or null for none.
outputLength - the number of bytes to derive.
Method Detail

getSecret

public byte[] getSecret()

getContext

public byte[] getContext()

getCustomization

public byte[] getCustomization()

getOutputLength

public int getOutputLength()

Bouncy Castle Cryptography Library 1.87