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

Go to the source code of this file.

Functions

__device__ bool g1p_eq (const g1p_t &p, const g1p_t &q)
 Compares two projective points returns true when equal. This function compares if both parameters represent the same point on the curve. The equality is given by comparing X and Y coordinates divided by Z coordinates (p.X/p.Z == q.X/q.Z) && (p.Y/p.Z == q.Y/q.Z). Code-wise it is done by cross multiplication which also works for Z==0: (p.X*q.Z == q.X*p.Z) && (p.Y*q.Z == q.Y*p.Z) More...
 
__device__ bool g1p_neq (const g1p_t &p, const g1p_t &q)
 Compares two projective points, returns true when not equal. This function compares if both parameters represent the distinct points on the curve. The equality is given by comparing X and Y coordinates divided by Z coordinates (p.X/p.Z == q.X/q.Z) && (p.Y/p.Z == q.Y/q.Z). Code-wise it is done by cross multiplication which also works for Z==0: (p.X*q.Z == q.X*p.Z) && (p.Y*q.Z == q.Y*p.Z) More...
 

Function Documentation

◆ g1p_eq()

__device__ bool g1p_eq ( const g1p_t p,
const g1p_t q 
)

Compares two projective points returns true when equal. This function compares if both parameters represent the same point on the curve. The equality is given by comparing X and Y coordinates divided by Z coordinates (p.X/p.Z == q.X/q.Z) && (p.Y/p.Z == q.Y/q.Z). Code-wise it is done by cross multiplication which also works for Z==0: (p.X*q.Z == q.X*p.Z) && (p.Y*q.Z == q.Y*p.Z)

Parameters
[in]pProjective G1 point
[in]qProjective G1 point
Returns
bool 1 if equal, 0 otherwise

Definition at line 23 of file g1p_compare.cu.

Here is the caller graph for this function:

◆ g1p_neq()

__device__ bool g1p_neq ( const g1p_t p,
const g1p_t q 
)

Compares two projective points, returns true when not equal. This function compares if both parameters represent the distinct points on the curve. The equality is given by comparing X and Y coordinates divided by Z coordinates (p.X/p.Z == q.X/q.Z) && (p.Y/p.Z == q.Y/q.Z). Code-wise it is done by cross multiplication which also works for Z==0: (p.X*q.Z == q.X*p.Z) && (p.Y*q.Z == q.Y*p.Z)

Parameters
[in]pProjective G1 point
[in]qProjective G1 point
Returns
bool 0 if equal, 1 otherwise

Definition at line 68 of file g1p_compare.cu.

Here is the caller graph for this function: