79 printf(
"%s %016lX%016lX%016lX%016lX%016lX%016lX %016lX%016lX%016lX%016lX%016lX%016lX\n", s,
81 a.
x[5], a.
x[4], a.
x[3], a.
x[2], a.
x[1], a.
x[0],
82 a.
y[5], a.
y[4], a.
y[3], a.
y[2], a.
y[1], a.
y[0]);
103 a.
x[5] = 0x17F1D3A73197D794;
104 a.
x[4] = 0x2695638C4FA9AC0F;
105 a.
x[3] = 0xC3688C4F9774B905;
106 a.
x[2] = 0xA14E3A3F171BAC58;
107 a.
x[1] = 0x6C55E83FF97A1AEF;
108 a.
x[0] = 0xFB3AF00ADB22C6BB;
110 a.
y[5] = 0x08B3F481E3AAA0F1;
111 a.
y[4] = 0xA09E30ED741D8AE4;
112 a.
y[3] = 0xFCF5E095D5D00AF6;
113 a.
y[2] = 0x00DB18CB2C04B3ED;
114 a.
y[1] = 0xD03CC744A2888AE4;
115 a.
y[0] = 0x0CAA232946C5E7E1;
__device__ __host__ void fp_zero(fp_t &z)
Sets z to zero.
__device__ __host__ void fp_fromUint64(fp_t &z, const uint64_t *x)
Converts uint64_t[6] to fp_t. After this operation, z represents x mod p.
uint64_t fp_t[6]
Residue modulo p. Any 384-bit representative of each residue is allowed, and stored as a 6-element li...
__device__ void fp_mul(fp_t &z, const fp_t &x, const fp_t &y)
Multiplies two Fp residues x and y, stores in z.
__device__ __host__ void fp_cpy(fp_t &z, const fp_t &x)
Copy from x into z.
__device__ void fp_inv(fp_t &z, const fp_t &x)
Calculates the multiplicative inverse of x and stores in z.
__device__ __host__ void g1a_fromUint64(g1a_t &a, const uint64_t *x, const uint64_t *y)
Converts arrays of uint64_t into a G1 point in affine coordinates. Each array must be uint64_t....
__device__ __host__ void g1a_fromFp(g1a_t &a, const fp_t &x, const fp_t &y)
Converts Fp values into a point in G1 in affine coordinates. This function does not validate if the c...
__device__ __host__ void g1a_inf(g1a_t &a)
Set a to the point-at-infinity (0,0)
__device__ __host__ void g1a_print(const char *s, const g1a_t &a)
Print a standard representation of a, preceded by the user-set string s.
__device__ void g1a_fromG1p(g1a_t &a, const g1p_t &p)
Converts a point in projective coordinates into affine coordinates.
__device__ __host__ void g1a_gen(g1a_t &a)
Sets a to the generator point G1 of bls12_381.
__device__ __host__ void g1a_cpy(g1a_t &a, const g1a_t &b)
Copy from b into a.
G1 point in affine coordinates.
G1 point in projective coordinates.