21 { 0x8a13c2b29f4325ad, 0x7803e16723f9f147, 0x6e7f23d4350c60bd, 0x062e48a6104cc52f, 0x9b6d4dac3f33e92c, 0x05dff4ac6726c6cb, },
22 { 0x2aa4d8e1b1df7ca5, 0x599a8782a1bea48a, 0x395952af0b6a0dbd, 0xd6093a00bb3e2bc9, 0x3c604c0410e5fc01, 0x14e4b429606d02bc, },
23 { 0x770553ef06aadf22, 0xc04c720ae01952ac, 0x9a55bee62edcdb27, 0x962f5650798fdf27, 0x28180e61b1f2cb8f, 0x0430df56ea4aba69, },
26 { 0x7f0318e712da7559, 0x266ac7358912af30, 0xc4374a5888cfca69, 0x4f376827946368db, 0x61156a0c4d426519, 0x0bba0304fb3212a4, },
27 { 0xc25f47067af44e76, 0xcde09eab0276a0f4, 0xe9ec335b039fcf17, 0x727ce462858d3730, 0xdf4d86ed009f83fe, 0x0745d51f4d0912b3, },
28 { 0xceb902463027454d, 0xc9d68f804d8ec369, 0xc2ddd8e251d7339c, 0xd787b07101270da7, 0xfc3d86788b163753, 0x191fe9e914d73631, },
31 { 0xc8ff9a5471e72c92, 0x99683253e5aefa15, 0x5d6b135ab656eb43, 0x1b3776dc534fa4ab, 0xc2bfc4ab80c05017, 0x17b787b9910f9fa6, },
32 { 0xf275ddf2d8723a25, 0xce36e492230ed9cd, 0xae724c9b9d46d006, 0x5d4cec21d5949cc3, 0x9ce9b30542ce5589, 0x05f77ff79a5b6f8a, },
33 { 0x1eab6a2bf6bfeb17, 0xd88225cb44eaa0fb, 0x659281132d662bf8, 0xf0ac9c552dfd6f39, 0xb14437f70cc0f519, 0x0ae6513795046382, },
36 { 0x2e4f86255524abb3, 0xebb6095fb99f8e97, 0x3a6ab2001ab4f83c, 0x606df6ee661d3aa2, 0xf6b369b6a22b4047, 0x0b1416f427fc4c5f, },
37 { 0xd0ee94cbc992ab24, 0x9fb5593bc61cd5bd, 0xc338a8acaef74389, 0x3a7da17eb290de91, 0xac616f60ea15f632, 0x0fc28d919f8ada25, },
38 { 0x1bb5a6833e3677ae, 0xf3d50cd096cd2ceb, 0xa1d2c3cbc5527a6e, 0x60613c9426b3b9a1, 0xee0f3f71173f041c, 0x139ca4dd9f299816, },
60 printf(
"=== RUN %s\n", __func__);
65 g1p_t p, q, r, t, u, v;
199 uint64_t x25[] = { 25, 0, 0, 0 };
254 for (
int i=0; pass && i<20000; i++) {
266 printf(
"FAIL after %d ok:\n", i);
278 if ((blockIdx.x | blockIdx.y | blockIdx.z | threadIdx.x | threadIdx.y | threadIdx.z) == 0)
280 printf(
"%ld test%s\n", count, count == 1 ?
"" :
"s");
__device__ void g1p_addsub(g1p_t &p, g1p_t &q)
Stores the sum and difference of p and q into p and q. Projective p and q, p,q ← p+q,...
__device__ __host__ void g1p_inf(g1p_t &p)
Set p to the point-at-infinity (0,1,0)
__device__ void g1p_sub(g1p_t &p, const g1p_t &q)
Point subtraction using projective coordinates. p ← p-q.
__device__ bool g1p_neq(const g1p_t &p, const g1p_t &q)
Compares two projective points, returns true when not equal. This function compares if both parameter...
__device__ void g1p_add(g1p_t &p, const g1p_t &q)
Computes the sum of two points q into p, using projective coordinates. and stores in p.
__device__ void g1p_dbl(g1p_t &p)
G1 point doubling, with write back: p=2*p.
__device__ __host__ void g1p_gen(g1p_t &p)
Sets p to the generator point G1 of bls12_381.
__device__ void g1p_mul(g1p_t &p, const fr_t &x)
p ← k·p Point multiplication by scalar, in projective coordinates. That result is stored back into p.
__device__ __host__ void g1p_cpy(g1p_t &p, const g1p_t &q)
Copy from q into p.
__device__ __host__ void g1p_print(const char *s, const g1p_t &p)
Print a standard representation of p, preceded by the user-set string s.
__managed__ g1p_t g1p_x25
__global__ void G1TestKAT(testval_t *)
Test operation over G1 using KAT and self consistency:
__managed__ g1p_t g1p_x24
G1 point in projective coordinates.