rbnacl-libsodium 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +23 -0
  3. data/CHANGES.md +5 -0
  4. data/Gemfile +5 -2
  5. data/Rakefile +5 -0
  6. data/ext/rbnacl/extconf.rb +2 -1
  7. data/lib/rbnacl/libsodium.rb +8 -2
  8. data/lib/rbnacl/libsodium/version.rb +1 -1
  9. data/vendor/libsodium/AUTHORS +14 -0
  10. data/vendor/libsodium/ChangeLog +26 -0
  11. data/vendor/libsodium/LICENSE +1 -1
  12. data/vendor/libsodium/Makefile.am +1 -0
  13. data/vendor/libsodium/Makefile.in +9 -0
  14. data/vendor/libsodium/README.markdown +7 -0
  15. data/vendor/libsodium/aclocal.m4 +1 -0
  16. data/vendor/libsodium/appveyor.yml +25 -0
  17. data/vendor/libsodium/autom4te.cache/output.1 +640 -126
  18. data/vendor/libsodium/autom4te.cache/output.6 +19049 -0
  19. data/vendor/libsodium/autom4te.cache/requests +1151 -914
  20. data/vendor/libsodium/autom4te.cache/traces.1 +472 -426
  21. data/vendor/libsodium/autom4te.cache/traces.6 +3193 -0
  22. data/vendor/libsodium/builds/msvc/version.h +2 -2
  23. data/vendor/libsodium/builds/msvc/vs2010/libsodium.sln +50 -79
  24. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +20 -8
  25. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +208 -166
  26. data/vendor/libsodium/builds/msvc/vs2012/libsodium.sln +50 -79
  27. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +20 -8
  28. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +206 -164
  29. data/vendor/libsodium/builds/msvc/vs2013/libsodium.sln +52 -81
  30. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +20 -8
  31. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +206 -164
  32. data/vendor/libsodium/builds/msvc/vs2015/libsodium.sln +52 -81
  33. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +20 -8
  34. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +206 -164
  35. data/vendor/libsodium/configure +639 -125
  36. data/vendor/libsodium/configure.ac +94 -16
  37. data/vendor/libsodium/dist-build/Makefile.in +9 -0
  38. data/vendor/libsodium/dist-build/emscripten-symbols.def +370 -0
  39. data/vendor/libsodium/dist-build/emscripten.sh +9 -3
  40. data/vendor/libsodium/dist-build/generate-emscripten-symbols.sh +43 -0
  41. data/vendor/libsodium/libsodium-uninstalled.pc.in +1 -1
  42. data/vendor/libsodium/libsodium.pc.in +1 -1
  43. data/vendor/libsodium/libsodium.vcxproj +70 -66
  44. data/vendor/libsodium/libsodium.vcxproj.filters +204 -192
  45. data/vendor/libsodium/m4/ax_valgrind_check.m4 +190 -0
  46. data/vendor/libsodium/msvc-scripts/Makefile.in +9 -0
  47. data/vendor/libsodium/msvc-scripts/process.bat +2 -2
  48. data/vendor/libsodium/src/Makefile.in +9 -0
  49. data/vendor/libsodium/src/libsodium/Makefile.am +31 -6
  50. data/vendor/libsodium/src/libsodium/Makefile.in +238 -42
  51. data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +234 -38
  52. data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +208 -118
  53. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_seal.c +2 -2
  54. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +1 -4
  55. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +1799 -1790
  56. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.h +39 -39
  57. data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +86 -0
  58. data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.h +28 -0
  59. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +38 -46
  60. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +47 -55
  61. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +47 -55
  62. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +47 -55
  63. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +7 -0
  64. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +0 -89
  65. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +50 -141
  66. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c +45 -0
  67. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.h +123 -0
  68. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c +3 -2
  69. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.c +2 -2
  70. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/{blake2b-round.h → blake2b-compress-sse41.h} +2 -28
  71. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.c +2 -4
  72. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.h +97 -0
  73. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-avx2.h +339 -0
  74. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h +0 -2
  75. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h +0 -2
  76. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +29 -18
  77. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +4 -43
  78. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +3 -32
  79. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +1 -20
  80. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +22 -41
  81. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +12 -39
  82. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +2 -4
  83. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +1 -20
  84. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c +570 -0
  85. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h +198 -0
  86. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +444 -0
  87. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +32 -0
  88. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +229 -0
  89. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +222 -0
  90. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h +40 -0
  91. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +238 -0
  92. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h +251 -0
  93. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +80 -0
  94. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.h +8 -0
  95. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +38 -0
  96. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +117 -0
  97. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +164 -0
  98. data/vendor/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c +106 -0
  99. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +1 -1
  100. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +4 -4
  101. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +186 -186
  102. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +2 -2
  103. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +3 -2
  104. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +33 -33
  105. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +253 -254
  106. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +16 -17
  107. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.h +1 -0
  108. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +11 -11
  109. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h +1 -0
  110. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h +1 -1
  111. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h +3 -2
  112. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h +5 -3
  113. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +41 -41
  114. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +10 -2
  115. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h +1 -1
  116. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +4 -0
  117. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +4 -0
  118. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +31 -32
  119. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +4 -0
  120. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h +1 -1
  121. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.S +4 -0
  122. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.h +1 -1
  123. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base_namespace.h +1 -1
  124. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h +1 -1
  125. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +2 -6
  126. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +8 -28
  127. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +75 -0
  128. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +6 -6
  129. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +1 -18
  130. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +20 -20
  131. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +4 -4
  132. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +6 -6
  133. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +56 -77
  134. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h +1 -0
  135. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.h +1 -0
  136. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +2 -8
  137. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +2 -8
  138. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +2 -8
  139. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +2 -8
  140. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +2 -8
  141. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +2 -8
  142. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +1 -5
  143. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +1 -5
  144. data/vendor/libsodium/src/libsodium/include/Makefile.am +3 -0
  145. data/vendor/libsodium/src/libsodium/include/Makefile.in +19 -8
  146. data/vendor/libsodium/src/libsodium/include/sodium.h +3 -0
  147. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +50 -0
  148. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +94 -22
  149. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +6 -6
  150. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hchacha20.h +35 -0
  151. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +3 -0
  152. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h +89 -0
  153. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +86 -0
  154. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +6 -6
  155. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +0 -11
  156. data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +3 -0
  157. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +3 -0
  158. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +5 -1
  159. data/vendor/libsodium/src/libsodium/sodium/common.h +150 -0
  160. data/vendor/libsodium/src/libsodium/sodium/core.c +3 -1
  161. data/vendor/libsodium/src/libsodium/sodium/runtime.c +37 -19
  162. data/vendor/libsodium/src/libsodium/sodium/utils.c +18 -9
  163. data/vendor/libsodium/test/Makefile.in +9 -0
  164. data/vendor/libsodium/test/default/Makefile.am +10 -0
  165. data/vendor/libsodium/test/default/Makefile.in +53 -20
  166. data/vendor/libsodium/test/default/aead_aes256gcm.c +43 -17
  167. data/vendor/libsodium/test/default/aead_chacha20poly1305.c +179 -86
  168. data/vendor/libsodium/test/default/auth7.c +5 -5
  169. data/vendor/libsodium/test/default/box.c +4 -4
  170. data/vendor/libsodium/test/default/box2.c +1 -1
  171. data/vendor/libsodium/test/default/core6.c +1 -1
  172. data/vendor/libsodium/test/default/generichash.c +12 -1
  173. data/vendor/libsodium/test/default/generichash2.c +2 -2
  174. data/vendor/libsodium/test/default/generichash3.c +21 -0
  175. data/vendor/libsodium/test/default/pwhash.c +186 -168
  176. data/vendor/libsodium/test/default/pwhash.exp +11 -30
  177. data/vendor/libsodium/test/default/pwhash_scrypt.c +349 -0
  178. data/vendor/libsodium/test/default/pwhash_scrypt.exp +31 -0
  179. data/vendor/libsodium/test/default/secretbox.c +1 -1
  180. data/vendor/libsodium/test/default/secretbox2.c +1 -1
  181. data/vendor/libsodium/test/default/sign.c +15 -0
  182. data/vendor/libsodium/test/default/sodium_utils2.c +8 -3
  183. data/vendor/libsodium/test/default/sodium_utils3.c +4 -2
  184. data/vendor/libsodium/test/default/verify1.c +0 -4
  185. data/vendor/libsodium/test/quirks/quirks.h +3 -0
  186. metadata +37 -22
  187. data/vendor/libsodium/builds/msvc/vs2010/test/test.props +0 -43
  188. data/vendor/libsodium/builds/msvc/vs2010/test/test.runner.bat +0 -78
  189. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +0 -244
  190. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +0 -192
  191. data/vendor/libsodium/builds/msvc/vs2012/test/test.props +0 -43
  192. data/vendor/libsodium/builds/msvc/vs2012/test/test.runner.bat +0 -78
  193. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +0 -244
  194. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +0 -192
  195. data/vendor/libsodium/builds/msvc/vs2013/test/test.props +0 -43
  196. data/vendor/libsodium/builds/msvc/vs2013/test/test.runner.bat +0 -78
  197. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +0 -244
  198. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +0 -192
  199. data/vendor/libsodium/builds/msvc/vs2015/test/test.props +0 -43
  200. data/vendor/libsodium/builds/msvc/vs2015/test/test.runner.bat +0 -78
  201. data/vendor/libsodium/builds/msvc/vs2015/test/test.vcxproj +0 -244
  202. data/vendor/libsodium/builds/msvc/vs2015/test/test.vcxproj.filters +0 -192
  203. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sysendian.h +0 -146
  204. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common_aes128ctr.c +0 -64
