aboutsummaryrefslogtreecommitdiff
path: root/src/util/tweetnacl-gnunet.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-11-26 21:20:02 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-11-26 21:20:26 +0100
commitc4797b14ed1ccf70d2882aa9e9075ebef564d34b (patch)
tree91e744c0e8c2ea842aad39da65ddf220e1188048 /src/util/tweetnacl-gnunet.h
parentf4011df26cf9ab60213c84f6601e95033bc1111f (diff)
downloadgnunet-c4797b14ed1ccf70d2882aa9e9075ebef564d34b.tar.gz
gnunet-c4797b14ed1ccf70d2882aa9e9075ebef564d34b.zip
DCE / GNUNET_TWEETNACL prefix for exported symbols
Diffstat (limited to 'src/util/tweetnacl-gnunet.h')
-rw-r--r--src/util/tweetnacl-gnunet.h105
1 files changed, 34 insertions, 71 deletions
diff --git a/src/util/tweetnacl-gnunet.h b/src/util/tweetnacl-gnunet.h
index d413541ff..239166ffc 100644
--- a/src/util/tweetnacl-gnunet.h
+++ b/src/util/tweetnacl-gnunet.h
@@ -13,75 +13,38 @@
13#ifndef TWEETNACL_H 13#ifndef TWEETNACL_H
14#define TWEETNACL_H 14#define TWEETNACL_H
15#include <stdint.h> 15#include <stdint.h>
16#define crypto_scalarmult_PRIMITIVE "curve25519" 16
17#define crypto_scalarmult crypto_scalarmult_curve25519 17
18#define crypto_scalarmult_base crypto_scalarmult_curve25519_base 18#define GNUNET_TWEETNACL_SIGN_SECRETKEYBYTES 64
19#define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 19#define GNUNET_TWEETNACL_SIGN_PUBLICBYTES 32
20#define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 20#define GNUNET_TWEETNACL_SCALARMULT_BYTES 32
21#define crypto_scalarmult_IMPLEMENTATION \ 21
22 crypto_scalarmult_curve25519_IMPLEMENTATION 22int
23#define crypto_scalarmult_VERSION crypto_scalarmult_curve25519_VERSION 23GNUNET_TWEETNACL_scalarmult_curve25519 (uint8_t *,
24#define crypto_scalarmult_curve25519_tweet_BYTES 32 24 const uint8_t *,
25#define crypto_scalarmult_curve25519_tweet_SCALARBYTES 32 25 const uint8_t *);
26extern int crypto_scalarmult_curve25519_tweet (uint8_t *, 26extern int
27 const uint8_t *, 27GNUNET_TWEETNACL_scalarmult_curve25519_base (uint8_t *,
28 const uint8_t *); 28 const uint8_t *);
29extern int crypto_scalarmult_curve25519_tweet_base (uint8_t *, 29void
30 const uint8_t *); 30GNUNET_TWEETNACL_sign_pk_from_seed (uint8_t *pk, const uint8_t *seed);
31#define crypto_scalarmult_curve25519_tweet_VERSION "-" 31
32#define crypto_scalarmult_curve25519 crypto_scalarmult_curve25519_tweet 32void
33#define crypto_scalarmult_curve25519_base \ 33GNUNET_TWEETNACL_sign_sk_from_seed (uint8_t *sk, const uint8_t *seed);
34 crypto_scalarmult_curve25519_tweet_base 34
35#define crypto_scalarmult_curve25519_BYTES \ 35int
36 crypto_scalarmult_curve25519_tweet_BYTES 36GNUNET_TWEETNACL_sign_ed25519_pk_to_curve25519 (uint8_t *x25519_pk,
37#define crypto_scalarmult_curve25519_SCALARBYTES \ 37 const uint8_t *ed25519_pk);
38 crypto_scalarmult_curve25519_tweet_SCALARBYTES 38
39#define crypto_scalarmult_curve25519_VERSION \ 39int
40 crypto_scalarmult_curve25519_tweet_VERSION 40GNUNET_TWEETNACL_sign_detached_verify (const uint8_t *sig,
41#define crypto_scalarmult_curve25519_IMPLEMENTATION \ 41 const uint8_t *m,
42 "crypto_scalarmult/curve25519/tweet" 42 uint64_t n,
43#define crypto_sign_PRIMITIVE "ed25519" 43 const uint8_t *pk);
44#define crypto_sign crypto_sign_ed25519 44
45#define crypto_sign_BYTES crypto_sign_ed25519_BYTES 45int
46#define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES 46GNUNET_TWEETNACL_sign_detached (uint8_t *sig,
47#define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES 47 const uint8_t *m,
48#define crypto_sign_IMPLEMENTATION crypto_sign_ed25519_IMPLEMENTATION 48 uint64_t n,
49#define crypto_sign_VERSION crypto_sign_ed25519_VERSION 49 const uint8_t *sk);
50#define crypto_sign_ed25519_tweet_BYTES 64
51#define crypto_sign_ed25519_tweet_PUBLICKEYBYTES 32
52#define crypto_sign_ed25519_tweet_SECRETKEYBYTES 64
53extern int crypto_sign_ed25519_tweet (uint8_t *,
54 uint64_t *,
55 const uint8_t *,
56 uint64_t,
57 const uint8_t *);
58extern int crypto_sign_ed25519_tweet_open (uint8_t *,
59 uint64_t *,
60 const uint8_t *,
61 uint64_t,
62 const uint8_t *);
63extern int crypto_sign_ed25519_tweet_keypair (uint8_t *,uint8_t *);
64#define crypto_sign_ed25519_tweet_VERSION "-"
65#define crypto_sign_ed25519 crypto_sign_ed25519_tweet
66#define crypto_sign_ed25519_open crypto_sign_ed25519_tweet_open
67#define crypto_sign_ed25519_keypair crypto_sign_ed25519_tweet_keypair
68#define crypto_sign_ed25519_BYTES crypto_sign_ed25519_tweet_BYTES
69#define crypto_sign_ed25519_PUBLICKEYBYTES \
70 crypto_sign_ed25519_tweet_PUBLICKEYBYTES
71#define crypto_sign_ed25519_SECRETKEYBYTES \
72 crypto_sign_ed25519_tweet_SECRETKEYBYTES
73#define crypto_sign_ed25519_VERSION crypto_sign_ed25519_tweet_VERSION
74#define crypto_sign_ed25519_IMPLEMENTATION "crypto_sign/ed25519/tweet"
75void crypto_sign_pk_from_seed (uint8_t *pk, const uint8_t *seed);
76void crypto_sign_sk_from_seed (uint8_t *sk, const uint8_t *seed);
77int crypto_sign_ed25519_pk_to_curve25519 (uint8_t *x25519_pk,
78 const uint8_t *ed25519_pk);
79int crypto_sign_detached_verify (const uint8_t *sig,
80 const uint8_t *m,
81 uint64_t n,
82 const uint8_t *pk);
83int crypto_sign_detached (uint8_t *sig,
84 const uint8_t *m,
85 uint64_t n,
86 const uint8_t *sk);
87#endif 50#endif