Permalink
Browse files

supercop-20081103

  • Loading branch information...
1 parent ddba2cc commit 8236bf3a76452cd5ea7876db17345b54aa84b9c9 Daniel J. Bernstein committed with Nov 3, 2008
Showing with 155,541 additions and 25,495 deletions.
  1. +13 −0 OPERATIONS
  2. +1 −0 crypto_auth/hmacmd5/checksum
  3. +2 −0 crypto_auth/hmacmd5/ref/api.h
  4. +97 −0 crypto_auth/hmacmd5/ref/hmac.c
  5. +9 −0 crypto_auth/hmacmd5/ref/verify.c
  6. +1 −0 crypto_auth/hmacsha256/checksum
  7. +2 −0 crypto_auth/hmacsha256/ref/api.h
  8. +83 −0 crypto_auth/hmacsha256/ref/hmac.c
  9. +9 −0 crypto_auth/hmacsha256/ref/verify.c
  10. 0 crypto_auth/hmacsha256/used
  11. +1 −0 crypto_auth/hmacsha512/checksum
  12. +2 −0 crypto_auth/hmacsha512/ref/api.h
  13. +86 −0 crypto_auth/hmacsha512/ref/hmac.c
  14. +9 −0 crypto_auth/hmacsha512/ref/verify.c
  15. 0 crypto_auth/hmacsha512/selected
  16. 0 crypto_auth/hmacsha512/used
  17. +60 −0 crypto_auth/measure.c
  18. +115 −0 crypto_auth/try.c
  19. +60 −0 crypto_auth1/measure.c
  20. +2 −0 crypto_auth1/poly1305/53/api.h
  21. +1,616 −0 crypto_auth1/poly1305/53/auth.c
  22. +9 −0 crypto_auth1/poly1305/53/verify.c
  23. +2 −0 crypto_auth1/poly1305/amd64/api.h
  24. +2,787 −0 crypto_auth1/poly1305/amd64/auth.s
  25. +85 −0 crypto_auth1/poly1305/amd64/constants.s
  26. +9 −0 crypto_auth1/poly1305/amd64/verify.c
  27. +1 −0 crypto_auth1/poly1305/checksum
  28. +2 −0 crypto_auth1/poly1305/ref/api.h
  29. +104 −0 crypto_auth1/poly1305/ref/auth.c
  30. +9 −0 crypto_auth1/poly1305/ref/verify.c
  31. 0 crypto_auth1/poly1305/used
  32. +2 −0 crypto_auth1/poly1305/x86/api.h
  33. +2,779 −0 crypto_auth1/poly1305/x86/auth.s
  34. +85 −0 crypto_auth1/poly1305/x86/constants.s
  35. +9 −0 crypto_auth1/poly1305/x86/verify.c
  36. +115 −0 crypto_auth1/try.c
  37. +1 −0 crypto_box/curve25519salsa20hmacsha512/checksum
  38. +22 −0 crypto_box/curve25519salsa20hmacsha512/ref/after.c
  39. +6 −0 crypto_box/curve25519salsa20hmacsha512/ref/api.h
  40. +18 −0 crypto_box/curve25519salsa20hmacsha512/ref/before.c
  41. +27 −0 crypto_box/curve25519salsa20hmacsha512/ref/box.c
  42. +12 −0 crypto_box/curve25519salsa20hmacsha512/ref/keypair.c
  43. 0 crypto_box/curve25519salsa20hmacsha512/used
  44. +1 −0 crypto_box/curve25519xsalsa20poly1305/checksum
  45. +22 −0 crypto_box/curve25519xsalsa20poly1305/ref/after.c
  46. +6 −0 crypto_box/curve25519xsalsa20poly1305/ref/api.h
  47. +16 −0 crypto_box/curve25519xsalsa20poly1305/ref/before.c
  48. +27 −0 crypto_box/curve25519xsalsa20poly1305/ref/box.c
  49. +12 −0 crypto_box/curve25519xsalsa20poly1305/ref/keypair.c
  50. 0 crypto_box/curve25519xsalsa20poly1305/used
  51. +133 −0 crypto_box/measure.c
  52. +191 −0 crypto_box/try.c
  53. +1 −0 crypto_core/hsalsa20/checksum
  54. +4 −0 crypto_core/hsalsa20/ref/api.h
  55. +135 −0 crypto_core/hsalsa20/ref/core.c
  56. +4 −0 crypto_core/hsalsa20/ref2/api.h
  57. +108 −0 crypto_core/hsalsa20/ref2/core.c
  58. 0 crypto_core/hsalsa20/used
  59. +14 −0 crypto_core/measure.c
  60. +1 −0 crypto_core/salsa20/checksum
  61. +4 −0 crypto_core/salsa20/ref/api.h
  62. +134 −0 crypto_core/salsa20/ref/core.c
  63. 0 crypto_core/salsa20/used
  64. +1 −0 crypto_core/salsa2012/checksum
  65. +4 −0 crypto_core/salsa2012/ref/api.h
  66. +134 −0 crypto_core/salsa2012/ref/core.c
  67. 0 crypto_core/salsa2012/used
  68. +1 −0 crypto_core/salsa208/checksum
  69. +4 −0 crypto_core/salsa208/ref/api.h
  70. +134 −0 crypto_core/salsa208/ref/core.c
  71. 0 crypto_core/salsa208/used
  72. +112 −0 crypto_core/try.c
  73. +3 −0 crypto_dh/curve25519/ref/api.h
  74. +16 −0 crypto_dh/curve25519/ref/usesmult.c
  75. +0 −3 crypto_dh/gls1271/ref/api.h
  76. BIN crypto_dh/gls1271/ref/documentation.pdf
  77. +0 −290 crypto_dh/gls1271/ref/gls1271.c
  78. +0 −2,581 crypto_dh/gls1271/ref/mrcomba.c
  79. +0 −1,058 crypto_dh/gls1271/ref/mrecn2.c
  80. +3 −0 crypto_dh/gls1271/ref3/api.h
  81. BIN crypto_dh/gls1271/ref3/documentation.pdf
  82. +19 −0 crypto_dh/gls1271/ref3/doit
  83. 0 crypto_dh/gls1271/{ref → ref3}/fp1271.s
  84. +570 −0 crypto_dh/gls1271/ref3/gls1271.c
  85. +47 −4 crypto_dh/gls1271/{ref → ref3}/miracl.h
  86. +5 −4 crypto_dh/gls1271/{ref → ref3}/mirdef.h
  87. 0 crypto_dh/gls1271/{ref → ref3}/mrarth0.c
  88. +1 −1 crypto_dh/gls1271/{ref → ref3}/mrarth1.c
  89. 0 crypto_dh/gls1271/{ref → ref3}/mrarth2.c
  90. 0 crypto_dh/gls1271/{ref → ref3}/mrbits.c
  91. 0 crypto_dh/gls1271/{ref → ref3}/mrcore.c
  92. +2,004 −0 crypto_dh/gls1271/ref3/mrecn2.c
  93. +468 −0 crypto_dh/gls1271/ref3/mrio1.c
  94. 0 crypto_dh/gls1271/{ref → ref3}/mrmonty.c
  95. 0 crypto_dh/gls1271/{ref → ref3}/mrmuldv.s
  96. 0 crypto_dh/gls1271/{ref → ref3}/mrxgcd.c
  97. +1 −0 crypto_dh/gls1271/{ref → ref3}/mrzzn2.c
  98. +4 −0 crypto_dh/gls1271/ref3/sizes.h
  99. +1 −1 crypto_dh/measure.c
  100. +1 −1 crypto_encrypt/measure.c
  101. +1 −0 crypto_hash/groestl224/checksum
  102. +3 −0 crypto_hash/groestl224/opt64/api.h
  103. +133 −0 crypto_hash/groestl224/opt64/brg_endian.h
  104. +231 −0 crypto_hash/groestl224/opt64/brg_types.h
  105. +231 −0 crypto_hash/groestl224/opt64/hash.c
  106. +49 −0 crypto_hash/groestl224/opt64/hash.h
  107. +32 −0 crypto_hash/groestl224/opt64/tables.h
  108. +1 −0 crypto_hash/groestl256/checksum
  109. +3 −0 crypto_hash/groestl256/opt64/api.h
  110. +133 −0 crypto_hash/groestl256/opt64/brg_endian.h
  111. +231 −0 crypto_hash/groestl256/opt64/brg_types.h
  112. +231 −0 crypto_hash/groestl256/opt64/hash.c
  113. +49 −0 crypto_hash/groestl256/opt64/hash.h
  114. +32 −0 crypto_hash/groestl256/opt64/tables.h
  115. +1 −0 crypto_hash/groestl384/checksum
  116. +3 −0 crypto_hash/groestl384/opt64/api.h
  117. +133 −0 crypto_hash/groestl384/opt64/brg_endian.h
  118. +231 −0 crypto_hash/groestl384/opt64/brg_types.h
  119. +251 −0 crypto_hash/groestl384/opt64/hash.c
  120. +49 −0 crypto_hash/groestl384/opt64/hash.h
  121. +32 −0 crypto_hash/groestl384/opt64/tables.h
  122. +1 −0 crypto_hash/groestl512/checksum
  123. +17 −0 crypto_hash/groestl512/opt64/README
  124. +3 −0 crypto_hash/groestl512/opt64/api.h
  125. +133 −0 crypto_hash/groestl512/opt64/brg_endian.h
  126. +231 −0 crypto_hash/groestl512/opt64/brg_types.h
  127. +251 −0 crypto_hash/groestl512/opt64/hash.c
  128. +49 −0 crypto_hash/groestl512/opt64/hash.h
  129. +32 −0 crypto_hash/groestl512/opt64/tables.h
  130. +28 −19 crypto_hash/md5/ref/hash.c
  131. +1 −1 crypto_hash/measure.c
  132. +13 −4 crypto_hash/sha256/ref/hash.c
  133. +13 −4 crypto_hash/sha512/ref/hash.c
  134. +23 −7 crypto_hash/try.c
  135. +2 −0 crypto_hashblocks/sha256/inplace/api.h
  136. +228 −0 crypto_hashblocks/sha256/inplace/blocks.c
  137. +2 −0 crypto_hashblocks/sha512/inplace/api.h
  138. +256 −0 crypto_hashblocks/sha512/inplace/blocks.c
  139. +25 −7 crypto_hashblocks/try.c
  140. +71 −0 crypto_secretbox/measure.c
  141. +1 −0 crypto_secretbox/salsa20hmacsha512/checksum
  142. +4 −0 crypto_secretbox/salsa20hmacsha512/ref/api.h
  143. +32 −0 crypto_secretbox/salsa20hmacsha512/ref/box.c
  144. 0 crypto_secretbox/salsa20hmacsha512/used
  145. +125 −0 crypto_secretbox/try.c
  146. +1 −0 crypto_secretbox/xsalsa20poly1305/checksum
  147. +4 −0 crypto_secretbox/xsalsa20poly1305/ref/api.h
  148. +35 −0 crypto_secretbox/xsalsa20poly1305/ref/box.c
  149. 0 crypto_secretbox/xsalsa20poly1305/used
  150. +1 −1 crypto_sign/measure.c
  151. +21 −0 crypto_sign/rwb0fuz1024/gmp/README
  152. +3 −0 crypto_sign/rwb0fuz1024/gmp/api.h
  153. +603 −0 crypto_sign/rwb0fuz1024/gmp/rwb0fuz1024.c
  154. +2 −0 crypto_smult/curve25519/athlon/api.h
  155. +8 −0 crypto_smult/curve25519/athlon/base.c
  156. +114 −0 crypto_smult/curve25519/athlon/const.s
  157. +195 −0 crypto_smult/curve25519/athlon/fromdouble.s
  158. +13 −0 crypto_smult/curve25519/athlon/init.s
  159. +3,990 −0 crypto_smult/curve25519/athlon/mainloop.s
  160. +410 −0 crypto_smult/curve25519/athlon/mult.s
  161. +91 −0 crypto_smult/curve25519/athlon/smult.c
  162. +298 −0 crypto_smult/curve25519/athlon/square.s
  163. +144 −0 crypto_smult/curve25519/athlon/todouble.s
  164. +1 −0 crypto_smult/curve25519/checksum
  165. +2 −0 crypto_smult/curve25519/donna/api.h
  166. +758 −0 crypto_smult/curve25519/donna/asm.s
  167. +8 −0 crypto_smult/curve25519/donna/base.c
  168. +204 −0 crypto_smult/curve25519/donna/smult.c
  169. +2 −0 crypto_smult/curve25519/donna_c64/api.h
  170. +8 −0 crypto_smult/curve25519/donna_c64/base.c
  171. +428 −0 crypto_smult/curve25519/donna_c64/smult.c
  172. +2 −0 crypto_smult/curve25519/ref/api.h
  173. +16 −0 crypto_smult/curve25519/ref/base.c
  174. +265 −0 crypto_smult/curve25519/ref/smult.c
  175. 0 crypto_smult/curve25519/used
  176. +57 −0 crypto_smult/measure.c
  177. +122 −0 crypto_smult/try.c
  178. +5,904 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/aes-ctr.s
  179. 0 crypto_stream/aes128estream/e/schwabe/{sparc-1 → athlon64-1}/api.c
  180. +2 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/api.h
  181. +18 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/e/Makefile
  182. +1,280 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/e/aes-ctr.q
  183. +5,904 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/e/aes-ctr.s
  184. +356 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/e/ecrypt-sync.h
  185. +1,041 −0 crypto_stream/aes128estream/e/schwabe/athlon64-1/e/table.s
  186. +6,155 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/aes-ctr.s
  187. +1 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/api.c
  188. +2 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/api.h
  189. +18 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/e/Makefile
  190. +1,318 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/e/aes-ctr.q
  191. +6,155 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/e/aes-ctr.s
  192. +356 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/e/ecrypt-sync.h
  193. +1,041 −0 crypto_stream/aes128estream/e/schwabe/athlon64-2/e/table.s
  194. +5,826 −0 crypto_stream/aes128estream/e/schwabe/core2/aes-ctr.s
  195. +1 −0 crypto_stream/aes128estream/e/schwabe/core2/api.c
  196. +2 −0 crypto_stream/aes128estream/e/schwabe/core2/api.h
  197. +18 −0 crypto_stream/aes128estream/e/schwabe/core2/e/Makefile
  198. +1,248 −0 crypto_stream/aes128estream/e/schwabe/core2/e/aes-ctr.q
  199. +5,826 −0 crypto_stream/aes128estream/e/schwabe/core2/e/aes-ctr.s
  200. +356 −0 crypto_stream/aes128estream/e/schwabe/core2/e/ecrypt-sync.h
  201. +1,041 −0 crypto_stream/aes128estream/e/schwabe/core2/e/table.s
  202. +6,077 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/aes-ctr.s
  203. +1 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/api.c
  204. +2 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/api.h
  205. +18 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/e/Makefile
  206. +1,240 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/e/aes-ctr.q
  207. +6,077 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/e/aes-ctr.s
  208. +356 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/e/ecrypt-sync.h
  209. +1,042 −0 crypto_stream/aes128estream/e/schwabe/pentium4-1/e/table.s
  210. +2,178 −2,170 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/ECRYPT_process_bytes.s
  211. +0 −363 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/aux.s
  212. +173 −129 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/e/ECRYPT_process_bytes.q
  213. +2,178 −2,170 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/e/ECRYPT_process_bytes.s
  214. +0 −264 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/e/aux.c
  215. +0 −363 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/e/aux.s
  216. +0 −2 crypto_stream/aes128estream/e/schwabe/ppc32linux-1/e/ecrypt-sync.h
  217. +0 −4,772 crypto_stream/aes128estream/e/schwabe/sparc-1/ECRYPT_process_bytes.s
  218. +0 −2 crypto_stream/aes128estream/e/schwabe/sparc-1/api.h
  219. +0 −1,835 crypto_stream/aes128estream/e/schwabe/sparc-1/aux.s
  220. +0 −1,399 crypto_stream/aes128estream/e/schwabe/sparc-1/e/ECRYPT_process_bytes.q
  221. +0 −4,772 crypto_stream/aes128estream/e/schwabe/sparc-1/e/ECRYPT_process_bytes.s
  222. +0 −602 crypto_stream/aes128estream/e/schwabe/sparc-1/e/aux.c
  223. +0 −1,835 crypto_stream/aes128estream/e/schwabe/sparc-1/e/aux.s
  224. +3,534 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/ECRYPT_process_bytes.s
  225. +1 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/api.c
  226. +2 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/api.h
  227. +14,830 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/aux.s
  228. +1,155 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/e/ECRYPT_process_bytes.q
  229. +3,534 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/e/ECRYPT_process_bytes.s
  230. 0 crypto_stream/aes128estream/e/schwabe/{sparc-1 → ultrasparc3-1}/e/Makefile
  231. +14,830 −0 crypto_stream/aes128estream/e/schwabe/ultrasparc3-1/e/aux.s
  232. +1 −3 crypto_stream/aes128estream/e/schwabe/{sparc-1 → ultrasparc3-1}/e/ecrypt-sync.h
  233. +1 −1 crypto_stream/aes256estream/checksum
  234. +1 −1 crypto_stream/chacha12/checksum
  235. +1 −1 crypto_stream/chacha20/checksum
  236. +1 −1 crypto_stream/chacha8/checksum
  237. +1 −1 crypto_stream/cryptmtv3/checksum
  238. +1 −1 crypto_stream/hc256/checksum
  239. +1 −1 crypto_stream/rabbit/checksum
  240. +2 −0 crypto_stream/salsa20/amd64_xmm6/api.h
  241. +4,823 −0 crypto_stream/salsa20/amd64_xmm6/stream.s
  242. +1 −1 crypto_stream/salsa20/checksum
  243. +0 −200 crypto_stream/salsa20/ref/salsa20.c
  244. +49 −0 crypto_stream/salsa20/ref/stream.c
  245. +52 −0 crypto_stream/salsa20/ref/xor.c
  246. +2 −0 crypto_stream/salsa20/x86_xmm5/api.h
  247. +5,078 −0 crypto_stream/salsa20/x86_xmm5/stream.s
  248. +2 −0 crypto_stream/salsa2012/amd64_xmm6/api.h
  249. +4,823 −0 crypto_stream/salsa2012/amd64_xmm6/stream.s
  250. +1 −1 crypto_stream/salsa2012/checksum
  251. +0 −200 crypto_stream/salsa2012/ref/salsa20.c
  252. +49 −0 crypto_stream/salsa2012/ref/stream.c
  253. +52 −0 crypto_stream/salsa2012/ref/xor.c
  254. +2 −0 crypto_stream/salsa2012/x86_xmm5/api.h
  255. +5,078 −0 crypto_stream/salsa2012/x86_xmm5/stream.s
  256. +2 −0 crypto_stream/salsa208/amd64_xmm6/api.h
  257. +4,823 −0 crypto_stream/salsa208/amd64_xmm6/stream.s
  258. +1 −1 crypto_stream/salsa208/checksum
  259. +0 −200 crypto_stream/salsa208/ref/salsa20.c
  260. +49 −0 crypto_stream/salsa208/ref/stream.c
  261. +52 −0 crypto_stream/salsa208/ref/xor.c
  262. +2 −0 crypto_stream/salsa208/x86_xmm5/api.h
  263. +5,078 −0 crypto_stream/salsa208/x86_xmm5/stream.s
  264. +1 −0 crypto_stream/snow20/checksum
  265. +1 −1 crypto_stream/sosemanuk/checksum
  266. +1 −1 crypto_stream/tpy/checksum
  267. +1 −1 crypto_stream/tpy6/checksum
  268. +1 −1 crypto_stream/tpypy/checksum
  269. +62 −13 crypto_stream/try.c
  270. +1 −0 crypto_stream/xsalsa20/checksum
  271. +2 −0 crypto_stream/xsalsa20/ref/api.h
  272. +22 −0 crypto_stream/xsalsa20/ref/stream.c
  273. +23 −0 crypto_stream/xsalsa20/ref/xor.c
  274. 0 crypto_stream/xsalsa20/used
  275. +1 −0 crypto_verify/16/checksum
  276. +1 −0 crypto_verify/16/ref/api.h
  277. +24 −0 crypto_verify/16/ref/verify.c
  278. 0 crypto_verify/16/used
  279. +1 −0 crypto_verify/32/checksum
  280. +1 −0 crypto_verify/32/ref/api.h
  281. +40 −0 crypto_verify/32/ref/verify.c
  282. 0 crypto_verify/32/used
  283. +14 −0 crypto_verify/measure.c
  284. +71 −0 crypto_verify/try.c
  285. +43 −74 do
  286. +6 −0 include/randombytes.h
  287. +44 −1 measure-anything.c
  288. +0 −43 randombytes/do
  289. +0 −42 randombytes/repeatable.c
  290. +0 −24 randombytes/repeatable.h
  291. +0 −15 randombytes/test.c
  292. +49 −2 try-anything.c
