rbnacl-libsodium 1.0.15.1 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -6
  3. data/CHANGES.md +50 -42
  4. data/Gemfile +1 -1
  5. data/README.md +3 -1
  6. data/Rakefile +46 -0
  7. data/ext/rbnacl/extconf.rb +16 -1
  8. data/lib/rbnacl/libsodium.rb +16 -8
  9. data/lib/rbnacl/libsodium/version.rb +1 -1
  10. data/rbnacl-libsodium.gemspec +3 -0
  11. data/vendor/libsodium/AUTHORS +20 -5
  12. data/vendor/libsodium/ChangeLog +25 -0
  13. data/vendor/libsodium/Makefile.in +3 -1
  14. data/vendor/libsodium/README.markdown +2 -1
  15. data/vendor/libsodium/aclocal.m4 +1 -0
  16. data/vendor/libsodium/autom4te.cache/output.1 +836 -123
  17. data/vendor/libsodium/autom4te.cache/output.4 +21342 -0
  18. data/vendor/libsodium/autom4te.cache/requests +801 -554
  19. data/vendor/libsodium/autom4te.cache/traces.1 +717 -596
  20. data/vendor/libsodium/autom4te.cache/traces.4 +4355 -0
  21. data/vendor/libsodium/builds/Makefile.in +3 -1
  22. data/vendor/libsodium/builds/msvc/resource.h +1 -1
  23. data/vendor/libsodium/builds/msvc/resource.rc +2 -2
  24. data/vendor/libsodium/builds/msvc/version.h +2 -2
  25. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +17 -8
  26. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +60 -24
  27. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +17 -8
  28. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +60 -24
  29. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +17 -8
  30. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +60 -24
  31. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +17 -8
  32. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +60 -24
  33. data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj +17 -8
  34. data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +60 -24
  35. data/vendor/libsodium/configure +834 -121
  36. data/vendor/libsodium/configure.ac +55 -13
  37. data/vendor/libsodium/contrib/Findsodium.cmake +22 -3
  38. data/vendor/libsodium/contrib/Makefile.in +3 -1
  39. data/vendor/libsodium/dist-build/Makefile.in +3 -1
  40. data/vendor/libsodium/dist-build/android-build.sh +2 -2
  41. data/vendor/libsodium/dist-build/emscripten-symbols.def +38 -26
  42. data/vendor/libsodium/dist-build/emscripten.sh +23 -8
  43. data/vendor/libsodium/dist-build/msys2-win32.sh +1 -1
  44. data/vendor/libsodium/dist-build/msys2-win64.sh +1 -1
  45. data/vendor/libsodium/libsodium.vcxproj +17 -8
  46. data/vendor/libsodium/libsodium.vcxproj.filters +41 -14
  47. data/vendor/libsodium/m4/ax_tls.m4 +74 -0
  48. data/vendor/libsodium/msvc-scripts/Makefile.in +3 -1
  49. data/vendor/libsodium/msvc-scripts/process.bat +2 -2
  50. data/vendor/libsodium/packaging/dotnet-core/README.md +5 -5
  51. data/vendor/libsodium/packaging/dotnet-core/prepare.py +7 -7
  52. data/vendor/libsodium/packaging/nuget/package.config +1 -1
  53. data/vendor/libsodium/regen-msvc/libsodium.vcxproj +326 -0
  54. data/vendor/libsodium/regen-msvc/libsodium.vcxproj.filters +23 -0
  55. data/vendor/libsodium/regen-msvc/libsodium.vcxproj.filters.tpl +35 -0
  56. data/vendor/libsodium/regen-msvc/libsodium.vcxproj.tpl +93 -0
  57. data/vendor/libsodium/regen-msvc/regen-msvc.py +136 -0
  58. data/vendor/libsodium/regen-msvc/tl_libsodium.vcxproj.filters.tpl +23 -0
  59. data/vendor/libsodium/regen-msvc/tl_libsodium.vcxproj.tpl +331 -0
  60. data/vendor/libsodium/src/Makefile.in +3 -1
  61. data/vendor/libsodium/src/libsodium/Makefile.am +40 -24
  62. data/vendor/libsodium/src/libsodium/Makefile.in +238 -180
  63. data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +10 -2
  64. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/core_ed25519.c +79 -0
  65. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +2031 -0
  66. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base.h +1344 -0
  67. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/base2.h +40 -0
  68. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/constants.h +20 -0
  69. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h +220 -0
  70. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/base.h +1344 -0
  71. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/base2.h +40 -0
  72. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/constants.h +21 -0
  73. data/vendor/libsodium/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h +116 -0
  74. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2.h +1 -1
  75. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c +2 -1
  76. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +14 -82
  77. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c +1 -0
  78. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +3 -3
  79. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +3 -3
  80. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +1 -7
  81. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +1 -0
  82. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +0 -6
  83. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c +19 -92
  84. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h +72 -4
  85. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +5 -1
  86. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h +1 -1
  87. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +10 -7
  88. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +108 -231
  89. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h +1 -1
  90. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c +27 -27
  91. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +2 -1
  92. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +6 -3
  93. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +3 -11
  94. data/vendor/libsodium/src/libsodium/crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c +86 -0
  95. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +28 -26
  96. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +32 -30
  97. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +14 -115
  98. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +56 -13
  99. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/{ed25519_ref10.h → sign_ed25519_ref10.h} +2 -5
  100. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +1 -1
  101. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +1 -0
  102. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +1 -0
  103. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +1 -1
  104. data/vendor/libsodium/src/libsodium/include/Makefile.am +2 -0
  105. data/vendor/libsodium/src/libsodium/include/Makefile.in +13 -9
  106. data/vendor/libsodium/src/libsodium/include/sodium.h +2 -0
  107. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_ed25519.h +37 -0
  108. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult.h +8 -0
  109. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +8 -0
  110. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_ed25519.h +41 -0
  111. data/vendor/libsodium/src/libsodium/include/sodium/private/common.h +18 -0
  112. data/vendor/libsodium/src/libsodium/include/sodium/private/ed25519_ref10.h +125 -0
  113. data/vendor/libsodium/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +1050 -0
  114. data/vendor/libsodium/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +518 -0
  115. data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +3 -0
  116. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +3 -0
  117. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +182 -102
  118. data/vendor/libsodium/src/libsodium/sodium/core.c +30 -2
  119. data/vendor/libsodium/src/libsodium/sodium/runtime.c +14 -0
  120. data/vendor/libsodium/src/libsodium/sodium/utils.c +46 -0
  121. data/vendor/libsodium/test/Makefile.in +3 -1
  122. data/vendor/libsodium/test/default/Makefile.am +16 -0
  123. data/vendor/libsodium/test/default/Makefile.in +71 -23
  124. data/vendor/libsodium/test/default/aead_aes256gcm.c +1 -1
  125. data/vendor/libsodium/test/default/cmptest.h +4 -0
  126. data/vendor/libsodium/test/default/core3.c +44 -4
  127. data/vendor/libsodium/test/default/core3.exp +2 -0
  128. data/vendor/libsodium/test/default/core4.c +1 -1
  129. data/vendor/libsodium/test/default/core_ed25519.c +151 -0
  130. data/vendor/libsodium/test/default/core_ed25519.exp +1 -0
  131. data/vendor/libsodium/test/default/ed25519_convert.c +9 -1
  132. data/vendor/libsodium/test/default/index.html.tpl +17 -3
  133. data/vendor/libsodium/test/default/kdf.c +4 -2
  134. data/vendor/libsodium/test/default/metamorphic.c +8 -8
  135. data/vendor/libsodium/test/default/misuse.c +29 -1
  136. data/vendor/libsodium/test/default/pwhash_argon2i.c +9 -3
  137. data/vendor/libsodium/test/default/pwhash_argon2i.exp +2 -2
  138. data/vendor/libsodium/test/default/pwhash_argon2id.c +7 -2
  139. data/vendor/libsodium/test/default/pwhash_argon2id.exp +2 -2
  140. data/vendor/libsodium/test/default/scalarmult.c +0 -2
  141. data/vendor/libsodium/test/default/scalarmult.exp +0 -1
  142. data/vendor/libsodium/test/default/scalarmult_ed25519.c +90 -0
  143. data/vendor/libsodium/test/default/scalarmult_ed25519.exp +1 -0
  144. data/vendor/libsodium/test/default/secretbox_easy2.c +1 -1
  145. data/vendor/libsodium/test/default/secretstream.c +52 -3
  146. data/vendor/libsodium/test/default/sign.c +16 -0
  147. data/vendor/libsodium/test/default/sodium_core.c +1 -0
  148. data/vendor/libsodium/test/default/sodium_utils.c +2 -1
  149. data/vendor/libsodium/test/default/xchacha20.c +2 -1
  150. metadata +63 -12
  151. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/base.h +0 -1344
  152. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/base2.h +0 -40
  153. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +0 -2797
  154. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +0 -545
  155. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.h +0 -10
  156. data/vendor/libsodium/src/libsodium/include/sodium/private/curve25519_ref10.h +0 -132
  157. data/vendor/libsodium/test/default/index-wasm.html.tpl +0 -118
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83d600396fb9e671bdb984562258d9afac860ef5
4
- data.tar.gz: c95ce5dc460b745e6b91a6eff7247ff35f252053
3
+ metadata.gz: f217630436d9f2692c0050a272207ebb65cf7b43
4
+ data.tar.gz: 44b22ecd52844856221ed92026ac9c2cce20af50
5
5
  SHA512:
6
- metadata.gz: 9729c0befc501d5e5ea7b75467da93b225a8024c3f761cf7125f5f3ff16a5fe1c3738c1b725cc9d2f3b14e5fcc87e738ef0e31bdef7f555f7bb0ec9b3543a435
7
- data.tar.gz: 59d775e61f456c036c128c480687b82658c40a9abceb177b9b69ad29a0f530afd472dd8ebc17cc02b538824514573b31bb00a7cd9fc67e2ac750fa032db6190c
6
+ metadata.gz: bdcd2ae8318bca194425b3bcdafc951a953ccb45bac817cc59f7fe64837e7b89d8dde19fe6b62e16d12ec605b60d619828569e120242b505a082cd19cbb39ea3
7
+ data.tar.gz: b426e333c16054bf9e0087fdb21d83f966a86f17ece44e2066195006a390d4d6a5bb1f26a297bfc6b75c109354922267e88ab4220a3b37ef6f87c8ddd496c632
@@ -2,13 +2,11 @@ language: ruby
2
2
  sudo: false
3
3
 
4
4
  rvm:
5
- - 2.0.0
6
- - 2.1.8
7
- - 2.2.4
8
- - 2.3.0
5
+ - 2.2.8
6
+ - 2.3.5
7
+ - 2.4.2
9
8
  - ruby-head
