Class BCRainbowPublicKey
java.lang.Object
org.bouncycastle.pqc.jcajce.provider.rainbow.BCRainbowPublicKey
- All Implemented Interfaces:
Serializable
,Key
,PublicKey
This class implements CipherParameters and PublicKey.
The public key in Rainbow consists of n - v1 polynomial components of the private key's F and the field structure of the finite field k.
The quadratic (or mixed) coefficients of the polynomials from the public key are stored in the 2-dimensional array in lexicographical order, requiring n * (n + 1) / 2 entries for each polynomial. The singular terms are stored in a 2-dimensional array requiring n entries per polynomial, the scalar term of each polynomial is stored in a 1-dimensional array.
More detailed information on the public key is to be found in the paper of Jintai Ding, Dieter Schmidt: Rainbow, a New Multivariable Polynomial Signature Scheme. ACNS 2005: 164-175 (https://dx.doi.org/10.1007/11496137_12)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBCRainbowPublicKey
(int docLength, short[][] coeffQuadratic, short[][] coeffSingular, short[] coeffScalar) ConstructorBCRainbowPublicKey
(RainbowPublicKeySpec keySpec) Constructor (used by theRainbowKeyFactorySpi
). -
Method Summary
-
Constructor Details
-
BCRainbowPublicKey
public BCRainbowPublicKey(int docLength, short[][] coeffQuadratic, short[][] coeffSingular, short[] coeffScalar) Constructor- Parameters:
docLength
-coeffQuadratic
-coeffSingular
-coeffScalar
-
-
BCRainbowPublicKey
Constructor (used by theRainbowKeyFactorySpi
).- Parameters:
keySpec
- aRainbowPublicKeySpec
-
BCRainbowPublicKey
-
-
Method Details
-
getDocLength
public int getDocLength()- Returns:
- the docLength
-
getCoeffQuadratic
public short[][] getCoeffQuadratic()- Returns:
- the coeffQuadratic
-
getCoeffSingular
public short[][] getCoeffSingular()- Returns:
- the coeffSingular
-
getCoeffScalar
public short[] getCoeffScalar()- Returns:
- the coeffScalar
-
equals
Compare this Rainbow public key with another object. -
hashCode
public int hashCode() -
getAlgorithm
- Specified by:
getAlgorithm
in interfaceKey
- Returns:
- name of the algorithm - "Rainbow"
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncoded
in interfaceKey
-