Class DilithiumPublicKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Key, java.security.PublicKey

    public class DilithiumPublicKey
    extends java.lang.Object
    implements java.security.PublicKey
    A public hardware key for the CRYSTALS-Dilithium 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:
    Serialized Form
    • Field Summary

      • Fields inherited from interface java.security.PublicKey

        serialVersionUID
    • Constructor Summary

      Constructors 
      Constructor Description
      DilithiumPublicKey​(byte[] token)
      Create a CRYSTALS-Dilithium public key
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()
      Returns the algorithm
      byte[] getEncoded()
      Returns the encoded raw key material for this public key
      java.lang.String getFormat()
      Return the format for this key.
      byte[] getToken()
      Returns a clone of the public key token
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DilithiumPublicKey

        public DilithiumPublicKey​(byte[] token)
                           throws java.security.InvalidKeyException
        Create a CRYSTALS-Dilithium public key
        Parameters:
        token - This is a CCA token which contains a token header plus the key material.
        Throws:
        java.security.InvalidKeyException
    • Method Detail

      • getAlgorithm

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

        public java.lang.String getFormat()
        Return the format for this key.
        Specified by:
        getFormat in interface java.security.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 java.security.Key
        Returns:
        encoded raw key material
      • getToken

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