10
- - jruby
11
- - jruby-9.0.4.0
9
+ - jruby-9.1.14.0
12
10
  - jruby-head
13
11
  - rbx-2
14
12
 
data/CHANGES.md CHANGED
@@ -1,86 +1,94 @@
1
- 1.0.15.1 (2017-11-08)
2
- ---------------------
1
+ # 1.0.16 (2017-12-13)
2
+
3
+ * Update to libsodium 1.0.16
4
+ * Add `rake gem:windows` to cross-compile Windows binary releases
5
+ * Windows DLL path fixups
6
+ * Support for 64-bit library pathnames
7
+ * Drop suppoort for Ruby <2.2 (to match RbNaCl itself)
8
+
9
+ # 1.0.15.1 (2017-11-08)
10
+
3
11
  * Run autogen.sh prior to release. D'oh!
4
12
 
5
- 1.0.15 (2017-11-08)
6
- -------------------
13
+ # 1.0.15 (2017-11-08)
14
+
7
15
  * Update to libsodium 1.0.15
8
16
  * OpenBSD support
9
17
 
10
- 1.0.13 (2017-08-15)
11
- -------------------
18
+ # 1.0.13 (2017-08-15)
19
+
12
20
  * Update to libsodium 1.0.13
13
21
 
14
- 1.0.11 (2016-11-27)
15
- -------------------
22
+ # 1.0.11 (2016-11-27)
23
+
16
24
  * Update to libsodium 1.0.11
17
25
 
18
- 1.0.10 (2016-04-16)
19
- -------------------
26
+ # 1.0.10 (2016-04-16)
27
+
20
28
  * Update to libsodium 1.0.10
21
29
  * Windows support fixups, take 2 (hopefully actually working)
22
30
 
23
- 1.0.9 (2016-04-02)
24
- ------------------
31
+ # 1.0.9 (2016-04-02)
32
+
25
33
  * Update to libsodium 1.0.9
26
34
  * Windows support fixups
27
35
 
28
- 1.0.8 (2015-12-26)
29
- ------------------
36
+ # 1.0.8 (2015-12-26)
37
+
30
38
  * Update to libsodium 1.0.8
31
39
 
