Files
zeekay 6322ce6797 fix: vendor sr25519-donna C files directly (no git submodule)
Git submodules don't work with Go module proxy — go get can't fetch
the submodule contents. Vendored the src/ directory from
TerenceGe/sr25519-donna directly into sr25519/donna/.

Updated unity build paths (donna/src/ → donna/) and CGO CFLAGS.
All 8 sr25519 tests pass.
2026-03-02 02:46:03 +00:00

21 lines
744 B
C

/*
This is based on isislovecruft's implementation (https://github.com/isislovecruft/ristretto-donna), fix some issues and make it working.
*/
#ifndef __ristretto255_H__
#define __ristretto255_H__
#include "ed25519-donna/ed25519-donna.h"
typedef uint8_t ristretto255_hash_output[64];
uint8_t uint8_32_ct_eq(const unsigned char a[32], const unsigned char b[32]);
int ristretto_decode(ge25519 *element, const unsigned char bytes[32]);
void ristretto_encode(unsigned char bytes[32], const ge25519 element);
void ristretto_from_uniform_bytes(ge25519 *element, const unsigned char bytes[64]);
int ristretto_ct_eq(const ge25519 *a, const ge25519 *b);
void ge25519_scalarmult_tg(ge25519 *r, const ge25519 *p1, const bignum256modm s1);
#endif