37 &X1 = p.
x, &Y1 = p.
y, &Z1 = p.
z,
38 &X2 = q.
x, &Y2 = q.
y, &Z2 = q.
z,
139 fp_mma(X2, t1, t3, Z2, X1);
144 fp_mma(Z2, t1, t0, Z2, Y1);
146 fp_mma(Y2, t0, X1, t3, Y1);
149 fp_mma(X1, t2, Y1, Z1, X1);
150 fp_mma(Z1, t2, t0, Z1, t3);
__device__ __host__ void fp_zero(fp_t &z)
Sets z to zero.
__device__ void fp_neg(fp_t &z, const fp_t &x)
Compute an additive inverse of a residue x modulo p. Stores in z. Subtracts x from the highest multip...
__device__ void fp_mma(fp_t &z, const fp_t &v, const fp_t &w, const fp_t &x, const fp_t &y)
Fp multiply-multiply-add. Fast execution of z = (v*w + x*y) mod p The double-wide products are added ...
__device__ void fp_add(fp_t &z, const fp_t &x, const fp_t &y)
Computes the sum of two residues x and y modulo p and stores it in z. Device only function.
__device__ void fp_x12(fp_t &z, const fp_t &x)
Multiplies the residue mod p x by 12 and stores the result into z.
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_x3(fp_t &z, const fp_t &x)
Multiplies x by 3 and stores the result into z.
__device__ void fp_sub(fp_t &z, const fp_t &x, const fp_t &y)
Calculates the difference of two residues modulo p and stores it into z.
__device__ bool g1p_isPoint(const g1p_t &p)
Check if the value stored in p is a valid point on the G1 curve.
__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,...
G1 point in projective coordinates.