/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/ |
D | SecP521R1Field.java | 5 import org.bouncycastle.math.raw.Nat; 17 int c = Nat.add(16, x, y, z) + x[16] + y[16]; in add() 18 if (c > P16 || (c == P16 && Nat.eq(16, z, P))) in add() 20 c += Nat.inc(16, z); in add() 28 int c = Nat.inc(16, x, z) + x[16]; in addOne() 29 if (c > P16 || (c == P16 && Nat.eq(16, z, P))) in addOne() 31 c += Nat.inc(16, z); in addOne() 39 int[] z = Nat.fromBigInteger(521, x); in fromBigInteger() 40 if (Nat.eq(17, z, P)) in fromBigInteger() 42 Nat.zero(17, z); in fromBigInteger() [all …]
|
D | SecP521R1FieldElement.java | 7 import org.bouncycastle.math.raw.Nat; 28 this.x = Nat.create(17); in SecP521R1FieldElement() 38 return Nat.isZero(17, x); in isZero() 43 return Nat.isOne(17, x); in isOne() 48 return Nat.getBit(x, 0) == 1; in testBitZero() 53 return Nat.toBigInteger(17, x); in toBigInteger() 68 int[] z = Nat.create(17); in add() 75 int[] z = Nat.create(17); in addOne() 82 int[] z = Nat.create(17); in subtract() 89 int[] z = Nat.create(17); in multiply() [all …]
|
D | SecP384R1Field.java | 5 import org.bouncycastle.math.raw.Nat; 26 int c = Nat.add(12, x, y, z); in add() 27 if (c != 0 || (z[11] == P11 && Nat.gte(12, z, P))) in add() 35 int c = Nat.add(24, xx, yy, zz); in addExt() 36 if (c != 0 || (zz[23] == PExt23 && Nat.gte(24, zz, PExt))) in addExt() 38 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in addExt() 40 Nat.incAt(24, zz, PExtInv.length); in addExt() 47 int c = Nat.inc(12, x, z); in addOne() 48 if (c != 0 || (z[11] == P11 && Nat.gte(12, z, P))) in addOne() 56 int[] z = Nat.fromBigInteger(384, x); in fromBigInteger() [all …]
|
D | SecP224K1Field.java | 5 import org.bouncycastle.math.raw.Nat; 26 Nat.add33To(7, PInv33, z); in add() 32 int c = Nat.add(14, xx, yy, zz); in addExt() 33 if (c != 0 || (zz[13] == PExt13 && Nat.gte(14, zz, PExt))) in addExt() 35 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in addExt() 37 Nat.incAt(14, zz, PExtInv.length); in addExt() 44 int c = Nat.inc(7, x, z); in addOne() 47 Nat.add33To(7, PInv33, z); in addOne() 56 Nat.add33To(7, PInv33, z); in fromBigInteger() 65 Nat.shiftDownBit(7, x, 0, z); in half() [all …]
|
D | SecP256K1Field.java | 5 import org.bouncycastle.math.raw.Nat; 27 Nat.add33To(8, PInv33, z); in add() 33 int c = Nat.add(16, xx, yy, zz); in addExt() 34 if (c != 0 || (zz[15] == PExt15 && Nat.gte(16, zz, PExt))) in addExt() 36 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in addExt() 38 Nat.incAt(16, zz, PExtInv.length); in addExt() 45 int c = Nat.inc(8, x, z); in addOne() 48 Nat.add33To(8, PInv33, z); in addOne() 66 Nat.shiftDownBit(8, x, 0, z); in half() 71 Nat.shiftDownBit(8, z, c); in half() [all …]
|
D | SecP192K1Field.java | 5 import org.bouncycastle.math.raw.Nat; 25 Nat.add33To(6, PInv33, z); in add() 31 int c = Nat.add(12, xx, yy, zz); in addExt() 32 if (c != 0 || (zz[11] == PExt11 && Nat.gte(12, zz, PExt))) in addExt() 34 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in addExt() 36 Nat.incAt(12, zz, PExtInv.length); in addExt() 43 int c = Nat.inc(6, x, z); in addOne() 46 Nat.add33To(6, PInv33, z); in addOne() 64 Nat.shiftDownBit(6, x, 0, z); in half() 69 Nat.shiftDownBit(6, z, c); in half() [all …]
|
D | SecP384R1FieldElement.java | 7 import org.bouncycastle.math.raw.Nat; 28 this.x = Nat.create(12); in SecP384R1FieldElement() 38 return Nat.isZero(12, x); in isZero() 43 return Nat.isOne(12, x); in isOne() 48 return Nat.getBit(x, 0) == 1; in testBitZero() 53 return Nat.toBigInteger(12, x); in toBigInteger() 68 int[] z = Nat.create(12); in add() 75 int[] z = Nat.create(12); in addOne() 82 int[] z = Nat.create(12); in subtract() 89 int[] z = Nat.create(12); in multiply() [all …]
|
D | SecP192R1Field.java | 5 import org.bouncycastle.math.raw.Nat; 32 int c = Nat.add(12, xx, yy, zz); in addExt() 33 if (c != 0 || (zz[11] == PExt11 && Nat.gte(12, zz, PExt))) in addExt() 35 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in addExt() 37 Nat.incAt(12, zz, PExtInv.length); in addExt() 44 int c = Nat.inc(6, x, z); in addOne() 65 Nat.shiftDownBit(6, x, 0, z); in half() 70 Nat.shiftDownBit(6, z, c); in half() 84 if (c != 0 || (zz[11] == PExt11 && Nat.gte(12, zz, PExt))) in multiplyAddToExt() 86 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in multiplyAddToExt() [all …]
|
D | SecP224R1Field.java | 5 import org.bouncycastle.math.raw.Nat; 32 int c = Nat.add(14, xx, yy, zz); in addExt() 33 if (c != 0 || (zz[13] == PExt13 && Nat.gte(14, zz, PExt))) in addExt() 35 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in addExt() 37 Nat.incAt(14, zz, PExtInv.length); in addExt() 44 int c = Nat.inc(7, x, z); in addOne() 65 Nat.shiftDownBit(7, x, 0, z); in half() 70 Nat.shiftDownBit(7, z, c); in half() 84 if (c != 0 || (zz[13] == PExt13 && Nat.gte(14, zz, PExt))) in multiplyAddToExt() 86 if (Nat.addTo(PExtInv.length, PExtInv, zz) != 0) in multiplyAddToExt() [all …]
|
D | SecP384R1Point.java | 6 import org.bouncycastle.math.raw.Nat; 91 int[] tt1 = Nat.create(24); in add() 92 int[] tt2 = Nat.create(24); in add() 93 int[] t3 = Nat.create(12); in add() 94 int[] t4 = Nat.create(12); in add() 134 int[] H = Nat.create(12); in add() 137 int[] R = Nat.create(12); in add() 141 if (Nat.isZero(12, H)) in add() 143 if (Nat.isZero(12, R)) in add() 156 int[] G = Nat.create(12); in add() [all …]
|
D | SecP521R1Point.java | 6 import org.bouncycastle.math.raw.Nat; 89 int[] t1 = Nat.create(17); in add() 90 int[] t2 = Nat.create(17); in add() 91 int[] t3 = Nat.create(17); in add() 92 int[] t4 = Nat.create(17); in add() 132 int[] H = Nat.create(17); in add() 139 if (Nat.isZero(17, H)) in add() 141 if (Nat.isZero(17, R)) in add() 154 int[] G = Nat.create(17); in add() 205 int[] t1 = Nat.create(17); in twice() [all …]
|
D | SecP256R1Field.java | 5 import org.bouncycastle.math.raw.Nat; 32 int c = Nat.add(16, xx, yy, zz); in addExt() 33 if (c != 0 || ((zz[15] & PExt15) == PExt15 && Nat.gte(16, zz, PExt))) in addExt() 35 Nat.subFrom(16, PExt, zz); in addExt() 41 int c = Nat.inc(8, x, z); in addOne() 62 Nat.shiftDownBit(8, x, 0, z); in half() 67 Nat.shiftDownBit(8, z, c); in half() 81 if (c != 0 || ((zz[15] & PExt15) == PExt15 && Nat.gte(16, zz, PExt))) in multiplyAddToExt() 83 Nat.subFrom(16, PExt, zz); in multiplyAddToExt() 229 int c = Nat.sub(16, xx, yy, zz); in subtractExt() [all …]
|
D | SecP256R1Point.java | 6 import org.bouncycastle.math.raw.Nat; 238 c = Nat.shiftUpBits(8, S, 2, 0); in twice() 241 c = Nat.shiftUpBits(8, T, 3, 0, t1); in twice()
|
D | SecP224K1Point.java | 6 import org.bouncycastle.math.raw.Nat; 227 c = Nat.shiftUpBits(7, S, 2, 0); in twice() 231 c = Nat.shiftUpBits(7, T, 3, 0, t1); in twice()
|
D | SecP192K1Point.java | 6 import org.bouncycastle.math.raw.Nat; 227 c = Nat.shiftUpBits(6, S, 2, 0); in twice() 231 c = Nat.shiftUpBits(6, T, 3, 0, t1); in twice()
|
D | SecP224R1Point.java | 6 import org.bouncycastle.math.raw.Nat; 238 c = Nat.shiftUpBits(7, S, 2, 0); in twice() 241 c = Nat.shiftUpBits(7, T, 3, 0, t1); in twice()
|
D | SecP192R1Point.java | 6 import org.bouncycastle.math.raw.Nat; 240 c = Nat.shiftUpBits(6, S, 2, 0); in twice() 243 c = Nat.shiftUpBits(6, T, 3, 0, t1); in twice()
|
D | SecP256K1Point.java | 6 import org.bouncycastle.math.raw.Nat; 227 c = Nat.shiftUpBits(8, S, 2, 0); in twice() 231 c = Nat.shiftUpBits(8, T, 3, 0, t1); in twice()
|
D | SecP224R1FieldElement.java | 7 import org.bouncycastle.math.raw.Nat; 240 int c = Nat.shiftUpBits(7, f, 2, 0); in RS()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/raw/ |
D | Mod.java | 24 if (Nat.isZero(len, x)) in invert() 28 if (Nat.isOne(len, x)) in invert() 34 int[] u = Nat.copy(len, x); in invert() 35 int[] a = Nat.create(len); in invert() 43 if (Nat.isOne(len, u)) in invert() 49 int[] v = Nat.copy(len, p); in invert() 50 int[] b = Nat.create(len); in invert() 62 if (Nat.gte(uvLen, u, v)) in invert() 64 Nat.subFrom(uvLen, v, u); in invert() 66 ac += Nat.subFrom(len, b, a) - bc; in invert() [all …]
|
D | Nat512.java | 21 c24 += neg ? Nat.addTo(16, tt, 0, zz, 8) : Nat.subFrom(16, tt, 0, zz, 8); in mul() 22 Nat.addWordAt(32, c24, zz, 24); in mul() 40 c24 += Nat.subFrom(16, tt, 0, zz, 8); in square() 41 Nat.addWordAt(32, c24, zz, 24); in square()
|
D | Nat384.java | 21 c18 += neg ? Nat.addTo(12, tt, 0, zz, 6) : Nat.subFrom(12, tt, 0, zz, 6); in mul() 22 Nat.addWordAt(24, c18, zz, 18); in mul() 40 c18 += Nat.subFrom(12, tt, 0, zz, 6); in square() 41 Nat.addWordAt(24, c18, zz, 18); in square()
|
D | Nat192.java | 542 return c == 0 ? 0 : Nat.incAt(6, z, zOff, 4); in mul33DWordAdd() 560 return c == 0 ? 0 : Nat.incAt(6, z, zOff, 3); in mul33WordAdd() 576 return c == 0 ? 0 : Nat.incAt(6, z, zOff, 3); in mulWordDwordAdd()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/ |
D | ECFieldElement.java | 7 import org.bouncycastle.math.raw.Nat; 403 int[] p = Nat.fromBigInteger(bits, q); in modInverse() 404 int[] n = Nat.fromBigInteger(bits, x); in modInverse() 405 int[] z = Nat.create(len); in modInverse() 407 return Nat.toBigInteger(len, z); in modInverse()
|
/external/clang/test/CXX/class.access/ |
D | p6.cpp | 89 template <class T, class Nat> class A {
|