mirror of
https://github.com/luxfi/precompile.git
synced 2026-09-24 00:26:21 +00:00
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.
21 lines
744 B
C
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
|