de.flexiprovider.pqc.hbc.cmss
Class CMSSPublicKey
java.lang.Object
|
+--de.flexiprovider.api.keys.PublicKey
|
+--de.flexiprovider.pqc.hbc.cmss.CMSSPublicKey
- All Implemented Interfaces:
- java.security.Key, Key, java.security.PublicKey, java.io.Serializable
- public class CMSSPublicKey
- extends PublicKey
This class implements the CMSS public key and is usually initiated by the
CMSSKeyPairGenerator.
- Author:
- Elena Klintsevich
- See Also:
CMSSKeyPairGenerator,
CMSSPublicKeySpec, Serialized Form
| Fields inherited from interface java.security.Key |
serialVersionUID |
| Fields inherited from interface java.security.PublicKey |
serialVersionUID |
|
Constructor Summary |
protected |
CMSSPublicKey(CMSSPublicKeySpec keySpec)
Construct a new CMSS2 public key from the given key specification. |
protected |
CMSSPublicKey(java.lang.String oid,
byte[] keyBytes,
byte[][][] masks)
Construct a new CMSS2 public key. |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
CMSSPublicKey
protected CMSSPublicKey(java.lang.String oid,
byte[] keyBytes,
byte[][][] masks)
- Construct a new CMSS2 public key.
- Parameters:
oid - the OID of the algorithmkeyBytes - the key bytes
CMSSPublicKey
protected CMSSPublicKey(CMSSPublicKeySpec keySpec)
- Construct a new CMSS2 public key from the given key specification.
- Parameters:
keySpec - a CMSS2PublicKeySpec
getAlgorithm
public java.lang.String getAlgorithm()
- Returns:
- the OID of the algorithm
getOIDString
protected java.lang.String getOIDString()
- Returns:
- the OID of the algorithm
getKeyBytes
protected byte[] getKeyBytes()
- Returns:
- the key bytes
getMasks
protected byte[][][] getMasks()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- a human readable form of the CMSS2 public key
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
getOID
protected codec.asn1.ASN1ObjectIdentifier getOID()
- Overrides:
getOID in class PublicKey
- Returns:
- the OID to encode in the SubjectPublicKeyInfo structure
getAlgParams
protected codec.asn1.ASN1Type getAlgParams()
- Overrides:
getAlgParams in class PublicKey
- Returns:
- the algorithm parameters to encode in the SubjectPublicKeyInfo
structure
getKeyData
protected byte[] getKeyData()
- Return the key data to encode in the SubjectPublicKeyInfo structure. *
The ASN.1 definition of the key structure is
CMSS2PublicKey ::= SEQUENCE {
oid OBJECT IDENTIFIER -- OID identifying the algorithm
pubKeyBytes OCTET STRING -- the public key bytes
leftMasks SECUENCE OF OCTET STRING
-- the left masks for spr-cmss
rightMasks SECUENCE OF OCTET STRING
-- the right masks for spr-cmss
}
- Overrides:
getKeyData in class PublicKey
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure