63 lines
1.8 KiB
Java
63 lines
1.8 KiB
Java
package org.bouncycastle.pqc.crypto.mceliece;
|
|
|
|
import org.bouncycastle.pqc.math.linearalgebra.GF2Matrix;
|
|
import org.bouncycastle.pqc.math.linearalgebra.GF2mField;
|
|
import org.bouncycastle.pqc.math.linearalgebra.GoppaCode;
|
|
import org.bouncycastle.pqc.math.linearalgebra.Permutation;
|
|
import org.bouncycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM;
|
|
import org.bouncycastle.pqc.math.linearalgebra.PolynomialRingGF2m;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class McElieceCCA2PrivateKeyParameters extends McElieceCCA2KeyParameters {
|
|
private GF2mField field;
|
|
private PolynomialGF2mSmallM goppaPoly;
|
|
private GF2Matrix h;
|
|
private int k;
|
|
private int n;
|
|
private Permutation p;
|
|
private PolynomialGF2mSmallM[] qInv;
|
|
|
|
public int getT() {
|
|
return this.goppaPoly.getDegree();
|
|
}
|
|
|
|
public PolynomialGF2mSmallM[] getQInv() {
|
|
return this.qInv;
|
|
}
|
|
|
|
public Permutation getP() {
|
|
return this.p;
|
|
}
|
|
|
|
public int getN() {
|
|
return this.n;
|
|
}
|
|
|
|
public int getK() {
|
|
return this.k;
|
|
}
|
|
|
|
public GF2Matrix getH() {
|
|
return this.h;
|
|
}
|
|
|
|
public PolynomialGF2mSmallM getGoppaPoly() {
|
|
return this.goppaPoly;
|
|
}
|
|
|
|
public GF2mField getField() {
|
|
return this.field;
|
|
}
|
|
|
|
public McElieceCCA2PrivateKeyParameters(int i, int i2, GF2mField gF2mField, PolynomialGF2mSmallM polynomialGF2mSmallM, Permutation permutation, String str) {
|
|
super(true, str);
|
|
this.n = i;
|
|
this.k = i2;
|
|
this.field = gF2mField;
|
|
this.goppaPoly = polynomialGF2mSmallM;
|
|
this.p = permutation;
|
|
this.h = GoppaCode.createCanonicalCheckMatrix(gF2mField, polynomialGF2mSmallM);
|
|
this.qInv = new PolynomialRingGF2m(gF2mField, polynomialGF2mSmallM).getSquareRootMatrix();
|
|
}
|
|
}
|