de.flexiprovider.pqc.rainbow
Class RainbowPublicKeySpec
java.lang.Object
|
+--de.flexiprovider.pqc.rainbow.RainbowPublicKeySpec
- All Implemented Interfaces:
- KeySpec, java.security.spec.KeySpec
- public class RainbowPublicKeySpec
- extends java.lang.Object
- implements KeySpec
This class provides a specification for a RainbowSignature public key.
- Author:
- Patrick Neugebauer, Marius Senftleben, Tsvetoslava Vateva
- See Also:
RainbowPublicKey,
KeySpec
|
Constructor Summary |
protected |
RainbowPublicKeySpec(java.lang.String oid,
int docLength,
byte[][] coeffQuadratic,
byte[][] coeffSingular,
byte[] coeffScalar)
Constructor used by the RainbowKeyFactory. |
protected |
RainbowPublicKeySpec(java.lang.String oid,
int docLength,
short[][] coeffquadratic,
short[][] coeffSingular,
short[] coeffScalar)
Constructor |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RainbowPublicKeySpec
protected RainbowPublicKeySpec(java.lang.String oid,
int docLength,
short[][] coeffquadratic,
short[][] coeffSingular,
short[] coeffScalar)
- Constructor
- Parameters:
docLength - coeffquadratic - coeffSingular - coeffScalar -
RainbowPublicKeySpec
protected RainbowPublicKeySpec(java.lang.String oid,
int docLength,
byte[][] coeffQuadratic,
byte[][] coeffSingular,
byte[] coeffScalar)
- Constructor used by the
RainbowKeyFactory. It constructs internal
data types out of these bytes got from ASN.1 decoding.
- Parameters:
docLength - coeffQuadratic - coeffSingular - coeffScalar -
getAlgorithm
public final java.lang.String getAlgorithm()
- Returns:
- name of the algorithm - "Rainbow"
getOIDString
public java.lang.String getOIDString()
- Returns:
- the OID of the algorithm
getDocLength
public int getDocLength()
- Returns:
- the docLength
getCoeffquadratic
protected short[][] getCoeffquadratic()
- Returns:
- the coeffquadratic
getCoeffsingular
protected short[][] getCoeffsingular()
- Returns:
- the coeffsingular
getCoeffscalar
protected short[] getCoeffscalar()
- Returns:
- the coeffscalar
getOID
protected codec.asn1.ASN1ObjectIdentifier getOID()
- Returns:
- the OID to encode in the SubjectPublicKeyInfo structure
getKeyData
protected byte[] getKeyData()
- Return the keyData to encode in the SubjectPublicKeyInfo structure.
The ASN.1 definition of the key structure is
RainbowPublicKey ::= SEQUENCE {
oid OBJECT IDENTIFIER -- OID identifying the algorithm
docLength Integer -- length of signable msg
coeffquadratic SEQUENCE OF OCTET STRING -- quadratic (mixed) coefficients
coeffsingular SEQUENCE OF OCTET STRING -- singular coefficients
coeffscalar OCTET STRING -- scalar coefficients
}
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure