Class MLKEMPublicKey

java.lang.Object
com.ibm.crypto.hdwrCCA.provider.MLKEMPublicKey
All Implemented Interfaces:
Serializable, Key, PublicKey

public final class MLKEMPublicKey extends Object implements PublicKey
A public hardware key for the ML-KEM algorithm. This key contains a token (which can be either a tokenized representation of a clear key, a key encrypted under the master key, or a label to a stored key in the PKDS), encoded bytes of the raw key material, and attributes (KeyHWAttributeValues, which include the key type and key usage).
See Also:
  • Constructor Details

    • MLKEMPublicKey

      public MLKEMPublicKey(byte[] token) throws InvalidKeyException
      Create a ML-KEM public key
      Parameters:
      token - This is a CCA token which contains a token header plus the key material.
      Throws:
      InvalidKeyException
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Returns the algorithm
      Specified by:
      getAlgorithm in interface Key
      Returns:
      the algorithm
    • getFormat

      public String getFormat()
      Return the format for this key.
      Specified by:
      getFormat in interface Key
      Returns:
      the format for this key
    • getEncoded

      public byte[] getEncoded()
      Returns the encoded raw key material for this public key
      Specified by:
      getEncoded in interface Key
      Returns:
      encoded raw key material
    • getToken

      public byte[] getToken()
      Returns a clone of the public key token
      Returns:
      the public key token