FK20 CUDA
g1a.cu File Reference
#include <stdio.h>
#include "fp.cuh"
#include "fr.cuh"
#include "g1.cuh"
Include dependency graph for g1a.cu:

Go to the source code of this file.

Functions

__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...
 

Function Documentation

◆ g1a_cpy()

__device__ __host__ void g1a_cpy ( g1a_t a,
const g1a_t b 
)

Copy from b into a.

Parameters
[out]a
[in]b
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]apoint in G1 in affine representation
[in]xx-coordinate
[in]yy-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]apoint in G1 in affine form
[in]ppoint 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]apoint in G1 in affine representation
[in]xArray with the x coordinate (uint64_t[6])
[in]yArray 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
a
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
a
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]smessage string
[out]apoint in g1 in affine form
Returns
void

Definition at line 77 of file g1a.cu.