Interface MLKEMPrivateKey

All Superinterfaces:
EncodableKeyPREVIEW, Key, PrivateKey

public interface MLKEMPrivateKey extends EncodableKeyPREVIEW, PrivateKey
MLKEMPrivateKey is a preview API of the Java Card platform.
Programs can only use MLKEMPrivateKey when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java Card platform.
MLKEMPrivateKey is the base interface for ML-KEM private keys with named parameters described in NIST FIPS 203 specifications - "Chapter 8. Parameter Sets".
Since:
preview
  • Method Details

    • getPublicKey

      short getPublicKey(byte[] value, short offset)
      Copies the encoded form of the corresponding ML-KEM public key into the supplied buffer. The format matches the ek value defined in NIST FIPS 203 - "Chapter 7.1 ML-KEM Key Generation".
      Parameters:
      value - the destination buffer that receives the encoded public key
      offset - the offset within value at which the encoded public key shall be written
      Returns:
      the offset of the first byte following the encoded public key data