Class AsymmetricLMSPublicKey

java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricLMSKey
org.bouncycastle.crypto.asymmetric.AsymmetricLMSPublicKey
All Implemented Interfaces:
AsymmetricKey, AsymmetricPublicKey, Key

public final class AsymmetricLMSPublicKey extends AsymmetricLMSKey implements AsymmetricPublicKey
Leighton-Micali Hash-Based Signatures (LMS) public keys.
  • Constructor Details

    • AsymmetricLMSPublicKey

      public AsymmetricLMSPublicKey(int levels, byte[] keyData)
    • AsymmetricLMSPublicKey

      public AsymmetricLMSPublicKey(byte[] encoding) throws IOException
      Construct a key from an encoding of a SubjectPublicKeyInfo.
      Parameters:
      encoding - the DER encoding of the key.
      Throws:
      IOException
    • AsymmetricLMSPublicKey

      public AsymmetricLMSPublicKey(SubjectPublicKeyInfo info) throws IOException
      Throws:
      IOException
  • Method Details

    • getPublicData

      public byte[] getPublicData()
    • getEncoded

      public byte[] getEncoded()
      Description copied from interface: AsymmetricKey
      Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
      Specified by:
      getEncoded in interface AsymmetricKey
      Returns:
      an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
    • equals

      public boolean equals(Object o)
      Description copied from interface: Key
      Return true if o is an equivalent key to this.
      Specified by:
      equals in interface Key
      Overrides:
      equals in class Object
      Parameters:
      o - object to compare to.
      Returns:
      true if o is the same or equivalent key, false otherwise.
    • hashCode

      public int hashCode()
      Description copied from interface: Key
      Return the hashCode for the key.
      Specified by:
      hashCode in interface Key
      Overrides:
      hashCode in class Object
      Returns:
      the key's hashCode.
    • getContextBasedVerifier

      public org.bouncycastle.crypto.internal.pqc.lms.LMSContextBasedVerifier getContextBasedVerifier()