@@ -2,13 +2,14 @@
2
2
  #include "core.h"
3
3
  #include "crypto_generichash.h"
4
4
  #include "crypto_onetimeauth.h"
5
+ #include "crypto_pwhash_argon2i.h"
5
6
  #include "crypto_scalarmult.h"
6
7
  #include "crypto_stream_chacha20.h"
7
8
  #include "randombytes.h"
8
9
  #include "runtime.h"
9
10
  #include "utils.h"
10
11
 
11
- #if 0
12
+ #if !defined(_MSC_VER) && 0
12
13
  # warning This is unstable, untested, development code.
13
14
  # warning It might not compile. It might not work as expected.
14
15
  # warning It might be totally insecure.
@@ -28,6 +29,7 @@ sodium_init(void)
28
29
  _sodium_runtime_get_cpu_features();
29
30
  randombytes_stir();
30
31
  _sodium_alloc_init();
32
+ _crypto_pwhash_argon2i_pick_best_implementation();
31
33
  _crypto_generichash_blake2b_pick_best_implementation();
32
34
  _crypto_onetimeauth_poly1305_pick_best_implementation();
33
35
  _crypto_scalarmult_curve25519_pick_best_implementation();
@@ -15,24 +15,28 @@ typedef struct CPUFeatures_ {
15
15
  int has_ssse3;
16
16
  int has_sse41;
17
17
  int has_avx;
18
+ int has_avx2;
18
19
  int has_pclmul;
19
20
  int has_aesni;
20
21
  } CPUFeatures;
