#include <stdio.h>
#include "fp.cuh"
#include "fr.cuh"
#include "g1.cuh"
Go to the source code of this file.
|
__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. This function does not validate if the coordinates are a valid point in the curve. More...
|
|
__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 coordinates are a valid point in the curve. More...
|
|
__device__ void | g1a_fromG1p (g1a_t &a, const g1p_t &p) |
| Converts a point in projective coordinates into affine coordinates. More...
|
|
__device__ __host__ void | g1a_cpy (g1a_t &a, const g1a_t &b) |
| Copy from b into a. More...
|
|
__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. More...
|
|
__device__ __host__ void | g1a_inf (g1a_t &a) |
| Set a to the point-at-infinity (0,0) More...
|
|
__device__ __host__ void | g1a_gen (g1a_t &a) |
| Sets a to the generator point G1 of bls12_381. More...
|
|
◆ g1a_cpy()
__device__ __host__ void g1a_cpy |
( |
g1a_t & |
a, |
|
|
const g1a_t & |
b |
|
) |
| |
Copy from b into a.
- Parameters
-
- Returns
- void
Definition at line 65 of file g1a.cu.
◆ g1a_fromFp()
__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 coordinates are a valid point in the curve.
- Parameters
-
[out] | a | point in G1 in affine representation |
[in] | x | x-coordinate |
[in] | y | y-coordinate |
- Returns
- void
Definition at line 36 of file g1a.cu.
◆ g1a_fromG1p()
__device__ void g1a_fromG1p |
( |
g1a_t & |
a, |
|
|
const g1p_t & |
p |
|
) |
| |
Converts a point in projective coordinates into affine coordinates.
- Parameters
-
[out] | a | point in G1 in affine form |
[in] | p | point in G1 in projective form |
- Returns
- void
Definition at line 48 of file g1a.cu.
◆ g1a_fromUint64()
__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. This function does not validate if the coordinates are a valid point in the curve.
- Parameters
-
[out] | a | point in G1 in affine representation |
[in] | x | Array with the x coordinate (uint64_t[6]) |
[in] | y | Array with the y coordinate (uint64_t[6]) |
- Returns
- void
Definition at line 21 of file g1a.cu.
◆ g1a_gen()
__device__ __host__ void g1a_gen |
( |
g1a_t & |
a | ) |
|
Sets a to the generator point G1 of bls12_381.
- Parameters
-
- Returns
- void
Definition at line 102 of file g1a.cu.
◆ g1a_inf()
__device__ __host__ void g1a_inf |
( |
g1a_t & |
a | ) |
|
Set a to the point-at-infinity (0,0)
- Parameters
-
- Returns
- void
Definition at line 91 of file g1a.cu.
◆ g1a_print()
__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.
- Parameters
-
[out] | s | message string |
[out] | a | point in g1 in affine form |
- Returns
- void
Definition at line 77 of file g1a.cu.