FK20 CUDA
All Data Structures Namespaces Files Functions Variables Typedefs Macros
g1p_scale.cu
Go to the documentation of this file.
1 // bls12_381: Arithmetic for BLS12-381
2 // Copyright 2022-2023 Dag Arne Osvik
3 // Copyright 2022-2023 Luan Cardoso dos Santos
4 
5 #include "fp.cuh"
6 #include "g1.cuh"
7 
16 __device__ void g1p_scale(g1p_t &p, const fp_t &s) {
17  fp_mul(p.x, p.x, s);
18  fp_mul(p.y, p.y, s);
19  fp_mul(p.z, p.z, s);
20 }
21 
22 // vim: ts=4 et sw=4 si
uint64_t fp_t[6]
Residue modulo p. Any 384-bit representative of each residue is allowed, and stored as a 6-element li...
Definition: fp.cuh:14
__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.
Definition: fp_mul.cu:17
__device__ void g1p_scale(g1p_t &p, const fp_t &s)
Scale the coordinates of a projective point. This operation multiplies each coordinate of p by s: (x,...
Definition: g1p_scale.cu:16
G1 point in projective coordinates.
Definition: g1.cuh:27
fp_t z
Definition: g1.cuh:28
fp_t x
Definition: g1.cuh:28
fp_t y
Definition: g1.cuh:28