1236 lines
49 KiB
Java
1236 lines
49 KiB
Java
package org.jmrtd.lds;
|
|
|
|
import android.graphics.Color;
|
|
import android.graphics.ImageFormat;
|
|
import android.graphics.PointF;
|
|
import android.os.Process;
|
|
import android.os.SystemClock;
|
|
import android.text.TextUtils;
|
|
import android.view.KeyEvent;
|
|
import android.view.View;
|
|
import android.view.ViewConfiguration;
|
|
import android.widget.ExpandableListView;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import java.lang.reflect.Method;
|
|
import java.math.BigInteger;
|
|
import java.security.spec.AlgorithmParameterSpec;
|
|
import java.security.spec.ECParameterSpec;
|
|
import javax.crypto.spec.DHParameterSpec;
|
|
import net.sf.scuba.smartcards.ISO7816;
|
|
import o.C4403bZM;
|
|
import o.xzZ;
|
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
|
import org.bouncycastle.asn1.ASN1Integer;
|
|
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.ASN1Sequence;
|
|
import org.bouncycastle.asn1.DLSequence;
|
|
import org.bouncycastle.crypto.agreement.DHStandardGroups;
|
|
import org.bouncycastle.jce.ECNamedCurveTable;
|
|
import org.bouncycastle.pqc.jcajce.spec.McElieceCCA2KeyGenParameterSpec;
|
|
import org.jmrtd.Util;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class PACEInfo extends SecurityInfo {
|
|
private static final ECParameterSpec PARAMS_ECP_BRAINPOOL_P192_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_BRAINPOOL_P224_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_BRAINPOOL_P256_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_BRAINPOOL_P320_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_BRAINPOOL_P384_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_BRAINPOOL_P512_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_NIST_P192_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_NIST_P224_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_NIST_P256_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_NIST_P384_R1;
|
|
private static final ECParameterSpec PARAMS_ECP_NIST_P521_R1;
|
|
private static final DHParameterSpec PARAMS_GFP_1024_160;
|
|
private static final DHParameterSpec PARAMS_GFP_2048_224;
|
|
private static final DHParameterSpec PARAMS_GFP_2048_256;
|
|
public static final int PARAM_ID_ECP_BRAINPOOL_P192_R1 = 9;
|
|
public static final int PARAM_ID_ECP_BRAINPOOL_P224_R1 = 11;
|
|
public static final int PARAM_ID_ECP_BRAINPOOL_P256_R1 = 13;
|
|
public static final int PARAM_ID_ECP_BRAINPOOL_P320_R1 = 14;
|
|
public static final int PARAM_ID_ECP_BRAINPOOL_P384_R1 = 16;
|
|
public static final int PARAM_ID_ECP_BRAINPOOL_P512_R1 = 17;
|
|
public static final int PARAM_ID_ECP_NIST_P192_R1 = 8;
|
|
public static final int PARAM_ID_ECP_NIST_P224_R1 = 10;
|
|
public static final int PARAM_ID_ECP_NIST_P384_R1 = 15;
|
|
public static final int PARAM_ID_ECP_NIST_P521_R1 = 18;
|
|
public static final int PARAM_ID_ECP_NST_P256_R1 = 12;
|
|
public static final int PARAM_ID_GFP_1024_160 = 0;
|
|
public static final int PARAM_ID_GFP_2048_224 = 1;
|
|
public static final int PARAM_ID_GFP_2048_256 = 2;
|
|
private static int a = 0;
|
|
private static int[] d = null;
|
|
private static final long serialVersionUID = 7960925013249578359L;
|
|
private BigInteger parameterId;
|
|
private String protocolOID;
|
|
private int version;
|
|
private static final byte[] $$a = {80, 41, ISO7816.INS_UPDATE_RECORD, 94};
|
|
private static final int $$b = 84;
|
|
private static int $10 = 0;
|
|
private static int $11 = 1;
|
|
private static int b = 0;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public enum MappingType {
|
|
GM,
|
|
IM,
|
|
CAM
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x0026 */
|
|
/* JADX WARN: Removed duplicated region for block: B:7:0x001e */
|
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0026 -> B:4:0x002a). Please report as a decompilation issue!!! */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static void e(byte r5, short r6, short r7, java.lang.Object[] r8) {
|
|
/*
|
|
byte[] r0 = org.jmrtd.lds.PACEInfo.$$a
|
|
int r5 = r5 * 2
|
|
int r5 = 104 - r5
|
|
int r7 = r7 * 2
|
|
int r1 = r7 + 1
|
|
int r6 = r6 * 4
|
|
int r6 = 3 - r6
|
|
byte[] r1 = new byte[r1]
|
|
r2 = 0
|
|
if (r0 != 0) goto L16
|
|
r4 = r7
|
|
r3 = r2
|
|
goto L2a
|
|
L16:
|
|
r3 = r2
|
|
L17:
|
|
int r6 = r6 + 1
|
|
byte r4 = (byte) r5
|
|
r1[r3] = r4
|
|
if (r3 != r7) goto L26
|
|
java.lang.String r5 = new java.lang.String
|
|
r5.<init>(r1, r2)
|
|
r8[r2] = r5
|
|
return
|
|
L26:
|
|
int r3 = r3 + 1
|
|
r4 = r0[r6]
|
|
L2a:
|
|
int r5 = r5 + r4
|
|
goto L17
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: org.jmrtd.lds.PACEInfo.e(byte, short, short, java.lang.Object[]):void");
|
|
}
|
|
|
|
static {
|
|
a = 1;
|
|
a();
|
|
PARAMS_GFP_1024_160 = Util.toExplicitDHParameterSpec(DHStandardGroups.rfc5114_1024_160);
|
|
PARAMS_GFP_2048_224 = Util.toExplicitDHParameterSpec(DHStandardGroups.rfc5114_2048_224);
|
|
PARAMS_GFP_2048_256 = Util.toExplicitDHParameterSpec(DHStandardGroups.rfc5114_2048_256);
|
|
PARAMS_ECP_NIST_P192_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("secp192r1"));
|
|
PARAMS_ECP_NIST_P224_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("secp224r1"));
|
|
PARAMS_ECP_NIST_P256_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("secp256r1"));
|
|
PARAMS_ECP_NIST_P384_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("secp384r1"));
|
|
PARAMS_ECP_NIST_P521_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("secp521r1"));
|
|
PARAMS_ECP_BRAINPOOL_P192_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("brainpoolp192r1"));
|
|
PARAMS_ECP_BRAINPOOL_P224_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("brainpoolp224r1"));
|
|
PARAMS_ECP_BRAINPOOL_P256_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("brainpoolp256r1"));
|
|
PARAMS_ECP_BRAINPOOL_P320_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("brainpoolp320r1"));
|
|
PARAMS_ECP_BRAINPOOL_P384_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("brainpoolp384r1"));
|
|
PARAMS_ECP_BRAINPOOL_P512_R1 = Util.toExplicitECParameterSpec(ECNamedCurveTable.getParameterSpec("brainpoolp512r1"));
|
|
int i = b + 53;
|
|
a = i % 128;
|
|
if (i % 2 != 0) {
|
|
return;
|
|
}
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
public PACEInfo(String str, int i, int i2) {
|
|
this(str, i, BigInteger.valueOf(i2));
|
|
}
|
|
|
|
public PACEInfo(String str, int i, BigInteger bigInteger) {
|
|
if (!checkRequiredIdentifier(str)) {
|
|
throw new IllegalArgumentException("Invalid OID");
|
|
}
|
|
if (i != 2) {
|
|
throw new IllegalArgumentException("Invalid version, must be 2");
|
|
}
|
|
int i2 = a;
|
|
int i3 = i2 + 21;
|
|
b = i3 % 128;
|
|
int i4 = i3 % 2;
|
|
this.protocolOID = str;
|
|
this.version = i;
|
|
this.parameterId = bigInteger;
|
|
int i5 = i2 + 45;
|
|
b = i5 % 128;
|
|
if (i5 % 2 != 0) {
|
|
int i6 = 45 / 0;
|
|
}
|
|
}
|
|
|
|
public static PACEInfo createPACEInfo(byte[] bArr) {
|
|
ASN1Primitive aSN1Primitive;
|
|
int i = 2 % 2;
|
|
ASN1Sequence aSN1Sequence = ASN1Sequence.getInstance(bArr);
|
|
String id = ((ASN1ObjectIdentifier) aSN1Sequence.getObjectAt(0)).getId();
|
|
ASN1Primitive aSN1Primitive2 = aSN1Sequence.getObjectAt(1).toASN1Primitive();
|
|
if (aSN1Sequence.size() == 3) {
|
|
int i2 = b + 105;
|
|
a = i2 % 128;
|
|
aSN1Primitive = (i2 % 2 == 0 ? aSN1Sequence.getObjectAt(3) : aSN1Sequence.getObjectAt(2)).toASN1Primitive();
|
|
} else {
|
|
int i3 = b + 113;
|
|
a = i3 % 128;
|
|
int i4 = i3 % 2;
|
|
aSN1Primitive = null;
|
|
}
|
|
return new PACEInfo(id, ((ASN1Integer) aSN1Primitive2).getValue().intValue(), aSN1Primitive != null ? ((ASN1Integer) aSN1Primitive).getValue() : null);
|
|
}
|
|
|
|
private static void c(int[] iArr, int i, Object[] objArr) {
|
|
int i2;
|
|
int[] iArr2;
|
|
char c;
|
|
int i3 = 2 % 2;
|
|
C4403bZM c4403bZM = new C4403bZM();
|
|
char[] cArr = new char[4];
|
|
char[] cArr2 = new char[iArr.length * 2];
|
|
int[] iArr3 = d;
|
|
int i4 = 16;
|
|
int i5 = 1;
|
|
int i6 = 0;
|
|
if (iArr3 != null) {
|
|
int i7 = $10;
|
|
int i8 = i7 + 123;
|
|
$11 = i8 % 128;
|
|
int i9 = i8 % 2;
|
|
int length = iArr3.length;
|
|
int[] iArr4 = new int[length];
|
|
int i10 = i7 + 101;
|
|
$11 = i10 % 128;
|
|
int i11 = i10 % 2;
|
|
int i12 = 0;
|
|
while (i12 < length) {
|
|
try {
|
|
Object[] objArr2 = {Integer.valueOf(iArr3[i12])};
|
|
Object obj = xzZ.y.get(729798706);
|
|
if (obj == null) {
|
|
obj = ((Class) xzZ.c(15 - (ViewConfiguration.getLongPressTimeout() >> i4), KeyEvent.normalizeMetaState(0) + 5, (char) (58134 - (ViewConfiguration.getKeyRepeatDelay() >> 16)))).getMethod("i", Integer.TYPE);
|
|
xzZ.y.put(729798706, obj);
|
|
}
|
|
iArr4[i12] = ((Integer) ((Method) obj).invoke(null, objArr2)).intValue();
|
|
i12++;
|
|
int i13 = $10 + 35;
|
|
$11 = i13 % 128;
|
|
int i14 = i13 % 2;
|
|
i4 = 16;
|
|
} catch (Throwable th) {
|
|
Throwable cause = th.getCause();
|
|
if (cause == null) {
|
|
throw th;
|
|
}
|
|
throw cause;
|
|
}
|
|
}
|
|
iArr3 = iArr4;
|
|
}
|
|
int length2 = iArr3.length;
|
|
int[] iArr5 = new int[length2];
|
|
int[] iArr6 = d;
|
|
if (iArr6 != null) {
|
|
int length3 = iArr6.length;
|
|
int[] iArr7 = new int[length3];
|
|
int i15 = 0;
|
|
while (i15 < length3) {
|
|
Object[] objArr3 = new Object[i5];
|
|
objArr3[i6] = Integer.valueOf(iArr6[i15]);
|
|
Object obj2 = xzZ.y.get(729798706);
|
|
if (obj2 != null) {
|
|
iArr2 = iArr6;
|
|
c = 55346;
|
|
} else {
|
|
obj2 = ((Class) xzZ.c(Process.getGidForName("") + 16, (SystemClock.elapsedRealtimeNanos() > 0L ? 1 : (SystemClock.elapsedRealtimeNanos() == 0L ? 0 : -1)) + 4, (char) (58133 - Process.getGidForName("")))).getMethod("i", Integer.TYPE);
|
|
iArr2 = iArr6;
|
|
c = 55346;
|
|
xzZ.y.put(729798706, obj2);
|
|
}
|
|
iArr7[i15] = ((Integer) ((Method) obj2).invoke(null, objArr3)).intValue();
|
|
i15++;
|
|
iArr6 = iArr2;
|
|
i5 = 1;
|
|
i6 = 0;
|
|
}
|
|
i2 = i6;
|
|
iArr6 = iArr7;
|
|
} else {
|
|
i2 = 0;
|
|
}
|
|
System.arraycopy(iArr6, i2, iArr5, i2, length2);
|
|
c4403bZM.b = i2;
|
|
while (c4403bZM.b < iArr.length) {
|
|
cArr[i2] = (char) (iArr[c4403bZM.b] >> 16);
|
|
cArr[1] = (char) iArr[c4403bZM.b];
|
|
cArr[2] = (char) (iArr[c4403bZM.b + 1] >> 16);
|
|
cArr[3] = (char) iArr[c4403bZM.b + 1];
|
|
c4403bZM.e = (cArr[0] << 16) + cArr[1];
|
|
c4403bZM.a = (cArr[2] << 16) + cArr[3];
|
|
C4403bZM.d(iArr5);
|
|
int i16 = 0;
|
|
for (int i17 = 16; i16 < i17; i17 = 16) {
|
|
c4403bZM.e ^= iArr5[i16];
|
|
Object[] objArr4 = {c4403bZM, Integer.valueOf(C4403bZM.d(c4403bZM.e)), c4403bZM, c4403bZM};
|
|
Object obj3 = xzZ.y.get(-1196964548);
|
|
if (obj3 == null) {
|
|
Class cls = (Class) xzZ.c((ViewConfiguration.getMinimumFlingVelocity() >> 16) + 118, 5 - ExpandableListView.getPackedPositionGroup(0L), (char) (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)));
|
|
byte b2 = (byte) 0;
|
|
byte b3 = b2;
|
|
Object[] objArr5 = new Object[1];
|
|
e(b2, b3, b3, objArr5);
|
|
obj3 = cls.getMethod((String) objArr5[0], Object.class, Integer.TYPE, Object.class, Object.class);
|
|
xzZ.y.put(-1196964548, obj3);
|
|
}
|
|
int intValue = ((Integer) ((Method) obj3).invoke(null, objArr4)).intValue();
|
|
c4403bZM.e = c4403bZM.a;
|
|
c4403bZM.a = intValue;
|
|
i16++;
|
|
}
|
|
int i18 = c4403bZM.e;
|
|
c4403bZM.e = c4403bZM.a;
|
|
c4403bZM.a = i18;
|
|
c4403bZM.a ^= iArr5[16];
|
|
c4403bZM.e ^= iArr5[17];
|
|
int i19 = c4403bZM.e;
|
|
int i20 = c4403bZM.a;
|
|
cArr[0] = (char) (c4403bZM.e >>> 16);
|
|
cArr[1] = (char) c4403bZM.e;
|
|
cArr[2] = (char) (c4403bZM.a >>> 16);
|
|
cArr[3] = (char) c4403bZM.a;
|
|
C4403bZM.d(iArr5);
|
|
cArr2[c4403bZM.b * 2] = cArr[0];
|
|
cArr2[(c4403bZM.b * 2) + 1] = cArr[1];
|
|
cArr2[(c4403bZM.b * 2) + 2] = cArr[2];
|
|
cArr2[(c4403bZM.b * 2) + 3] = cArr[3];
|
|
try {
|
|
Object[] objArr6 = {c4403bZM, c4403bZM};
|
|
Object obj4 = xzZ.y.get(1914371176);
|
|
if (obj4 == null) {
|
|
Class cls2 = (Class) xzZ.c(TextUtils.getTrimmedLength("") + 98, Color.red(0) + 5, (char) View.resolveSize(0, 0));
|
|
byte b4 = (byte) 1;
|
|
byte b5 = (byte) (b4 - 1);
|
|
Object[] objArr7 = new Object[1];
|
|
e(b4, b5, b5, objArr7);
|
|
obj4 = cls2.getMethod((String) objArr7[0], Object.class, Object.class);
|
|
xzZ.y.put(1914371176, obj4);
|
|
}
|
|
((Method) obj4).invoke(null, objArr6);
|
|
i2 = 0;
|
|
} catch (Throwable th2) {
|
|
Throwable cause2 = th2.getCause();
|
|
if (cause2 == null) {
|
|
throw th2;
|
|
}
|
|
throw cause2;
|
|
}
|
|
}
|
|
objArr[0] = new String(cArr2, 0, i);
|
|
}
|
|
|
|
@Override // org.jmrtd.lds.SecurityInfo
|
|
public String getProtocolOIDString() {
|
|
int i = 2 % 2;
|
|
int i2 = a + 101;
|
|
b = i2 % 128;
|
|
if (i2 % 2 == 0) {
|
|
return toProtocolOIDString(this.protocolOID);
|
|
}
|
|
toProtocolOIDString(this.protocolOID);
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
@Override // org.jmrtd.lds.SecurityInfo
|
|
@Deprecated
|
|
public ASN1Primitive getDERObject() {
|
|
int i = 2 % 2;
|
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
|
aSN1EncodableVector.add(new ASN1ObjectIdentifier(this.protocolOID));
|
|
aSN1EncodableVector.add(new ASN1Integer(this.version));
|
|
BigInteger bigInteger = this.parameterId;
|
|
if (bigInteger != null) {
|
|
aSN1EncodableVector.add(new ASN1Integer(bigInteger));
|
|
}
|
|
DLSequence dLSequence = new DLSequence(aSN1EncodableVector);
|
|
int i2 = a + 41;
|
|
b = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
return dLSequence;
|
|
}
|
|
|
|
public String toString() {
|
|
int i = 2 % 2;
|
|
StringBuilder sb = new StringBuilder("PACEInfo [protocol: ");
|
|
sb.append(toProtocolOIDString(this.protocolOID));
|
|
sb.append(", version: ");
|
|
sb.append(this.version);
|
|
if (this.parameterId != null) {
|
|
int i2 = a + 55;
|
|
b = i2 % 128;
|
|
if (i2 % 2 != 0) {
|
|
sb.append(", parameterId: ");
|
|
sb.append(toStandardizedParamIdString(this.parameterId));
|
|
int i3 = 1 / 0;
|
|
} else {
|
|
sb.append(", parameterId: ");
|
|
sb.append(toStandardizedParamIdString(this.parameterId));
|
|
}
|
|
}
|
|
sb.append("]");
|
|
String obj = sb.toString();
|
|
int i4 = a + 79;
|
|
b = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
return obj;
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:11:0x0028, code lost:
|
|
|
|
if (r3 == null) goto L9;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:4:0x001b, code lost:
|
|
|
|
if (r3 == null) goto L9;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:5:0x0036, code lost:
|
|
|
|
r3 = r3.hashCode();
|
|
r4 = org.jmrtd.lds.PACEInfo.a + 41;
|
|
org.jmrtd.lds.PACEInfo.b = r4 % 128;
|
|
r4 = r4 % 2;
|
|
r0 = r3;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:9:0x002a, code lost:
|
|
|
|
r3 = org.jmrtd.lds.PACEInfo.b + 95;
|
|
org.jmrtd.lds.PACEInfo.a = r3 % 128;
|
|
r3 = r3 % 2;
|
|
r0 = 1991;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public int hashCode() {
|
|
/*
|
|
r6 = this;
|
|
r0 = 2
|
|
int r1 = r0 % r0
|
|
int r1 = org.jmrtd.lds.PACEInfo.b
|
|
int r1 = r1 + 75
|
|
int r2 = r1 % 128
|
|
org.jmrtd.lds.PACEInfo.a = r2
|
|
int r1 = r1 % r0
|
|
if (r1 != 0) goto L1e
|
|
java.lang.String r1 = r6.protocolOID
|
|
int r1 = r1.hashCode()
|
|
int r2 = r6.version
|
|
java.math.BigInteger r3 = r6.parameterId
|
|
r4 = 1
|
|
int r4 = r4 / 0
|
|
if (r3 != 0) goto L36
|
|
goto L2a
|
|
L1e:
|
|
java.lang.String r1 = r6.protocolOID
|
|
int r1 = r1.hashCode()
|
|
int r2 = r6.version
|
|
java.math.BigInteger r3 = r6.parameterId
|
|
if (r3 != 0) goto L36
|
|
L2a:
|
|
int r3 = org.jmrtd.lds.PACEInfo.b
|
|
int r3 = r3 + 95
|
|
int r4 = r3 % 128
|
|
org.jmrtd.lds.PACEInfo.a = r4
|
|
int r3 = r3 % r0
|
|
r0 = 1991(0x7c7, float:2.79E-42)
|
|
goto L44
|
|
L36:
|
|
int r3 = r3.hashCode()
|
|
int r4 = org.jmrtd.lds.PACEInfo.a
|
|
int r4 = r4 + 41
|
|
int r5 = r4 % 128
|
|
org.jmrtd.lds.PACEInfo.b = r5
|
|
int r4 = r4 % r0
|
|
r0 = r3
|
|
L44:
|
|
int r1 = r1 * 7
|
|
r3 = 1234567891(0x499602d3, float:1228890.4)
|
|
int r1 = r1 + r3
|
|
int r2 = r2 * 5
|
|
int r1 = r1 + r2
|
|
int r0 = r0 * 3
|
|
int r1 = r1 + r0
|
|
return r1
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: org.jmrtd.lds.PACEInfo.hashCode():int");
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
int i = 2 % 2;
|
|
int i2 = b;
|
|
int i3 = i2 + 53;
|
|
a = i3 % 128;
|
|
if (i3 % 2 == 0) {
|
|
Object obj2 = null;
|
|
obj2.hashCode();
|
|
throw null;
|
|
}
|
|
if (obj == null) {
|
|
return false;
|
|
}
|
|
if (obj != this) {
|
|
if (PACEInfo.class.equals(obj.getClass())) {
|
|
return getDERObject().equals(((PACEInfo) obj).getDERObject());
|
|
}
|
|
return false;
|
|
}
|
|
int i4 = i2 + 7;
|
|
int i5 = i4 % 128;
|
|
a = i5;
|
|
int i6 = i4 % 2;
|
|
int i7 = i5 + 27;
|
|
b = i7 % 128;
|
|
int i8 = i7 % 2;
|
|
return true;
|
|
}
|
|
|
|
public static boolean checkRequiredIdentifier(String str) {
|
|
int i = 2 % 2;
|
|
int i2 = b + 7;
|
|
a = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
if (SecurityInfo.ID_PACE_DH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
return true;
|
|
}
|
|
int i4 = b + 109;
|
|
a = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
int i5 = 23 / 0;
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
return true;
|
|
}
|
|
} else if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
return true;
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return true;
|
|
}
|
|
int i6 = b + 117;
|
|
a = i6 % 128;
|
|
int i7 = i6 % 2;
|
|
if (SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str)) {
|
|
return true;
|
|
}
|
|
int i8 = b + 3;
|
|
a = i8 % 128;
|
|
int i9 = i8 % 2;
|
|
if (!(!SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str))) {
|
|
return true;
|
|
}
|
|
int i10 = a + 55;
|
|
b = i10 % 128;
|
|
int i11 = i10 % 2;
|
|
if (SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return true;
|
|
}
|
|
int i12 = a + 15;
|
|
b = i12 % 128;
|
|
Object obj = null;
|
|
if (i12 % 2 != 0) {
|
|
SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str);
|
|
throw null;
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str)) {
|
|
return true;
|
|
}
|
|
int i13 = a + 111;
|
|
b = i13 % 128;
|
|
if (i13 % 2 != 0) {
|
|
SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str);
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
if (!(!SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str)) || !(!SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(str)) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(str)) {
|
|
return true;
|
|
}
|
|
int i14 = a + 111;
|
|
b = i14 % 128;
|
|
int i15 = i14 % 2;
|
|
if (SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(str)) {
|
|
return true;
|
|
}
|
|
int i16 = b + 69;
|
|
a = i16 % 128;
|
|
int i17 = i16 % 2;
|
|
return SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str);
|
|
}
|
|
|
|
public static MappingType toMappingType(String str) {
|
|
int i = 2 % 2;
|
|
if (!SecurityInfo.ID_PACE_DH_GM_3DES_CBC_CBC.equals(str) && !SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str) && !SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i2 = a + 107;
|
|
b = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
if (!SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
int i4 = b + 109;
|
|
a = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
if (!SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(str) && (!SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(str)) && !SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(str) && !SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
int i6 = b + 117;
|
|
a = i6 % 128;
|
|
int i7 = i6 % 2;
|
|
if (!SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(str) && !SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(str) && !SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i8 = b + 65;
|
|
a = i8 % 128;
|
|
if (i8 % 2 == 0) {
|
|
SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str);
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
if (!SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str) && !SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(str) && !SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str) && !SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str) && !SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(str)) {
|
|
if (SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str)) {
|
|
return MappingType.CAM;
|
|
}
|
|
StringBuilder sb = new StringBuilder("Unknown OID: \"");
|
|
sb.append(str);
|
|
sb.append("\"");
|
|
throw new NumberFormatException(sb.toString());
|
|
}
|
|
}
|
|
return MappingType.IM;
|
|
}
|
|
}
|
|
}
|
|
return MappingType.GM;
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:10:0x003b, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(r5) != false) goto L60;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:12:0x0043, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(r5) != false) goto L60;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:13:0x0045, code lost:
|
|
|
|
r1 = org.jmrtd.lds.PACEInfo.a + 103;
|
|
org.jmrtd.lds.PACEInfo.b = r1 % 128;
|
|
r4 = null;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:14:0x0051, code lost:
|
|
|
|
if ((r1 % 2) != 0) goto L58;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:16:0x0057, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(r5) != false) goto L60;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:18:0x005f, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(r5) != false) goto L60;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:20:0x0067, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(r5) != false) goto L60;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:22:0x006f, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(r5) != false) goto L56;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:24:0x0077, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(r5) != false) goto L62;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:26:0x007f, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(r5) != false) goto L63;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:28:0x0087, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(r5) != false) goto L64;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:30:0x008f, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(r5) != false) goto L65;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:31:0x0091, code lost:
|
|
|
|
r1 = org.jmrtd.lds.PACEInfo.a + 49;
|
|
org.jmrtd.lds.PACEInfo.b = r1 % 128;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:32:0x009c, code lost:
|
|
|
|
if ((r1 % 2) != 0) goto L54;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:34:0x00a2, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(r5) == false) goto L41;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:36:0x00ab, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(r5) == true) goto L66;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:37:0x00ad, code lost:
|
|
|
|
r1 = org.jmrtd.lds.PACEInfo.a + 65;
|
|
org.jmrtd.lds.PACEInfo.b = r1 % 128;
|
|
r1 = r1 % 2;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:38:0x00bc, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(r5) != false) goto L67;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:40:0x00c4, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(r5) != false) goto L68;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:42:0x00cc, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(r5) != false) goto L69;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:44:0x00d4, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(r5) == false) goto L52;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:45:0x00d7, code lost:
|
|
|
|
r1 = new java.lang.StringBuilder("Unknown OID: \"");
|
|
r1.append(r5);
|
|
r1.append("\"");
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:46:0x00ef, code lost:
|
|
|
|
throw new java.lang.NumberFormatException(r1.toString());
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:48:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:49:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:50:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:51:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:52:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:53:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:54:0x00f0, code lost:
|
|
|
|
org.jmrtd.lds.SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(r5);
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:55:0x00f3, code lost:
|
|
|
|
throw null;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:56:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:57:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:58:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:59:?, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:60:0x00f4, code lost:
|
|
|
|
return "ECDH";
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:61:0x00f7, code lost:
|
|
|
|
org.jmrtd.lds.SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(r5);
|
|
r4.hashCode();
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:62:0x00fd, code lost:
|
|
|
|
throw null;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:64:0x0027, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(r5) == false) goto L11;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:6:0x0020, code lost:
|
|
|
|
if (org.jmrtd.lds.SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(r5) == false) goto L11;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:8:0x0031, code lost:
|
|
|
|
if ((!org.jmrtd.lds.SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(r5)) == true) goto L14;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public static java.lang.String toKeyAgreementAlgorithm(java.lang.String r5) {
|
|
/*
|
|
Method dump skipped, instructions count: 266
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: org.jmrtd.lds.PACEInfo.toKeyAgreementAlgorithm(java.lang.String):java.lang.String");
|
|
}
|
|
|
|
public static String toCipherAlgorithm(String str) {
|
|
int i = 2 % 2;
|
|
if (SecurityInfo.ID_PACE_DH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return "DESede";
|
|
}
|
|
int i2 = a + 49;
|
|
b = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
if (SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return "DESede";
|
|
}
|
|
int i4 = a + 105;
|
|
b = i4 % 128;
|
|
if (i4 % 2 != 0) {
|
|
int i5 = 46 / 0;
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "AES";
|
|
}
|
|
} else if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "AES";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
return "AES";
|
|
}
|
|
int i6 = b + 75;
|
|
a = i6 % 128;
|
|
if (i6 % 2 == 0) {
|
|
int i7 = 25 / 0;
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "AES";
|
|
}
|
|
} else if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "AES";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(str)) {
|
|
return "AES";
|
|
}
|
|
int i8 = a + 65;
|
|
b = i8 % 128;
|
|
if (i8 % 2 != 0) {
|
|
int i9 = 80 / 0;
|
|
if (SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str)) {
|
|
return "AES";
|
|
}
|
|
} else if (SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str)) {
|
|
return "AES";
|
|
}
|
|
StringBuilder sb = new StringBuilder("Unknown OID: \"");
|
|
sb.append(str);
|
|
sb.append("\"");
|
|
throw new NumberFormatException(sb.toString());
|
|
}
|
|
|
|
public static String toDigestAlgorithm(String str) {
|
|
int i = 2 % 2;
|
|
if (SecurityInfo.ID_PACE_DH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return McElieceCCA2KeyGenParameterSpec.SHA1;
|
|
}
|
|
int i2 = a + 77;
|
|
b = i2 % 128;
|
|
Object obj = null;
|
|
if (i2 % 2 != 0) {
|
|
SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str);
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str) || !(!SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(str)) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(str)) {
|
|
return McElieceCCA2KeyGenParameterSpec.SHA1;
|
|
}
|
|
if (!SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i3 = b + 117;
|
|
a = i3 % 128;
|
|
if (i3 % 2 == 0) {
|
|
SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str);
|
|
throw null;
|
|
}
|
|
if (!SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str) && !SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i4 = a + 63;
|
|
b = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
if (!SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i6 = b + 31;
|
|
a = i6 % 128;
|
|
int i7 = i6 % 2;
|
|
if (!SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(str) && !SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str) && !SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str) && !SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
int i8 = a + 37;
|
|
b = i8 % 128;
|
|
int i9 = i8 % 2;
|
|
if (!SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(str)) {
|
|
int i10 = b + 25;
|
|
a = i10 % 128;
|
|
if (i10 % 2 == 0) {
|
|
SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str);
|
|
throw null;
|
|
}
|
|
if (!SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str)) {
|
|
StringBuilder sb = new StringBuilder("Unknown OID: \"");
|
|
sb.append(str);
|
|
sb.append("\"");
|
|
throw new NumberFormatException(sb.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
int i11 = a + 85;
|
|
b = i11 % 128;
|
|
if (i11 % 2 != 0) {
|
|
int i12 = 95 / 0;
|
|
}
|
|
return McElieceCCA2KeyGenParameterSpec.SHA256;
|
|
}
|
|
|
|
public static int toKeyLength(String str) {
|
|
int i = 2 % 2;
|
|
if (SecurityInfo.ID_PACE_DH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return 128;
|
|
}
|
|
int i2 = a + 109;
|
|
b = i2 % 128;
|
|
Object obj = null;
|
|
if (i2 % 2 == 0) {
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(str)) {
|
|
return 128;
|
|
}
|
|
int i3 = a + 55;
|
|
b = i3 % 128;
|
|
if (i3 % 2 == 0) {
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(str)) {
|
|
return 128;
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
return 192;
|
|
}
|
|
int i4 = a + 21;
|
|
b = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
if (SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(str)) {
|
|
return 192;
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(str) || SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str)) {
|
|
return 256;
|
|
}
|
|
StringBuilder sb = new StringBuilder("Unknown OID: \"");
|
|
sb.append(str);
|
|
sb.append("\"");
|
|
throw new NumberFormatException(sb.toString());
|
|
}
|
|
SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str);
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str);
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
public static AlgorithmParameterSpec toParameterSpec(BigInteger bigInteger) {
|
|
int i = 2 % 2;
|
|
int i2 = a + 31;
|
|
b = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
int intValue = bigInteger.intValue();
|
|
if (i3 != 0) {
|
|
toParameterSpec(intValue);
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
AlgorithmParameterSpec parameterSpec = toParameterSpec(intValue);
|
|
int i4 = a + 59;
|
|
b = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
return parameterSpec;
|
|
}
|
|
|
|
public static AlgorithmParameterSpec toParameterSpec(int i) {
|
|
int i2 = 2 % 2;
|
|
int i3 = b + 33;
|
|
int i4 = i3 % 128;
|
|
a = i4;
|
|
int i5 = i3 % 2;
|
|
if (i == 0) {
|
|
return PARAMS_GFP_1024_160;
|
|
}
|
|
if (i == 1) {
|
|
return PARAMS_GFP_2048_224;
|
|
}
|
|
if (i == 2) {
|
|
return PARAMS_GFP_2048_256;
|
|
}
|
|
switch (i) {
|
|
case 8:
|
|
return PARAMS_ECP_NIST_P192_R1;
|
|
case 9:
|
|
return PARAMS_ECP_BRAINPOOL_P192_R1;
|
|
case 10:
|
|
return PARAMS_ECP_NIST_P224_R1;
|
|
case 11:
|
|
return PARAMS_ECP_BRAINPOOL_P224_R1;
|
|
case 12:
|
|
ECParameterSpec eCParameterSpec = PARAMS_ECP_NIST_P256_R1;
|
|
int i6 = i4 + 57;
|
|
b = i6 % 128;
|
|
if (i6 % 2 != 0) {
|
|
int i7 = 47 / 0;
|
|
}
|
|
return eCParameterSpec;
|
|
case 13:
|
|
return PARAMS_ECP_BRAINPOOL_P256_R1;
|
|
case 14:
|
|
ECParameterSpec eCParameterSpec2 = PARAMS_ECP_BRAINPOOL_P320_R1;
|
|
int i8 = i4 + 73;
|
|
b = i8 % 128;
|
|
if (i8 % 2 == 0) {
|
|
return eCParameterSpec2;
|
|
}
|
|
throw null;
|
|
case 15:
|
|
return PARAMS_ECP_NIST_P384_R1;
|
|
case 16:
|
|
return PARAMS_ECP_BRAINPOOL_P384_R1;
|
|
case 17:
|
|
return PARAMS_ECP_BRAINPOOL_P512_R1;
|
|
case 18:
|
|
return PARAMS_ECP_NIST_P521_R1;
|
|
default:
|
|
throw new NumberFormatException("Unknown standardized domain parameters ".concat(String.valueOf(i)));
|
|
}
|
|
}
|
|
|
|
public static String toStandardizedParamIdString(BigInteger bigInteger) {
|
|
int i = 2 % 2;
|
|
if (bigInteger == null) {
|
|
int i2 = b + 47;
|
|
a = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
Object[] objArr = new Object[1];
|
|
c(new int[]{94732971, -1580175622}, 3 - ImageFormat.getBitsPerPixel(0), objArr);
|
|
return ((String) objArr[0]).intern();
|
|
}
|
|
int intValue = bigInteger.intValue();
|
|
if (intValue == 0) {
|
|
return "1024-bit MODP Group with 160-bit Prime Order Subgroup";
|
|
}
|
|
int i4 = a;
|
|
int i5 = i4 + 21;
|
|
b = i5 % 128;
|
|
int i6 = i5 % 2;
|
|
if (intValue == 1) {
|
|
return "2048-bit MODP Group with 224-bit Prime Order Subgroup";
|
|
}
|
|
if (intValue == 2) {
|
|
return "2048-bit MODP Group with 256-bit Prime Order Subgroup";
|
|
}
|
|
switch (intValue) {
|
|
case 8:
|
|
return "NIST P-192 (secp192r1)";
|
|
case 9:
|
|
return "BrainpoolP192r1";
|
|
case 10:
|
|
return "NIST P-224 (secp224r1)";
|
|
case 11:
|
|
return "BrainpoolP224r1";
|
|
case 12:
|
|
return "NIST P-256 (secp256r1)";
|
|
case 13:
|
|
return "BrainpoolP256r1";
|
|
case 14:
|
|
return "BrainpoolP320r1";
|
|
case 15:
|
|
return "NIST P-384 (secp384r1)";
|
|
case 16:
|
|
return "BrainpoolP384r1";
|
|
case 17:
|
|
int i7 = i4 + 97;
|
|
b = i7 % 128;
|
|
if (i7 % 2 != 0) {
|
|
int i8 = 50 / 0;
|
|
}
|
|
return "BrainpoolP512r1";
|
|
case 18:
|
|
return "NIST P-521 (secp521r1)";
|
|
default:
|
|
return bigInteger.toString();
|
|
}
|
|
}
|
|
|
|
private String toProtocolOIDString(String str) {
|
|
int i = 2 % 2;
|
|
if (!(!SecurityInfo.ID_PACE_DH_GM_3DES_CBC_CBC.equals(str))) {
|
|
return "id-PACE-DH-GM-3DES-CBC-CBC";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_128.equals(str)) {
|
|
int i2 = a + 87;
|
|
b = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
return "id-PACE-DH-GM-AES-CBC-CMAC-128";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
return "id-PACE-DH-GM-AES-CBC-CMAC-192";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
int i4 = b + 111;
|
|
a = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
int i5 = 83 / 0;
|
|
}
|
|
return "id-PACE-DH-GM-AES-CBC-CMAC-256";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_IM_3DES_CBC_CBC.equals(str)) {
|
|
int i6 = b + 107;
|
|
a = i6 % 128;
|
|
if (i6 % 2 == 0) {
|
|
int i7 = 6 / 0;
|
|
}
|
|
return "id-PACE-DH-IM-3DES-CBC-CBC";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "id-PACE-DH-IM-AES-CBC-CMAC-128";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_192.equals(str)) {
|
|
return "id-PACE-DH-IM-AES-CBC-CMAC-192";
|
|
}
|
|
if (SecurityInfo.ID_PACE_DH_IM_AES_CBC_CMAC_256.equals(str)) {
|
|
return "id-PACE_DH-IM-AES-CBC-CMAC-256";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_GM_3DES_CBC_CBC.equals(str)) {
|
|
int i8 = b + 25;
|
|
a = i8 % 128;
|
|
if (i8 % 2 == 0) {
|
|
int i9 = 60 / 0;
|
|
}
|
|
return "id-PACE-ECDH-GM-3DES-CBC-CBC";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_128.equals(str)) {
|
|
int i10 = b + 31;
|
|
a = i10 % 128;
|
|
if (i10 % 2 == 0) {
|
|
int i11 = 89 / 0;
|
|
}
|
|
return "id-PACE-ECDH-GM-AES-CBC-CMAC-128";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i12 = b + 109;
|
|
a = i12 % 128;
|
|
if (i12 % 2 != 0) {
|
|
return "id-PACE-ECDH-GM-AES-CBC-CMAC-192";
|
|
}
|
|
throw null;
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_GM_AES_CBC_CMAC_256.equals(str)) {
|
|
return "id-PACE-ECDH-GM-AES-CBC-CMAC-256";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_3DES_CBC_CBC.equals(str)) {
|
|
return "id-PACE-ECDH-IM_3DES-CBC-CBC";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "id-PACE-ECDH-IM-AES-CBC-CMAC-128";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_192.equals(str)) {
|
|
int i13 = b + 51;
|
|
a = i13 % 128;
|
|
int i14 = i13 % 2;
|
|
return "id-PACE-ECDH-IM-AES-CBC-CMAC-192";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_IM_AES_CBC_CMAC_256.equals(str)) {
|
|
return "id-PACE-ECDH-IM-AES-CBC-CMAC-256";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_128.equals(str)) {
|
|
return "id-PACE-ECDH-CAM-AES-CBC-CMAC-128";
|
|
}
|
|
if (SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_192.equals(str)) {
|
|
return "id-PACE-ECDH-CAM-AES-CBC-CMAC-192";
|
|
}
|
|
if (!SecurityInfo.ID_PACE_ECDH_CAM_AES_CBC_CMAC_256.equals(str)) {
|
|
return str;
|
|
}
|
|
int i15 = a + 49;
|
|
b = i15 % 128;
|
|
int i16 = i15 % 2;
|
|
return "id-PACE-ECDH-CAM-AES-CBC-CMAC-256";
|
|
}
|
|
|
|
static void a() {
|
|
d = new int[]{-845880487, 1153436149, -1462948328, -1822567609, -914580631, 49973616, -725071608, 1358589175, -1509041285, -1615345995, -1606635576, 640445573, 1816793894, -1723122389, -846353345, 841097862, 1786274429, -1999305052};
|
|
}
|
|
|
|
public int getVersion() {
|
|
int i = 2 % 2;
|
|
int i2 = a + 75;
|
|
int i3 = i2 % 128;
|
|
b = i3;
|
|
int i4 = i2 % 2;
|
|
int i5 = this.version;
|
|
int i6 = i3 + 87;
|
|
a = i6 % 128;
|
|
if (i6 % 2 != 0) {
|
|
return i5;
|
|
}
|
|
throw null;
|
|
}
|
|
|
|
public BigInteger getParameterId() {
|
|
int i = 2 % 2;
|
|
int i2 = b + 57;
|
|
a = i2 % 128;
|
|
if (i2 % 2 != 0) {
|
|
return this.parameterId;
|
|
}
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
@Override // org.jmrtd.lds.SecurityInfo
|
|
public String getObjectIdentifier() {
|
|
int i = 2 % 2;
|
|
int i2 = b + 37;
|
|
a = i2 % 128;
|
|
if (i2 % 2 != 0) {
|
|
return this.protocolOID;
|
|
}
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
}
|