package org.bouncycastle.pqc.math.linearalgebra; import android.graphics.Color; import android.graphics.PointF; import android.telephony.cdma.CdmaCellLocation; import android.text.TextUtils; import android.util.TypedValue; import android.view.Gravity; import android.view.View; import android.view.ViewConfiguration; import android.widget.ExpandableListView; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.common.base.Ascii; import java.lang.reflect.Method; import java.security.SecureRandom; import o.dQY; import o.xzZ; /* loaded from: classes6.dex */ public class GF2mField { private int degree; private int polynomial; private static final byte[] $$a = {Ascii.ETB, -9, -41, -17}; private static final int $$b = 94; private static int $10 = 0; private static int $11 = 1; private static int c = 0; private static int e = 1; private static char[] d = {36834, 31171}; private static long a = 3579556367810357485L; /* JADX WARN: Removed duplicated region for block: B:10:0x0024 */ /* JADX WARN: Removed duplicated region for block: B:7:0x001c */ /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0024 -> B:4:0x0029). 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 f(byte r7, byte r8, byte r9, java.lang.Object[] r10) { /* int r9 = r9 * 4 int r9 = r9 + 1 int r7 = r7 + 4 byte[] r0 = org.bouncycastle.pqc.math.linearalgebra.GF2mField.$$a int r8 = 106 - r8 byte[] r1 = new byte[r9] r2 = 0 if (r0 != 0) goto L12 r3 = r9 r4 = r2 goto L29 L12: r3 = r2 L13: int r4 = r3 + 1 byte r5 = (byte) r8 int r7 = r7 + 1 r1[r3] = r5 if (r4 != r9) goto L24 java.lang.String r7 = new java.lang.String r7.(r1, r2) r10[r2] = r7 return L24: r3 = r0[r7] r6 = r3 r3 = r8 r8 = r6 L29: int r8 = -r8 int r8 = r8 + r3 r3 = r4 goto L13 */ throw new UnsupportedOperationException("Method not decompiled: org.bouncycastle.pqc.math.linearalgebra.GF2mField.f(byte, byte, byte, java.lang.Object[]):void"); } private static void b(char c2, int i, int i2, Object[] objArr) { int i3 = 2 % 2; dQY dqy = new dQY(); long[] jArr = new long[i2]; dqy.a = 0; while (dqy.a < i2) { int i4 = dqy.a; try { Object[] objArr2 = {Integer.valueOf(d[i + dqy.a])}; Object obj = xzZ.y.get(1095064095); if (obj == null) { Class cls = (Class) xzZ.c(308 - (ViewConfiguration.getTapTimeout() >> 16), 5 - TextUtils.getCapsMode("", 0, 0), (char) (32797 - Gravity.getAbsoluteGravity(0, 0))); byte b = (byte) (-1); Object[] objArr3 = new Object[1]; f(b, (byte) (b & 8), (byte) 0, objArr3); obj = cls.getMethod((String) objArr3[0], Integer.TYPE); xzZ.y.put(1095064095, obj); } Object[] objArr4 = {Long.valueOf(((Long) ((Method) obj).invoke(null, objArr2)).longValue()), Long.valueOf(dqy.a), Long.valueOf(a), Integer.valueOf(c2)}; Object obj2 = xzZ.y.get(-548438098); if (obj2 == null) { Class cls2 = (Class) xzZ.c((ViewConfiguration.getGlobalActionKeyTimeout() > 0L ? 1 : (ViewConfiguration.getGlobalActionKeyTimeout() == 0L ? 0 : -1)) + 411, View.MeasureSpec.getSize(0) + 5, (char) (ViewConfiguration.getScrollBarFadeDuration() >> 16)); byte b2 = (byte) (-1); Object[] objArr5 = new Object[1]; f(b2, (byte) (b2 & 7), (byte) 0, objArr5); obj2 = cls2.getMethod((String) objArr5[0], Long.TYPE, Long.TYPE, Long.TYPE, Integer.TYPE); xzZ.y.put(-548438098, obj2); } jArr[i4] = ((Long) ((Method) obj2).invoke(null, objArr4)).longValue(); Object[] objArr6 = {dqy, dqy}; Object obj3 = xzZ.y.get(1071125919); if (obj3 == null) { Class cls3 = (Class) xzZ.c(407 - Color.green(0), (ViewConfiguration.getFadingEdgeLength() >> 16) + 5, (char) (TextUtils.indexOf((CharSequence) "", '0', 0, 0) + 29235)); byte b3 = (byte) (-1); byte b4 = (byte) (b3 + 1); Object[] objArr7 = new Object[1]; f(b3, b4, b4, objArr7); obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class); xzZ.y.put(1071125919, obj3); } ((Method) obj3).invoke(null, objArr6); int i5 = $10 + 9; $11 = i5 % 128; int i6 = i5 % 2; } catch (Throwable th) { Throwable cause = th.getCause(); if (cause == null) { throw th; } throw cause; } } char[] cArr = new char[i2]; dqy.a = 0; int i7 = $10 + 117; $11 = i7 % 128; int i8 = i7 % 2; while (dqy.a < i2) { int i9 = $11 + 75; $10 = i9 % 128; if (i9 % 2 != 0) { cArr[dqy.a] = (char) jArr[dqy.a]; Object[] objArr8 = {dqy, dqy}; Object obj4 = xzZ.y.get(1071125919); if (obj4 == null) { Class cls4 = (Class) xzZ.c(407 - (ViewConfiguration.getKeyRepeatDelay() >> 16), (ViewConfiguration.getJumpTapTimeout() >> 16) + 5, (char) ((ViewConfiguration.getWindowTouchSlop() >> 8) + 29234)); byte b5 = (byte) (-1); byte b6 = (byte) (b5 + 1); Object[] objArr9 = new Object[1]; f(b5, b6, b6, objArr9); obj4 = cls4.getMethod((String) objArr9[0], Object.class, Object.class); xzZ.y.put(1071125919, obj4); } ((Method) obj4).invoke(null, objArr8); throw null; } cArr[dqy.a] = (char) jArr[dqy.a]; Object[] objArr10 = {dqy, dqy}; Object obj5 = xzZ.y.get(1071125919); if (obj5 == null) { Class cls5 = (Class) xzZ.c((ViewConfiguration.getPressedStateDuration() >> 16) + 407, 5 - (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)), (char) (29233 - (ExpandableListView.getPackedPositionForChild(0, 0) > 0L ? 1 : (ExpandableListView.getPackedPositionForChild(0, 0) == 0L ? 0 : -1)))); byte b7 = (byte) (-1); byte b8 = (byte) (b7 + 1); Object[] objArr11 = new Object[1]; f(b7, b8, b8, objArr11); obj5 = cls5.getMethod((String) objArr11[0], Object.class, Object.class); xzZ.y.put(1071125919, obj5); } ((Method) obj5).invoke(null, objArr10); } objArr[0] = new String(cArr); } public String toString() { int i = 2 % 2; StringBuilder sb = new StringBuilder("Finite Field GF(2^"); sb.append(this.degree); sb.append(") = GF(2)[X]/<"); sb.append(polyToString(this.polynomial)); sb.append("> "); String obj = sb.toString(); int i2 = e + 89; c = i2 % 128; int i3 = i2 % 2; return obj; } public int sqRoot(int i) { int i2 = 2 % 2; int i3 = c + 39; int i4 = i3 % 128; e = i4; int i5 = i3 % 2; int i6 = i4 + 91; c = i6 % 128; int i7 = i6 % 2; int i8 = 1; while (i8 < this.degree) { int i9 = c + 37; e = i9 % 128; int i10 = i9 % 2; i = mult(i, i); i8 = i10 == 0 ? i8 + 22 : i8 + 1; } return i; } public int mult(int i, int i2) { int i3 = 2 % 2; int i4 = c + 109; e = i4 % 128; Object obj = null; if (i4 % 2 == 0) { PolynomialRingGF2.modMultiply(i, i2, this.polynomial); obj.hashCode(); throw null; } int modMultiply = PolynomialRingGF2.modMultiply(i, i2, this.polynomial); int i5 = e + 105; c = i5 % 128; if (i5 % 2 == 0) { return modMultiply; } throw null; } public boolean isElementOfThisField(int i) { int i2 = 2 % 2; int i3 = this.degree; if (i3 != 31) { if (i < 0 || i >= (1 << i3)) { return false; } int i4 = e + 25; c = i4 % 128; int i5 = i4 % 2; return true; } int i6 = e + 101; int i7 = i6 % 128; c = i7; if (i6 % 2 != 0) { throw null; } if (i < 0) { return false; } int i8 = i7 + 43; int i9 = i8 % 128; e = i9; int i10 = i8 % 2; int i11 = i9 + 7; c = i11 % 128; int i12 = i11 % 2; return true; } public int inverse(int i) { int i2 = 2 % 2; int i3 = c + 115; e = i3 % 128; int i4 = i3 % 2; int exp = exp(i, (1 << this.degree) - 2); int i5 = e + 79; c = i5 % 128; if (i5 % 2 == 0) { return exp; } Object obj = null; obj.hashCode(); throw null; } public int hashCode() { int i = 2 % 2; int i2 = c + 103; int i3 = i2 % 128; e = i3; if (i2 % 2 == 0) { Object obj = null; obj.hashCode(); throw null; } int i4 = this.polynomial; int i5 = i3 + 37; c = i5 % 128; int i6 = i5 % 2; return i4; } public int getRandomNonZeroElement(SecureRandom secureRandom) { int i = 2 % 2; int nextInt = RandUtils.nextInt(secureRandom, 1 << this.degree); int i2 = 0; while (nextInt == 0) { int i3 = e + 111; c = i3 % 128; if (i3 % 2 != 0) { Object obj = null; obj.hashCode(); throw null; } if (i2 >= 1048576) { break; } nextInt = RandUtils.nextInt(secureRandom, 1 << this.degree); i2++; int i4 = c + 67; e = i4 % 128; int i5 = i4 % 2; } if (i2 != 1048576) { return nextInt; } int i6 = e + 71; int i7 = i6 % 128; c = i7; int i8 = i6 % 2; int i9 = i7 + 63; e = i9 % 128; if (i9 % 2 != 0) { return 1; } int i10 = 2 / 5; return 1; } public int getRandomNonZeroElement() { int i = 2 % 2; int randomNonZeroElement = getRandomNonZeroElement(new SecureRandom()); int i2 = c + 117; e = i2 % 128; int i3 = i2 % 2; return randomNonZeroElement; } public int getRandomElement(SecureRandom secureRandom) { int i = 2 % 2; int i2 = e + 97; c = i2 % 128; int nextInt = i2 % 2 != 0 ? RandUtils.nextInt(secureRandom, 1 - this.degree) : RandUtils.nextInt(secureRandom, 1 << this.degree); int i3 = e + 113; c = i3 % 128; if (i3 % 2 == 0) { return nextInt; } throw null; } public int getPolynomial() { int i = 2 % 2; int i2 = e; int i3 = i2 + 23; c = i3 % 128; int i4 = i3 % 2; int i5 = this.polynomial; int i6 = i2 + 63; c = i6 % 128; if (i6 % 2 != 0) { int i7 = 84 / 0; } return i5; } public byte[] getEncoded() { int i = 2 % 2; int i2 = c + 21; e = i2 % 128; int i3 = i2 % 2; int i4 = this.polynomial; if (i3 != 0) { return LittleEndianConversions.I2OSP(i4); } LittleEndianConversions.I2OSP(i4); throw null; } public int getDegree() { int i = 2 % 2; int i2 = c + 101; e = i2 % 128; if (i2 % 2 != 0) { return this.degree; } Object obj = null; obj.hashCode(); throw null; } public int exp(int i, int i2) { int i3 = 2 % 2; Object obj = null; if (i2 == 0) { int i4 = e + 89; c = i4 % 128; if (i4 % 2 == 0) { return 1; } throw null; } if (i == 0) { int i5 = c + 57; e = i5 % 128; int i6 = i5 % 2; return 0; } if (i == 1) { return 1; } if (i2 < 0) { int i7 = e + 45; c = i7 % 128; if (i7 % 2 != 0) { inverse(i); obj.hashCode(); throw null; } i = inverse(i); i2 = -i2; } int i8 = 1; while (i2 != 0) { if ((i2 & 1) == 1) { int i9 = c + 101; e = i9 % 128; if (i9 % 2 == 0) { mult(i8, i); obj.hashCode(); throw null; } i8 = mult(i8, i); } i = mult(i, i); i2 >>>= 1; } return i8; } public boolean equals(Object obj) { int i = 2 % 2; if (obj != null && (obj instanceof GF2mField)) { int i2 = c + 83; int i3 = i2 % 128; e = i3; int i4 = i2 % 2; GF2mField gF2mField = (GF2mField) obj; if (this.degree == gF2mField.degree) { int i5 = i3 + 123; c = i5 % 128; if (i5 % 2 != 0) { int i6 = gF2mField.polynomial; Object obj2 = null; obj2.hashCode(); throw null; } if (this.polynomial == gF2mField.polynomial) { return true; } } } int i7 = c + 55; e = i7 % 128; if (i7 % 2 == 0) { int i8 = 66 / 0; } return false; } public String elementToStr(int i) { StringBuilder sb; int i2 = 2 % 2; int i3 = e + 25; c = i3 % 128; int i4 = i3 % 2; String str = ""; int i5 = 0; while (i5 < this.degree) { if ((((byte) i) & 1) == 0) { Object[] objArr = new Object[1]; b((char) (CdmaCellLocation.convertQuartSecToDecDegrees(0) > 0.0d ? 1 : (CdmaCellLocation.convertQuartSecToDecDegrees(0) == 0.0d ? 0 : -1)), (TypedValue.complexToFloat(0) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFloat(0) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), (ViewConfiguration.getFadingEdgeLength() >> 16) + 1, objArr); sb = new StringBuilder(((String) objArr[0]).intern()); } else { Object[] objArr2 = new Object[1]; b((char) ((TypedValue.complexToFloat(0) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFloat(0) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) + 63008), Color.argb(0, 0, 0, 0) + 1, 1 - TextUtils.getOffsetBefore("", 0), objArr2); sb = new StringBuilder(((String) objArr2[0]).intern()); int i6 = c + 29; e = i6 % 128; int i7 = i6 % 2; } sb.append(str); str = sb.toString(); i >>>= 1; i5++; int i8 = c + 93; e = i8 % 128; int i9 = i8 % 2; } return str; } public int add(int i, int i2) { int i3 = 2 % 2; int i4 = c + 99; int i5 = i4 % 128; e = i5; int i6 = i ^ i2; if (i4 % 2 == 0) { int i7 = 75 / 0; } int i8 = i5 + 21; c = i8 % 128; int i9 = i8 % 2; return i6; } /* JADX WARN: Code restructure failed: missing block: B:10:0x006e, code lost: r3 = org.bouncycastle.pqc.math.linearalgebra.GF2mField.c + 107; org.bouncycastle.pqc.math.linearalgebra.GF2mField.e = r3 % 128; */ /* JADX WARN: Code restructure failed: missing block: B:11:0x0077, code lost: if ((r3 % 2) != 0) goto L20; */ /* JADX WARN: Code restructure failed: missing block: B:13:0x007c, code lost: if (((byte) (r8 & 1)) != 0) goto L28; */ /* JADX WARN: Code restructure failed: missing block: B:14:0x0084, code lost: r3 = new java.lang.StringBuilder(); r3.append(r1); r3.append("+x^"); r3.append(r2); r1 = r3.toString(); */ /* JADX WARN: Code restructure failed: missing block: B:16:0x0098, code lost: r8 = r8 >>> 1; r2 = r2 + 1; */ /* JADX WARN: Code restructure failed: missing block: B:19:0x0082, code lost: if (((byte) (r8 & 1)) != 1) goto L29; */ /* JADX WARN: Code restructure failed: missing block: B:23:0x009e, code lost: return r1; */ /* JADX WARN: Code restructure failed: missing block: B:25:0x0068, code lost: r1 = ""; */ /* JADX WARN: Code restructure failed: missing block: B:26:0x001a, code lost: r2 = new java.lang.Object[1]; b((char) (android.view.ViewConfiguration.getMinimumFlingVelocity() >> 16), android.widget.ExpandableListView.getPackedPositionGroup(0), ((android.os.Process.getThreadPriority(0) + 20) >> 6) + 1, r2); */ /* JADX WARN: Code restructure failed: missing block: B:27:?, code lost: return ((java.lang.String) r2[0]).intern(); */ /* JADX WARN: Code restructure failed: missing block: B:28:0x0018, code lost: if (r8 == 0) goto L8; */ /* JADX WARN: Code restructure failed: missing block: B:4:0x0015, code lost: if (r8 == 0) goto L8; */ /* JADX WARN: Code restructure failed: missing block: B:6:0x003f, code lost: if (((byte) (r8 & 1)) != 1) goto L12; */ /* JADX WARN: Code restructure failed: missing block: B:7:0x0041, code lost: r6 = new java.lang.Object[1]; b((char) (63008 - (android.view.ViewConfiguration.getKeyRepeatDelay() >> 16)), (android.os.SystemClock.uptimeMillis() > 0 ? 1 : (android.os.SystemClock.uptimeMillis() == 0 ? 0 : -1)), 1 - (android.view.ViewConfiguration.getKeyRepeatDelay() >> 16), r6); r1 = ((java.lang.String) r6[0]).intern(); */ /* JADX WARN: Code restructure failed: missing block: B:8:0x006a, code lost: r8 = r8 >>> 1; r2 = 1; */ /* JADX WARN: Code restructure failed: missing block: B:9:0x006c, code lost: if (r8 == 0) goto L26; */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static java.lang.String polyToString(int r8) { /* r0 = 2 int r1 = r0 % r0 int r1 = org.bouncycastle.pqc.math.linearalgebra.GF2mField.c int r1 = r1 + 19 int r2 = r1 % 128 org.bouncycastle.pqc.math.linearalgebra.GF2mField.e = r2 int r1 = r1 % r0 r2 = 0 r4 = 0 r5 = 1 if (r1 != 0) goto L18 r1 = 46 int r1 = r1 / r4 if (r8 != 0) goto L3c goto L1a L18: if (r8 != 0) goto L3c L1a: int r8 = android.view.ViewConfiguration.getMinimumFlingVelocity() int r8 = r8 >> 16 char r8 = (char) r8 int r0 = android.widget.ExpandableListView.getPackedPositionGroup(r2) int r1 = android.os.Process.getThreadPriority(r4) int r1 = r1 + 20 int r1 = r1 >> 6 int r1 = r1 + r5 java.lang.Object[] r2 = new java.lang.Object[r5] b(r8, r0, r1, r2) r8 = r2[r4] java.lang.String r8 = (java.lang.String) r8 java.lang.String r8 = r8.intern() goto L9e L3c: r1 = r8 & 1 byte r1 = (byte) r1 if (r1 != r5) goto L68 int r1 = android.view.ViewConfiguration.getKeyRepeatDelay() int r1 = r1 >> 16 r6 = 63008(0xf620, float:8.8293E-41) int r6 = r6 - r1 char r1 = (char) r6 long r6 = android.os.SystemClock.uptimeMillis() int r2 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1)) int r3 = android.view.ViewConfiguration.getKeyRepeatDelay() int r3 = r3 >> 16 int r3 = 1 - r3 java.lang.Object[] r6 = new java.lang.Object[r5] b(r1, r2, r3, r6) r1 = r6[r4] java.lang.String r1 = (java.lang.String) r1 java.lang.String r1 = r1.intern() goto L6a L68: java.lang.String r1 = "" L6a: int r8 = r8 >>> r5 r2 = r5 L6c: if (r8 == 0) goto L9d int r3 = org.bouncycastle.pqc.math.linearalgebra.GF2mField.c int r3 = r3 + 107 int r4 = r3 % 128 org.bouncycastle.pqc.math.linearalgebra.GF2mField.e = r4 int r3 = r3 % r0 if (r3 != 0) goto L7f r3 = r8 & 1 byte r3 = (byte) r3 if (r3 != 0) goto L98 goto L84 L7f: r3 = r8 & 1 byte r3 = (byte) r3 if (r3 != r5) goto L98 L84: java.lang.StringBuilder r3 = new java.lang.StringBuilder r3.() r3.append(r1) java.lang.String r1 = "+x^" r3.append(r1) r3.append(r2) java.lang.String r1 = r3.toString() L98: int r8 = r8 >>> 1 int r2 = r2 + 1 goto L6c L9d: r8 = r1 L9e: return r8 */ throw new UnsupportedOperationException("Method not decompiled: org.bouncycastle.pqc.math.linearalgebra.GF2mField.polyToString(int):java.lang.String"); } public GF2mField(byte[] bArr) { this.degree = 0; if (bArr.length != 4) { throw new IllegalArgumentException("byte array is not an encoded finite field"); } int OS2IP = LittleEndianConversions.OS2IP(bArr); this.polynomial = OS2IP; if (!PolynomialRingGF2.isIrreducible(OS2IP)) { throw new IllegalArgumentException("byte array is not an encoded finite field"); } int i = e + 13; c = i % 128; int i2 = i % 2; this.degree = PolynomialRingGF2.degree(this.polynomial); int i3 = e + 7; c = i3 % 128; int i4 = i3 % 2; } public GF2mField(GF2mField gF2mField) { this.degree = 0; this.degree = gF2mField.degree; this.polynomial = gF2mField.polynomial; } public GF2mField(int i, int i2) { this.degree = 0; if (i != PolynomialRingGF2.degree(i2)) { throw new IllegalArgumentException(" Error: the degree is not correct"); } if (!PolynomialRingGF2.isIrreducible(i2)) { throw new IllegalArgumentException(" Error: given polynomial is reducible"); } int i3 = c + 79; e = i3 % 128; int i4 = i3 % 2; this.degree = i; this.polynomial = i2; if (i4 == 0) { int i5 = 42 / 0; } } public GF2mField(int i) { this.degree = 0; if (i >= 32) { throw new IllegalArgumentException(" Error: the degree of field is too large "); } if (i <= 0) { throw new IllegalArgumentException(" Error: the degree of field is non-positive "); } int i2 = e + 17; c = i2 % 128; int i3 = i2 % 2; this.degree = i; this.polynomial = PolynomialRingGF2.getIrreduciblePolynomial(i); int i4 = c + 29; e = i4 % 128; if (i4 % 2 != 0) { return; } Object obj = null; obj.hashCode(); throw null; } }