| 1 | #ifndef _XEDDSA_H_ |
| 2 | #define _XEDDSA_H_ |
| 3 | |
| 4 | #include <stdbool.h> |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | #include <cross_platform.h> |
| 8 | |
| 9 | #ifdef __cplusplus |
| 10 | extern "C" { |
| 11 | #endif |
| 12 | extern void INTERFACE ed25519_priv_sign(uint8_t*, const uint8_t*, const uint8_t*, const uint32_t, const uint8_t*); |
| 13 | extern void INTERFACE ed25519_seed_sign(uint8_t*, const uint8_t*, const uint8_t*, const uint32_t); |
| 14 | extern int INTERFACE ed25519_verify(const uint8_t*, const uint8_t*, const uint8_t*, const uint32_t); |
| 15 | |
| 16 | extern void INTERFACE curve25519_pub_to_ed25519_pub(uint8_t*, const uint8_t*, const bool); |
| 17 | extern int INTERFACE ed25519_pub_to_curve25519_pub(uint8_t*, const uint8_t*); |
| 18 | |
| 19 | extern void INTERFACE priv_to_curve25519_pub(uint8_t*, const uint8_t*); |
| 20 | extern void INTERFACE priv_to_ed25519_pub(uint8_t*, const uint8_t*); |
| 21 | extern void INTERFACE seed_to_ed25519_pub(uint8_t*, const uint8_t*); |
| 22 | |
| 23 | extern void INTERFACE priv_force_sign(uint8_t*, const uint8_t*, const bool); |
| 24 | extern void INTERFACE seed_to_priv(uint8_t*, const uint8_t*); |
| 25 | |
| 26 | extern int INTERFACE x25519(uint8_t*, const uint8_t*, const uint8_t*); |
| 27 | |
| 28 | extern int INTERFACE xeddsa_init(); |
| 29 | |
| 30 | extern const unsigned XEDDSA_VERSION_MAJOR; |
| 31 | extern const unsigned XEDDSA_VERSION_MINOR; |
| 32 | extern const unsigned XEDDSA_VERSION_REVISION; |
| 33 | #ifdef __cplusplus |
| 34 | } |
| 35 | #endif |
| 36 | |
| 37 | #endif /* _XEDDSA_H_ */ |