21
22
 
22
23
  static CPUFeatures _cpu_features;
23
24
 
24
- #define CPUID_SSE2 0x04000000
25
- #define CPUIDECX_SSE3 0x00000001
26
- #define CPUIDECX_SSSE3 0x00000200
27
- #define CPUIDECX_SSE41 0x00080000
28
- #define CPUIDECX_AVX 0x10000000
29
- #define CPUIDECX_PCLMUL 0x00000002
30
- #define CPUIDECX_AESNI 0x02000000
31
- #define CPUIDECX_XSAVE 0x04000000
32
- #define CPUIDECX_OSXSAVE 0x08000000
25
+ #define CPUID_EBX_AVX2 0x00000020
33
26
 
34
- #define XCR0_SSE 0x00000002
35
- #define XCR0_AVX 0x00000004
27
+ #define CPUID_ECX_SSE3 0x00000001
28
+ #define CPUID_ECX_PCLMUL 0x00000002
29
+ #define CPUID_ECX_SSSE3 0x00000200
30
+ #define CPUID_ECX_SSE41 0x00080000
31
+ #define CPUID_ECX_AESNI 0x02000000
32
+ #define CPUID_ECX_XSAVE 0x04000000
33
+ #define CPUID_ECX_OSXSAVE 0x08000000
34
+ #define CPUID_ECX_AVX 0x10000000
35
+
36
+ #define CPUID_EDX_SSE2 0x04000000
37
+
38
+ #define XCR0_SSE 0x00000002
39
+ #define XCR0_AVX 0x00000004
36
40
 
37
41
  static int
38
42
  _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features)
@@ -94,6 +98,7 @@ _cpuid(unsigned int cpu_info[4U], const unsigned int cpu_info_type)
94
98
  "0" (cpu_info_type), "2" (0U));
95
99
  # endif
96
100
  #else
101
+ (void) cpu_info_type;
97
102
  cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0;
98
103
  #endif
99
104
  }
@@ -111,28 +116,28 @@ _sodium_runtime_intel_cpu_features(CPUFeatures * const cpu_features)
111
116
  _cpuid(cpu_info, 0x00000001);
112
117
  #if defined(HAVE_EMMINTRIN_H) || \
