tweetnacl.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. // tweetnacl.h - written and placed in the public domain by Jeffrey Walton
  2. /// \file nr.h
  3. /// \brief Declarations for Bernstein's TweetNaCL
  4. /// \details TweetNaCL is used to cross-validate the library's implementations.
  5. /// The implementation itself is not optimized and kind of amusing. However
  6. /// it serves a valuable purpose for cross-validation.
  7. /// \details Don't use this in production.
  8. #ifndef TWEETNACL_H
  9. #define TWEETNACL_H
  10. #define crypto_auth_PRIMITIVE "hmacsha512256"
  11. #define crypto_auth crypto_auth_hmacsha512256
  12. #define crypto_auth_verify crypto_auth_hmacsha512256_verify
  13. #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES
  14. #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES
  15. #define crypto_auth_IMPLEMENTATION crypto_auth_hmacsha512256_IMPLEMENTATION
  16. #define crypto_auth_VERSION crypto_auth_hmacsha512256_VERSION
  17. #define crypto_auth_hmacsha512256_tweet_BYTES 32
  18. #define crypto_auth_hmacsha512256_tweet_KEYBYTES 32
  19. extern int crypto_auth_hmacsha512256_tweet(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
  20. extern int crypto_auth_hmacsha512256_tweet_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
  21. #define crypto_auth_hmacsha512256_tweet_VERSION "-"
  22. #define crypto_auth_hmacsha512256 crypto_auth_hmacsha512256_tweet
  23. #define crypto_auth_hmacsha512256_verify crypto_auth_hmacsha512256_tweet_verify
  24. #define crypto_auth_hmacsha512256_BYTES crypto_auth_hmacsha512256_tweet_BYTES
  25. #define crypto_auth_hmacsha512256_KEYBYTES crypto_auth_hmacsha512256_tweet_KEYBYTES
  26. #define crypto_auth_hmacsha512256_VERSION crypto_auth_hmacsha512256_tweet_VERSION
  27. #define crypto_auth_hmacsha512256_IMPLEMENTATION "crypto_auth/hmacsha512256/tweet"
  28. #define crypto_box_PRIMITIVE "curve25519xsalsa20poly1305"
  29. #define crypto_box crypto_box_curve25519xsalsa20poly1305
  30. #define crypto_box_open crypto_box_curve25519xsalsa20poly1305_open
  31. #define crypto_box_keypair crypto_box_curve25519xsalsa20poly1305_keypair
  32. #define crypto_box_beforenm crypto_box_curve25519xsalsa20poly1305_beforenm
  33. #define crypto_box_afternm crypto_box_curve25519xsalsa20poly1305_afternm
  34. #define crypto_box_open_afternm crypto_box_curve25519xsalsa20poly1305_open_afternm
  35. #define crypto_box_PUBLICKEYBYTES crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES
  36. #define crypto_box_SECRETKEYBYTES crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES
  37. #define crypto_box_BEFORENMBYTES crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES
  38. #define crypto_box_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_NONCEBYTES
  39. #define crypto_box_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_ZEROBYTES
  40. #define crypto_box_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES
  41. #define crypto_box_IMPLEMENTATION crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION
  42. #define crypto_box_VERSION crypto_box_curve25519xsalsa20poly1305_VERSION
  43. #define crypto_box_curve25519xsalsa20poly1305_tweet_PUBLICKEYBYTES 32
  44. #define crypto_box_curve25519xsalsa20poly1305_tweet_SECRETKEYBYTES 32
  45. #define crypto_box_curve25519xsalsa20poly1305_tweet_BEFORENMBYTES 32
  46. #define crypto_box_curve25519xsalsa20poly1305_tweet_NONCEBYTES 24
  47. #define crypto_box_curve25519xsalsa20poly1305_tweet_ZEROBYTES 32
  48. #define crypto_box_curve25519xsalsa20poly1305_tweet_BOXZEROBYTES 16
  49. extern int crypto_box_curve25519xsalsa20poly1305_tweet(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *);
  50. extern int crypto_box_curve25519xsalsa20poly1305_tweet_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *);
  51. extern int crypto_box_curve25519xsalsa20poly1305_tweet_keypair(unsigned char *,unsigned char *);
  52. extern int crypto_box_curve25519xsalsa20poly1305_tweet_beforenm(unsigned char *,const unsigned char *,const unsigned char *);
  53. extern int crypto_box_curve25519xsalsa20poly1305_tweet_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  54. extern int crypto_box_curve25519xsalsa20poly1305_tweet_open_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  55. #define crypto_box_curve25519xsalsa20poly1305_tweet_VERSION "-"
  56. #define crypto_box_curve25519xsalsa20poly1305 crypto_box_curve25519xsalsa20poly1305_tweet
  57. #define crypto_box_curve25519xsalsa20poly1305_open crypto_box_curve25519xsalsa20poly1305_tweet_open
  58. #define crypto_box_curve25519xsalsa20poly1305_keypair crypto_box_curve25519xsalsa20poly1305_tweet_keypair
  59. #define crypto_box_curve25519xsalsa20poly1305_beforenm crypto_box_curve25519xsalsa20poly1305_tweet_beforenm
  60. #define crypto_box_curve25519xsalsa20poly1305_afternm crypto_box_curve25519xsalsa20poly1305_tweet_afternm
  61. #define crypto_box_curve25519xsalsa20poly1305_open_afternm crypto_box_curve25519xsalsa20poly1305_tweet_open_afternm
  62. #define crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES crypto_box_curve25519xsalsa20poly1305_tweet_PUBLICKEYBYTES
  63. #define crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES crypto_box_curve25519xsalsa20poly1305_tweet_SECRETKEYBYTES
  64. #define crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES crypto_box_curve25519xsalsa20poly1305_tweet_BEFORENMBYTES
  65. #define crypto_box_curve25519xsalsa20poly1305_NONCEBYTES crypto_box_curve25519xsalsa20poly1305_tweet_NONCEBYTES
  66. #define crypto_box_curve25519xsalsa20poly1305_ZEROBYTES crypto_box_curve25519xsalsa20poly1305_tweet_ZEROBYTES
  67. #define crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES crypto_box_curve25519xsalsa20poly1305_tweet_BOXZEROBYTES
  68. #define crypto_box_curve25519xsalsa20poly1305_VERSION crypto_box_curve25519xsalsa20poly1305_tweet_VERSION
  69. #define crypto_box_curve25519xsalsa20poly1305_IMPLEMENTATION "crypto_box/curve25519xsalsa20poly1305/tweet"
  70. #define crypto_core_PRIMITIVE "salsa20"
  71. #define crypto_core crypto_core_salsa20
  72. #define crypto_core_OUTPUTBYTES crypto_core_salsa20_OUTPUTBYTES
  73. #define crypto_core_INPUTBYTES crypto_core_salsa20_INPUTBYTES
  74. #define crypto_core_KEYBYTES crypto_core_salsa20_KEYBYTES
  75. #define crypto_core_CONSTBYTES crypto_core_salsa20_CONSTBYTES
  76. #define crypto_core_IMPLEMENTATION crypto_core_salsa20_IMPLEMENTATION
  77. #define crypto_core_VERSION crypto_core_salsa20_VERSION
  78. #define crypto_core_salsa20_tweet_OUTPUTBYTES 64
  79. #define crypto_core_salsa20_tweet_INPUTBYTES 16
  80. #define crypto_core_salsa20_tweet_KEYBYTES 32
  81. #define crypto_core_salsa20_tweet_CONSTBYTES 16
  82. extern int crypto_core_salsa20_tweet(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
  83. #define crypto_core_salsa20_tweet_VERSION "-"
  84. #define crypto_core_salsa20 crypto_core_salsa20_tweet
  85. #define crypto_core_salsa20_OUTPUTBYTES crypto_core_salsa20_tweet_OUTPUTBYTES
  86. #define crypto_core_salsa20_INPUTBYTES crypto_core_salsa20_tweet_INPUTBYTES
  87. #define crypto_core_salsa20_KEYBYTES crypto_core_salsa20_tweet_KEYBYTES
  88. #define crypto_core_salsa20_CONSTBYTES crypto_core_salsa20_tweet_CONSTBYTES
  89. #define crypto_core_salsa20_VERSION crypto_core_salsa20_tweet_VERSION
  90. #define crypto_core_salsa20_IMPLEMENTATION "crypto_core/salsa20/tweet"
  91. #define crypto_core_hsalsa20_tweet_OUTPUTBYTES 32
  92. #define crypto_core_hsalsa20_tweet_INPUTBYTES 16
  93. #define crypto_core_hsalsa20_tweet_KEYBYTES 32
  94. #define crypto_core_hsalsa20_tweet_CONSTBYTES 16
  95. extern int crypto_core_hsalsa20_tweet(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *);
  96. #define crypto_core_hsalsa20_tweet_VERSION "-"
  97. #define crypto_core_hsalsa20 crypto_core_hsalsa20_tweet
  98. #define crypto_core_hsalsa20_OUTPUTBYTES crypto_core_hsalsa20_tweet_OUTPUTBYTES
  99. #define crypto_core_hsalsa20_INPUTBYTES crypto_core_hsalsa20_tweet_INPUTBYTES
  100. #define crypto_core_hsalsa20_KEYBYTES crypto_core_hsalsa20_tweet_KEYBYTES
  101. #define crypto_core_hsalsa20_CONSTBYTES crypto_core_hsalsa20_tweet_CONSTBYTES
  102. #define crypto_core_hsalsa20_VERSION crypto_core_hsalsa20_tweet_VERSION
  103. #define crypto_core_hsalsa20_IMPLEMENTATION "crypto_core/hsalsa20/tweet"
  104. #define crypto_hashblocks_PRIMITIVE "sha512"
  105. #define crypto_hashblocks crypto_hashblocks_sha512
  106. #define crypto_hashblocks_STATEBYTES crypto_hashblocks_sha512_STATEBYTES
  107. #define crypto_hashblocks_BLOCKBYTES crypto_hashblocks_sha512_BLOCKBYTES
  108. #define crypto_hashblocks_IMPLEMENTATION crypto_hashblocks_sha512_IMPLEMENTATION
  109. #define crypto_hashblocks_VERSION crypto_hashblocks_sha512_VERSION
  110. #define crypto_hashblocks_sha512_tweet_STATEBYTES 64
  111. #define crypto_hashblocks_sha512_tweet_BLOCKBYTES 128
  112. extern int crypto_hashblocks_sha512_tweet(unsigned char *,const unsigned char *,unsigned long long);
  113. #define crypto_hashblocks_sha512_tweet_VERSION "-"
  114. #define crypto_hashblocks_sha512 crypto_hashblocks_sha512_tweet
  115. #define crypto_hashblocks_sha512_STATEBYTES crypto_hashblocks_sha512_tweet_STATEBYTES
  116. #define crypto_hashblocks_sha512_BLOCKBYTES crypto_hashblocks_sha512_tweet_BLOCKBYTES
  117. #define crypto_hashblocks_sha512_VERSION crypto_hashblocks_sha512_tweet_VERSION
  118. #define crypto_hashblocks_sha512_IMPLEMENTATION "crypto_hashblocks/sha512/tweet"
  119. #define crypto_hashblocks_sha256_tweet_STATEBYTES 32
  120. #define crypto_hashblocks_sha256_tweet_BLOCKBYTES 64
  121. extern int crypto_hashblocks_sha256_tweet(unsigned char *,const unsigned char *,unsigned long long);
  122. #define crypto_hashblocks_sha256_tweet_VERSION "-"
  123. #define crypto_hashblocks_sha256 crypto_hashblocks_sha256_tweet
  124. #define crypto_hashblocks_sha256_STATEBYTES crypto_hashblocks_sha256_tweet_STATEBYTES
  125. #define crypto_hashblocks_sha256_BLOCKBYTES crypto_hashblocks_sha256_tweet_BLOCKBYTES
  126. #define crypto_hashblocks_sha256_VERSION crypto_hashblocks_sha256_tweet_VERSION
  127. #define crypto_hashblocks_sha256_IMPLEMENTATION "crypto_hashblocks/sha256/tweet"
  128. #define crypto_hash_PRIMITIVE "sha512"
  129. #define crypto_hash crypto_hash_sha512
  130. #define crypto_hash_BYTES crypto_hash_sha512_BYTES
  131. #define crypto_hash_IMPLEMENTATION crypto_hash_sha512_IMPLEMENTATION
  132. #define crypto_hash_VERSION crypto_hash_sha512_VERSION
  133. #define crypto_hash_sha512_tweet_BYTES 64
  134. extern int crypto_hash_sha512_tweet(unsigned char *,const unsigned char *,unsigned long long);
  135. #define crypto_hash_sha512_tweet_VERSION "-"
  136. #define crypto_hash_sha512 crypto_hash_sha512_tweet
  137. #define crypto_hash_sha512_BYTES crypto_hash_sha512_tweet_BYTES
  138. #define crypto_hash_sha512_VERSION crypto_hash_sha512_tweet_VERSION
  139. #define crypto_hash_sha512_IMPLEMENTATION "crypto_hash/sha512/tweet"
  140. #define crypto_hash_sha256_tweet_BYTES 32
  141. extern int crypto_hash_sha256_tweet(unsigned char *,const unsigned char *,unsigned long long);
  142. #define crypto_hash_sha256_tweet_VERSION "-"
  143. #define crypto_hash_sha256 crypto_hash_sha256_tweet
  144. #define crypto_hash_sha256_BYTES crypto_hash_sha256_tweet_BYTES
  145. #define crypto_hash_sha256_VERSION crypto_hash_sha256_tweet_VERSION
  146. #define crypto_hash_sha256_IMPLEMENTATION "crypto_hash/sha256/tweet"
  147. #define crypto_onetimeauth_PRIMITIVE "poly1305"
  148. #define crypto_onetimeauth crypto_onetimeauth_poly1305
  149. #define crypto_onetimeauth_verify crypto_onetimeauth_poly1305_verify
  150. #define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES
  151. #define crypto_onetimeauth_KEYBYTES crypto_onetimeauth_poly1305_KEYBYTES
  152. #define crypto_onetimeauth_IMPLEMENTATION crypto_onetimeauth_poly1305_IMPLEMENTATION
  153. #define crypto_onetimeauth_VERSION crypto_onetimeauth_poly1305_VERSION
  154. #define crypto_onetimeauth_poly1305_tweet_BYTES 16
  155. #define crypto_onetimeauth_poly1305_tweet_KEYBYTES 32
  156. extern int crypto_onetimeauth_poly1305_tweet(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
  157. extern int crypto_onetimeauth_poly1305_tweet_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *);
  158. #define crypto_onetimeauth_poly1305_tweet_VERSION "-"
  159. #define crypto_onetimeauth_poly1305 crypto_onetimeauth_poly1305_tweet
  160. #define crypto_onetimeauth_poly1305_verify crypto_onetimeauth_poly1305_tweet_verify
  161. #define crypto_onetimeauth_poly1305_BYTES crypto_onetimeauth_poly1305_tweet_BYTES
  162. #define crypto_onetimeauth_poly1305_KEYBYTES crypto_onetimeauth_poly1305_tweet_KEYBYTES
  163. #define crypto_onetimeauth_poly1305_VERSION crypto_onetimeauth_poly1305_tweet_VERSION
  164. #define crypto_onetimeauth_poly1305_IMPLEMENTATION "crypto_onetimeauth/poly1305/tweet"
  165. #define crypto_scalarmult_PRIMITIVE "curve25519"
  166. #define crypto_scalarmult crypto_scalarmult_curve25519
  167. #define crypto_scalarmult_base crypto_scalarmult_curve25519_base
  168. #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES
  169. #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES
  170. #define crypto_scalarmult_IMPLEMENTATION crypto_scalarmult_curve25519_IMPLEMENTATION
  171. #define crypto_scalarmult_VERSION crypto_scalarmult_curve25519_VERSION
  172. #define crypto_scalarmult_curve25519_tweet_BYTES 32
  173. #define crypto_scalarmult_curve25519_tweet_SCALARBYTES 32
  174. extern int crypto_scalarmult_curve25519_tweet(unsigned char *,const unsigned char *,const unsigned char *);
  175. extern int crypto_scalarmult_curve25519_tweet_base(unsigned char *,const unsigned char *);
  176. #define crypto_scalarmult_curve25519_tweet_VERSION "-"
  177. #define crypto_scalarmult_curve25519 crypto_scalarmult_curve25519_tweet
  178. #define crypto_scalarmult_curve25519_base crypto_scalarmult_curve25519_tweet_base
  179. #define crypto_scalarmult_curve25519_BYTES crypto_scalarmult_curve25519_tweet_BYTES
  180. #define crypto_scalarmult_curve25519_SCALARBYTES crypto_scalarmult_curve25519_tweet_SCALARBYTES
  181. #define crypto_scalarmult_curve25519_VERSION crypto_scalarmult_curve25519_tweet_VERSION
  182. #define crypto_scalarmult_curve25519_IMPLEMENTATION "crypto_scalarmult/curve25519/tweet"
  183. #define crypto_secretbox_PRIMITIVE "xsalsa20poly1305"
  184. #define crypto_secretbox crypto_secretbox_xsalsa20poly1305
  185. #define crypto_secretbox_open crypto_secretbox_xsalsa20poly1305_open
  186. #define crypto_secretbox_KEYBYTES crypto_secretbox_xsalsa20poly1305_KEYBYTES
  187. #define crypto_secretbox_NONCEBYTES crypto_secretbox_xsalsa20poly1305_NONCEBYTES
  188. #define crypto_secretbox_ZEROBYTES crypto_secretbox_xsalsa20poly1305_ZEROBYTES
  189. #define crypto_secretbox_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES
  190. #define crypto_secretbox_IMPLEMENTATION crypto_secretbox_xsalsa20poly1305_IMPLEMENTATION
  191. #define crypto_secretbox_VERSION crypto_secretbox_xsalsa20poly1305_VERSION
  192. #define crypto_secretbox_xsalsa20poly1305_tweet_KEYBYTES 32
  193. #define crypto_secretbox_xsalsa20poly1305_tweet_NONCEBYTES 24
  194. #define crypto_secretbox_xsalsa20poly1305_tweet_ZEROBYTES 32
  195. #define crypto_secretbox_xsalsa20poly1305_tweet_BOXZEROBYTES 16
  196. extern int crypto_secretbox_xsalsa20poly1305_tweet(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  197. extern int crypto_secretbox_xsalsa20poly1305_tweet_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  198. #define crypto_secretbox_xsalsa20poly1305_tweet_VERSION "-"
  199. #define crypto_secretbox_xsalsa20poly1305 crypto_secretbox_xsalsa20poly1305_tweet
  200. #define crypto_secretbox_xsalsa20poly1305_open crypto_secretbox_xsalsa20poly1305_tweet_open
  201. #define crypto_secretbox_xsalsa20poly1305_KEYBYTES crypto_secretbox_xsalsa20poly1305_tweet_KEYBYTES
  202. #define crypto_secretbox_xsalsa20poly1305_NONCEBYTES crypto_secretbox_xsalsa20poly1305_tweet_NONCEBYTES
  203. #define crypto_secretbox_xsalsa20poly1305_ZEROBYTES crypto_secretbox_xsalsa20poly1305_tweet_ZEROBYTES
  204. #define crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES crypto_secretbox_xsalsa20poly1305_tweet_BOXZEROBYTES
  205. #define crypto_secretbox_xsalsa20poly1305_VERSION crypto_secretbox_xsalsa20poly1305_tweet_VERSION
  206. #define crypto_secretbox_xsalsa20poly1305_IMPLEMENTATION "crypto_secretbox/xsalsa20poly1305/tweet"
  207. #define crypto_sign_PRIMITIVE "ed25519"
  208. #define crypto_sign crypto_sign_ed25519
  209. #define crypto_sign_open crypto_sign_ed25519_open
  210. #define crypto_sign_keypair crypto_sign_ed25519_keypair
  211. #define crypto_sign_BYTES crypto_sign_ed25519_BYTES
  212. #define crypto_sign_PUBLICKEYBYTES crypto_sign_ed25519_PUBLICKEYBYTES
  213. #define crypto_sign_SECRETKEYBYTES crypto_sign_ed25519_SECRETKEYBYTES
  214. #define crypto_sign_IMPLEMENTATION crypto_sign_ed25519_IMPLEMENTATION
  215. #define crypto_sign_VERSION crypto_sign_ed25519_VERSION
  216. #define crypto_sign_ed25519_tweet_BYTES 64
  217. #define crypto_sign_ed25519_tweet_PUBLICKEYBYTES 32
  218. #define crypto_sign_ed25519_tweet_SECRETKEYBYTES 64
  219. extern int crypto_sign_ed25519_tweet(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
  220. extern int crypto_sign_ed25519_tweet_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
  221. extern int crypto_sign_ed25519_tweet_keypair(unsigned char *,unsigned char *);
  222. #define crypto_sign_ed25519_tweet_VERSION "-"
  223. #define crypto_sign_ed25519 crypto_sign_ed25519_tweet
  224. #define crypto_sign_ed25519_open crypto_sign_ed25519_tweet_open
  225. #define crypto_sign_ed25519_keypair crypto_sign_ed25519_tweet_keypair
  226. #define crypto_sign_ed25519_BYTES crypto_sign_ed25519_tweet_BYTES
  227. #define crypto_sign_ed25519_PUBLICKEYBYTES crypto_sign_ed25519_tweet_PUBLICKEYBYTES
  228. #define crypto_sign_ed25519_SECRETKEYBYTES crypto_sign_ed25519_tweet_SECRETKEYBYTES
  229. #define crypto_sign_ed25519_VERSION crypto_sign_ed25519_tweet_VERSION
  230. #define crypto_sign_ed25519_IMPLEMENTATION "crypto_sign/ed25519/tweet"
  231. #define crypto_stream_PRIMITIVE "xsalsa20"
  232. #define crypto_stream crypto_stream_xsalsa20
  233. #define crypto_stream_xor crypto_stream_xsalsa20_xor
  234. #define crypto_stream_KEYBYTES crypto_stream_xsalsa20_KEYBYTES
  235. #define crypto_stream_NONCEBYTES crypto_stream_xsalsa20_NONCEBYTES
  236. #define crypto_stream_IMPLEMENTATION crypto_stream_xsalsa20_IMPLEMENTATION
  237. #define crypto_stream_VERSION crypto_stream_xsalsa20_VERSION
  238. #define crypto_stream_xsalsa20_tweet_KEYBYTES 32
  239. #define crypto_stream_xsalsa20_tweet_NONCEBYTES 24
  240. extern int crypto_stream_xsalsa20_tweet(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  241. extern int crypto_stream_xsalsa20_tweet_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  242. #define crypto_stream_xsalsa20_tweet_VERSION "-"
  243. #define crypto_stream_xsalsa20 crypto_stream_xsalsa20_tweet
  244. #define crypto_stream_xsalsa20_xor crypto_stream_xsalsa20_tweet_xor
  245. #define crypto_stream_xsalsa20_KEYBYTES crypto_stream_xsalsa20_tweet_KEYBYTES
  246. #define crypto_stream_xsalsa20_NONCEBYTES crypto_stream_xsalsa20_tweet_NONCEBYTES
  247. #define crypto_stream_xsalsa20_VERSION crypto_stream_xsalsa20_tweet_VERSION
  248. #define crypto_stream_xsalsa20_IMPLEMENTATION "crypto_stream/xsalsa20/tweet"
  249. #define crypto_stream_salsa20_tweet_KEYBYTES 32
  250. #define crypto_stream_salsa20_tweet_NONCEBYTES 8
  251. extern int crypto_stream_salsa20_tweet(unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  252. extern int crypto_stream_salsa20_tweet_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *);
  253. #define crypto_stream_salsa20_tweet_VERSION "-"
  254. #define crypto_stream_salsa20 crypto_stream_salsa20_tweet
  255. #define crypto_stream_salsa20_xor crypto_stream_salsa20_tweet_xor
  256. #define crypto_stream_salsa20_KEYBYTES crypto_stream_salsa20_tweet_KEYBYTES
  257. #define crypto_stream_salsa20_NONCEBYTES crypto_stream_salsa20_tweet_NONCEBYTES
  258. #define crypto_stream_salsa20_VERSION crypto_stream_salsa20_tweet_VERSION
  259. #define crypto_stream_salsa20_IMPLEMENTATION "crypto_stream/salsa20/tweet"
  260. #define crypto_verify_PRIMITIVE "16"
  261. #define crypto_verify crypto_verify_16
  262. #define crypto_verify_BYTES crypto_verify_16_BYTES
  263. #define crypto_verify_IMPLEMENTATION crypto_verify_16_IMPLEMENTATION
  264. #define crypto_verify_VERSION crypto_verify_16_VERSION
  265. #define crypto_verify_16_tweet_BYTES 16
  266. extern int crypto_verify_16_tweet(const unsigned char *,const unsigned char *);
  267. #define crypto_verify_16_tweet_VERSION "-"
  268. #define crypto_verify_16 crypto_verify_16_tweet
  269. #define crypto_verify_16_BYTES crypto_verify_16_tweet_BYTES
  270. #define crypto_verify_16_VERSION crypto_verify_16_tweet_VERSION
  271. #define crypto_verify_16_IMPLEMENTATION "crypto_verify/16/tweet"
  272. #define crypto_verify_32_tweet_BYTES 32
  273. extern int crypto_verify_32_tweet(const unsigned char *,const unsigned char *);
  274. #define crypto_verify_32_tweet_VERSION "-"
  275. #define crypto_verify_32 crypto_verify_32_tweet
  276. #define crypto_verify_32_BYTES crypto_verify_32_tweet_BYTES
  277. #define crypto_verify_32_VERSION crypto_verify_32_tweet_VERSION
  278. #define crypto_verify_32_IMPLEMENTATION "crypto_verify/32/tweet"
  279. #endif