libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / include / sodium / crypto_sign.h
blob60d37ae08f9655232618628921f0d32ca658cc6e
1 #ifndef crypto_sign_H
2 #define crypto_sign_H
4 /*
5 * THREAD SAFETY: crypto_sign_keypair() is thread-safe,
6 * provided that you called sodium_init() once before using any
7 * other libsodium function.
8 * Other functions, including crypto_sign_seed_keypair() are always thread-safe.
9 */
11 #include <stddef.h>
13 #include "crypto_sign_ed25519.h"
14 #include "export.h"
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 #define crypto_sign_BYTES crypto_sign_ed25519_BYTES
21 SODIUM_EXPORT
22 size_t crypto_sign_bytes(void);
24 #define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES
25 SODIUM_EXPORT
26 size_t crypto_sign_publickeybytes(void);
28 #define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES
29 SODIUM_EXPORT
30 size_t crypto_sign_secretkeybytes(void);
32 #define crypto_sign_PRIMITIVE "ed25519"
33 SODIUM_EXPORT
34 const char *crypto_sign_primitive(void);
36 SODIUM_EXPORT
37 int crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk,
38 const unsigned char *seed);
40 SODIUM_EXPORT
41 int crypto_sign_keypair(unsigned char *pk, unsigned char *sk);
43 SODIUM_EXPORT
44 int crypto_sign(unsigned char *sm, unsigned long long *smlen,
45 const unsigned char *m, unsigned long long mlen,
46 const unsigned char *sk);
48 SODIUM_EXPORT
49 int crypto_sign_open(unsigned char *m, unsigned long long *mlen,
50 const unsigned char *sm, unsigned long long smlen,
51 const unsigned char *pk);
53 #ifdef __cplusplus
55 #endif
57 #endif