Class BCMcElieceCCA2PrivateKey
java.lang.Object
org.bouncycastle.pqc.jcajce.provider.mceliece.BCMcElieceCCA2PrivateKey
- All Implemented Interfaces:
Serializable
,Key
,PrivateKey
,Destroyable
This class implements a McEliece CCA2 private key and is usually instantiated
by the
McElieceCCA2KeyPairGenerator
or McElieceCCA2KeyFactorySpi
.- See Also:
-
Constructor Details
-
BCMcElieceCCA2PrivateKey
-
-
Method Details
-
getAlgorithm
Return the name of the algorithm.- Specified by:
getAlgorithm
in interfaceKey
- Returns:
- "McEliece-CCA2"
-
getN
public int getN()- Returns:
- the length of the code
-
getK
public int getK()- Returns:
- the dimension of the code
-
getT
public int getT()- Returns:
- the degree of the Goppa polynomial (error correcting capability)
-
getField
- Returns:
- the finite field
-
getGoppaPoly
- Returns:
- the irreducible Goppa polynomial
-
getP
- Returns:
- the permutation vector
-
getH
- Returns:
- the canonical check matrix
-
getQInv
- Returns:
- the matrix used to compute square roots in (GF(2^m))^t
-
equals
Compare this key with another object. -
hashCode
public int hashCode() -
getEncoded
public byte[] getEncoded()Return the keyData to encode in the SubjectPublicKeyInfo structure.The ASN.1 definition of the key structure is
McEliecePrivateKey ::= SEQUENCE { m INTEGER -- extension degree of the field k INTEGER -- dimension of the code field OCTET STRING -- field polynomial goppaPoly OCTET STRING -- irreducible Goppa polynomial p OCTET STRING -- permutation vector matrixH OCTET STRING -- canonical check matrix sqRootMatrix SEQUENCE OF OCTET STRING -- square root matrix }
- Specified by:
getEncoded
in interfaceKey
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure
-
getFormat
-