Class KMACKDFParameterSpec

java.lang.Object
org.bouncycastle.jcajce.spec.KMACKDFParameterSpec
All Implemented Interfaces:
AlgorithmParameterSpec

public class KMACKDFParameterSpec extends Object implements 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 (KDF.getInstance("KMAC128-KDF") or "KMAC256-KDF"). The customization is the Customization octet string the KDF's algorithm identifier parameters may carry, empty when absent.
  • Constructor Details

    • 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 Details

    • getSecret

      public byte[] getSecret()
    • getContext

      public byte[] getContext()
    • getCustomization

      public byte[] getCustomization()
    • getOutputLength

      public int getOutputLength()