Class BCMcElieceCCA2PublicKey
- java.lang.Object
-
- org.bouncycastle.pqc.jcajce.provider.mceliece.BCMcElieceCCA2PublicKey
-
- All Implemented Interfaces:
Serializable
,Key
,PublicKey
,CipherParameters
public class BCMcElieceCCA2PublicKey extends Object implements CipherParameters, PublicKey
This class implements a McEliece CCA2 public key and is usually instantiated by theMcElieceCCA2KeyPairGenerator
orMcElieceCCA2KeyFactorySpi
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BCMcElieceCCA2PublicKey(McElieceCCA2PublicKeyParameters params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Compare this key with another object.String
getAlgorithm()
Return the name of the algorithm.byte[]
getEncoded()
Return the keyData to encode in the SubjectPublicKeyInfo structure.String
getFormat()
GF2Matrix
getG()
int
getK()
int
getN()
int
getT()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
BCMcElieceCCA2PublicKey
public BCMcElieceCCA2PublicKey(McElieceCCA2PublicKeyParameters params)
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
Return the name of the algorithm.- Specified by:
getAlgorithm
in interfaceKey
- Returns:
- "McEliece"
-
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 error correction capability of the code
-
getG
public GF2Matrix getG()
- Returns:
- the generator matrix
-
toString
public String toString()
-
equals
public boolean equals(Object other)
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
McEliecePublicKey ::= SEQUENCE { n Integer -- length of the code t Integer -- error correcting capability matrixG OctetString -- generator matrix as octet string }
- Specified by:
getEncoded
in interfaceKey
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure
-
-