ed25519.h 960 B

123456789101112131415161718192021222324252627282930
  1. #ifndef ED25519_H
  2. #define ED25519_H
  3. #include <stdlib.h>
  4. #if defined(__cplusplus)
  5. extern "C" {
  6. #endif
  7. typedef unsigned char ed25519_signature[64];
  8. typedef unsigned char ed25519_public_key[32];
  9. typedef unsigned char ed25519_secret_key[32];
  10. typedef unsigned char curved25519_key[32];
  11. void ed25519_publickey(const ed25519_secret_key sk, ed25519_public_key pk);
  12. int ed25519_sign_open(const unsigned char *m, size_t mlen, const ed25519_public_key pk, const ed25519_signature RS);
  13. void ed25519_sign(const unsigned char *m, size_t mlen, const ed25519_secret_key sk, const ed25519_public_key pk, ed25519_signature RS);
  14. 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);
  15. void ed25519_randombytes_unsafe(void *out, size_t count);
  16. void curved25519_scalarmult_basepoint(curved25519_key pk, const curved25519_key e);
  17. #if defined(__cplusplus)
  18. }
  19. #endif
  20. #endif // ED25519_H