32
- 1.0.7 (2015-12-08)
33
- ------------------
40
+ # 1.0.7 (2015-12-08)
41
+
34
42
  * Update to libsodium 1.0.7
35
43
 
36
- 1.0.6 (2015-11-01)
37
- ------------------
44
+ # 1.0.6 (2015-11-01)
45
+
38
46
  * Update to libsodium 1.0.6
39
47
 
40
- 1.0.5 (2015-11-01)
41
- ------------------
48
+ # 1.0.5 (2015-11-01)
49
+
42
50
  * Update to libsodium 1.0.5
43
51
 
44
- 1.0.4 (2015-10-18)
45
- ------------------
52
+ # 1.0.4 (2015-10-18)
53
+
46
54
  * Update to libsodium 1.0.4
47
55
 
48
- 1.0.3 (2015-05-10)
49
- ------------------
56
+ # 1.0.3 (2015-05-10)
57
+
50
58
  * Update to libsodium 1.0.3
51
59
 
52
- 1.0.2 (2015-01-31)
53
- ------------------
60
+ # 1.0.2 (2015-01-31)
61
+
54
62
  * Update to libsodium 1.0.2
55
63
 
56
- 1.0.1 (2014-11-25)
57
- ------------------
64
+ # 1.0.1 (2014-11-25)
65
+
58
66
  * Update to libsodium 1.0.1
59
67
 
60
- 1.0.0 (2014-09-27)
61
- ------------------
68
+ # 1.0.0 (2014-09-27)
69
+
62
70
  * Update to libsodium 1.0.0
63
71
 
64
- 0.7.0 (2014-08-24)
65
- ------------------
72
+ # 0.7.0 (2014-08-24)
73
+
66
74
  * Update to libsodium 0.7.0
67
75
 
68
- 0.6.1 (2014-07-19)
69
- ------------------
76
+ # 0.6.1 (2014-07-19)
77
+
70
78
  * Update to libsodium 0.6.1
71
79
 
72
- 0.6.0 (2014-07-03)
73
- ------------------
80
+ # 0.6.0 (2014-07-03)
81
+
74
82
  * Update to libsodium 0.6.0
75
83
 
76
- 0.5.0.1 (2014-06-14)
77
- --------------------
84
+ # 0.5.0.1 (2014-06-14)
85
+
78
86
  * Run autogen.sh in advance so systems without autotools still work
79
87
 
80
- 0.5.0 (2014-05-14)
81
- ------------------
88
+ # 0.5.0 (2014-05-14)
89
+
82
90
  * Update to libsodium 0.5.0
83
91
 
84
- 0.4.5 (2014-05-13)
85
- ------------------
92
+ # 0.4.5 (2014-05-13)
93
+
86
94
  * Initial release with libsodium 0.4.5
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rbnacl", github: 'cryptosphere/rbnacl'
5
+ gem "rbnacl", git: 'https://github.com/cryptosphere/rbnacl.git'
6
6
 
7
7
  group :development, :test do
8
8
  gem "rspec", "~> 3"
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  RbNaCl::Libsodium
2
2
  =================
