2025-03-14 22:52:59 +05:00
|
|
|
#ifndef __ED25519_CUH
|
|
|
|
#define __ED25519_CUH
|
2025-03-15 04:42:31 +05:00
|
|
|
struct ed25519_pt { unsigned char x[32], y[32], t[32], z[32]; };
|
2025-03-14 22:52:59 +05:00
|
|
|
extern __device__ __constant__ struct ed25519_pt ed25519_base;
|
|
|
|
extern __device__ __constant__ struct ed25519_pt ed25519_neutral;
|
2025-03-15 04:42:31 +05:00
|
|
|
extern __device__ __constant__ unsigned char ed25519_d[32];
|
|
|
|
extern __device__ __constant__ unsigned char ed25519_k[32];
|
2025-03-14 22:52:59 +05:00
|
|
|
__device__ void ed25519_unproject(unsigned char* x, unsigned char* y, const struct ed25519_pt* p);
|
|
|
|
__device__ void ed25519_pack(unsigned char* c, const unsigned char* x, const unsigned char* y);
|
|
|
|
__device__ __forceinline__ void ed25519_add(struct ed25519_pt* r, const struct ed25519_pt* p1, const struct ed25519_pt* p2);
|
|
|
|
__device__ __forceinline__ void ed25519_double(struct ed25519_pt* r, const struct ed25519_pt* p);
|
|
|
|
__device__ __forceinline__ void ed25519_copy(struct ed25519_pt* dst, const struct ed25519_pt* src);
|
|
|
|
__device__ void ed25519_smult(struct ed25519_pt* r_out, const struct ed25519_pt* p, const unsigned char* e);
|
|
|
|
__device__ void ed25519_prepare(unsigned char* e);
|
|
|
|
#endif
|