View
@@ -0,0 +1,13 @@
+crypto_verify :_BYTES (const unsigned char *,const unsigned char *)
+crypto_core :_OUTPUTBYTES:_INPUTBYTES:_KEYBYTES:_CONSTBYTES (unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *)
+crypto_hashblocks :_STATEBYTES:_BLOCKBYTES (unsigned char *,const unsigned char *,unsigned long long)
+crypto_hash :_BYTES (unsigned char *,const unsigned char *,unsigned long long)
+crypto_stream :_xor:_KEYBYTES:_NONCEBYTES (unsigned char *,unsigned long long,const unsigned char *,const unsigned char *):_xor(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *)
+crypto_auth1 :_verify:_BYTES:_KEYBYTES (unsigned char *,const unsigned char *,unsigned long long,const unsigned char *):_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *)
+crypto_auth :_verify:_BYTES:_KEYBYTES (unsigned char *,const unsigned char *,unsigned long long,const unsigned char *):_verify(const unsigned char *,const unsigned char *,unsigned long long,const unsigned char *)
+crypto_secretbox :_open:_KEYBYTES:_NONCEBYTES:_ZEROBYTES:_BOXZEROBYTES (unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *):_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *)
+crypto_smult :_base:_BYTES:_SCALARBYTES (unsigned char *,const unsigned char *,const unsigned char *):_base(unsigned char *,const unsigned char *)
+crypto_box :_open:_keypair:_beforenm:_afternm:_open_afternm:_PUBLICKEYBYTES:_SECRETKEYBYTES:_BEFORENMBYTES:_NONCEBYTES:_ZEROBYTES:_BOXZEROBYTES (unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *):_open(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *,const unsigned char *):_keypair(unsigned char *,unsigned char *):_beforenm(unsigned char *,const unsigned char *,const unsigned char *):_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *):_open_afternm(unsigned char *,const unsigned char *,unsigned long long,const unsigned char *,const unsigned char *)
+crypto_dh :_keypair:_BYTES:_SECRETKEYBYTES:_PUBLICKEYBYTES (unsigned char *,const unsigned char *,const unsigned char *):_keypair(unsigned char *,unsigned char *)
+crypto_sign :_open:_keypair:_BYTES:_SECRETKEYBYTES:_PUBLICKEYBYTES (unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *):_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *):_keypair(unsigned char *,unsigned char *)
+crypto_encrypt :_open:_keypair:_BYTES:_SECRETKEYBYTES:_PUBLICKEYBYTES (unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *):_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *):_keypair(unsigned char *,unsigned char *)
@@ -0,0 +1 @@
+a48d8d16952858bb6cc11b52d4d962d4
@@ -0,0 +1,2 @@
+#define crypto_auth_hmacmd5_ref_BYTES 16
+#define crypto_auth_hmacmd5_ref_KEYBYTES 32
@@ -0,0 +1,97 @@
+#include "crypto_hashblocks_md5.h"
+#include "crypto_auth.h"
+
+#define blocks crypto_hashblocks_md5
+
+typedef unsigned int uint32;
+
+int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
+{
+ unsigned char h[16];
+ unsigned char padded[128];
+ int i;
+ unsigned long long bits = 512 + (inlen << 3);
+
+ h[ 0] = 0x01;
+ h[ 1] = 0x23;
+ h[ 2] = 0x45;
+ h[ 3] = 0x67;
+ h[ 4] = 0x89;
+ h[ 5] = 0xab;
+ h[ 6] = 0xcd;
+ h[ 7] = 0xef;
+ h[ 8] = 0xfe;
+ h[ 9] = 0xdc;
+ h[10] = 0xba;
+ h[11] = 0x98;
+ h[12] = 0x76;
+ h[13] = 0x54;
+ h[14] = 0x32;
+ h[15] = 0x10;
+
+ for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x36;
+ for (i = 32;i < 64;++i) padded[i] = 0x36;
+
+ blocks(h,padded,64);
+ blocks(h,in,inlen);
+ in += inlen;
+ inlen &= 63;
+ in -= inlen;
+
+ for (i = 0;i < inlen;++i) padded[i] = in[i];
+ padded[inlen] = 0x80;
+
+ if (inlen < 56) {
+ for (i = inlen + 1;i < 56;++i) padded[i] = 0;
+ padded[56] = bits;
+ padded[57] = bits >> 8;
+ padded[58] = bits >> 16;
+ padded[59] = bits >> 24;
+ padded[60] = bits >> 32;
+ padded[61] = bits >> 40;
+ padded[62] = bits >> 48;
+ padded[63] = bits >> 56;
+ blocks(h,padded,64);
+ } else {
+ for (i = inlen + 1;i < 120;++i) padded[i] = 0;
+ padded[120] = bits;
+ padded[121] = bits >> 8;
+ padded[122] = bits >> 16;
+ padded[123] = bits >> 24;
+ padded[124] = bits >> 32;
+ padded[125] = bits >> 40;
+ padded[126] = bits >> 48;
+ padded[127] = bits >> 56;
+ blocks(h,padded,128);
+ }
+
+ for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x5c;
+ for (i = 32;i < 64;++i) padded[i] = 0x5c;
+ for (i = 0;i < 16;++i) padded[64 + i] = h[i];
+
+ out[ 0] = 0x01;
+ out[ 1] = 0x23;
+ out[ 2] = 0x45;
+ out[ 3] = 0x67;
+ out[ 4] = 0x89;
+ out[ 5] = 0xab;
+ out[ 6] = 0xcd;
+ out[ 7] = 0xef;
+ out[ 8] = 0xfe;
+ out[ 9] = 0xdc;
+ out[10] = 0xba;
+ out[11] = 0x98;
+ out[12] = 0x76;
+ out[13] = 0x54;
+ out[14] = 0x32;
+ out[15] = 0x10;
+
+ for (i = 16;i < 64;++i) padded[64 + i] = 0;
+ padded[64 + 16] = 0x80;
+ padded[64 + 56] = 128;
+ padded[64 + 57] = 2;
+
+ blocks(out,padded,128);
+
+ return 0;
+}
@@ -0,0 +1,9 @@
+#include "crypto_verify_16.h"
+#include "crypto_auth.h"
+
+int crypto_auth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
+{
+ unsigned char correct[16]; /* XXX: alignment! */
+ crypto_auth(correct,in,inlen,k);
+ return crypto_verify_16(h,correct);
+}
@@ -0,0 +1 @@
+3bd7abd4f4dce04396f2ac7cb1cff70607f692411c49a1563b037d31e1662632
@@ -0,0 +1,2 @@
+#define crypto_auth_hmacsha256_ref_BYTES 32
+#define crypto_auth_hmacsha256_ref_KEYBYTES 32
@@ -0,0 +1,83 @@
+/*
+ * 20080913
+ * D. J. Bernstein
+ * Public domain.
+ * */
+
+#include "crypto_hashblocks_sha256.h"
+#include "crypto_auth.h"
+
+#define blocks crypto_hashblocks_sha256
+
+typedef unsigned int uint32;
+
+static const char iv[32] = {
+ 0x6a,0x09,0xe6,0x67,
+ 0xbb,0x67,0xae,0x85,
+ 0x3c,0x6e,0xf3,0x72,
+ 0xa5,0x4f,0xf5,0x3a,
+ 0x51,0x0e,0x52,0x7f,
+ 0x9b,0x05,0x68,0x8c,
+ 0x1f,0x83,0xd9,0xab,
+ 0x5b,0xe0,0xcd,0x19,
+} ;
+
+int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
+{
+ unsigned char h[32];
+ unsigned char padded[128];
+ int i;
+ unsigned long long bits = 512 + (inlen << 3);
+
+ for (i = 0;i < 32;++i) h[i] = iv[i];
+
+ for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x36;
+ for (i = 32;i < 64;++i) padded[i] = 0x36;
+
+ blocks(h,padded,64);
+ blocks(h,in,inlen);
+ in += inlen;
+ inlen &= 63;
+ in -= inlen;
+
+ for (i = 0;i < inlen;++i) padded[i] = in[i];
+ padded[inlen] = 0x80;
+
+ if (inlen < 56) {
+ for (i = inlen + 1;i < 56;++i) padded[i] = 0;
+ padded[56] = bits >> 56;
+ padded[57] = bits >> 48;
+ padded[58] = bits >> 40;
+ padded[59] = bits >> 32;
+ padded[60] = bits >> 24;
+ padded[61] = bits >> 16;
+ padded[62] = bits >> 8;
+ padded[63] = bits;
+ blocks(h,padded,64);
+ } else {
+ for (i = inlen + 1;i < 120;++i) padded[i] = 0;
+ padded[120] = bits >> 56;
+ padded[121] = bits >> 48;
+ padded[122] = bits >> 40;
+ padded[123] = bits >> 32;
+ padded[124] = bits >> 24;
+ padded[125] = bits >> 16;
+ padded[126] = bits >> 8;
+ padded[127] = bits;
+ blocks(h,padded,128);
+ }
+
+ for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x5c;
+ for (i = 32;i < 64;++i) padded[i] = 0x5c;
+ for (i = 0;i < 32;++i) padded[64 + i] = h[i];
+
+ for (i = 0;i < 32;++i) out[i] = iv[i];
+
+ for (i = 32;i < 64;++i) padded[64 + i] = 0;
+ padded[64 + 32] = 0x80;
+ padded[64 + 62] = 3;
+
+ blocks(out,padded,128);
+
+ return 0;
+}
@@ -0,0 +1,9 @@
+#include "crypto_verify_32.h"
+#include "crypto_auth.h"
+
+int crypto_auth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
+{
+ unsigned char correct[32]; /* XXX: alignment! */
+ crypto_auth(correct,in,inlen,k);
+ return crypto_verify_32(h,correct);
+}
No changes.
@@ -0,0 +1 @@
+2f5e8a6a0cac012d8d001351d7d583e69f91390df46305c3608e0c2893491886
@@ -0,0 +1,2 @@
+#define crypto_auth_hmacsha512_ref_BYTES 32
+#define crypto_auth_hmacsha512_ref_KEYBYTES 32
@@ -0,0 +1,86 @@
+/*
+ * 20080913
+ * D. J. Bernstein
+ * Public domain.
+ * */
+
+#include "crypto_hashblocks_sha512.h"
+#include "crypto_auth.h"
+
+#define blocks crypto_hashblocks_sha512
+
+typedef unsigned long long uint64;
+
+static const unsigned char iv[64] = {
+ 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08,
+ 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b,
+ 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b,
+ 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1,
+ 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1,
+ 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f,
+ 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b,
+ 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79
+} ;
+
+int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
+{
+ unsigned char h[64];
+ unsigned char padded[256];
+ int i;
+ unsigned long long bytes = 128 + inlen;
+
+ for (i = 0;i < 64;++i) h[i] = iv[i];
+
+ for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x36;
+ for (i = 32;i < 128;++i) padded[i] = 0x36;
+
+ blocks(h,padded,128);
+ blocks(h,in,inlen);
+ in += inlen;
+ inlen &= 127;
+ in -= inlen;
+
+ for (i = 0;i < inlen;++i) padded[i] = in[i];
+ padded[inlen] = 0x80;
+
+ if (inlen < 112) {
+ for (i = inlen + 1;i < 119;++i) padded[i] = 0;
+ padded[119] = bytes >> 61;
+ padded[120] = bytes >> 53;
+ padded[121] = bytes >> 45;
+ padded[122] = bytes >> 37;
+ padded[123] = bytes >> 29;
+ padded[124] = bytes >> 21;
+ padded[125] = bytes >> 13;
+ padded[126] = bytes >> 5;
+ padded[127] = bytes << 3;
+ blocks(h,padded,128);
+ } else {
+ for (i = inlen + 1;i < 247;++i) padded[i] = 0;
+ padded[247] = bytes >> 61;
+ padded[248] = bytes >> 53;
+ padded[249] = bytes >> 45;
+ padded[250] = bytes >> 37;
+ padded[251] = bytes >> 29;
+ padded[252] = bytes >> 21;
+ padded[253] = bytes >> 13;
+ padded[254] = bytes >> 5;
+ padded[255] = bytes << 3;
+ blocks(h,padded,256);
+ }
+
+ for (i = 0;i < 32;++i) padded[i] = k[i] ^ 0x5c;
+ for (i = 32;i < 128;++i) padded[i] = 0x5c;
+
+ for (i = 0;i < 64;++i) padded[128 + i] = h[i];
+ for (i = 0;i < 64;++i) h[i] = iv[i];
+
+ for (i = 64;i < 128;++i) padded[128 + i] = 0;
+ padded[128 + 64] = 0x80;
+ padded[128 + 126] = 6;
+
+ blocks(h,padded,256);
+ for (i = 0;i < 32;++i) out[i] = h[i];
+
+ return 0;
+}
@@ -0,0 +1,9 @@
+#include "crypto_verify_32.h"
+#include "crypto_auth.h"
+
+int crypto_auth_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k)
+{
+ unsigned char correct[32]; /* XXX: alignment! */
+ crypto_auth(correct,in,inlen,k);
+ return crypto_verify_32(h,correct);
+}
No changes.
No changes.
View
@@ -0,0 +1,60 @@
+#include "crypto_auth.h"
+#include "randombytes.h"
+#include "cpucycles.h"
+
+extern void printentry(long long,const char *,long long *,long long);
+extern unsigned char *alignedcalloc(unsigned long long);
+extern const char *primitiveimplementation;
+extern const char *implementationversion;
+extern const char *sizenames[];
+extern const long long sizes[];
+extern void allocate(void);
+extern void measure(void);
+
+const char *primitiveimplementation = crypto_auth_IMPLEMENTATION;
+const char *implementationversion = crypto_auth_VERSION;
+const char *sizenames[] = { "outputbytes", "keybytes", 0 };
+const long long sizes[] = { crypto_auth_BYTES, crypto_auth_KEYBYTES };
+
+#define MAXTEST_BYTES 4096
+
+static unsigned char *k;
+static unsigned char *m;
+static unsigned char *h;
+
+void allocate(void)
+{
+ k = alignedcalloc(crypto_auth_KEYBYTES);
+ m = alignedcalloc(MAXTEST_BYTES);
+ h = alignedcalloc(crypto_auth_BYTES);
+}
+
+#define TIMINGS 15
+static long long cycles[TIMINGS + 1];
+
+void measure(void)
+{
+ int i;
+ int loop;
+ int mlen;
+
+ for (loop = 0;loop < 3;++loop) {
+ for (mlen = 0;mlen <= MAXTEST_BYTES;mlen += 1 + mlen / 8192) {
+ randombytes(k,crypto_auth_KEYBYTES);
+ randombytes(m,mlen);
+ randombytes(h,crypto_auth_BYTES);
+ for (i = 0;i <= TIMINGS;++i) {
+ cycles[i] = cpucycles();
+ crypto_auth(h,m,mlen,k);
+ }
+ for (i = 0;i < TIMINGS;++i) cycles[i] = cycles[i + 1] - cycles[i];
+ printentry(mlen,"cycles",cycles,TIMINGS);
+ for (i = 0;i <= TIMINGS;++i) {
+ cycles[i] = cpucycles();
+ crypto_auth_verify(h,m,mlen,k);
+ }
+ for (i = 0;i < TIMINGS;++i) cycles[i] = cycles[i + 1] - cycles[i];
+ printentry(mlen,"verify_cycles",cycles,TIMINGS);
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit 8236bf3

Please sign in to comment.