92 lines
3.0 KiB
Java
92 lines
3.0 KiB
Java
package org.bouncycastle.math.ec.custom.sec;
|
|
|
|
import java.math.BigInteger;
|
|
import org.bouncycastle.math.ec.ECCurve;
|
|
import org.bouncycastle.math.ec.ECFieldElement;
|
|
import org.bouncycastle.math.ec.ECPoint;
|
|
import org.bouncycastle.util.encoders.Hex;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class SecT571R1Curve extends ECCurve.AbstractF2m {
|
|
static final SecT571FieldElement SecT571R1_B;
|
|
static final SecT571FieldElement SecT571R1_B_SQRT;
|
|
private static final int SecT571R1_DEFAULT_COORDS = 6;
|
|
protected SecT571R1Point infinity;
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public int getFieldSize() {
|
|
return 571;
|
|
}
|
|
|
|
public int getK1() {
|
|
return 2;
|
|
}
|
|
|
|
public int getK2() {
|
|
return 5;
|
|
}
|
|
|
|
public int getK3() {
|
|
return 10;
|
|
}
|
|
|
|
public int getM() {
|
|
return 571;
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve.AbstractF2m
|
|
public boolean isKoblitz() {
|
|
return false;
|
|
}
|
|
|
|
public boolean isTrinomial() {
|
|
return false;
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public boolean supportsCoordinateSystem(int i) {
|
|
return i == 6;
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public ECPoint getInfinity() {
|
|
return this.infinity;
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public ECFieldElement fromBigInteger(BigInteger bigInteger) {
|
|
return new SecT571FieldElement(bigInteger);
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public ECPoint createRawPoint(ECFieldElement eCFieldElement, ECFieldElement eCFieldElement2, ECFieldElement[] eCFieldElementArr, boolean z) {
|
|
return new SecT571R1Point(this, eCFieldElement, eCFieldElement2, eCFieldElementArr, z);
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public ECPoint createRawPoint(ECFieldElement eCFieldElement, ECFieldElement eCFieldElement2, boolean z) {
|
|
return new SecT571R1Point(this, eCFieldElement, eCFieldElement2, z);
|
|
}
|
|
|
|
@Override // org.bouncycastle.math.ec.ECCurve
|
|
public ECCurve cloneCurve() {
|
|
return new SecT571R1Curve();
|
|
}
|
|
|
|
public SecT571R1Curve() {
|
|
super(571, 2, 5, 10);
|
|
this.infinity = new SecT571R1Point(this, null, null);
|
|
this.a = fromBigInteger(BigInteger.valueOf(1L));
|
|
this.b = SecT571R1_B;
|
|
this.order = new BigInteger(1, Hex.decode("03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47"));
|
|
this.cofactor = BigInteger.valueOf(2L);
|
|
this.coord = 6;
|
|
}
|
|
|
|
static {
|
|
SecT571FieldElement secT571FieldElement = new SecT571FieldElement(new BigInteger(1, Hex.decode("02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A")));
|
|
SecT571R1_B = secT571FieldElement;
|
|
SecT571R1_B_SQRT = (SecT571FieldElement) secT571FieldElement.sqrt();
|
|
}
|
|
}
|