2013-08-18 18:01:20 +02:00
|
|
|
#ifndef ED25519_H
|
|
|
|
#define ED25519_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2014-03-09 01:49:36 +01:00
|
|
|
#include "libtorrent/config.hpp" // for TORRENT_EXPORT
|
2013-08-18 18:01:20 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ED25519_NO_SEED
|
2014-03-06 10:45:16 +01:00
|
|
|
int TORRENT_EXPORT ed25519_create_seed(unsigned char *seed);
|
2013-08-18 18:01:20 +02:00
|
|
|
#endif
|
|
|
|
|
2014-03-06 10:45:16 +01:00
|
|
|
void TORRENT_EXPORT ed25519_create_keypair(unsigned char *public_key, unsigned char *private_key, const unsigned char *seed);
|
|
|
|
void TORRENT_EXPORT ed25519_sign(unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *public_key, const unsigned char *private_key);
|
|
|
|
int TORRENT_EXPORT ed25519_verify(const unsigned char *signature, const unsigned char *message, size_t message_len, const unsigned char *private_key);
|
|
|
|
void TORRENT_EXPORT ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, const unsigned char *scalar);
|
|
|
|
void TORRENT_EXPORT ed25519_key_exchange(unsigned char *shared_secret, const unsigned char *public_key, const unsigned char *private_key);
|
2013-08-18 18:01:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|