#include <stdio.h>
#include "fp.cuh"
#include "g1.cuh"
Go to the source code of this file.
|
| __device__ void | g1p_toUint64 (const g1p_t &p, uint64_t *x, uint64_t *y, uint64_t *z) |
| | Converts G1 point into arrays of uint64_t. Each array must be uint64_t[6] This function does not validate if the coordinates are a valid point in the curve. More...
|
| |
| __device__ __host__ void | g1p_fromUint64 (g1p_t &p, uint64_t *x, uint64_t *y, uint64_t *z) |
| | Converts arrays of uint64_t into a G1 point. Each array must be uint64_t[6] This function does not validate if the coordinates are a valid point in the curve. More...
|
| |
| __device__ void | g1p_fromG1a (g1p_t &p, const g1a_t &a) |
| | Convert a point in affine coordinates to projective coordinates. More...
|
| |
| __device__ __host__ void | g1p_cpy (g1p_t &p, const g1p_t &q) |
| | Copy from q into p. More...
|
| |
| __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. More...
|
| |
| __device__ __host__ void | g1p_inf (g1p_t &p) |
| | Set p to the point-at-infinity (0,1,0) More...
|
| |
| __device__ __host__ void | g1p_gen (g1p_t &p) |
| | Sets p to the generator point G1 of bls12_381. More...
|
| |
| __global__ void | g1p_eq_wrapper (uint8_t *eq, size_t count, const g1p_t *p, const g1p_t *q) |
| | Kernel wrapper, host-callable comparison of arrays of g1p_t. More...
|
| |
| __global__ void | g1a_fromG1p_wrapper (g1a_t *a, size_t count, const g1p_t *p) |
| | Kernel wrappers, host-callable conversion of points in projective coordinates into affine coordinates. More...
|
| |
◆ g1a_fromG1p_wrapper()
| __global__ void g1a_fromG1p_wrapper |
( |
g1a_t * |
a, |
|
|
size_t |
count, |
|
|
const g1p_t * |
p |
|
) |
| |
Kernel wrappers, host-callable conversion of points in projective coordinates into affine coordinates.
- Parameters
-
| [out] | a | Array g1a_t[count] |
| [in] | count | number of elements in the array |
| [in] | p | Array g1p_t[count] |
- Returns
- void
Definition at line 166 of file g1p.cu.
◆ g1p_cpy()
| __device__ __host__ void g1p_cpy |
( |
g1p_t & |
p, |
|
|
const g1p_t & |
q |
|
) |
| |
Copy from q into p.
- Parameters
-
- Returns
- void
Definition at line 67 of file g1p.cu.
◆ g1p_eq_wrapper()
| __global__ void g1p_eq_wrapper |
( |
uint8_t * |
eq, |
|
|
size_t |
count, |
|
|
const g1p_t * |
p, |
|
|
const g1p_t * |
q |
|
) |
| |
Kernel wrapper, host-callable comparison of arrays of g1p_t.
- Parameters
-
| [out] | eq | Array of size count, will store the result of the comparison. eq[i]==1 iff p[i]==q[i] |
| [in] | count | number of elements to be compared |
| [in] | p | Array g1p_t[count] |
| [in] | q | Array g1p_t[count] |
- Returns
- void
Definition at line 140 of file g1p.cu.
◆ g1p_fromG1a()
| __device__ void g1p_fromG1a |
( |
g1p_t & |
p, |
|
|
const g1a_t & |
a |
|
) |
| |
Convert a point in affine coordinates to projective coordinates.
- Parameters
-
| [out] | p | point in projective coordinates |
| [in] | a | point in affine coordinates |
- Returns
- void
Definition at line 51 of file g1p.cu.
◆ g1p_fromUint64()
| __device__ __host__ void g1p_fromUint64 |
( |
g1p_t & |
p, |
|
|
uint64_t * |
x, |
|
|
uint64_t * |
y, |
|
|
uint64_t * |
z |
|
) |
| |
Converts arrays of uint64_t into a G1 point. Each array must be uint64_t[6] This function does not validate if the coordinates are a valid point in the curve.
- Parameters
-
| [out] | p | point in G1 |
| [in] | x | Array with the x coordinate |
| [in] | y | Array with the y coordinate |
| [in] | z | Array with the z coordinate |
- Returns
- void
Definition at line 38 of file g1p.cu.
◆ g1p_gen()
| __device__ __host__ void g1p_gen |
( |
g1p_t & |
p | ) |
|
Sets p to the generator point G1 of bls12_381.
- Parameters
-
- Returns
- void
Definition at line 106 of file g1p.cu.
◆ g1p_inf()
| __device__ __host__ void g1p_inf |
( |
g1p_t & |
p | ) |
|
Set p to the point-at-infinity (0,1,0)
- Parameters
-
- Returns
- void
Definition at line 93 of file g1p.cu.
◆ g1p_print()
| __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.
- Parameters
-
| [out] | s | Description string |
| [out] | p | Point in g1 |
- Returns
- void
Definition at line 80 of file g1p.cu.
◆ g1p_toUint64()
| __device__ void g1p_toUint64 |
( |
const g1p_t & |
p, |
|
|
uint64_t * |
x, |
|
|
uint64_t * |
y, |
|
|
uint64_t * |
z |
|
) |
| |
Converts G1 point into arrays of uint64_t. Each array must be uint64_t[6] This function does not validate if the coordinates are a valid point in the curve.
- Parameters
-
| [in] | p | point in G1 |
| [out] | x | Array with the x coordinate |
| [out] | y | Array with the y coordinate |
| [out] | z | Array with the z coordinate |
- Returns
- void
Definition at line 21 of file g1p.cu.