what-the-bank/sources/org/bouncycastle/math/ec/custom/sec/SecT131R2Curve.java

85 lines
2.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
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;
import org.jmrtd.cbeff.ISO781611;
/* loaded from: classes6.dex */
public class SecT131R2Curve extends ECCurve.AbstractF2m {
private static final int SecT131R2_DEFAULT_COORDS = 6;
protected SecT131R2Point infinity;
@Override // org.bouncycastle.math.ec.ECCurve
public int getFieldSize() {
return ISO781611.CREATION_DATE_AND_TIME_TAG;
}
public int getK1() {
return 2;
}
public int getK2() {
return 3;
}
public int getK3() {
return 8;
}
public int getM() {
return ISO781611.CREATION_DATE_AND_TIME_TAG;
}
@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 SecT131FieldElement(bigInteger);
}
@Override // org.bouncycastle.math.ec.ECCurve
public ECPoint createRawPoint(ECFieldElement eCFieldElement, ECFieldElement eCFieldElement2, ECFieldElement[] eCFieldElementArr, boolean z) {
return new SecT131R2Point(this, eCFieldElement, eCFieldElement2, eCFieldElementArr, z);
}
@Override // org.bouncycastle.math.ec.ECCurve
public ECPoint createRawPoint(ECFieldElement eCFieldElement, ECFieldElement eCFieldElement2, boolean z) {
return new SecT131R2Point(this, eCFieldElement, eCFieldElement2, z);
}
@Override // org.bouncycastle.math.ec.ECCurve
public ECCurve cloneCurve() {
return new SecT131R2Curve();
}
public SecT131R2Curve() {
super(ISO781611.CREATION_DATE_AND_TIME_TAG, 2, 3, 8);
this.infinity = new SecT131R2Point(this, null, null);
this.a = fromBigInteger(new BigInteger(1, Hex.decode("03E5A88919D7CAFCBF415F07C2176573B2")));
this.b = fromBigInteger(new BigInteger(1, Hex.decode("04B8266A46C55657AC734CE38F018F2192")));
this.order = new BigInteger(1, Hex.decode("0400000000000000016954A233049BA98F"));
this.cofactor = BigInteger.valueOf(2L);
this.coord = 6;
}
}