rbnacl-libsodium 0.4.5a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +35 -0
  3. data/.gitmodules +3 -0
  4. data/CHANGES.md +3 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE +21 -0
  7. data/README.md +23 -0
  8. data/Rakefile +1 -0
  9. data/ext/rbnacl/extconf.rb +30 -0
  10. data/lib/rbnacl/libsodium.rb +11 -0
  11. data/lib/rbnacl/libsodium/version.rb +5 -0
  12. data/rbnacl-libsodium.gemspec +25 -0
  13. data/vendor/libsodium/AUTHORS +101 -0
  14. data/vendor/libsodium/ChangeLog +68 -0
  15. data/vendor/libsodium/LICENSE +16 -0
  16. data/vendor/libsodium/Makefile.am +20 -0
  17. data/vendor/libsodium/README +1 -0
  18. data/vendor/libsodium/README.markdown +246 -0
  19. data/vendor/libsodium/THANKS +17 -0
  20. data/vendor/libsodium/autogen.sh +16 -0
  21. data/vendor/libsodium/configure.ac +405 -0
  22. data/vendor/libsodium/dist-build/android.sh +48 -0
  23. data/vendor/libsodium/dist-build/iphone.sh +16 -0
  24. data/vendor/libsodium/dist-build/msys.sh +9 -0
  25. data/vendor/libsodium/libsodium.pc.in +11 -0
  26. data/vendor/libsodium/libsodium.sln +38 -0
  27. data/vendor/libsodium/libsodium.vcxproj +508 -0
  28. data/vendor/libsodium/libsodium.vcxproj.filters +569 -0
  29. data/vendor/libsodium/logo.png +0 -0
  30. data/vendor/libsodium/m4/ax_check_compile_flag.m4 +73 -0
  31. data/vendor/libsodium/m4/ax_check_gnu_make.m4 +78 -0
  32. data/vendor/libsodium/m4/ax_check_link_flag.m4 +72 -0
  33. data/vendor/libsodium/m4/ld-output-def.m4 +29 -0
  34. data/vendor/libsodium/m4/pkg.m4 +214 -0
  35. data/vendor/libsodium/msvc-scripts/Makefile.am +4 -0
  36. data/vendor/libsodium/msvc-scripts/process.bat +8 -0
  37. data/vendor/libsodium/msvc-scripts/rep.vbs +12 -0
  38. data/vendor/libsodium/msvc-scripts/sodium.props +25 -0
  39. data/vendor/libsodium/src/Makefile.am +3 -0
  40. data/vendor/libsodium/src/libsodium/Makefile.am +232 -0
  41. data/vendor/libsodium/src/libsodium/crypto_auth/crypto_auth.c +34 -0
  42. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +16 -0
  43. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/checksum +1 -0
  44. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/api.h +10 -0
  45. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c +83 -0
  46. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/verify_hmacsha256.c +9 -0
  47. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +16 -0
  48. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/checksum +1 -0
  49. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/api.h +10 -0
  50. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/hmac_hmacsha512256.c +86 -0
  51. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/verify_hmacsha512256.c +9 -0
  52. data/vendor/libsodium/src/libsodium/crypto_auth/try.c +119 -0
  53. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box.c +95 -0
  54. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +41 -0
  55. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/checksum +1 -0
  56. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +22 -0
  57. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +19 -0
  58. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +19 -0
  59. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +27 -0
  60. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +12 -0
  61. data/vendor/libsodium/src/libsodium/crypto_box/try.c +195 -0
  62. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/checksum +1 -0
  63. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c +26 -0
  64. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/api.h +11 -0
  65. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +108 -0
  66. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/checksum +1 -0
  67. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +26 -0
  68. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/api.h +11 -0
  69. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +134 -0
  70. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/checksum +1 -0
  71. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +26 -0
  72. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/api.h +11 -0
  73. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +134 -0
  74. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/checksum +1 -0
  75. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +26 -0
  76. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/api.h +11 -0
  77. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +134 -0
  78. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +31 -0
  79. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/api.h +4 -0
  80. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +132 -0
  81. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +169 -0
  82. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +364 -0
  83. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2s-ref.c +355 -0
  84. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +61 -0
  85. data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +84 -0
  86. data/vendor/libsodium/src/libsodium/crypto_hash/crypto_hash.c +9 -0
  87. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/checksum +1 -0
  88. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c +11 -0
  89. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/api.h +8 -0
  90. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/hash_sha256.c +69 -0
  91. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/checksum +1 -0
  92. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c +11 -0
  93. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/api.h +8 -0
  94. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/hash_sha512.c +71 -0
  95. data/vendor/libsodium/src/libsodium/crypto_hash/try.c +76 -0
  96. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/checksum +1 -0
  97. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c +16 -0
  98. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/api.h +9 -0
  99. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/blocks_sha256.c +212 -0
  100. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/checksum +1 -0
  101. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c +16 -0
  102. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/api.h +9 -0
  103. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/blocks_sha512.c +239 -0
  104. data/vendor/libsodium/src/libsodium/crypto_hashblocks/try.c +78 -0
  105. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +34 -0
  106. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +8 -0
  107. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c +1661 -0
  108. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c +10 -0
  109. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/api.h +8 -0
  110. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +151 -0
  111. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/portable-jane.h +772 -0
  112. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c +10 -0
  113. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +36 -0
  114. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c +16 -0
  115. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +152 -0
  116. data/vendor/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +34 -0
  117. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/checksum +1 -0
  118. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +9 -0
  119. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c +13 -0
  120. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +426 -0
  121. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/api.h +8 -0
  122. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/base_curve25519_ref.c +20 -0
  123. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/smult_curve25519_ref.c +268 -0
  124. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c +14 -0
  125. data/vendor/libsodium/src/libsodium/crypto_scalarmult/try.c +125 -0
  126. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +48 -0
  127. data/vendor/libsodium/src/libsodium/crypto_secretbox/try.c +129 -0
  128. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/checksum +1 -0
  129. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +12 -0
  130. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c +35 -0
  131. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +26 -0
  132. data/vendor/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c +27 -0
  133. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/api.h +8 -0
  134. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +91 -0
  135. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c +11 -0
  136. data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +61 -0
  137. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/description +1 -0
  138. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +14 -0
  139. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base.h +1344 -0
  140. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base2.h +40 -0
  141. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h +1 -0
  142. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h +1 -0
  143. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h +56 -0
  144. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_0.c +19 -0
  145. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_1.c +19 -0
  146. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_add.c +57 -0
  147. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_cmov.c +63 -0
  148. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_copy.c +29 -0
  149. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_frombytes.c +73 -0
  150. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_invert.c +14 -0
  151. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnegative.c +16 -0
  152. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnonzero.c +19 -0
  153. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_mul.c +253 -0
  154. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_neg.c +45 -0
  155. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_pow22523.c +13 -0
  156. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq.c +149 -0
  157. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq2.c +160 -0
  158. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sub.c +57 -0
  159. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_tobytes.c +119 -0
  160. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h +95 -0
  161. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.c +11 -0
  162. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h +97 -0
  163. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_double_scalarmult.c +96 -0
  164. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_frombytes.c +50 -0
  165. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.c +11 -0
  166. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h +88 -0
  167. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.c +11 -0
  168. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h +88 -0
  169. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c +12 -0
  170. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c +13 -0
  171. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_0.c +8 -0
  172. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.c +11 -0
  173. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h +73 -0
  174. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_0.c +9 -0
  175. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_dbl.c +12 -0
  176. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_cached.c +17 -0
  177. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_p2.c +12 -0
  178. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_tobytes.c +14 -0
  179. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_precomp_0.c +8 -0
  180. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c +105 -0
  181. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.c +11 -0
  182. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h +97 -0
  183. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_tobytes.c +14 -0
  184. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +31 -0
  185. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +40 -0
  186. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h +160 -0
  187. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h +160 -0
  188. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h +15 -0
  189. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_muladd.c +368 -0
  190. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_reduce.c +275 -0
  191. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +38 -0
  192. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h +1 -0
  193. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +26 -0
  194. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +13 -0
  195. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519.h +54 -0
  196. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c +348 -0
  197. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519.h +34 -0
  198. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519_edwards25519sha512batch.c +230 -0
  199. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519.h +51 -0
  200. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519_edwards25519sha512batch.c +146 -0
  201. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c +102 -0
  202. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c +21 -0
  203. data/vendor/libsodium/src/libsodium/crypto_sign/try.c +87 -0
  204. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/checksum +1 -0
  205. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +159 -0
  206. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/api.h +14 -0
  207. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c +59 -0
  208. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +788 -0
  209. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common_aes128ctr.c +64 -0
  210. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts.h +28 -0
  211. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts_aes128ctr.c +14 -0
  212. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +47 -0
  213. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +131 -0
  214. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c +28 -0
  215. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +10 -0
  216. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +181 -0
  217. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c +21 -0
  218. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +274 -0
  219. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +274 -0
  220. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table.h +56 -0
  221. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +238 -0
  222. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256.h +171 -0
  223. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +14 -0
  224. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +27 -0
  225. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +21 -0
  226. data/vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c +36 -0
  227. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/api.h +1 -0
  228. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +950 -0
  229. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/checksum +1 -0
  230. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/api.h +8 -0
  231. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +55 -0
  232. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +58 -0
  233. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +16 -0
  234. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/checksum +1 -0
  235. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/api.h +11 -0
  236. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +51 -0
  237. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +54 -0
  238. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +16 -0
  239. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/checksum +1 -0
  240. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h +10 -0
  241. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +51 -0
  242. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +54 -0
  243. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +16 -0
  244. data/vendor/libsodium/src/libsodium/crypto_stream/try.c +122 -0
  245. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/checksum +1 -0
  246. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +11 -0
  247. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +24 -0
  248. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +25 -0
  249. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +16 -0
  250. data/vendor/libsodium/src/libsodium/crypto_verify/16/checksum +1 -0
  251. data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/api.h +2 -0
  252. data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c +24 -0
  253. data/vendor/libsodium/src/libsodium/crypto_verify/16/verify_16_api.c +6 -0
  254. data/vendor/libsodium/src/libsodium/crypto_verify/32/checksum +1 -0
  255. data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/api.h +2 -0
  256. data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c +40 -0
  257. data/vendor/libsodium/src/libsodium/crypto_verify/32/verify_32_api.c +6 -0
  258. data/vendor/libsodium/src/libsodium/crypto_verify/try.c +76 -0
  259. data/vendor/libsodium/src/libsodium/include/Makefile.am +63 -0
  260. data/vendor/libsodium/src/libsodium/include/sodium.h +48 -0
  261. data/vendor/libsodium/src/libsodium/include/sodium/core.h +18 -0
  262. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +36 -0
  263. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +36 -0
  264. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +36 -0
  265. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +83 -0
  266. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +72 -0
  267. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h +40 -0
  268. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h +40 -0
  269. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h +40 -0
  270. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h +40 -0
  271. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +70 -0
  272. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +87 -0
  273. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +23 -0
  274. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +29 -0
  275. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +29 -0
  276. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha256.h +32 -0
  277. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha512.h +32 -0
  278. data/vendor/libsodium/src/libsodium/include/sodium/crypto_int32.h +8 -0
  279. data/vendor/libsodium/src/libsodium/include/sodium/crypto_int64.h +8 -0
  280. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +37 -0
  281. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +65 -0
  282. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h +34 -0
  283. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_donna.h +34 -0
  284. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult.h +36 -0
  285. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h.in +44 -0
  286. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +47 -0
  287. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +44 -0
  288. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +33 -0
  289. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +29 -0
  290. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +61 -0
  291. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +52 -0
  292. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +44 -0
  293. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +46 -0
  294. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +60 -0
  295. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +61 -0
  296. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h.in +54 -0
  297. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +43 -0
  298. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +43 -0
  299. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +44 -0
  300. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint16.h +8 -0
  301. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint32.h +8 -0
  302. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint64.h +8 -0
  303. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint8.h +8 -0
  304. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h +25 -0
  305. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h +25 -0
  306. data/vendor/libsodium/src/libsodium/include/sodium/export.h +32 -0
  307. data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +53 -0
  308. data/vendor/libsodium/src/libsodium/include/sodium/randombytes_salsa20_random.h +45 -0
  309. data/vendor/libsodium/src/libsodium/include/sodium/randombytes_sysrandom.h +45 -0
  310. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +36 -0
  311. data/vendor/libsodium/src/libsodium/include/sodium/version.h.in +29 -0
  312. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +63 -0
  313. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +317 -0
  314. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +212 -0
  315. data/vendor/libsodium/src/libsodium/sodium/compat.c +248 -0
  316. data/vendor/libsodium/src/libsodium/sodium/core.c +21 -0
  317. data/vendor/libsodium/src/libsodium/sodium/utils.c +94 -0
  318. data/vendor/libsodium/src/libsodium/sodium/version.c +20 -0
  319. data/vendor/libsodium/test/Makefile.am +5 -0
  320. data/vendor/libsodium/test/default/Makefile.am +277 -0
  321. data/vendor/libsodium/test/default/auth.c +21 -0
  322. data/vendor/libsodium/test/default/auth.exp +4 -0
  323. data/vendor/libsodium/test/default/auth2.c +36 -0
  324. data/vendor/libsodium/test/default/auth2.exp +4 -0
  325. data/vendor/libsodium/test/default/auth3.c +36 -0
  326. data/vendor/libsodium/test/default/auth3.exp +1 -0
  327. data/vendor/libsodium/test/default/auth5.c +37 -0
  328. data/vendor/libsodium/test/default/auth5.exp +0 -0
  329. data/vendor/libsodium/test/default/box.c +65 -0
  330. data/vendor/libsodium/test/default/box.exp +19 -0
  331. data/vendor/libsodium/test/default/box2.c +66 -0
  332. data/vendor/libsodium/test/default/box2.exp +17 -0
  333. data/vendor/libsodium/test/default/box7.c +37 -0
  334. data/vendor/libsodium/test/default/box7.exp +0 -0
  335. data/vendor/libsodium/test/default/box8.c +44 -0
  336. data/vendor/libsodium/test/default/box8.exp +0 -0
  337. data/vendor/libsodium/test/default/cmptest.h +51 -0
  338. data/vendor/libsodium/test/default/core1.c +32 -0
  339. data/vendor/libsodium/test/default/core1.exp +4 -0
  340. data/vendor/libsodium/test/default/core2.c +35 -0
  341. data/vendor/libsodium/test/default/core2.exp +4 -0
  342. data/vendor/libsodium/test/default/core3.c +42 -0
  343. data/vendor/libsodium/test/default/core3.exp +1 -0
  344. data/vendor/libsodium/test/default/core4.c +35 -0
  345. data/vendor/libsodium/test/default/core4.exp +8 -0
  346. data/vendor/libsodium/test/default/core5.c +34 -0
  347. data/vendor/libsodium/test/default/core5.exp +4 -0
  348. data/vendor/libsodium/test/default/core6.c +49 -0
  349. data/vendor/libsodium/test/default/core6.exp +4 -0
  350. data/vendor/libsodium/test/default/generichash.c +27 -0
  351. data/vendor/libsodium/test/default/generichash.exp +64 -0
  352. data/vendor/libsodium/test/default/generichash2.c +31 -0
  353. data/vendor/libsodium/test/default/generichash2.exp +64 -0
  354. data/vendor/libsodium/test/default/hash.c +16 -0
  355. data/vendor/libsodium/test/default/hash.exp +1 -0
  356. data/vendor/libsodium/test/default/hash2.exp +1 -0
  357. data/vendor/libsodium/test/default/hash3.c +16 -0
  358. data/vendor/libsodium/test/default/hash3.exp +1 -0
  359. data/vendor/libsodium/test/default/onetimeauth.c +44 -0
  360. data/vendor/libsodium/test/default/onetimeauth.exp +2 -0
  361. data/vendor/libsodium/test/default/onetimeauth2.c +42 -0
  362. data/vendor/libsodium/test/default/onetimeauth2.exp +1 -0
  363. data/vendor/libsodium/test/default/onetimeauth7.c +37 -0
  364. data/vendor/libsodium/test/default/onetimeauth7.exp +0 -0
  365. data/vendor/libsodium/test/default/pre.js +33 -0
  366. data/vendor/libsodium/test/default/randombytes.c +16 -0
  367. data/vendor/libsodium/test/default/scalarmult.c +25 -0
  368. data/vendor/libsodium/test/default/scalarmult.exp +4 -0
  369. data/vendor/libsodium/test/default/scalarmult2.c +25 -0
  370. data/vendor/libsodium/test/default/scalarmult2.exp +4 -0
  371. data/vendor/libsodium/test/default/scalarmult5.c +32 -0
  372. data/vendor/libsodium/test/default/scalarmult5.exp +4 -0
  373. data/vendor/libsodium/test/default/scalarmult6.c +32 -0
  374. data/vendor/libsodium/test/default/scalarmult6.exp +4 -0
  375. data/vendor/libsodium/test/default/scalarmult7.c +34 -0
  376. data/vendor/libsodium/test/default/scalarmult7.exp +1 -0
  377. data/vendor/libsodium/test/default/scalarmult8.c +34 -0
  378. data/vendor/libsodium/test/default/scalarmult8.exp +1 -0
  379. data/vendor/libsodium/test/default/secretbox.c +58 -0
  380. data/vendor/libsodium/test/default/secretbox.exp +19 -0
  381. data/vendor/libsodium/test/default/secretbox2.c +59 -0
  382. data/vendor/libsodium/test/default/secretbox2.exp +17 -0
  383. data/vendor/libsodium/test/default/secretbox7.c +33 -0
  384. data/vendor/libsodium/test/default/secretbox7.exp +0 -0
  385. data/vendor/libsodium/test/default/secretbox8.c +40 -0
  386. data/vendor/libsodium/test/default/secretbox8.exp +0 -0
  387. data/vendor/libsodium/test/default/shorthash.c +23 -0
  388. data/vendor/libsodium/test/default/shorthash.exp +64 -0
  389. data/vendor/libsodium/test/default/sodium_core.c +11 -0
  390. data/vendor/libsodium/test/default/sodium_core.exp +1 -0
  391. data/vendor/libsodium/test/default/sodium_utils.c +27 -0
  392. data/vendor/libsodium/test/default/sodium_utils.exp +6 -0
  393. data/vendor/libsodium/test/default/sodium_version.c +13 -0
  394. data/vendor/libsodium/test/default/sodium_version.exp +3 -0
  395. data/vendor/libsodium/test/default/stream.c +30 -0
  396. data/vendor/libsodium/test/default/stream.exp +1 -0
  397. data/vendor/libsodium/test/default/stream2.c +28 -0
  398. data/vendor/libsodium/test/default/stream2.exp +1 -0
  399. data/vendor/libsodium/test/default/stream3.c +30 -0
  400. data/vendor/libsodium/test/default/stream3.exp +4 -0
  401. data/vendor/libsodium/test/default/stream4.c +55 -0
  402. data/vendor/libsodium/test/default/stream4.exp +17 -0
  403. data/vendor/libsodium/test/default/stream5.c +29 -0
  404. data/vendor/libsodium/test/default/stream5.exp +1 -0
  405. data/vendor/libsodium/test/default/stream6.c +54 -0
  406. data/vendor/libsodium/test/default/stream6.exp +17 -0
  407. data/vendor/libsodium/test/default/wintest.bat +56 -0
  408. data/vendor/libsodium/test/quirks/windows/windows-quirks.h +18 -0
  409. metadata +500 -0
