java.lang.Object
org.bouncycastle.pqc.crypto.mlkem.MLKEMExtractor

public class MLKEMExtractorextends Object
Extractor for ML-KEM private key operations. Provides functionality to extract shared secrets from encapsulated data using private keys.
  • Field Details

  • Constructor Details

    • MLKEMExtractor

      public MLKEMExtractor(MLKEMPrivateKeyParameters privateKey)
      Creates a new MLKEMExtractor instance.
      Parameters:
      privateKey - the private key to use for decapsulation
  • Method Details

    • extractSecret

      public byte[] extractSecret(byte[] encapsulation)
      Extract the shared secret from the encapsulated data.
      Parameters:
      encapsulation - the encapsulated data
      Returns:
      the shared secret
    • getEncapsulationLength

      public int getEncapsulationLength()
      Get the encapsulation length.
      Returns:
      the encapsulation length in bytes