FK20 CUDA
g1p_ispoint.cu File Reference
#include "fp.cuh"
#include "g1.cuh"
Include dependency graph for g1p_ispoint.cu:

Go to the source code of this file.

Functions

__device__ bool g1p_isInf (const g1p_t &p)
 Check if the value stored in p is the the/any point at infinity. This implementation uses (0, 1, 0) as the point at infinity. Alternatively, the macro G1P_ANYINF allows the point at infinity to be represented as (0, y, 0) where y!=0. More...
 
__device__ bool g1p_isPoint (const g1p_t &p)
 Check if the value stored in p is a valid point on the G1 curve. More...
 

Function Documentation

◆ g1p_isInf()

__device__ bool g1p_isInf ( const g1p_t p)

Check if the value stored in p is the the/any point at infinity. This implementation uses (0, 1, 0) as the point at infinity. Alternatively, the macro G1P_ANYINF allows the point at infinity to be represented as (0, y, 0) where y!=0.

The algebra used in this library sets the point at infinity to (0, 1, 0) (or (0, y, 0)), instead of the usual (1, 1, 0) used in other libs, due to following the Algorithm 7 in eprint 2015-1060.

Parameters
[in]p
Returns
bool 1 if the p is the point at infinity.

Definition at line 20 of file g1p_ispoint.cu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ g1p_isPoint()

__device__ bool g1p_isPoint ( const g1p_t p)

Check if the value stored in p is a valid point on the G1 curve.

Parameters
[in]p
Returns
bool 1 if is in the curve, zero otherwise.

Definition at line 34 of file g1p_ispoint.cu.

Here is the call graph for this function:
Here is the caller graph for this function: