public class BCMcElieceCCA2PrivateKey
extends java.lang.Object
implements org.spongycastle.crypto.CipherParameters, java.security.PrivateKey
McElieceCCA2KeyPairGenerator or McElieceCCA2KeyFactorySpi.McElieceCCA2KeyPairGenerator,
Serialized Form| Constructor and Description |
|---|
BCMcElieceCCA2PrivateKey(org.spongycastle.pqc.crypto.mceliece.McElieceCCA2PrivateKeyParameters params) |
BCMcElieceCCA2PrivateKey(McElieceCCA2PrivateKeySpec keySpec)
Constructor (used by the
McElieceCCA2KeyFactorySpi). |
BCMcElieceCCA2PrivateKey(java.lang.String oid,
int n,
int k,
org.spongycastle.pqc.math.linearalgebra.GF2mField field,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM gp,
org.spongycastle.pqc.math.linearalgebra.Permutation p,
org.spongycastle.pqc.math.linearalgebra.GF2Matrix h,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] qInv)
Constructor (used by the
McElieceCCA2KeyPairGenerator). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Compare this key with another object.
|
java.lang.String |
getAlgorithm()
Return the name of the algorithm.
|
protected org.spongycastle.asn1.ASN1Primitive |
getAlgParams() |
byte[] |
getEncoded()
Return the keyData to encode in the SubjectPublicKeyInfo structure.
|
org.spongycastle.pqc.math.linearalgebra.GF2mField |
getField() |
java.lang.String |
getFormat() |
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM |
getGoppaPoly() |
org.spongycastle.pqc.math.linearalgebra.GF2Matrix |
getH() |
int |
getK() |
org.spongycastle.pqc.crypto.mceliece.McElieceCCA2Parameters |
getMcElieceCCA2Parameters() |
int |
getN() |
protected org.spongycastle.asn1.ASN1ObjectIdentifier |
getOID() |
java.lang.String |
getOIDString() |
org.spongycastle.pqc.math.linearalgebra.Permutation |
getP() |
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] |
getQInv() |
int |
getT() |
int |
hashCode() |
java.lang.String |
toString() |
public BCMcElieceCCA2PrivateKey(java.lang.String oid,
int n,
int k,
org.spongycastle.pqc.math.linearalgebra.GF2mField field,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM gp,
org.spongycastle.pqc.math.linearalgebra.Permutation p,
org.spongycastle.pqc.math.linearalgebra.GF2Matrix h,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] qInv)
McElieceCCA2KeyPairGenerator).n - the length of the codek - the dimension of the codefield - the field polynomialgp - the irreducible Goppa polynomialp - the permutationh - the canonical check matrixqInv - the matrix used to compute square roots in
(GF(2^m))^tpublic BCMcElieceCCA2PrivateKey(McElieceCCA2PrivateKeySpec keySpec)
McElieceCCA2KeyFactorySpi).keySpec - a McElieceCCA2PrivateKeySpecpublic BCMcElieceCCA2PrivateKey(org.spongycastle.pqc.crypto.mceliece.McElieceCCA2PrivateKeyParameters params)
public java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic int getN()
public int getK()
public int getT()
public org.spongycastle.pqc.math.linearalgebra.GF2mField getField()
public org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM getGoppaPoly()
public org.spongycastle.pqc.math.linearalgebra.Permutation getP()
public org.spongycastle.pqc.math.linearalgebra.GF2Matrix getH()
public org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] getQInv()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getOIDString()
protected org.spongycastle.asn1.ASN1ObjectIdentifier getOID()
protected org.spongycastle.asn1.ASN1Primitive getAlgParams()
public byte[] getEncoded()
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
}
getEncoded in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic org.spongycastle.pqc.crypto.mceliece.McElieceCCA2Parameters getMcElieceCCA2Parameters()