11#include <botan/ed25519.h>
14#include <botan/internal/ct_utils.h>
15#include <botan/internal/ed25519_internal.h>
16#include <botan/internal/sha2_64.h>
41 const uint8_t domain_sep[],
42 size_t domain_sep_len) {
55 sha.
update(domain_sep, domain_sep_len);
63 sha.
update(domain_sep, domain_sep_len);
75 const uint8_t sig[64],
77 const uint8_t domain_sep[],
78 size_t domain_sep_len) {
91 const uint64_t CURVE25519_ORDER[4] = {
105 for(
size_t i = 0; i != 4; ++i) {
106 if(s[i] > CURVE25519_ORDER[i]) {
109 if(s[i] < CURVE25519_ORDER[i]) {
117 sha.
update(domain_sep, domain_sep_len);
void update(const uint8_t in[], size_t length)
void final(uint8_t out[])
constexpr CT::Mask< T > is_equal(const T x[], const T y[], size_t len)
int ge_frombytes_negate_vartime(ge_p3 *v, const uint8_t *)
void ed25519_sign(uint8_t sig[64], const uint8_t m[], size_t mlen, const uint8_t sk[64], const uint8_t domain_sep[], size_t domain_sep_len)
void ed25519_gen_keypair(uint8_t *pk, uint8_t *sk, const uint8_t seed[32])
void ge_scalarmult_base(uint8_t out[32], const uint8_t in[32])
constexpr auto load_le(ParamTs &&... params)
bool ed25519_verify(const uint8_t *m, size_t mlen, const uint8_t sig[64], const uint8_t *pk, const uint8_t domain_sep[], size_t domain_sep_len)
constexpr void copy_mem(T *out, const T *in, size_t n)
void sc_reduce(uint8_t *)
void ge_double_scalarmult_vartime(uint8_t out[32], const uint8_t a[], const ge_p3 *A, const uint8_t b[])
void sc_muladd(uint8_t *, const uint8_t *, const uint8_t *, const uint8_t *)