Home
last modified time | relevance | path

Searched refs:Nat (Results 1 – 25 of 33) sorted by relevance

12

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/custom/sec/
DSecP521R1Field.java5 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 …]
DSecP521R1FieldElement.java7 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 …]
DSecP384R1Field.java5 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 …]
DSecP224K1Field.java5 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 …]
DSecP256K1Field.java5 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 …]
DSecP192K1Field.java5 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 …]
DSecP384R1FieldElement.java7 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 …]
DSecP192R1Field.java5 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 …]
DSecP224R1Field.java5 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 …]
DSecP384R1Point.java6 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 …]
DSecP521R1Point.java6 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 …]
DSecP256R1Field.java5 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 …]
DSecP256R1Point.java6 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()
DSecP224K1Point.java6 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()
DSecP192K1Point.java6 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()
DSecP224R1Point.java6 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()
DSecP192R1Point.java6 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()
DSecP256K1Point.java6 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()
DSecP224R1FieldElement.java7 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/
DMod.java24 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 …]
DNat512.java21 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()
DNat384.java21 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()
DNat192.java542 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/
DECFieldElement.java7 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/
Dp6.cpp89 template <class T, class Nat> class A {

12