113
118
  (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
114
- cpu_features->has_sse2 = ((cpu_info[3] & CPUID_SSE2) != 0x0);
119
+ cpu_features->has_sse2 = ((cpu_info[3] & CPUID_EDX_SSE2) != 0x0);
115
120
  #else
116
121
  cpu_features->has_sse2 = 0;
117
122
  #endif
118
123
 
119
124
  #if defined(HAVE_PMMINTRIN_H) || \
120
125
  (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
121
- cpu_features->has_sse3 = ((cpu_info[2] & CPUIDECX_SSE3) != 0x0);
126
+ cpu_features->has_sse3 = ((cpu_info[2] & CPUID_ECX_SSE3) != 0x0);
122
127
  #else
123
128
  cpu_features->has_sse3 = 0;
124
129
  #endif
125
130
 
126
131
  #if defined(HAVE_TMMINTRIN_H) || \
127
132
  (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
128
- cpu_features->has_ssse3 = ((cpu_info[2] & CPUIDECX_SSSE3) != 0x0);
133
+ cpu_features->has_ssse3 = ((cpu_info[2] & CPUID_ECX_SSSE3) != 0x0);
129
134
  #else
130
135
  cpu_features->has_ssse3 = 0;
131
136
  #endif
132
137
 
133
138
  #if defined(HAVE_SMMINTRIN_H) || \
134
139
  (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
135
- cpu_features->has_sse41 = ((cpu_info[2] & CPUIDECX_SSE41) != 0x0);
140
+ cpu_features->has_sse41 = ((cpu_info[2] & CPUID_ECX_SSE41) != 0x0);
136
141
  #else
137
142
  cpu_features->has_sse41 = 0;
138
143
  #endif
@@ -140,8 +145,8 @@ _sodium_runtime_intel_cpu_features(CPUFeatures * const cpu_features)
140
145
  cpu_features->has_avx = 0;
141
146
  #if defined(HAVE_AVXINTRIN_H) || \
142
147
  (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
143
- if ((cpu_info[2] & (CPUIDECX_AVX | CPUIDECX_XSAVE | CPUIDECX_OSXSAVE))
144
- == (CPUIDECX_AVX | CPUIDECX_XSAVE | CPUIDECX_OSXSAVE)) {
148
+ if ((cpu_info[2] & (CPUID_ECX_AVX | CPUID_ECX_XSAVE | CPUID_ECX_OSXSAVE))
149
+ == (CPUID_ECX_AVX | CPUID_ECX_XSAVE | CPUID_ECX_OSXSAVE)) {
145
150
  uint32_t xcr0 = 0U;
146
151
  # ifdef MSC_VER
147
152
  __asm {
@@ -159,10 +164,18 @@ _sodium_runtime_intel_cpu_features(CPUFeatures * const cpu_features)
159
164
  }
160
165
  #endif
161
166
 
167
+ cpu_features->has_avx2 = 0;
168
+ #if defined(HAVE_AVX2INTRIN_H) || \
169
+ (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
170
+ if (cpu_features->has_avx) {
171
+ cpu_features->has_avx2 = ((cpu_info[1] & CPUID_EBX_AVX2) != 0x0);
172
+ }
173
+ #endif
174
+
162
175
  #if defined(HAVE_WMMINTRIN_H) || \
163
176
  (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
164
- cpu_features->has_pclmul = ((cpu_info[2] & CPUIDECX_PCLMUL) != 0x0);
165
- cpu_features->has_aesni = ((cpu_info[2] & CPUIDECX_AESNI) != 0x0);
177
+ cpu_features->has_pclmul = ((cpu_info[2] & CPUID_ECX_PCLMUL) != 0x0);
178
+ cpu_features->has_aesni = ((cpu_info[2] & CPUID_ECX_AESNI) != 0x0);
166
179
  #else
167
180
  cpu_features->has_pclmul = 0;
168
181
  cpu_features->has_aesni = 0;
@@ -213,6 +226,11 @@ sodium_runtime_has_avx(void) {
213
226
  return _cpu_features.has_avx;
214
227
  }
215
228
 
229
+ int
230
+ sodium_runtime_has_avx2(void) {
231
+ return _cpu_features.has_avx2;
232
+ }
233
+
216
234
  int
217
235
  sodium_runtime_has_pclmul(void) {
218
236
  return _cpu_features.has_pclmul;
@@ -23,6 +23,10 @@
23
23
  # include <unistd.h>
24
24
  #endif
25
25
 
26
+ #ifndef ENOSYS
27
+ # define ENOSYS ENXIO
28
+ #endif
29
+
26
30
  #if defined(_WIN32) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
27
31
  # define WINAPI_DESKTOP
28
32
  #endif
@@ -73,8 +77,9 @@ sodium_memzero(void * const pnt, const size_t len)
73
77
  memset(pnt, 0, len);
74
78
  _sodium_dummy_symbol_to_prevent_memzero_lto(pnt, len);
75
79
  #else
76
- volatile unsigned char *pnt_ = (volatile unsigned char *) pnt;
77
- size_t i = (size_t) 0U;
80
+ volatile unsigned char *volatile pnt_ =
81
+ (volatile unsigned char * volatile) pnt;
82
+ size_t i = (size_t) 0U;
78
83
 
79
84
  while (i < len) {
80
85
  pnt_[i++] = 0U;
@@ -101,8 +106,10 @@ sodium_memcmp(const void * const b1_, const void * const b2_, size_t len)
101
106
  const unsigned char *b1 = (const unsigned char *) b1_;
102
107
  const unsigned char *b2 = (const unsigned char *) b2_;
103
108
  #else
104
- const volatile unsigned char *b1 = (const volatile unsigned char *) b1_;
105
- const volatile unsigned char *b2 = (const volatile unsigned char *) b2_;
109
+ const volatile unsigned char *volatile b1 =
110
+ (const volatile unsigned char * volatile) b1_;
111
+ const volatile unsigned char *volatile b2 =
112
+ (const volatile unsigned char * volatile) b2_;
106
113
  #endif
107
114
  size_t i;
108
115
  unsigned char d = (unsigned char) 0U;
@@ -135,8 +142,10 @@ sodium_compare(const unsigned char *b1_, const unsigned char *b2_, size_t len)
135
142
  const unsigned char *b1 = b1_;
136
143
  const unsigned char *b2 = b2_;
137
144
  #else
138
- const volatile unsigned char *b1 = (const volatile unsigned char *) b1_;
139
- const volatile unsigned char *b2 = (const volatile unsigned char *) b2_;
145
+ const volatile unsigned char * volatile b1 =
146
+ (const volatile unsigned char * volatile) b1_;
147
+ const volatile unsigned char * volatile b2 =
148
+ (const volatile unsigned char * volatile) b2_;
140
149
  #endif
141
150
  unsigned char gt = 0U;
142
151
  unsigned char eq = 1U;
@@ -440,7 +449,7 @@ _mprotect_readwrite(void *ptr, size_t size)
440
449
 
441
450
  #ifdef HAVE_ALIGNED_MALLOC
442
451
 
443
- static void
452
+ __attribute__ ((noreturn)) static void
444
453
  _out_of_bounds(void)
445
454
  {
446
455
  # ifdef SIGSEGV
@@ -517,7 +526,7 @@ _unprotected_ptr_from_user_ptr(void * const ptr)
517
526
  static __attribute__ ((malloc)) void *
518
527
  _sodium_malloc(const size_t size)
519
528
  {
520
- return malloc(size);
529
+ return malloc(size > (size_t) 0U ? size : (size_t) 1U);
521
530
  }
522
531
  #else
523
532
  static __attribute__ ((malloc)) void *
@@ -569,7 +578,7 @@ sodium_malloc(const size_t size)
569
578
  void *ptr;
570
579
 
571
580
  if ((ptr = _sodium_malloc(size)) == NULL) {
572
- return NULL; /* LCOV_EXCL_LINE */
581
+ return NULL;
573
582
  }
574
583
  memset(ptr, (int) GARBAGE_VALUE, size);
575
584
 
@@ -92,6 +92,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92
92
  am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
93
93
  $(top_srcdir)/m4/ax_check_define.m4 \
94
94
  $(top_srcdir)/m4/ax_check_link_flag.m4 \
95
+ $(top_srcdir)/m4/ax_valgrind_check.m4 \
95
96
  $(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
96
97
  $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
97
98
  $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -200,6 +201,8 @@ CCASFLAGS = @CCASFLAGS@
200
201
  CCDEPMODE = @CCDEPMODE@
201
202
  CFLAGS = @CFLAGS@
202
203
  CFLAGS_AESNI = @CFLAGS_AESNI@
204
+ CFLAGS_AVX = @CFLAGS_AVX@
205
+ CFLAGS_AVX2 = @CFLAGS_AVX2@
203
206
  CFLAGS_MMX = @CFLAGS_MMX@
204
207
  CFLAGS_PCLMUL = @CFLAGS_PCLMUL@
205
208
  CFLAGS_SSE2 = @CFLAGS_SSE2@
@@ -272,6 +275,12 @@ SODIUM_LIBRARY_VERSION_MAJOR = @SODIUM_LIBRARY_VERSION_MAJOR@
272
275
  SODIUM_LIBRARY_VERSION_MINOR = @SODIUM_LIBRARY_VERSION_MINOR@
273
276
  STRIP = @STRIP@
274
277
  TEST_LDFLAGS = @TEST_LDFLAGS@
278
+ VALGRIND = @VALGRIND@
279
+ VALGRIND_ENABLED = @VALGRIND_ENABLED@
280
+ VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
281
+ VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
282
+ VALGRIND_HAVE_TOOL_helgrind = @VALGRIND_HAVE_TOOL_helgrind@
283
+ VALGRIND_HAVE_TOOL_memcheck = @VALGRIND_HAVE_TOOL_memcheck@
275
284
  VERSION = @VERSION@
276
285
  abs_builddir = @abs_builddir@
277
286
  abs_srcdir = @abs_srcdir@
@@ -37,6 +37,7 @@ EXTRA_DIST = \
37
37
  onetimeauth2.exp \
38
38
  onetimeauth7.exp \
39
39
  pwhash.exp \
40
+ pwhash_scrypt.exp \
40
41
  pwhash_scrypt_ll.exp \
41
42
  randombytes.exp \
42
43
  scalarmult.exp \
@@ -98,6 +99,7 @@ DISTCLEANFILES = \
98
99
  onetimeauth2.res \
99
100
  onetimeauth7.res \
100
101
  pwhash.res \
102
+ pwhash_scrypt.res \
101
103
  pwhash_scrypt_ll.res \
102
104
  randombytes.res \
103
105
  scalarmult.res \
@@ -160,6 +162,7 @@ CLEANFILES = \
160
162
  onetimeauth2.final \
161
163
  onetimeauth7.final \
162
164
  pwhash.final \
165
+ pwhash_scrypt.final \
163
166
  pwhash_scrypt_ll.final \
164
167
  randombytes.final \
165
168
  scalarmult.final \
@@ -217,6 +220,7 @@ CLEANFILES = \
217
220
  onetimeauth2.nexe \
218
221
  onetimeauth7.nexe \
219
222
  pwhash.nexe \
223
+ pwhash_scrypt.nexe \
220
224
  pwhash_scrypt_ll.nexe \
221
225
  randombytes.nexe \
222
226
  scalarmult.nexe \
@@ -286,6 +290,7 @@ TESTS_TARGETS = \
286
290
  onetimeauth2 \
287
291
  onetimeauth7 \
288
292
  pwhash \
293
+ pwhash_scrypt \
289
294
  pwhash_scrypt_ll \
290
295
  randombytes \
291
296
  scalarmult \
@@ -424,6 +429,9 @@ onetimeauth7_LDADD = $(TESTS_LDADD)
424
429
  pwhash_SOURCE = cmptest.h pwhash.c
425
430
  pwhash_LDADD = $(TESTS_LDADD)
426
431
 
432
+ pwhash_scrypt_SOURCE = cmptest.h pwhash_scrypt.c
433
+ pwhash_scrypt_LDADD = $(TESTS_LDADD)
434
+
427
435
  pwhash_scrypt_ll_SOURCE = cmptest.h pwhash_scrypt_ll.c
428
436
  pwhash_scrypt_ll_LDADD = $(TESTS_LDADD)
429
437
 
@@ -504,3 +512,5 @@ LOG_COMPILER = ./nacl-test-wrapper.sh
504
512
  endif
505
513
 
506
514
  verify: check
515
+
516
+ @VALGRIND_CHECK_RULES@
@@ -98,6 +98,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
98
98
  am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
99
99
  $(top_srcdir)/m4/ax_check_define.m4 \
100
100
  $(top_srcdir)/m4/ax_check_link_flag.m4 \
101
+ $(top_srcdir)/m4/ax_valgrind_check.m4 \
101
102
  $(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
102
103
  $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
103
104
  $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
@@ -121,7 +122,7 @@ am__EXEEXT_2 = aead_aes256gcm$(EXEEXT) aead_chacha20poly1305$(EXEEXT) \
121
122
  ed25519_convert$(EXEEXT) generichash$(EXEEXT) \
122
123
  generichash2$(EXEEXT) generichash3$(EXEEXT) hash$(EXEEXT) \
123
124
  hash3$(EXEEXT) onetimeauth$(EXEEXT) onetimeauth2$(EXEEXT) \
124
- onetimeauth7$(EXEEXT) pwhash$(EXEEXT) \
125
+ onetimeauth7$(EXEEXT) pwhash$(EXEEXT) pwhash_scrypt$(EXEEXT) \
125
126
  pwhash_scrypt_ll$(EXEEXT) randombytes$(EXEEXT) \
126
127
  scalarmult$(EXEEXT) scalarmult2$(EXEEXT) scalarmult5$(EXEEXT) \
127
128
  scalarmult6$(EXEEXT) scalarmult7$(EXEEXT) secretbox$(EXEEXT) \
@@ -234,6 +235,9 @@ onetimeauth7_DEPENDENCIES = $(TESTS_LDADD)
234
235
  pwhash_SOURCES = pwhash.c
235
236
  pwhash_OBJECTS = pwhash.$(OBJEXT)
236
237
  pwhash_DEPENDENCIES = $(TESTS_LDADD)
238
+ pwhash_scrypt_SOURCES = pwhash_scrypt.c
239
+ pwhash_scrypt_OBJECTS = pwhash_scrypt.$(OBJEXT)
240
+ pwhash_scrypt_DEPENDENCIES = $(TESTS_LDADD)
237
241
  pwhash_scrypt_ll_SOURCES = pwhash_scrypt_ll.c
238
242
  pwhash_scrypt_ll_OBJECTS = pwhash_scrypt_ll.$(OBJEXT)
239
243
  pwhash_scrypt_ll_DEPENDENCIES = $(TESTS_LDADD)
@@ -349,26 +353,26 @@ SOURCES = aead_aes256gcm.c aead_chacha20poly1305.c auth.c auth2.c \
349
353
  core1.c core2.c core3.c core4.c core5.c core6.c \
350
354
  ed25519_convert.c generichash.c generichash2.c generichash3.c \
351
355
  hash.c hash3.c onetimeauth.c onetimeauth2.c onetimeauth7.c \
352
- pwhash.c pwhash_scrypt_ll.c randombytes.c scalarmult.c \
353
- scalarmult2.c scalarmult5.c scalarmult6.c scalarmult7.c \
354
- secretbox.c secretbox2.c secretbox7.c secretbox8.c \
355
- secretbox_easy.c secretbox_easy2.c shorthash.c sign.c \
356
- sodium_core.c sodium_utils.c sodium_utils2.c sodium_utils3.c \
357
- sodium_version.c stream.c stream2.c stream3.c stream4.c \
358
- verify1.c
356
+ pwhash.c pwhash_scrypt.c pwhash_scrypt_ll.c randombytes.c \
357
+ scalarmult.c scalarmult2.c scalarmult5.c scalarmult6.c \
358
+ scalarmult7.c secretbox.c secretbox2.c secretbox7.c \
359
+ secretbox8.c secretbox_easy.c secretbox_easy2.c shorthash.c \
360
+ sign.c sodium_core.c sodium_utils.c sodium_utils2.c \
361
+ sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \
362
+ stream4.c verify1.c
359
363
  DIST_SOURCES = aead_aes256gcm.c aead_chacha20poly1305.c auth.c auth2.c \
360
364
  auth3.c auth5.c auth6.c auth7.c box.c box2.c box7.c box8.c \
361
365
  box_easy.c box_easy2.c box_seal.c box_seed.c chacha20.c \
362
366
  core1.c core2.c core3.c core4.c core5.c core6.c \
363
367
  ed25519_convert.c generichash.c generichash2.c generichash3.c \
364
368
  hash.c hash3.c onetimeauth.c onetimeauth2.c onetimeauth7.c \
365
- pwhash.c pwhash_scrypt_ll.c randombytes.c scalarmult.c \
366
- scalarmult2.c scalarmult5.c scalarmult6.c scalarmult7.c \
367
- secretbox.c secretbox2.c secretbox7.c secretbox8.c \
368
- secretbox_easy.c secretbox_easy2.c shorthash.c sign.c \
369
- sodium_core.c sodium_utils.c sodium_utils2.c sodium_utils3.c \
370
- sodium_version.c stream.c stream2.c stream3.c stream4.c \
371
- verify1.c
369
+ pwhash.c pwhash_scrypt.c pwhash_scrypt_ll.c randombytes.c \
370
+ scalarmult.c scalarmult2.c scalarmult5.c scalarmult6.c \
371
+ scalarmult7.c secretbox.c secretbox2.c secretbox7.c \
372
+ secretbox8.c secretbox_easy.c secretbox_easy2.c shorthash.c \
373
+ sign.c sodium_core.c sodium_utils.c sodium_utils2.c \
374
+ sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \
375
+ stream4.c verify1.c
372
376
  am__can_run_installinfo = \
373
377
  case $$AM_UPDATE_INFO_DIR in \
374
378
  n|no|NO) false;; \
@@ -617,6 +621,8 @@ CCASFLAGS = @CCASFLAGS@
617
621
  CCDEPMODE = @CCDEPMODE@
618
622
  CFLAGS = @CFLAGS@
619
623
  CFLAGS_AESNI = @CFLAGS_AESNI@
624
+ CFLAGS_AVX = @CFLAGS_AVX@
625
+ CFLAGS_AVX2 = @CFLAGS_AVX2@
620
626
  CFLAGS_MMX = @CFLAGS_MMX@
621
627
  CFLAGS_PCLMUL = @CFLAGS_PCLMUL@
622
628
  CFLAGS_SSE2 = @CFLAGS_SSE2@
@@ -689,6 +695,12 @@ SODIUM_LIBRARY_VERSION_MAJOR = @SODIUM_LIBRARY_VERSION_MAJOR@
689
695
  SODIUM_LIBRARY_VERSION_MINOR = @SODIUM_LIBRARY_VERSION_MINOR@
690
696
  STRIP = @STRIP@
691
697
  TEST_LDFLAGS = @TEST_LDFLAGS@
698
+ VALGRIND = @VALGRIND@
699
+ VALGRIND_ENABLED = @VALGRIND_ENABLED@
700
+ VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
701
+ VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
702
+ VALGRIND_HAVE_TOOL_helgrind = @VALGRIND_HAVE_TOOL_helgrind@
703
+ VALGRIND_HAVE_TOOL_memcheck = @VALGRIND_HAVE_TOOL_memcheck@
692
704
  VERSION = @VERSION@
693
705
  abs_builddir = @abs_builddir@
694
706
  abs_srcdir = @abs_srcdir@
@@ -780,6 +792,7 @@ EXTRA_DIST = \
780
792
  onetimeauth2.exp \
781
793
  onetimeauth7.exp \
782
794
  pwhash.exp \
795
+ pwhash_scrypt.exp \
783
796
  pwhash_scrypt_ll.exp \
784
797
  randombytes.exp \
785
798
  scalarmult.exp \
@@ -841,6 +854,7 @@ DISTCLEANFILES = \
841
854
  onetimeauth2.res \
842
855
  onetimeauth7.res \
843
856
  pwhash.res \
857
+ pwhash_scrypt.res \
844
858
  pwhash_scrypt_ll.res \
845
859
  randombytes.res \
846
860
  scalarmult.res \
@@ -902,6 +916,7 @@ DISTCLEANFILES = \
902
916
  @NATIVECLIENT_TRUE@ onetimeauth2.final \
903
917
  @NATIVECLIENT_TRUE@ onetimeauth7.final \
904
918
  @NATIVECLIENT_TRUE@ pwhash.final \
919
+ @NATIVECLIENT_TRUE@ pwhash_scrypt.final \
905
920
  @NATIVECLIENT_TRUE@ pwhash_scrypt_ll.final \
906
921
  @NATIVECLIENT_TRUE@ randombytes.final \
907
922
  @NATIVECLIENT_TRUE@ scalarmult.final \
@@ -959,6 +974,7 @@ DISTCLEANFILES = \
959
974
  @NATIVECLIENT_TRUE@ onetimeauth2.nexe \
960
975
  @NATIVECLIENT_TRUE@ onetimeauth7.nexe \
961
976
  @NATIVECLIENT_TRUE@ pwhash.nexe \
977
+ @NATIVECLIENT_TRUE@ pwhash_scrypt.nexe \
962
978
  @NATIVECLIENT_TRUE@ pwhash_scrypt_ll.nexe \
963
979
  @NATIVECLIENT_TRUE@ randombytes.nexe \
964
980
  @NATIVECLIENT_TRUE@ scalarmult.nexe \
@@ -997,11 +1013,12 @@ TESTS_TARGETS = aead_aes256gcm aead_chacha20poly1305 auth auth2 auth3 \
997
1013
  box_seal box_seed chacha20 core1 core2 core3 core4 core5 core6 \
998
1014
  ed25519_convert generichash generichash2 generichash3 hash \
999
1015
  hash3 onetimeauth onetimeauth2 onetimeauth7 pwhash \
1000
- pwhash_scrypt_ll randombytes scalarmult scalarmult2 \
1001
- scalarmult5 scalarmult6 scalarmult7 secretbox secretbox2 \
1002
- secretbox7 secretbox8 secretbox_easy secretbox_easy2 shorthash \
1003
- sign sodium_core sodium_utils sodium_version stream stream2 \
1004
- stream3 stream4 verify1 $(am__append_1)
1016
+ pwhash_scrypt pwhash_scrypt_ll randombytes scalarmult \
1017
+ scalarmult2 scalarmult5 scalarmult6 scalarmult7 secretbox \
1018
+ secretbox2 secretbox7 secretbox8 secretbox_easy \
1019
+ secretbox_easy2 shorthash sign sodium_core sodium_utils \
1020
+ sodium_version stream stream2 stream3 stream4 verify1 \
1021
+ $(am__append_1)
1005
1022
  TESTS_LDADD = \
1006
1023
  ${top_builddir}/src/libsodium/libsodium.la
1007
1024
 
@@ -1071,6 +1088,8 @@ onetimeauth7_SOURCE = cmptest.h onetimeauth7.c
1071
1088
  onetimeauth7_LDADD = $(TESTS_LDADD)
1072
1089
  pwhash_SOURCE = cmptest.h pwhash.c
1073
1090
  pwhash_LDADD = $(TESTS_LDADD)
1091
+ pwhash_scrypt_SOURCE = cmptest.h pwhash_scrypt.c
1092
+ pwhash_scrypt_LDADD = $(TESTS_LDADD)
1074
1093
  pwhash_scrypt_ll_SOURCE = cmptest.h pwhash_scrypt_ll.c
1075
1094
  pwhash_scrypt_ll_LDADD = $(TESTS_LDADD)
1076
1095
  randombytes_SOURCE = cmptest.h randombytes.c
@@ -1297,6 +1316,10 @@ pwhash$(EXEEXT): $(pwhash_OBJECTS) $(pwhash_DEPENDENCIES) $(EXTRA_pwhash_DEPENDE
1297
1316
  @rm -f pwhash$(EXEEXT)
1298
1317
  $(AM_V_CCLD)$(LINK) $(pwhash_OBJECTS) $(pwhash_LDADD) $(LIBS)
1299
1318
 
1319
+ pwhash_scrypt$(EXEEXT): $(pwhash_scrypt_OBJECTS) $(pwhash_scrypt_DEPENDENCIES) $(EXTRA_pwhash_scrypt_DEPENDENCIES)
1320
+ @rm -f pwhash_scrypt$(EXEEXT)
1321
+ $(AM_V_CCLD)$(LINK) $(pwhash_scrypt_OBJECTS) $(pwhash_scrypt_LDADD) $(LIBS)
1322
+
1300
1323
  pwhash_scrypt_ll$(EXEEXT): $(pwhash_scrypt_ll_OBJECTS) $(pwhash_scrypt_ll_DEPENDENCIES) $(EXTRA_pwhash_scrypt_ll_DEPENDENCIES)
1301
1324
  @rm -f pwhash_scrypt_ll$(EXEEXT)
1302
1325
  $(AM_V_CCLD)$(LINK) $(pwhash_scrypt_ll_OBJECTS) $(pwhash_scrypt_ll_LDADD) $(LIBS)
@@ -1436,6 +1459,7 @@ distclean-compile:
1436
1459
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onetimeauth2.Po@am__quote@
1437
1460
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onetimeauth7.Po@am__quote@
1438
1461
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwhash.Po@am__quote@
1462
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwhash_scrypt.Po@am__quote@
1439
1463
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwhash_scrypt_ll.Po@am__quote@
1440
1464
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randombytes.Po@am__quote@
1441
1465
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scalarmult.Po@am__quote@
@@ -1916,6 +1940,13 @@ pwhash.log: pwhash$(EXEEXT)
1916
1940
  --log-file $$b.log --trs-file $$b.trs \
1917
1941
  $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1918
1942
  "$$tst" $(AM_TESTS_FD_REDIRECT)
1943
+ pwhash_scrypt.log: pwhash_scrypt$(EXEEXT)
1944
+ @p='pwhash_scrypt$(EXEEXT)'; \
1945
+ b='pwhash_scrypt'; \
1946
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1947
+ --log-file $$b.log --trs-file $$b.trs \
1948
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1949
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
1919
1950
  pwhash_scrypt_ll.log: pwhash_scrypt_ll$(EXEEXT)
1920
1951
  @p='pwhash_scrypt_ll$(EXEEXT)'; \
1921
1952
  b='pwhash_scrypt_ll'; \
@@ -2269,6 +2300,8 @@ uninstall-am:
2269
2300
 
2270
2301
  verify: check
2271
2302
 
2303
+ @VALGRIND_CHECK_RULES@
2304
+
2272
2305
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
2273
2306
  # Otherwise a system limit (for SysV at least) may be exceeded.
2274
2307
  .NOEXPORT: