public class BCMcEliecePrivateKey
extends java.lang.Object
implements org.spongycastle.crypto.CipherParameters, java.security.PrivateKey
McElieceKeyPairGenerator or McElieceKeyFactorySpi.| Constructor and Description |
|---|
BCMcEliecePrivateKey(org.spongycastle.pqc.crypto.mceliece.McEliecePrivateKeyParameters params) |
BCMcEliecePrivateKey(McEliecePrivateKeySpec keySpec)
Constructor (used by the
McElieceKeyFactorySpi). |
BCMcEliecePrivateKey(java.lang.String oid,
int n,
int k,
org.spongycastle.pqc.math.linearalgebra.GF2mField field,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM goppaPoly,
org.spongycastle.pqc.math.linearalgebra.GF2Matrix sInv,
org.spongycastle.pqc.math.linearalgebra.Permutation p1,
org.spongycastle.pqc.math.linearalgebra.Permutation p2,
org.spongycastle.pqc.math.linearalgebra.GF2Matrix h,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] qInv)
Constructor (used by the
McElieceKeyPairGenerator). |
| 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 key data 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.McElieceParameters |
getMcElieceParameters() |
int |
getN() |
protected org.spongycastle.asn1.ASN1ObjectIdentifier |
getOID() |
java.lang.String |
getOIDString() |
org.spongycastle.pqc.math.linearalgebra.Permutation |
getP1() |
org.spongycastle.pqc.math.linearalgebra.Permutation |
getP2() |
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] |
getQInv() |
org.spongycastle.pqc.math.linearalgebra.GF2Matrix |
getSInv() |
int |
hashCode() |
java.lang.String |
toString() |
public BCMcEliecePrivateKey(java.lang.String oid,
int n,
int k,
org.spongycastle.pqc.math.linearalgebra.GF2mField field,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM goppaPoly,
org.spongycastle.pqc.math.linearalgebra.GF2Matrix sInv,
org.spongycastle.pqc.math.linearalgebra.Permutation p1,
org.spongycastle.pqc.math.linearalgebra.Permutation p2,
org.spongycastle.pqc.math.linearalgebra.GF2Matrix h,
org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] qInv)
McElieceKeyPairGenerator).oid - n - the length of the codek - the dimension of the codefield - the field polynomial defining the finite field
GF(2m)goppaPoly - the irreducible Goppa polynomialsInv - the matrix S-1p1 - the permutation used to generate the systematic check
matrixp2 - the permutation used to compute the public generator
matrixh - the canonical check matrixqInv - the matrix used to compute square roots in
(GF(2m))tpublic BCMcEliecePrivateKey(McEliecePrivateKeySpec keySpec)
McElieceKeyFactorySpi).keySpec - a McEliecePrivateKeySpecpublic BCMcEliecePrivateKey(org.spongycastle.pqc.crypto.mceliece.McEliecePrivateKeyParameters params)
public java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic int getN()
public int getK()
public org.spongycastle.pqc.math.linearalgebra.GF2mField getField()
public org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM getGoppaPoly()
public org.spongycastle.pqc.math.linearalgebra.GF2Matrix getSInv()
public org.spongycastle.pqc.math.linearalgebra.Permutation getP1()
public org.spongycastle.pqc.math.linearalgebra.Permutation getP2()
public org.spongycastle.pqc.math.linearalgebra.GF2Matrix getH()
public org.spongycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM[] getQInv()
public java.lang.String getOIDString()
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.Objectprotected org.spongycastle.asn1.ASN1ObjectIdentifier getOID()
protected org.spongycastle.asn1.ASN1Primitive getAlgParams()
public byte[] getEncoded()
McEliecePrivateKey ::= SEQUENCE {
n INTEGER -- length of the code
k INTEGER -- dimension of the code
fieldPoly OCTET STRING -- field polynomial defining GF(2ˆm)
goppaPoly OCTET STRING -- irreducible Goppa polynomial
sInv OCTET STRING -- matrix Sˆ-1
p1 OCTET STRING -- permutation P1
p2 OCTET STRING -- permutation P2
h OCTET STRING -- canonical check matrix
qInv SEQUENCE OF OCTET STRING -- matrix used to compute square roots
}
getEncoded in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic org.spongycastle.pqc.crypto.mceliece.McElieceParameters getMcElieceParameters()