tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

ed25519-donna.h (1561B)


      1 #ifndef ED25519_H
      2 #define ED25519_H
      3 
      4 #include <stdlib.h>
      5 
      6 typedef unsigned char ed25519_signature[64];
      7 typedef unsigned char ed25519_public_key[32];
      8 typedef unsigned char ed25519_secret_key[32];
      9 
     10 typedef unsigned char curved25519_key[32];
     11 
     12 void ed25519_publickey(const ed25519_secret_key sk, ed25519_public_key pk);
     13 int ed25519_sign_open(const unsigned char *m, size_t mlen, const ed25519_public_key pk, const ed25519_signature RS);
     14 void ed25519_sign(const unsigned char *m, size_t mlen, const ed25519_secret_key sk, const ed25519_public_key pk, ed25519_signature RS);
     15 
     16 int ed25519_sign_open_batch(const unsigned char **m, size_t *mlen, const unsigned char **pk, const unsigned char **RS, size_t num, int *valid);
     17 
     18 void ed25519_randombytes_unsafe(void *out, size_t count);
     19 
     20 void curved25519_scalarmult_basepoint(curved25519_key pk, const curved25519_key e);
     21 
     22 #if defined(ED25519_SSE2)
     23 void ed25519_publickey_sse2(const ed25519_secret_key sk, ed25519_public_key pk);
     24 int ed25519_sign_open_sse2(const unsigned char *m, size_t mlen, const ed25519_public_key pk, const ed25519_signature RS);
     25 void ed25519_sign_sse2(const unsigned char *m, size_t mlen, const ed25519_secret_key sk, const ed25519_public_key pk, ed25519_signature RS);
     26 
     27 int ed25519_sign_open_batch_sse2(const unsigned char **m, size_t *mlen, const unsigned char **pk, const unsigned char **RS, size_t num, int *valid);
     28 
     29 void ed25519_randombytes_unsafe_sse2(void *out, size_t count);
     30 
     31 void curved25519_scalarmult_basepoint_sse2(curved25519_key pk, const curved25519_key e);
     32 #endif
     33 
     34 #endif // ED25519_H