@@ -0,0 +1,32 @@
1
+ #include <stdio.h>
2
+
3
+ #define TEST_NAME "core1"
4
+ #include "cmptest.h"
5
+
6
+ unsigned char shared[32] = {
7
+ 0x4a,0x5d,0x9d,0x5b,0xa4,0xce,0x2d,0xe1
8
+ ,0x72,0x8e,0x3b,0xf4,0x80,0x35,0x0f,0x25
9
+ ,0xe0,0x7e,0x21,0xc9,0x47,0xd1,0x9e,0x33
10
+ ,0x76,0xf0,0x9b,0x3c,0x1e,0x16,0x17,0x42
11
+ } ;
12
+
13
+ unsigned char zero[32] = { 0 };
14
+
15
+ unsigned char c[16] = {
16
+ 0x65,0x78,0x70,0x61,0x6e,0x64,0x20,0x33
17
+ ,0x32,0x2d,0x62,0x79,0x74,0x65,0x20,0x6b
18
+ } ;
19
+
20
+ unsigned char firstkey[32];
21
+
22
+ int main(void)
23
+ {
24
+ int i;
25
+ crypto_core_hsalsa20(firstkey,zero,shared,c);
26
+ for (i = 0;i < 32;++i) {
27
+ if (i > 0) printf(","); else printf(" ");
28
+ printf("0x%02x",(unsigned int) firstkey[i]);
29
+ if (i % 8 == 7) printf("\n");
30
+ }
31
+ return 0;
32
+ }
@@ -0,0 +1,4 @@
1
+ 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
2
+ ,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
3
+ ,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
4
+ ,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
@@ -0,0 +1,35 @@
1
+ #include <stdio.h>
2
+
3
+ #define TEST_NAME "core2"
4
+ #include "cmptest.h"
5
+
6
+ unsigned char firstkey[32] = {
7
+ 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
8
+ ,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
9
+ ,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
10
+ ,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
11
+ } ;
12
+
13
+ unsigned char nonceprefix[16] = {
14
+ 0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73
15
+ ,0xcd,0x62,0xbd,0xa8,0x75,0xfc,0x73,0xd6
16
+ } ;
17
+
18
+ unsigned char c[16] = {
19
+ 0x65,0x78,0x70,0x61,0x6e,0x64,0x20,0x33
20
+ ,0x32,0x2d,0x62,0x79,0x74,0x65,0x20,0x6b
21
+ } ;
22
+
23
+ unsigned char secondkey[32];
24
+
25
+ int main(void)
26
+ {
27
+ int i;
28
+ crypto_core_hsalsa20(secondkey,nonceprefix,firstkey,c);
29
+ for (i = 0;i < 32;++i) {
30
+ if (i > 0) printf(","); else printf(" ");
31
+ printf("0x%02x",(unsigned int) secondkey[i]);
32
+ if (i % 8 == 7) printf("\n");
33
+ }
34
+ return 0;
35
+ }
@@ -0,0 +1,4 @@
1
+ 0xdc,0x90,0x8d,0xda,0x0b,0x93,0x44,0xa9
2
+ ,0x53,0x62,0x9b,0x73,0x38,0x20,0x77,0x88
3
+ ,0x80,0xf3,0xce,0xb4,0x21,0xbb,0x61,0xb9
4
+ ,0x1c,0xbd,0x4c,0x3e,0x66,0x25,0x6c,0xe4
@@ -0,0 +1,42 @@
1
+ #include <stdio.h>
2
+
3
+ #define TEST_NAME "core3"
4
+ #include "cmptest.h"
5
+
6
+ unsigned char secondkey[32] = {
7
+ 0xdc,0x90,0x8d,0xda,0x0b,0x93,0x44,0xa9
8
+ ,0x53,0x62,0x9b,0x73,0x38,0x20,0x77,0x88
9
+ ,0x80,0xf3,0xce,0xb4,0x21,0xbb,0x61,0xb9
10
+ ,0x1c,0xbd,0x4c,0x3e,0x66,0x25,0x6c,0xe4
11
+ } ;
12
+
13
+ unsigned char noncesuffix[8] = {
14
+ 0x82,0x19,0xe0,0x03,0x6b,0x7a,0x0b,0x37
15
+ } ;
16
+
17
+ unsigned char c[16] = {
18
+ 0x65,0x78,0x70,0x61,0x6e,0x64,0x20,0x33
19
+ ,0x32,0x2d,0x62,0x79,0x74,0x65,0x20,0x6b
20
+ } ;
21
+
22
+ unsigned char in[16] = { 0 } ;
23
+
24
+ unsigned char output[64 * 256 * 256];
25
+
26
+ unsigned char h[32];
27
+
28
+ int main(void)
29
+ {
30
+ int i;
31
+ long long pos = 0;
32
+ for (i = 0;i < 8;++i) in[i] = noncesuffix[i];
33
+ do {
34
+ do {
35
+ crypto_core_salsa20(output + pos,in,secondkey,c);
36
+ pos += 64;
37
+ } while (++in[8]);
38
+ } while (++in[9]);
39
+ crypto_hash_sha256(h,output,sizeof output);
40
+ for (i = 0;i < 32;++i) printf("%02x",h[i]); printf("\n");
41
+ return 0;
42
+ }
@@ -0,0 +1 @@
1
+ 662b9d0e3463029156069b12f918691a98f7dfb2ca0393c96bbfc6b1fbd630a2
@@ -0,0 +1,35 @@
1
+ #include <stdio.h>
2
+
3
+ #define TEST_NAME "core4"
4
+ #include "cmptest.h"
5
+
6
+ unsigned char k[32] = {
7
+ 1, 2, 3, 4, 5, 6, 7, 8
8
+ , 9, 10, 11, 12, 13, 14, 15, 16
9
+ ,201,202,203,204,205,206,207,208
10
+ ,209,210,211,212,213,214,215,216
11
+ } ;
12
+
13
+ unsigned char in[16] = {
14
+ 101,102,103,104,105,106,107,108
15
+ ,109,110,111,112,113,114,115,116
16
+ } ;
17
+
18
+ unsigned char c[16] = {
19
+ 101,120,112, 97,110,100, 32, 51
20
+ , 50, 45, 98,121,116,101, 32,107
21
+ } ;
22
+
23
+ unsigned char out[64];
24
+
25
+ int main(void)
26
+ {
27
+ int i;
28
+ crypto_core_salsa20(out,in,k,c);
29
+ for (i = 0;i < 64;++i) {
30
+ if (i > 0) printf(","); else printf(" ");
31
+ printf("%3d",(unsigned int) out[i]);
32
+ if (i % 8 == 7) printf("\n");
33
+ }
34
+ return 0;
35
+ }
@@ -0,0 +1,8 @@
1
+ 69, 37, 68, 39, 41, 15,107,193
2
+ ,255,139,122, 6,170,233,217, 98
3
+ , 89,144,182,106, 21, 51,200, 65
4
+ ,239, 49,222, 34,215,114, 40,126
5
+ ,104,197, 7,225,197,153, 31, 2
6
+ ,102, 78, 76,176, 84,245,246,184
7
+ ,177,160,133,130, 6, 72,149,119
8
+ ,192,195,132,236,234,103,246, 74
@@ -0,0 +1,34 @@
1
+ #include <stdio.h>
2
+
3
+ #define TEST_NAME "core5"
4
+ #include "cmptest.h"
5
+
6
+ unsigned char k[32] = {
7
+ 0xee,0x30,0x4f,0xca,0x27,0x00,0x8d,0x8c
8
+ ,0x12,0x6f,0x90,0x02,0x79,0x01,0xd8,0x0f
9
+ ,0x7f,0x1d,0x8b,0x8d,0xc9,0x36,0xcf,0x3b
10
+ ,0x9f,0x81,0x96,0x92,0x82,0x7e,0x57,0x77
11
+ } ;
12
+
13
+ unsigned char in[16] = {
14
+ 0x81,0x91,0x8e,0xf2,0xa5,0xe0,0xda,0x9b
15
+ ,0x3e,0x90,0x60,0x52,0x1e,0x4b,0xb3,0x52
16
+ } ;
17
+
18
+ unsigned char c[16] = {
19
+ 101,120,112, 97,110,100, 32, 51
20
+ , 50, 45, 98,121,116,101, 32,107
21
+ } ;
22
+
23
+ unsigned char out[32];
24
+
25
+ int main(void)
26
+ {
27
+ int i;
28
+ crypto_core_hsalsa20(out,in,k,c);
29
+ for (i = 0;i < 32;++i) {
30
+ printf(",0x%02x",(unsigned int) out[i]);
31
+ if (i % 8 == 7) printf("\n");
32
+ }
33
+ return 0;
34
+ }
@@ -0,0 +1,4 @@
1
+ ,0xbc,0x1b,0x30,0xfc,0x07,0x2c,0xc1,0x40
2
+ ,0x75,0xe4,0xba,0xa7,0x31,0xb5,0xa8,0x45
3
+ ,0xea,0x9b,0x11,0xe9,0xa5,0x19,0x1f,0x94
4
+ ,0xe1,0x8c,0xba,0x8f,0xd8,0x21,0xa7,0xcd
@@ -0,0 +1,49 @@
1
+ #include <stdio.h>
2
+
3
+ #define TEST_NAME "core6"
4
+ #include "cmptest.h"
5
+
6
+ unsigned char k[32] = {
7
+ 0xee,0x30,0x4f,0xca,0x27,0x00,0x8d,0x8c
8
+ ,0x12,0x6f,0x90,0x02,0x79,0x01,0xd8,0x0f
9
+ ,0x7f,0x1d,0x8b,0x8d,0xc9,0x36,0xcf,0x3b
10
+ ,0x9f,0x81,0x96,0x92,0x82,0x7e,0x57,0x77
11
+ } ;
12
+
13
+ unsigned char in[16] = {
14
+ 0x81,0x91,0x8e,0xf2,0xa5,0xe0,0xda,0x9b
15
+ ,0x3e,0x90,0x60,0x52,0x1e,0x4b,0xb3,0x52
16
+ } ;
17
+
18
+ unsigned char c[16] = {
19
+ 101,120,112, 97,110,100, 32, 51
20
+ , 50, 45, 98,121,116,101, 32,107
21
+ } ;
22
+
23
+ unsigned char out[64];
24
+
25
+ void print(unsigned char *x,unsigned char *y)
26
+ {
27
+ int i;
28
+ unsigned int borrow = 0;
29
+ for (i = 0;i < 4;++i) {
30
+ unsigned int xi = x[i];
31
+ unsigned int yi = y[i];
32
+ printf(",0x%02x",255 & (xi - yi - borrow));
33
+ borrow = (xi < yi + borrow);
34
+ }
35
+ }
36
+
37
+ int main(void)
38
+ {
39
+ crypto_core_salsa20(out,in,k,c);
40
+ print(out,c);
41
+ print(out + 20,c + 4); printf("\n");
42
+ print(out + 40,c + 8);
43
+ print(out + 60,c + 12); printf("\n");
44
+ print(out + 24,in);
45
+ print(out + 28,in + 4); printf("\n");
46
+ print(out + 32,in + 8);
47
+ print(out + 36,in + 12); printf("\n");
48
+ return 0;
49
+ }
@@ -0,0 +1,4 @@
1
+ ,0xbc,0x1b,0x30,0xfc,0x07,0x2c,0xc1,0x40
2
+ ,0x75,0xe4,0xba,0xa7,0x31,0xb5,0xa8,0x45
3
+ ,0xea,0x9b,0x11,0xe9,0xa5,0x19,0x1f,0x94
4
+ ,0xe1,0x8c,0xba,0x8f,0xd8,0x21,0xa7,0xcd
@@ -0,0 +1,27 @@
1
+ #include <stdio.h>
2
+
3
+ #include "crypto_uint8.h"
4
+
5
+ #define TEST_NAME "generichash"
6
+ #include "cmptest.h"
7
+
8
+ int main(void)
9
+ {
10
+ #define MAXLEN 64
11
+ crypto_uint8 in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
12
+ size_t h,i,j;
13
+
14
+ for(h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h;
15
+
16
+ for(i = 0; i < MAXLEN; ++i) {
17
+ in[i]=i;
18
+ crypto_generichash(out, 1 + i % crypto_generichash_BYTES_MAX,
19
+ in, i,
20
+ k, 1 + i % crypto_generichash_KEYBYTES_MAX);
21
+ for (j = 0;j < 1 + i % crypto_generichash_BYTES_MAX;++j) {
22
+ printf("%02x",(unsigned int) out[j]);
23
+ }
24
+ printf("\n");
25
+ }
26
+ return 0;
27
+ }
@@ -0,0 +1,64 @@
1
+ 05
2
+ 5d8c
3
+ 22221b
4
+ d4974470
5
+ be8492fb36
6
+ edc178279907
7
+ 26848f2ae0c2e6
8
+ 045cf1235112b9f6
9
+ 5110bad569356dfa6c
10
+ 1339d95145bc8a33d3aa
11
+ 3dbb39b4d57c5566808a88
12
+ 22378260939cee01022686a2
13
+ e18b37abcead6cc520e6504dac
14
+ 3cbb356604cf862e62ad2f534323
15
+ 44c41ba227b191961b475ec5875057
16
+ 0c7c9c3922d41a7b2b3b20f92685d560
17
+ 8508c01d19709bdd881866aa1f8c63ca06
18
+ f6b2dddfbece6d7d52e114c7e5a97772e18d
19
+ d36b5af9591d0cd3747254e26bc6e1de5b6081
20
+ f7f7ce69149418d7ec33327bd86e14bcca4b8ed7
21
+ 2c9aba9a56de21165753c4f3cee9310a9c8fe546b9
22
+ ee5e08cee5fbbcb51900341bb30db6695920faecda6a
23
+ fe9ffb56dc5716b91bc7d77ce7b05e7cc39c31683bec91
24
+ c500ae0f5bff0f1106ce104ae9c291add7207e0d8ebcb1ed
25
+ 68e23d12000b387158afd6458d3bcef9c26936ca68b5c0f3d6
26
+ 220efa2c09f67dbb02aa623bbc0cb92107a30f53b633e78d4b44
27
+ 54df984b47e4bcd489d9c045c488743fac91c9b3e0cbcc37495fac
28
+ b4852cf66c6ce164c002bbb62ded0faeb4a39c39fdffb372ff14dd31
29
+ d79cafb5565e7775616e1c9b09100d61fb71efaf25affcf2d480d2c980
30
+ ae557883145e374adef583ba0550429d5cdd86b254c33bf52d02e070efda
31
+ 9f53d28c0df7b327c2eb4c8a12c742829225b7f30fda7baf64135098fdb01b
32
+ a9f51bb7f6a3e9cdb96ce652c07d177962a348a9cced1b92f948187e59b44463
33
+ f2960cf5fd57fc92f549cd5a2803147964f60e7703e1b8897c088cded74c7bd39f
34
+ 89981acbb690eb03ed2a67510d1d85a1b4f9d496fdfe134550ae14146bb05fd5fedd
35
+ 6d8245383fd7c418b46511339e711b9d4a0d1f5fdf6de45fdd3d0664164b7bf878a124
36
+ 1f0b6b083d524e0741710ddef499ce88f51083bb3ad80a1815cc57acf006436e9b6ad72b
37
+ fc35bfe34c915020bb8b44fa0a19933774eaaf61919780fd55564e085bc31646dfc1d426e9
38
+ 117d58f1f8cb2c036102686035975be90550795e5a0e3469a8f7a2cba9bc88961852b18c8ae3
39
+ c679c950818729c799bb7f39cef2d89fa80a147817f379a073ef1ccafea5d369815c70373bf5be
40
+ d487ad2143024ee8c645a066c035b74abe3a11f1c9fcd738b154b8ca37134d74fb78c40d1a2274cf
41
+ 2d3ee00828b0ccea6812b40f214fab6d4f23f7e74ae228115bcb208ced2d5e1cb9cdff41de912af7a8
42
+ a697b26d4c4475e312288b98ae2ec4954d3c74c8e144c0ab518616ff9f52918a946fd765af75e761178c
43
+ f647bcba2a711f431d6d453aa7d75dcf5bb9ab6f8b83f89117230f633e7580f27c71c4f4c211cadd04f587
44
+ 1fc1d6a4db753e2f4fd1456b2b709dd70ad58547eeda9d5a55762b5cd4097a7a1bd73cc633ec27168ee65631
45
+ 1cfe0f63ab155379b4a1b5bf694a33635097b8e4b6dbd3b983d62454d36d7bf4550bece301abdd27b2dd76ca9f
46
+ 73dee8a0a558e7b6f6eefe411280e253b05ef006d499849fea5d6a95f9141ee160322fff3a3f70e10c84025e02ce
47
+ edf9e706f4acae4f4bed72404f14458ba075d2b9d9a4a1ed46d1f1c5e23113a74cce9f7735432a922a3d8097f22c7a
48
+ 95d5cd54c6722ac4335fa0ab38d388c9fd0baea48a9078605e400534ef38f13abb1d770da84b90b0256e1c1b64f54ba9
49
+ fe6b85ee8b5eb7da035264ed46e6dcd948571018d1f6976de4102fcb4bb5f1422e7df1b5aaa5b6b56c5961966db29ead6e
50
+ 499ab83c01e4bf74ea5036392f9f810eae8a066fff49e316e4288baccb2001efa24f64cef7bfae70c90f139b198e53ad87f1
51
+ eac6c9d97264241a8adba22ee925438ed9787a547018608a10676a7594bc51c60294bd9159fbcada9022b44880a37c5b07c1b4
52
+ 0771e3ae24bbfe424800d4bae776fef3da1607990019e7c4b30bc8140061ebf0b64aad7b018a878d579caa67154b98a04402735e
53
+ d569e5f5fe197387451441911a2be2effa606dad39820af44cea056bd9d1499dde41fa1c6c3a0459d5866c944bec2ac83328953726
54
+ 68e523ded865c4d8318d61c312189a59597bbc3995e312e85137611af761a5f73508ac79e359edf729d4508830fc642b432f09185914
55
+ 601af664ae596166707244adbb4f704593b355c6a659c844d853c6647fb265cdbcea26ed43657251dec37f2d6453fa0ace55f22d303cb0
56
+ 703d8e552236b2090143444545f0a61a809d8ef9843bcf6883f61671fb31c8d6ac9fd373e7f9f79a0c72fa6a37dc655ba1fb01a5f41e36d1
57
+ 03896f594afd1bf97acb862106eb05a1d8b54ec08d184812a79f4dc7b287a7486e60927b6c23e5f51fcbc94798648b28fd13438300567bec95
58
+ cc66a891768e95a2717b040c111996f14942f10f2475c33aa5f1c97476e6f8386733d6b21c16102d01ff1f715475f01099e1f19aa763238a38a9
59
+ 007aac8eae29e5bf2be1b54857f5fe80c324424a3273b46e55482fbc4ae1033df4a97016b60c81a5344abd6366f56d8cee2c2e94619418293990de
60
+ 50c81e92605a6111ea4c7c602acfb3945d4c2631c8c08fa4b594134577f5c2ffcca90d48604162cfdb2a0bb40416ff9134a275461b829ff1b875f995
61
+ 661b7a1c70170aa7559aa82639fa65c1bdcfb5e336cb23b40a9edf5b4f6eeca1a176a9844da705cafb990dd94b9dc6194eb6b2de3eca9dbd255bb267a1
62
+ 9ff11c233aaf5e0242b0dbe6e110a42e58b86141ad0ef130fd2bb895700019782de66d435bf0a8d6f5eda5d7d1105e7a6f3ef17a9da8f9c16fc21075431a
63
+ bdd3d0fafe8ba2b29d1ac0b79aa46e249cc9d3a82d0f772d690637bbdd353722356658d00436ff5dd5239ab747979329345eb8c7ed11b7331456ae87350fcf
64
+ bd965bf31e87d70327536f2a341cebc4768eca275fa05ef98f7f1b71a0351298de006fba73fe6733ed01d75801b4a928e54231b38e38c562b2e33ea1284992fa
@@ -0,0 +1,31 @@
1
+ #include <stdio.h>
2
+
3
+ #include "crypto_uint8.h"
4
+
5
+ #define TEST_NAME "generichash2"
6
+ #include "cmptest.h"
7
+
8
+ int main(void)
9
+ {
10
+ #define MAXLEN 64
11
+ crypto_generichash_state st;
12
+ crypto_uint8 in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX];
13
+ size_t h,i,j;
14
+
15
+ for(h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h;
16
+
17
+ for(i = 0; i < MAXLEN; ++i) {
18
+ in[i]=i;
19
+ crypto_generichash_init(&st, k, 1 + i % crypto_generichash_KEYBYTES_MAX,
20
+ 1 + i % crypto_generichash_BYTES_MAX);
21
+ crypto_generichash_update(&st, in, i);
22
+ crypto_generichash_update(&st, in, i);
23
+ crypto_generichash_update(&st, in, i);
24
+ crypto_generichash_final(&st, out, 1 + i % crypto_generichash_BYTES_MAX);
25
+ for (j = 0;j < 1 + i % crypto_generichash_BYTES_MAX;++j) {
26
+ printf("%02x",(unsigned int) out[j]);
27
+ }
28
+ printf("\n");
29
+ }
30
+ return 0;
31
+ }
@@ -0,0 +1,64 @@
1
+ 05
2
+ 22a8
3
+ 287a9d
4
+ d8eeab1c
5
+ d4ce34973f
6
+ 584f7ac46f0c
7
+ 32c848bb67545b
8
+ 8438e21361bca125
9
+ 27a6faae998b4fabb4
10
+ 508c05a4f2daee150bad
11
+ 68c886c97dce370e8c72fa
12
+ d41e90824ace31ba7bf512ac
13
+ 6e0d7a1e2b92a68e45ea867895
14
+ 1fc5ee8715312db38da9066152a5
15
+ 3138504ba58fcd56c62752bc98a6d2
16
+ b689ecd5357cb5276007627fbdf4082e
17
+ afe251881beb8b9dfa3d4f76aafc7b2995
18
+ 980eaa215cb0911027c5564db809bb8ac0a1
19
+ 56048436883efdfc8feaa239d960fa5ce24d42
20
+ fce905b6d57fd841f58899a77887a4988e6aa2d1
21
+ 6f7afd81d24ccf4d98188b71bdbb7e6c637620879b
22
+ 50406b4c37b48621505942b35dff30a75f7d2868146b
23
+ 32c21792e18e7a79a4a20ef291721d7eab4e4cf99fbe79
24
+ 4b9d9ac5dbfb825acd87588667e6683e0fde4cdcd0a532f9
25
+ 2b55a3ebb461623e5de4fbacfb8b26819cfa8adeb094c8c13b
26
+ 4c7d261780b25a864a008352ad64d1ae7fc21d608317813cf63f
27
+ f0ca06b8e12c48f1511d0991ba562f06dbe6ba6d5e18280224cc6a
28
+ 838a5f7056bfbca65a245796dd3510cb07ff1614b44989d91ac650b2
29
+ a58a8da276577160441f8b9e9c52a041b7caf7cd316acc506f620ab0e1
30
+ e03940a7231049ff2b86c47a28e4951f105d2a3aa3421190fe0ed6aa4ad6
31
+ a7af977c0b34294b1a03d0cc2dcf6eb72f9a32721c3f70128384aeb1f56047
32
+ 0e5625d74ada70b8a3b23ca76894e9a0f9dee88f5e3e370e27ad25061ea9dd6f
33
+ 775fd9257b265997a16557a445985091798af60e68d06e3ae8e2e886d23ed12f6e
34
+ 852e8d4208166a990e215ed06b86c708f491e014584ac9b08f97f24d9f08a84c8e83
35
+ fbdca0db9a933fcffcce2ae694d7e16e7571b100564fcb3d69cec82ea42f254a493a32
36
+ 50530ae5eb9780f3fafc5d179f7b363a0d69314a8545d68588b5fec28c8e8d1a011857f6
37
+ 5eb71553ff1ac4aba3f84faeb70281c738e3428aae68edc9842ebf55ffd7184a015e323445
38
+ 39b279c6d9cca89f8052f953abf71041faf3491b2b965cef503d715e8bf339e02a58fd0e0fba
39
+ e315bef5f4918e881dc8d39d3c6b3948c2ea8e21ac00ee7c7ab875a53e194add0c3d9b8bcba5b2
40
+ 4e950f0e1da3111d054136fbdf10b4b88b20de6ad0c6bd5024a5e0a8b4cd7059685c0b663a00cbfa
41
+ b1ed8d99fd62a4f504ecdd58a01759a85932a7783f88f314cdca5019e05063dcc1fcb3c39b8c07758e
42
+ e4d78e734b0cb5bbd83e22bc67f97bbc8a3644f789f6c26a3ec2fe72c75b4d48a3bc000e6f2f2f0726fe
43
+ 162e01beb796433a2771eab54611fc93677ed12c73a93ea4d75e148bec7ab14b3e31ab7f395456fb2b47ab
44
+ 759c30631fd52e80a22f0614125dcd136287db65079908b75fb5b03be1cdf6dd0a1c9de0cc759cdd82c33758
45
+ af2992acdaf0908f03a2025854de6446123c919b1e24db711df6cb070091343b4e6f5b2716c20c2547f50f1fde
46
+ b833064955778a611fe41a9f1a2de730a16fb4e61a7e2fb67425ce199101d4e71dd7b0c731ea4188e9cc30e9bc52
47
+ e546ee327168d9b4e0d73d9a043f9ef03f880bc8aee91b0923704eb7361ac916b00f5c71c872e2f911a77ef76704b5
48
+ 83d86f056729fa1a6e1d3fe8c3d2ebe42b327025747f2e6ba923d2b7b893e31571839937222852033844e585b17d462f
49
+ 5d70402524fbef569552a3ff6854087e090ff9ac9ea03aba92cf9f33a28845fa6a1631090dca10e05cdd3341b391a15fcf
50
+ 64f4d3ebf0717900f7c04512d1e18f9985975991d4254d76c4e2ee02c0edd6f912f715991984731b808b8370be1f201e53bf
51
+ 7d45eae6626dfc9ec3591764b8c39c72ca67e6c1893ab590963a75922719937d1d0ff188a510ffbdf9c777a4d565b3683cbf38
52
+ 68e007db5067874548c0d12a9ca709221f9bd352e3eb9847fde6c5de4a8550f4b85b67fe4e5aad70626ebb27d71e5b528effb2e6
53
+ b0dc4dc0bd0d41a8ccfa45a127542079bc4e6f63a63863a9ce21f44481d23eff1060ea03851759b9317209405d5b7cc4387cc2759b
54
+ adf6a9df484e93eb3a6113c3fd68a49b2166878fc652833c9cbef3fd8dd281d385ad0374bc25bc865b216ca395e21c30b9eda1d58a8d
55
+ f1df9bc169323da338daa8a94867db96a1a2a6feb26569198fb4591ae602ba6f766a879e745d71e93b6cb8886b914f2bf4aa55d4c48045
56
+ 0c7446078a5077f33bba1ebfad60bbf1b1df47aab2eb3f3f3274ce56ead7800cf095af8208b6d570c4c832fe33227bbbc0842a13e1e82ad9
57
+ accd0b4682e56698ecc55a60a8db8b3f950b6bffc5a1d160daf6ca25e13e3b4983ced5903df0bdc21f70c2ec5adb1a2ec9617df645cdd17ac9
58
+ b787bae190ff2608eb383e0299cc10d6b7232de67ab74285e7bfa933d79f91226066537d74a9d40140d7b1683c2d42cd1935f6430cc554db2b69
59
+ d09b717a0c80f581c07b8813e0ae79cec2188f77122f7477954610655a20420f13eb1b68cacde8c1fdf7a9a398efa72f40c85f0122812eaa33aba0
60
+ 87fff156d9895917468e92848fdcfacc134ca3bfc7fce484bd6db41c682ee2ee47151df0fa863d5641633d908c0328e6cbe080e80d8293530ffd2c4f
61
+ 1b17b2c0e7afcd224ec9bbe9ce9a13a00bd0a336b863f1b4d5304043778244323bd23fb6154a2e1e94aa48f6ff0e12787a50ca09e9e72ece9e038f6218
62
+ 23ac1ccd5e7df51b65b284650158d662e7ef51ebae01b879f39cec484b688c792f8e854bd8ca31ffe8796d28f10e49ab402dab47878a21cb95556dc32b0a
63
+ f8f5323ebcc28bf927e72d342b5b70d80ba67794afb4c28debad21b0dae24c7a9252e862eb4b83bea6d9c0bb7c108983c987f13d73f250c7f14483f0454a24
64
+ 55b97ca594d68ccf69a0a93fe7fa4004c7e2947a8cac4ca4a44e17ac6876f472e3f221b341a28004cd35a79cfad7fabb9378ce5af03e4c0445ebbe9540943bbd