2025-03-16 18:27:56 +05:00
|
|
|
#ifndef __FE_H
|
|
|
|
#define __FE_H
|
2025-03-16 22:03:05 +05:00
|
|
|
using fe = int[10];
|
2025-03-16 18:27:56 +05:00
|
|
|
void __device__ __host__ fe_1(fe h);
|
2025-03-16 22:03:05 +05:00
|
|
|
void __device__ __host__ fe_tobytes(unsigned char *s, const fe& h);
|
2025-03-17 05:32:00 +05:00
|
|
|
void __device__ __host__ fe_copy(fe h, const fe& f);
|
|
|
|
int __device__ __host__ fe_isnegative(const fe& f);
|
|
|
|
void __device__ __host__ fe_cmov(fe f, const fe& g, unsigned int b);
|
2025-03-16 22:03:05 +05:00
|
|
|
void __device__ __host__ fe_neg(fe h, const fe& f);
|
|
|
|
void __device__ __host__ fe_add(fe h, const fe& f, const fe& g);
|
|
|
|
void __device__ __host__ fe_invert(fe out, const fe& z);
|
|
|
|
void __device__ __host__ fe_sq(fe h, const fe& f);
|
2025-03-17 05:32:00 +05:00
|
|
|
void __device__ __host__ fe_sq2(fe h, const fe& f);
|
|
|
|
void __device__ __host__ fe_mul(fe h, const fe& __restrict__ f, const fe& __restrict__ g);
|
2025-03-16 22:03:05 +05:00
|
|
|
void __device__ __host__ fe_sub(fe h, const fe& f, const fe& g);
|
2025-03-16 18:27:56 +05:00
|
|
|
#endif
|