rbnacl-libsodium 0.7.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +4 -0
  3. data/lib/rbnacl/libsodium/version.rb +1 -1
  4. data/vendor/libsodium/ChangeLog +13 -0
  5. data/vendor/libsodium/THANKS +1 -0
  6. data/vendor/libsodium/autom4te.cache/output.1 +14 -90
  7. data/vendor/libsodium/autom4te.cache/output.3 +14 -90
  8. data/vendor/libsodium/autom4te.cache/requests +127 -127
  9. data/vendor/libsodium/autom4te.cache/traces.1 +224 -224
  10. data/vendor/libsodium/autom4te.cache/traces.3 +137 -144
  11. data/vendor/libsodium/builds/msvc/version.h +2 -2
  12. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +3 -0
  13. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +3 -0
  14. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +3 -0
  15. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +3 -0
  16. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +3 -0
  17. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +3 -0
  18. data/vendor/libsodium/configure +14 -90
  19. data/vendor/libsodium/configure.ac +5 -12
  20. data/vendor/libsodium/msvc-scripts/process.bat +2 -2
  21. data/vendor/libsodium/packaging/nuget/package.config +1 -1
  22. data/vendor/libsodium/packaging/nuget/package.nuspec +25 -25
  23. data/vendor/libsodium/packaging/nuget/package.targets +20 -20
  24. data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +2 -0
  25. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +7 -0
  26. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +1 -1
  27. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +9 -4
  28. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +6 -1
  29. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +4 -4
  30. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +2 -0
  31. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +2 -0
  32. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +2 -1
  33. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +2 -0
  34. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +13 -13
  35. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +28 -27
  36. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +16 -12
  37. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +2 -2
  38. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +2 -2
  39. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +3 -3
  40. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +1 -1
  41. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +7 -3
  42. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c +1 -1
  43. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +3 -2
  44. data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +10 -8
  45. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +13 -8
  46. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +10 -8
  47. data/vendor/libsodium/src/libsodium/sodium/core.c +1 -1
  48. data/vendor/libsodium/src/libsodium/sodium/runtime.c +3 -3
  49. data/vendor/libsodium/src/libsodium/sodium/utils.c +12 -12
  50. data/vendor/libsodium/test/default/Makefile.am +9 -1
  51. data/vendor/libsodium/test/default/Makefile.in +35 -13
  52. data/vendor/libsodium/test/default/aead_chacha20poly1305.c +37 -31
  53. data/vendor/libsodium/test/default/auth.c +48 -9
  54. data/vendor/libsodium/test/default/auth.exp +18 -0
  55. data/vendor/libsodium/test/default/auth2.c +19 -24
  56. data/vendor/libsodium/test/default/auth3.c +17 -25
  57. data/vendor/libsodium/test/default/auth5.c +24 -24
  58. data/vendor/libsodium/test/default/auth6.c +9 -8
  59. data/vendor/libsodium/test/default/auth7.c +24 -24
  60. data/vendor/libsodium/test/default/box.c +74 -51
  61. data/vendor/libsodium/test/default/box.exp +19 -0
  62. data/vendor/libsodium/test/default/box2.c +48 -51
  63. data/vendor/libsodium/test/default/box2.exp +17 -0
  64. data/vendor/libsodium/test/default/box7.c +20 -18
  65. data/vendor/libsodium/test/default/box8.c +27 -25
  66. data/vendor/libsodium/test/default/box_easy.c +32 -42
  67. data/vendor/libsodium/test/default/box_easy2.c +3 -5
  68. data/vendor/libsodium/test/default/box_seed.c +20 -20
  69. data/vendor/libsodium/test/default/chacha20.c +41 -21
  70. data/vendor/libsodium/test/default/chacha20.exp +8 -5
  71. data/vendor/libsodium/test/default/cmptest.h +4 -0
  72. data/vendor/libsodium/test/default/core1.c +26 -19
  73. data/vendor/libsodium/test/default/core2.c +24 -23
  74. data/vendor/libsodium/test/default/core3.c +30 -26
  75. data/vendor/libsodium/test/default/core4.c +22 -23
  76. data/vendor/libsodium/test/default/core5.c +18 -22
  77. data/vendor/libsodium/test/default/core6.c +33 -34
  78. data/vendor/libsodium/test/default/ed25519_convert.c +16 -20
  79. data/vendor/libsodium/test/default/generichash.c +59 -15
  80. data/vendor/libsodium/test/default/generichash.exp +2 -0
  81. data/vendor/libsodium/test/default/generichash2.c +30 -13
  82. data/vendor/libsodium/test/default/generichash3.c +156 -22
  83. data/vendor/libsodium/test/default/generichash3.exp +11 -0
  84. data/vendor/libsodium/test/default/hash.c +31 -6
  85. data/vendor/libsodium/test/default/hash.exp +3 -0
  86. data/vendor/libsodium/test/default/hash3.c +10 -7
  87. data/vendor/libsodium/test/default/onetimeauth.c +46 -34
  88. data/vendor/libsodium/test/default/onetimeauth.exp +2 -0
  89. data/vendor/libsodium/test/default/onetimeauth2.c +20 -32
  90. data/vendor/libsodium/test/default/onetimeauth7.c +24 -24
  91. data/vendor/libsodium/test/default/pwhash.c +276 -68
  92. data/vendor/libsodium/test/default/pwhash.exp +20 -0
  93. data/vendor/libsodium/test/default/pwhash_scrypt_ll.c +31 -37
  94. data/vendor/libsodium/test/default/randombytes.c +85 -8
  95. data/vendor/libsodium/test/default/randombytes.exp +1 -0
  96. data/vendor/libsodium/test/default/scalarmult.c +28 -15
  97. data/vendor/libsodium/test/default/scalarmult2.c +20 -15
  98. data/vendor/libsodium/test/default/scalarmult5.c +24 -21
  99. data/vendor/libsodium/test/default/scalarmult6.c +24 -21
  100. data/vendor/libsodium/test/default/scalarmult7.c +31 -0
  101. data/vendor/libsodium/test/default/scalarmult7.exp +1 -0
  102. data/vendor/libsodium/test/default/secretbox.c +50 -45
  103. data/vendor/libsodium/test/default/secretbox2.c +32 -45
  104. data/vendor/libsodium/test/default/secretbox7.c +19 -17
  105. data/vendor/libsodium/test/default/secretbox8.c +26 -24
  106. data/vendor/libsodium/test/default/secretbox_easy.c +46 -52
  107. data/vendor/libsodium/test/default/secretbox_easy2.c +3 -5
  108. data/vendor/libsodium/test/default/shorthash.c +17 -10
  109. data/vendor/libsodium/test/default/sign.c +74 -39
  110. data/vendor/libsodium/test/default/sodium_core.c +6 -3
  111. data/vendor/libsodium/test/default/sodium_utils.c +57 -28
  112. data/vendor/libsodium/test/default/sodium_utils.exp +6 -0
  113. data/vendor/libsodium/test/default/sodium_utils2.c +13 -11
  114. data/vendor/libsodium/test/default/sodium_utils3.c +5 -10
  115. data/vendor/libsodium/test/default/sodium_version.c +4 -5
  116. data/vendor/libsodium/test/default/stream.c +23 -17
  117. data/vendor/libsodium/test/default/stream2.c +17 -15
  118. data/vendor/libsodium/test/default/stream3.c +17 -19
  119. data/vendor/libsodium/test/default/stream4.c +36 -45
  120. data/vendor/libsodium/test/default/verify1.c +20 -18
  121. metadata +5 -3
  122. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2s-ref.c +0 -356
