use NULL value in load_path_suffix to NOT load any files
[oweals/gnunet.git] / src / util / tweetnacl-gnunet.h
1 /*
2       This file has been placed in the public domain.
3
4       Based on TweetNaCl version 20140427
5
6       Originally obtained from:
7       https://tweetnacl.cr.yp.to/20140427/tweetnacl.h
8
9       SPDX-License-Identifier: 0BSD
10  */
11
12
13 #ifndef TWEETNACL_H
14 #define TWEETNACL_H
15 #include <stdint.h>
16
17
18 #define GNUNET_TWEETNACL_SIGN_SECRETKEYBYTES 64
19 #define GNUNET_TWEETNACL_SIGN_PUBLICBYTES 32
20 #define GNUNET_TWEETNACL_SCALARMULT_BYTES 32
21
22 int
23 GNUNET_TWEETNACL_scalarmult_curve25519 (uint8_t *,
24                                         const uint8_t *,
25                                         const uint8_t *);
26 extern int
27 GNUNET_TWEETNACL_scalarmult_curve25519_base (uint8_t *,
28                                              const uint8_t *);
29 void
30 GNUNET_TWEETNACL_sign_pk_from_seed (uint8_t *pk, const uint8_t *seed);
31
32 void
33 GNUNET_TWEETNACL_sign_sk_from_seed (uint8_t *sk, const uint8_t *seed);
34
35 int
36 GNUNET_TWEETNACL_sign_ed25519_pk_to_curve25519 (uint8_t *x25519_pk,
37                                                 const uint8_t *ed25519_pk);
38
39 int
40 GNUNET_TWEETNACL_sign_detached_verify (const uint8_t *sig,
41                                        const uint8_t *m,
42                                        uint64_t n,
43                                        const uint8_t *pk);
44
45 int
46 GNUNET_TWEETNACL_sign_detached (uint8_t *sig,
47                                 const uint8_t *m,
48                                 uint64_t n,
49                                 const uint8_t *sk);
50
51 void
52 GNUNET_TWEETNACL_scalarmult_gnunet_ecdsa (uint8_t *pk, const uint8_t *s);
53
54 #endif