3
- [![Gem Version](https://badge.fury.io/rb/rbnacl-libsodium.png)](http://badge.fury.io/rb/rbnacl-libsodium)
3
+ [![Gem Version](https://badge.fury.io/rb/rbnacl-libsodium.svg)](http://badge.fury.io/rb/rbnacl-libsodium)
4
+ [![Build Status](https://travis-ci.org/cryptosphere/rbnacl-libsodium.svg?branch=master)](https://travis-ci.org/cryptosphere/rbnacl-libsodium)
5
+ [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cryptosphere/rbnacl-libsodium/blob/master/LICENSE.txt)
4
6
 
5
7
  [RbNaCl] is a Ruby wrapper for [libsodium], a portable version of the Networking and
6
8
  Cryptography library ([NaCl]) created by Daniel J. Bernstein.
data/Rakefile CHANGED
@@ -1,6 +1,52 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
+ require 'rake/extensiontask'
3
4
 
4
5
  RSpec::Core::RakeTask.new
5
6
 
6
7
  task default: :spec
8
+
9
+ MAKE = ENV['MAKE'] || ENV['make'] || "make"
10
+ RUBY_CC_VERSION = ENV['RUBY_CC_VERSION'] || '2.3.0'
11
+
12
+ desc "Build Windows binary packages"
13
+ task 'gem:windows' do
14
+ require 'rake_compiler_dock'
15
+ if File.exist? "vendor/libsodium/Makefile"
16
+ RakeCompilerDock.sh "cd vendor/libsodium && #{MAKE} clean"
17
+ end
18
+ sh "bundle package" # Avoid repeated downloads of gems by using gem files from the host.
19
+ RakeCompilerDock.sh "bundle --local && RUBY_CC_VERSION=#{RUBY_CC_VERSION} rake cross native gem"
20
+ end
21
+
22
+ spec = Gem::Specification.load("rbnacl-libsodium.gemspec")
23
+
24
+ PLATFORMS = ['x86-mingw32', 'x64-mingw32']
25
+ Rake::ExtensionTask.new("fake_ext", spec) do |ext|
26
+ ext.ext_dir = 'ext/rbnacl'
27
+ ext.cross_compile = true
28
+ ext.cross_platform = PLATFORMS
29
+ ext.cross_config_options << {
30
+ 'x86-mingw32' => '--with-host=i686-w64-mingw32',
31
+ 'x64-mingw32' => '--with-host=x86_64-w64-mingw32'
32
+ }
33
+ ext.cross_compiling do |gem_spec|
34
+ gem_spec.files.reject! { |f| /lib\/fake_ext\.so\Z/ =~ f }
35
+ stage_path = "#{ext.tmp_dir}/#{gem_spec.platform}/stage"
36
+ gem_spec.files += Dir["#{stage_path}/vendor/libsodium/dist/**/*"].map do |stage|
37
+ gem_path = stage.sub(stage_path + "/", "")
38
+ # define empty task to skip copy from vendor/libsodium/dist/*
39
+ task stage
40
+ task gem_path
41
+ gem_path
42
+ end
43
+ gem_spec.post_install_message = "You installed the binary version of this gem!"
44
+ end
45
+ end
46
+
47
+ PLATFORMS.each do |platf|
48
+ copy_task = "copy:fake_ext:#{platf}:#{RUBY_CC_VERSION}"
49
+ if Rake::Task.task_defined?(copy_task)
50
+ Rake::Task[copy_task].clear_actions
51
+ end
52
+ end
@@ -1,3 +1,5 @@
1
+ require 'mkmf'
2
+
1
3
  def sys(cmd)
2
4
  puts " -- #{cmd}"
3
5
  unless ret = system(cmd)
@@ -14,13 +16,26 @@ clean:
14
16
  \t@echo "Nothing to do"
15
17
  MAKEFILE
16
18
 
19
+ HOST = arg_config("--host")
20
+ OPTIONS = []
21
+ if HOST
22
+ OPTIONS << "--host=#{HOST}"
23
+ end
24
+
17
25
  CWD = File.expand_path(File.dirname(__FILE__))
18
26
  LIBSODIUM_DIR = File.expand_path(File.join(CWD, '..', '..', 'vendor', 'libsodium'))
19
27
  MAKE = ENV['MAKE'] || ENV['make'] || "make"
28
+ if HOST
29
+ # install to the stage directory for rake-compiler
30
+ DIST = File.expand_path(File.join(CWD, '..', '..', 'tmp', RUBY_PLATFORM, 'stage', 'vendor', 'libsodium', 'dist'))
31
+ else
32
+ DIST = "#{LIBSODIUM_DIR}/dist"
33
+ end
20
34
 
21
35
  Dir.chdir(LIBSODIUM_DIR) do
22
36
  # sh is required to run configure on Windows
23
- sys("sh -c \"./configure --prefix=#{LIBSODIUM_DIR}/dist\"")
37
+ sys("sh -c \"./configure --prefix=#{DIST} #{OPTIONS.join(' ')}\"")
38
+ sys("#{MAKE} clean") if HOST
24
39
  sys(MAKE)
25
40
  sys("#{MAKE} install")
26
41
  end
@@ -1,18 +1,26 @@
1
- require "rbnacl/libsodium/version"
1
+ require 'rbnacl/libsodium/version'
2
2
 
3
3
  module RbNaCl
4
4
  module Libsodium
5
- sodiumlib_dir = File.expand_path("../../../vendor/libsodium/dist/lib/", __FILE__)
5
+ class << self
6
+ def sodiumlib_dir
7
+ sodiumlib32_dir = File.expand_path('../../../vendor/libsodium/dist/lib/', __FILE__)
8
+ sodiumlib64_dir = File.expand_path('../../../vendor/libsodium/dist/lib64/', __FILE__)
9
+ [sodiumlib32_dir, sodiumlib64_dir].select { |dir| Dir.exist?(dir) }.first
10
+ end
6
11
 
7
- sodiumlib_glob = case RUBY_DESCRIPTION
8
- when /darwin/ then "libsodium*.dylib"
9
- when /Windows|(win|mingw)32/ then "libsodium*.dll"
10
- when /openbsd/ then "libsodium*.so.*"
11
- else "libsodium*.so"
12
+ def sodiumlib_glob
13
+ case RUBY_DESCRIPTION
14
+ when /darwin/ then 'libsodium*.dylib'
15
+ when /Windows|(win|mingw)32/ then '../bin/libsodium*.dll'
16
+ when /openbsd/ then 'libsodium*.so.*'
17
+ else 'libsodium*.so'
18
+ end
19
+ end
12
20
  end
13
21
 
14
22
  ::RBNACL_LIBSODIUM_GEM_LIB_PATH = Dir.glob(File.join(sodiumlib_dir, sodiumlib_glob)).first
15
23
  end
16
24
  end
17
25
 
18
- require "rbnacl"
26
+ require 'rbnacl'
@@ -1,5 +1,5 @@
1
1
  module RbNaCl
2
2
  module Libsodium
3
- VERSION = '1.0.15.1'
3
+ VERSION = '1.0.16'
4
4
  end
5
5
  end
@@ -20,7 +20,10 @@ Gem::Specification.new do |spec|
20
20
  spec.extensions = ['ext/rbnacl/extconf.rb']
21
21
 
22
22
  spec.add_runtime_dependency "rbnacl", ">= 3.0.1"
23
+ spec.required_ruby_version = '>= 2.2.6'
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.5"
25
26
  spec.add_development_dependency "rake", ">= 10"
27
+ spec.add_development_dependency 'rake-compiler', '~> 0.9.7'
28
+ spec.add_development_dependency 'rake-compiler-dock', '~> 0.5.2'
26
29
  end
@@ -14,6 +14,7 @@ blake2 Jean-Philippe Aumasson
14
14
  chacha20 Daniel J. Bernstein
15
15
 
16
16
  chacha20poly1305 Adam Langley
17
+ Yoav Nir
17
18
 
18
19
  curve25519 Daniel J. Bernstein
19
20
 
@@ -41,7 +42,9 @@ crypto_aead/aes256gcm/aesni Romain Dolbeau
41
42
  Frank Denis
42
43
 
43
44
  crypto_aead/chacha20poly1305 Frank Denis
44
- crypto_aead/xchacha20poly1305
45
+
46
+ crypto_aead/xchacha20poly1305 Frank Denis
47
+ Jason A. Donenfeld
45
48
 
46
49
  crypto_auth/hmacsha256 Colin Percival
47
50
  crypto_auth/hmacsha512
@@ -51,7 +54,8 @@ crypto_box/curve25519xsalsa20poly1305 Daniel J. Bernstein
51
54
 
52
55
  crypto_box/curve25519xchacha20poly1305 Frank Denis
53
56
 
54
- crypto_core/curve25519 Daniel J. Bernstein
57
+ crypto_core/ed25519 Daniel J. Bernstein
58
+ Adam Langley
55
59
 
56
60
  crypto_core/hchacha20 Frank Denis
57
61
 
@@ -67,7 +71,7 @@ crypto_hash/sha256 Colin Percival
67
71
  crypto_hash/sha512
68
72
  crypto_hash/sha512256
69
73
 
70
- crypto_kdf/blake2b Frank Denis
74
+ crypto_kdf Frank Denis
71
75
 
72
76
  crypto_kx Frank Denis
73
77
 
@@ -85,10 +89,10 @@ crypto_pwhash/scryptsalsa208sha256 Colin Percival
85
89
 
86
90
  crypto_scalarmult/curve25519/ref10 Daniel J. Bernstein
87
91
 
88
- crypto_scalarmult/curve25519/donna_c64 Adam Langley
89
-
90
92
  crypto_scalarmult/curve25519/sandy2x Tung Chou
91
93
 
94
+ crypto_scalarmult/ed25519 Frank Denis
95
+
92
96
  crypto_secretbox/xsalsa20poly1305 Daniel J. Bernstein
93
97
 
94
98
  crypto_secretbox/xchacha20poly1305 Frank Denis
@@ -110,6 +114,7 @@ crypto_stream/chacha20/dolbeau Romain Dolbeau
110
114
  Daniel J. Bernstein
111
115
 
112
116
  crypto_stream/salsa20/ref Daniel J. Bernstein
117
+ crypto_stream/salsa20/xmm6
113
118
 
114
119
  crypto_stream/salsa20/xmm6int Romain Dolbeau
115
120
  Daniel J. Bernstein
@@ -118,3 +123,13 @@ crypto_stream/salsa2012/ref Daniel J. Bernstein
118
123
  crypto_stream/salsa2008/ref
119
124
 
120
125
  crypto_stream/xchacha20 Frank Denis
126
+
127
+ crypto_verify Frank Denis
128
+
129
+ sodium/codecs.c Frank Denis
130
+ Thomas Pornin
131
+ Christian Winnerlein
132
+
133
+ sodium/core.c Frank Denis
134
+ sodium/runtime.h
135
+ sodium/utils.c
@@ -1,4 +1,29 @@
1
1
 
2
+ * Version 1.0.16
3
+ - Signatures computations and verifications are now way faster on
4
+ 64-bit platforms with compilers supporting 128-bit arithmetic (gcc,
5
+ clang, icc). This includes the WebAssembly target.
6
+ - New low-level APIs for computations over edwards25519:
7
+ `crypto_scalarmult_ed25519()`, `crypto_scalarmult_ed25519_base()`,
8
+ `crypto_core_ed25519_is_valid_point()`, `crypto_core_ed25519_add()`,
9
+ `crypto_core_ed25519_sub()` and `crypto_core_ed25519_from_uniform()`
10
+ (elligator representative to point).
11
+ - `crypto_sign_open()`, `crypto_sign_verify_detached() and
12
+ `crypto_sign_edwards25519sha512batch_open` now reject public keys in
13
+ non-canonical form in addition to low-order points.
14
+ - The library can be built with `ED25519_NONDETERMINISTIC` defined in
15
+ order to use synthetic nonces for EdDSA. This is disabled by default.
16
+ - Webassembly: `crypto_pwhash_*()` functions are now included in
17
+ non-sumo builds.
18
+ - `sodium_stackzero()` was added to wipe content off the stack.
19
+ - Android: support new SDKs where unified headers have become the
20
+ default.
21
+ - The Salsa20-based PRNG example is now thread-safe on platforms with
22
+ support for thread-local storage, optionally mixes bits from RDRAND.
23
+ - CMAKE: static library detection on Unix systems has been improved
24
+ (thanks to @BurningEnlightenment, @nibua-r, @mellery451)
25
+ - Argon2 and scrypt are slightly faster on Linux.
26
+
2
27
  * Version 1.0.15
3
28
  - The default password hashing algorithm is now Argon2id. The
4
29
  `pwhash_str_verify()` function can still verify Argon2i hashes
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_catchable_abrt.m4 \
95
95
  $(top_srcdir)/m4/ax_check_compile_flag.m4 \
96
96
  $(top_srcdir)/m4/ax_check_define.m4 \
97
97
  $(top_srcdir)/m4/ax_check_link_flag.m4 \
98
- $(top_srcdir)/m4/ax_pthread.m4 \
98
+ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \
99
99
  $(top_srcdir)/m4/ax_valgrind_check.m4 \
100
100
  $(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
101
101
  $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -251,6 +251,7 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
251
251
  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
252
252
  distcleancheck_listfiles = find . -type f -print
253
253
  ACLOCAL = @ACLOCAL@
254
+ ALLOCA = @ALLOCA@
254
255
  AMTAR = @AMTAR@
255
256
  AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
256
257
  AR = @AR@
@@ -271,6 +272,7 @@ CFLAGS_AVX2 = @CFLAGS_AVX2@
271
272
  CFLAGS_AVX512F = @CFLAGS_AVX512F@
272
273
  CFLAGS_MMX = @CFLAGS_MMX@
273
274
  CFLAGS_PCLMUL = @CFLAGS_PCLMUL@
275
+ CFLAGS_RDRAND = @CFLAGS_RDRAND@
274
276
  CFLAGS_SSE2 = @CFLAGS_SSE2@
275
277
  CFLAGS_SSE3 = @CFLAGS_SSE3@
276
278
  CFLAGS_SSE41 = @CFLAGS_SSE41@