@@ -1,5 +1,5 @@
1
1
  AC_PREREQ([2.65])
2
- AC_INIT([libsodium],[0.7.0],
2
+ AC_INIT([libsodium],[1.0.0],
3
3
  [https://github.com/jedisct1/libsodium/issues],
4
4
  [libsodium],
5
5
  [https://github.com/jedisct1/libsodium])
@@ -16,9 +16,9 @@ ISODATE=`date +%Y-%m-%d`
16
16
  AC_SUBST(ISODATE)
17
17
 
18
18
  SODIUM_LIBRARY_VERSION_MAJOR=7
19
- SODIUM_LIBRARY_VERSION_MINOR=0
19
+ SODIUM_LIBRARY_VERSION_MINOR=2
20
20
  DLL_VERSION=6
21
- SODIUM_LIBRARY_VERSION=13:0:0
21
+ SODIUM_LIBRARY_VERSION=13:2:0
22
22
  # | | |
23
23
  # +------+ | +---+
24
24
  # | | |
@@ -165,7 +165,7 @@ AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overf
165
165
  LIBTOOL_OLD_FLAGS="$LIBTOOL_EXTRA_FLAGS"
166
166
  LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
167
167
  AC_ARG_ENABLE(soname-versions,
168
- [AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for android) (default: enabled)])],
168
+ [AC_HELP_STRING([--enable-soname-versions], [enable soname versions (must be disabled for Android) (default: enabled)])],
169
169
  [
170
170
  AS_IF([test "x$enableval" = "xno"], [
171
171
  LIBTOOL_EXTRA_FLAGS="$LIBTOOL_OLD_FLAGS -avoid-version"
@@ -183,19 +183,12 @@ AS_IF([test "x$enable_ssp" != "xno"],[
183
183
 
184
184
  AS_CASE([$host_os],
185
185
  [cygwin*|mingw*|msys|pw32*|cegcc*], [ ],
186
- [dragonfly*], [
186
+ [*], [
187
187
  AX_CHECK_COMPILE_FLAG([-fstack-protector], [
188
188
  AX_CHECK_LINK_FLAG([-fstack-protector],
189
189
  [CFLAGS="$CFLAGS -fstack-protector"]
190
190
  )
191
191
  ])
192
- ],
193
- [*], [
194
- AX_CHECK_COMPILE_FLAG([-fstack-protector-all], [
195
- AX_CHECK_LINK_FLAG([-fstack-protector-all],
196
- [CFLAGS="$CFLAGS -fstack-protector-all"]
197
- )
198
- ])
199
192
  ])
200
193
  ])
201
194
 
@@ -1,4 +1,4 @@
1
- cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/0.7.0/ < src\libsodium\include\sodium\version.h.in > tmp
1
+ cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/0.7.2/ < src\libsodium\include\sodium\version.h.in > tmp
2
2
  cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/7/ < tmp > tmp2
3
- cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/0/ < tmp2 > src\libsodium\include\sodium\version.h
3
+ cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/2/ < tmp2 > src\libsodium\include\sodium\version.h
4
4
  del tmp tmp2
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <!-- These values are populated into the package.gsl templates by package.bat. -->
3
3
  <!-- The target attribute controls path and file name only, id controls package naming. -->
4
- <package id="libsodium_vc120" target="libsodium" version = "0.6.0.1" pathversion="0_6_0_1" platformtoolset="v120" />
4
+ <package id="libsodium_vc120" target="libsodium" version = "0.7.0.0" pathversion="0_7_0_0" platformtoolset="v120" />
@@ -7,7 +7,7 @@
7
7
  <package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
8
8
  <metadata minClientVersion="2.5">
9
9
  <id>libsodium_vc120</id>
10
- <version>0.6.0.1</version>
10
+ <version>0.7.0.0</version>
11
11
  <title>libsodium_vc120</title>
12
12
  <authors>libsodium contributors</authors>
13
13
  <owners>Eric Voskuil</owners>
@@ -40,52 +40,52 @@
40
40
  <!-- libraries -->
41
41
 
42
42
  <!-- x86 Dynamic libraries (.dll) -->
43
- <file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-0_6_0_1.dll" />
44
- <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-gd-0_6_0_1.dll" />
43
+ <file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.dll" />
44
+ <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.dll" />
45
45
 
46
46
  <!-- x86 Debugging symbols (.pdb) -->
47
- <!--<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-0_6_0_1.pdb" />-->
48
- <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-gd-0_6_0_1.pdb" />
47
+ <!--<file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.pdb" />-->
48
+ <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.pdb" />
49
49
 
50
50
  <!-- x86 Import libraries (.imp.lib) -->
51
- <file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-0_6_0_1.imp.lib" />
52
- <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-gd-0_6_0_1.imp.lib" />
51
+ <file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.imp.lib" />
52
+ <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.imp.lib" />
53
53
 
54
54
  <!-- x86 Export libraries (.exp) -->
55
- <file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-0_6_0_1.exp" />
56
- <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-gd-0_6_0_1.exp" />
55
+ <file src="..\..\bin\Win32\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-0_7_0_0.exp" />
56
+ <file src="..\..\bin\Win32\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x86-v120-mt-gd-0_7_0_0.exp" />
57
57
 
58
58
  <!-- x86 Static libraries (.lib) -->
59
- <file src="..\..\bin\Win32\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-0_6_0_1.lib" />
60
- <file src="..\..\bin\Win32\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-0_6_0_1.lib" />
59
+ <file src="..\..\bin\Win32\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-0_7_0_0.lib" />
60
+ <file src="..\..\bin\Win32\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-0_7_0_0.lib" />
61
61
 
62
62
  <!-- x86 Static link time code generation libraries (.ltcg.lib) -->
63
- <file src="..\..\bin\Win32\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-0_6_0_1.ltcg.lib" />
64
- <file src="..\..\bin\Win32\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-0_6_0_1.ltcg.lib" />
63
+ <file src="..\..\bin\Win32\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-s-0_7_0_0.ltcg.lib" />
64
+ <file src="..\..\bin\Win32\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x86-v120-mt-sgd-0_7_0_0.ltcg.lib" />
65
65
 
66
66
  <!-- x64 Dynamic libraries (.dll) -->
67
- <file src="..\..\bin\x64\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-0_6_0_1.dll" />
68
- <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-gd-0_6_0_1.dll" />
67
+ <file src="..\..\bin\x64\Release\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.dll" />
68
+ <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.dll" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.dll" />
69
69
 
70
70
  <!-- x64 Debugging symbols (.pdb) -->
71
- <!--<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-0_6_0_1.pdb" />-->
72
- <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-gd-0_6_0_1.pdb" />
71
+ <!--<file src="..\..\bin\x64\Release\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.pdb" />-->
72
+ <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.pdb" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.pdb" />
73
73
 
74
74
  <!-- x64 Import libraries (.imp.lib) -->
75
- <file src="..\..\bin\x64\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-0_6_0_1.imp.lib" />
76
- <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-gd-0_6_0_1.imp.lib" />
75
+ <file src="..\..\bin\x64\Release\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.imp.lib" />
76
+ <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.imp.lib" />
77
77
 
78
78
  <!-- x64 Export libraries (.exp) -->
79
- <file src="..\..\bin\x64\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-0_6_0_1.exp" />
80
- <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-gd-0_6_0_1.exp" />
79
+ <file src="..\..\bin\x64\Release\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-0_7_0_0.exp" />
80
+ <file src="..\..\bin\x64\Debug\v120\dynamic\libsodium.exp" target="build\native\bin\libsodium-x64-v120-mt-gd-0_7_0_0.exp" />
81
81
 
82
82
  <!-- x64 Static libraries (.lib) -->
83
- <file src="..\..\bin\x64\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-0_6_0_1.lib" />
84
- <file src="..\..\bin\x64\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-0_6_0_1.lib" />
83
+ <file src="..\..\bin\x64\Release\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-0_7_0_0.lib" />
84
+ <file src="..\..\bin\x64\Debug\v120\static\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-0_7_0_0.lib" />
85
85
 
86
86
  <!-- x64 Static link time code generation libraries (.ltcg.lib) -->
87
- <file src="..\..\bin\x64\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-0_6_0_1.ltcg.lib" />
88
- <file src="..\..\bin\x64\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-0_6_0_1.ltcg.lib" />
87
+ <file src="..\..\bin\x64\Release\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-s-0_7_0_0.ltcg.lib" />
88
+ <file src="..\..\bin\x64\Debug\v120\ltcg\libsodium.lib" target="build\native\bin\libsodium-x64-v120-mt-sgd-0_7_0_0.ltcg.lib" />
89
89
  </files>
90
90
  <!--
91
91
  #################################################################
@@ -30,66 +30,66 @@
30
30
  <!-- static libraries -->
31
31
  <ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
32
32
  <Link>
33
- <AdditionalDependencies>libsodium-x86-v120-mt-s-0_6_0_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
33
+ <AdditionalDependencies>libsodium-x86-v120-mt-s-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
34
34
  </Link>
35
35
  </ItemDefinitionGroup>
36
36
  <ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
37
37
  <Link>
38
- <AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_6_0_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
38
+ <AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
39
39
  </Link>
40
40
  </ItemDefinitionGroup>
41
41
  <ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Release')) != -1">
42
42
  <Link>
43
- <AdditionalDependencies>libsodium-x64-v120-mt-s-0_6_0_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
43
+ <AdditionalDependencies>libsodium-x64-v120-mt-s-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
44
44
  </Link>
45
45
  </ItemDefinitionGroup>
46
46
  <ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'static' And $(Configuration.IndexOf('Debug')) != -1">
47
47
  <Link>
48
- <AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_6_0_1.lib;%(AdditionalDependencies)</AdditionalDependencies>
48
+ <AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_7_0_0.lib;%(AdditionalDependencies)</AdditionalDependencies>
49
49
  </Link>
50
50
  </ItemDefinitionGroup>
51
51
 
52
52
  <!-- static ltcg libraries -->
53
53
  <ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
54
54
  <Link>
55
- <AdditionalDependencies>libsodium-x86-v120-mt-s-0_6_0_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
55
+ <AdditionalDependencies>libsodium-x86-v120-mt-s-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
56
56
  </Link>
57
57
  </ItemDefinitionGroup>
58
58
  <ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
59
59
  <Link>
60
- <AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_6_0_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
60
+ <AdditionalDependencies>libsodium-x86-v120-mt-sgd-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
61
61
  </Link>
62
62
  </ItemDefinitionGroup>
63
63
  <ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Release')) != -1">
64
64
  <Link>
65
- <AdditionalDependencies>libsodium-x64-v120-mt-s-0_6_0_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
65
+ <AdditionalDependencies>libsodium-x64-v120-mt-s-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
66
66
  </Link>
67
67
  </ItemDefinitionGroup>
68
68
  <ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'ltcg' And $(Configuration.IndexOf('Debug')) != -1">
69
69
  <Link>
70
- <AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_6_0_1.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
70
+ <AdditionalDependencies>libsodium-x64-v120-mt-sgd-0_7_0_0.ltcg.lib;%(AdditionalDependencies)</AdditionalDependencies>
71
71
  </Link>
72
72
  </ItemDefinitionGroup>
73
73
 
74
74
  <!-- dynamic import libraries -->
75
75
  <ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
76
76
  <Link>
77
- <AdditionalDependencies>libsodium-x86-v120-mt-0_6_0_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
77
+ <AdditionalDependencies>libsodium-x86-v120-mt-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
78
78
  </Link>
79
79
  </ItemDefinitionGroup>
80
80
  <ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
81
81
  <Link>
82
- <AdditionalDependencies>libsodium-x86-v120-mt-gd-0_6_0_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
82
+ <AdditionalDependencies>libsodium-x86-v120-mt-gd-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
83
83
  </Link>
84
84
  </ItemDefinitionGroup>
85
85
  <ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1">
86
86
  <Link>
87
- <AdditionalDependencies>libsodium-x64-v120-mt-0_6_0_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
87
+ <AdditionalDependencies>libsodium-x64-v120-mt-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
88
88
  </Link>
89
89
  </ItemDefinitionGroup>
90
90
  <ItemDefinitionGroup Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1">
91
91
  <Link>
92
- <AdditionalDependencies>libsodium-x64-v120-mt-gd-0_6_0_1.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
92
+ <AdditionalDependencies>libsodium-x64-v120-mt-gd-0_7_0_0.imp.lib;%(AdditionalDependencies)</AdditionalDependencies>
93
93
  </Link>
94
94
  </ItemDefinitionGroup>
95
95
 
@@ -98,26 +98,26 @@
98
98
  <Target Name="libsodium_AfterBuild_Win32_v120_Dynamic_Release"
99
99
  Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
100
100
  AfterTargets="libsodium_AfterBuild">
101
- <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_6_0_1.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
102
- <!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_6_0_1.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
101
+ <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
102
+ <!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
103
103
  </Target>
104
104
  <Target Name="libsodium_AfterBuild_Win32_v120_Dynamic_Debug"
105
105
  Condition="'$(Platform)' == 'Win32' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
106
106
  AfterTargets="libsodium_AfterBuild">
107
- <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_6_0_1.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
108
- <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_6_0_1.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
107
+ <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
108
+ <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x86-v120-mt-gd-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
109
109
  </Target>
110
110
  <Target Name="libsodium_AfterBuild_x64_v120_Dynamic_Release"
111
111
  Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Release')) != -1"
112
112
  AfterTargets="libsodium_AfterBuild">
113
- <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_6_0_1.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
114
- <!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_6_0_1.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
113
+ <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
114
+ <!--<Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />-->
115
115
  </Target>
116
116
  <Target Name="libsodium_AfterBuild_x64_v120_Dynamic_Debug"
117
117
  Condition="'$(Platform)' == 'x64' And ('$(PlatformToolset)' == 'v120' Or '$(PlatformToolset)' == 'CTP_Nov2013') And '$(Linkage-libsodium)' == 'dynamic' And $(Configuration.IndexOf('Debug')) != -1"
118
118
  AfterTargets="libsodium_AfterBuild">
119
- <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_6_0_1.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
120
- <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_6_0_1.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
119
+ <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_7_0_0.dll" DestinationFiles="$(TargetDir)libsodium.dll" SkipUnchangedFiles="true" />
120
+ <Copy SourceFiles="$(MSBuildThisFileDirectory)bin\libsodium-x64-v120-mt-gd-0_7_0_0.pdb" DestinationFiles="$(TargetDir)libsodium.pdb" SkipUnchangedFiles="true" />
121
121
  </Target>
122
122
 
123
123
  <!--
@@ -37,6 +37,7 @@ crypto_aead_chacha20poly1305_encrypt(unsigned char *c,
37
37
  unsigned char slen[8U];
38
38
 
39
39
  (void) nsec;
40
+ /* LCOV_EXCL_START */
40
41
  #ifdef ULONG_LONG_MAX
41
42
  if (mlen > ULONG_LONG_MAX - crypto_aead_chacha20poly1305_ABYTES) {
42
43
  if (clen != NULL) {
@@ -45,6 +46,7 @@ crypto_aead_chacha20poly1305_encrypt(unsigned char *c,
45
46
  return -1;
46
47
  }
47
48
  #endif
49
+ /* LCOV_EXCL_STOP */
48
50
 
49
51
  crypto_stream_chacha20(block0, sizeof block0, npub, k);
50
52
  crypto_onetimeauth_poly1305_init(&state, block0);
@@ -1,4 +1,8 @@
1
1
 
2
+ #include <limits.h>
3
+ #include <stdint.h>
4
+ #include <stdlib.h>
5
+
2
6
  #include "crypto_box.h"
3
7
  #include "crypto_secretbox.h"
4
8
  #include "utils.h"
@@ -26,6 +30,9 @@ crypto_box_easy(unsigned char *c, const unsigned char *m,
26
30
  unsigned long long mlen, const unsigned char *n,
27
31
  const unsigned char *pk, const unsigned char *sk)
28
32
  {
33
+ if (mlen > SIZE_MAX - crypto_box_MACBYTES) {
34
+ return -1;
35
+ }
29
36
  return crypto_box_detached(c + crypto_box_MACBYTES, c, m, mlen, n,
30
37
  pk, sk);
31
38
  }
@@ -22,6 +22,6 @@ int crypto_box_keypair(
22
22
  unsigned char *sk
23
23
  )
24
24
  {
25
- randombytes(sk,32);
25
+ randombytes_buf(sk,32);
26
26
  return crypto_scalarmult_curve25519_base(pk,sk);
27
27
  }
@@ -15,13 +15,16 @@
15
15
  #define __BLAKE2_IMPL_H__
16
16
 
17
17
  #include <stdint.h>
18
+ #include <string.h>
18
19
 
19
20
  #include "utils.h"
20
21
 
21
22
  static inline uint32_t load32( const void *src )
22
23
  {
23
24
  #if defined(NATIVE_LITTLE_ENDIAN)
24
- return *( uint32_t * )( src );
25
+ uint32_t w;
26
+ memcpy(&w, src, sizeof w);
27
+ return w;
25
28
  #else
26
29
  const uint8_t *p = ( const uint8_t * )src;
27
30
  uint32_t w = *p++;
@@ -35,7 +38,9 @@ static inline uint32_t load32( const void *src )
35
38
  static inline uint64_t load64( const void *src )
36
39
  {
37
40
  #if defined(NATIVE_LITTLE_ENDIAN)
38
- return *( uint64_t * )( src );
41
+ uint64_t w;
42
+ memcpy(&w, src, sizeof w);
43
+ return w;
39
44
  #else
40
45
  const uint8_t *p = ( const uint8_t * )src;
41
46
  uint64_t w = *p++;
@@ -53,7 +58,7 @@ static inline uint64_t load64( const void *src )
53
58
  static inline void store32( void *dst, uint32_t w )
54
59
  {
55
60
  #if defined(NATIVE_LITTLE_ENDIAN)
56
- *( uint32_t * )( dst ) = w;
61
+ memcpy(dst, &w, sizeof w);
57
62
  #else
58
63
  uint8_t *p = ( uint8_t * )dst;
59
64
  *p++ = ( uint8_t )w; w >>= 8;
@@ -66,7 +71,7 @@ static inline void store32( void *dst, uint32_t w )
66
71
  static inline void store64( void *dst, uint64_t w )
67
72
  {
68
73
  #if defined(NATIVE_LITTLE_ENDIAN)
69
- *( uint64_t * )( dst ) = w;
74
+ memcpy(dst, &w, sizeof w);
70
75
  #else
71
76
  uint8_t *p = ( uint8_t * )dst;
72
77
  *p++ = ( uint8_t )w; w >>= 8;
@@ -43,11 +43,13 @@ static const uint8_t blake2b_sigma[12][16] =
43
43
  };
44
44
 
45
45
 
46
+ /* LCOV_EXCL_START */
46
47
  static inline int blake2b_set_lastnode( blake2b_state *S )
47
48
  {
48
49
  S->f[1] = ~0ULL;
49
50
  return 0;
50
51
  }
52
+ /* LCOV_EXCL_STOP */
51
53
  #if 0
52
54
  static inline int blake2b_clear_lastnode( blake2b_state *S )
53
55
  {
@@ -387,12 +389,15 @@ int blake2b_final( blake2b_state *S, uint8_t *out, uint8_t outlen )
387
389
  uint8_t buffer[BLAKE2B_OUTBYTES];
388
390
  int i;
389
391
 
392
+ if( outlen > BLAKE2B_OUTBYTES ) {
393
+ return -1;
394
+ }
390
395
  if( S->buflen > BLAKE2B_BLOCKBYTES )
391
396
  {
392
397
  blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
393
398
  blake2b_compress( S, S->buf );
394
399
  S->buflen -= BLAKE2B_BLOCKBYTES;
395
- memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, S->buflen );
400
+ memmove( S->buf, S->buf + BLAKE2B_BLOCKBYTES, S->buflen );
396
401
  }
397
402
 
398
403
  blake2b_increment_counter( S, S->buflen );
@@ -54,11 +54,11 @@ crypto_generichash_blake2b_init(crypto_generichash_blake2b_state *state,
54
54
  assert(keylen <= UINT8_MAX);
55
55
  if (key == NULL || keylen <= 0U) {
56
56
  if (blake2b_init(state, (uint8_t) outlen) != 0) {
57
- return -1;
57
+ return -1; /* LCOV_EXCL_LINE */
58
58
  }
59
59
  } else if (blake2b_init_key(state, (uint8_t) outlen, key,
60
60
  (uint8_t) keylen) != 0) {
61
- return -1;
61
+ return -1; /* LCOV_EXCL_LINE */
62
62
  }
63
63
  return 0;
64
64
  }
@@ -79,13 +79,13 @@ crypto_generichash_blake2b_init_salt_personal(crypto_generichash_blake2b_state *
79
79
  if (key == NULL || keylen <= 0U) {
80
80
  if (blake2b_init_salt_personal(state, (uint8_t) outlen,
81
81
  salt, personal) != 0) {
82
- return -1;
82
+ return -1; /* LCOV_EXCL_LINE */
83
83
  }
84
84
  } else if (blake2b_init_key_salt_personal(state,
85
85
  (uint8_t) outlen, key,
86
86
  (uint8_t) keylen,
87
87
  salt, personal) != 0) {
88
- return -1;
88
+ return -1; /* LCOV_EXCL_LINE */
89
89
  }
90
90
  return 0;
91
91
  }
@@ -245,9 +245,11 @@ crypto_hash_sha256_update(crypto_hash_sha256_state *state,
245
245
  bitlen[1] = ((uint32_t)inlen) << 3;
246
246
  bitlen[0] = (uint32_t)(inlen >> 29);
247
247
 
248
+ /* LCOV_EXCL_START */
248
249
  if ((state->count[1] += bitlen[1]) < bitlen[1]) {
249
250
  state->count[0]++;
250
251
  }
252
+ /* LCOV_EXCL_STOP */
251
253
  state->count[0] += bitlen[0];
252
254
 
253
255
  if (inlen < 64 - r) {
@@ -272,9 +272,11 @@ crypto_hash_sha512_update(crypto_hash_sha512_state *state,
272
272
  bitlen[1] = ((uint64_t)inlen) << 3;
273
273
  bitlen[0] = ((uint64_t)inlen) >> 61;
274
274
 
275
+ /* LCOV_EXCL_START */
275
276
  if ((state->count[1] += bitlen[1]) < bitlen[1]) {
276
277
  state->count[0]++;
277
278
  }
279
+ /* LCOV_EXCL_STOP */
278
280
  state->count[0] += bitlen[0];
279
281
 
280
282
  if (inlen < 128 - r) {
@@ -86,12 +86,13 @@ crypto_onetimeauth_poly1305_donna_final(crypto_onetimeauth_poly1305_state *state
86
86
  return 0;
87
87
  }
88
88
 
89
-
89
+ /* LCOV_EXCL_START */
90
90
  const char *
91
91
  crypto_onetimeauth_poly1305_donna_implementation_name(void)
92
92
  {
93
93
  return POLY1305_IMPLEMENTATION_NAME;
94
94
  }
95
+ /* LCOV_EXCL_STOP */
95
96
 
96
97
  struct crypto_onetimeauth_poly1305_implementation
97
98
  crypto_onetimeauth_poly1305_donna_implementation = {