rbnacl-libsodium 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -2
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/ChangeLog +24 -0
- data/vendor/libsodium/LICENSE +2 -0
- data/vendor/libsodium/Makefile.in +6 -1
- data/vendor/libsodium/aclocal.m4 +1 -0
- data/vendor/libsodium/autom4te.cache/output.1 +1896 -1136
- data/vendor/libsodium/autom4te.cache/output.7 +19837 -0
- data/vendor/libsodium/autom4te.cache/requests +1271 -1031
- data/vendor/libsodium/autom4te.cache/traces.1 +532 -491
- data/vendor/libsodium/autom4te.cache/traces.7 +3614 -0
- data/vendor/libsodium/builds/msvc/version.h +2 -2
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +22 -1
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +23 -20
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +13 -2
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +12 -9
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +12 -1
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +3 -0
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +2 -1
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +14 -11
- data/vendor/libsodium/configure +1887 -1127
- data/vendor/libsodium/configure.ac +44 -11
- data/vendor/libsodium/dist-build/Makefile.am +4 -2
- data/vendor/libsodium/dist-build/Makefile.in +9 -2
- data/vendor/libsodium/dist-build/android-armv8-a.sh +1 -1
- data/vendor/libsodium/dist-build/android-build.sh +40 -3
- data/vendor/libsodium/dist-build/android-mips64.sh +1 -1
- data/vendor/libsodium/dist-build/android-x86_64.sh +4 -0
- data/vendor/libsodium/dist-build/emscripten-symbols.def +25 -25
- data/vendor/libsodium/dist-build/emscripten.sh +69 -35
- data/vendor/libsodium/dist-build/msys2-win32.sh +8 -2
- data/vendor/libsodium/dist-build/msys2-win64.sh +8 -2
- data/vendor/libsodium/dist-build/{nativeclient.sh → nativeclient-pnacl.sh} +3 -4
- data/vendor/libsodium/dist-build/nativeclient-x86.sh +19 -0
- data/vendor/libsodium/dist-build/nativeclient-x86_64.sh +19 -0
- data/vendor/libsodium/logo.png +0 -0
- data/vendor/libsodium/m4/ax_pthread.m4 +485 -0
- data/vendor/libsodium/msvc-scripts/Makefile.in +5 -0
- data/vendor/libsodium/msvc-scripts/process.bat +2 -2
- data/vendor/libsodium/packaging/nuget/package.bat +3 -3
- data/vendor/libsodium/src/Makefile.in +5 -0
- data/vendor/libsodium/src/libsodium/Makefile.am +2 -1
- data/vendor/libsodium/src/libsodium/Makefile.in +13 -8
- data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +70 -87
- data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c +1 -1
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +9 -1
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +11 -4
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +14 -8
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +0 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +10 -6
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +2 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +1 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +11 -11
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h +2 -2
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +3 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +3 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +830 -826
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.S +732 -728
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +3 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +8 -0
- data/vendor/libsodium/src/libsodium/include/Makefile.in +5 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +3 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +3 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_chacha20.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium/private/curve25519_ref10.h +2 -2
- data/vendor/libsodium/src/libsodium/include/sodium/private/mutex.h +7 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +1 -1
- data/vendor/libsodium/src/libsodium/randombytes/nativeclient/randombytes_nativeclient.c +15 -4
- data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +25 -15
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +72 -15
- data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +43 -4
- data/vendor/libsodium/src/libsodium/sodium/core.c +131 -2
- data/vendor/libsodium/src/libsodium/sodium/runtime.c +5 -2
- data/vendor/libsodium/src/libsodium/sodium/utils.c +16 -8
- data/vendor/libsodium/test/Makefile.in +5 -0
- data/vendor/libsodium/test/default/Makefile.in +5 -0
- data/vendor/libsodium/test/default/generichash2.c +8 -2
- data/vendor/libsodium/test/default/nacl-test-wrapper.sh +19 -17
- data/vendor/libsodium/test/default/randombytes.c +4 -2
- data/vendor/libsodium/test/quirks/quirks.h +23 -2
- metadata +11 -15
- data/vendor/libsodium/README +0 -1
- data/vendor/libsodium/dist-build/android-x86-64.sh +0 -4
- data/vendor/libsodium/examples/Makefile +0 -21
- data/vendor/libsodium/examples/auth.c +0 -68
- data/vendor/libsodium/examples/box.c +0 -135
- data/vendor/libsodium/examples/box_detached.c +0 -134
- data/vendor/libsodium/examples/generichash.c +0 -80
- data/vendor/libsodium/examples/generichash_stream.c +0 -58
- data/vendor/libsodium/examples/shorthash.c +0 -58
- data/vendor/libsodium/examples/sign.c +0 -78
- data/vendor/libsodium/examples/utils.h +0 -110
@@ -96,6 +96,9 @@ crypto_secretbox_open_detached(unsigned char *m, const unsigned char *c,
|
|
96
96
|
sodium_memzero(subkey, sizeof subkey);
|
97
97
|
return -1;
|
98
98
|
}
|
99
|
+
if (m == NULL) {
|
100
|
+
return 0;
|
101
|
+
}
|
99
102
|
if (((uintptr_t) c >= (uintptr_t) m &&
|
100
103
|
(uintptr_t) c - (uintptr_t) m < clen) ||
|
101
104
|
((uintptr_t) m >= (uintptr_t) c &&
|
data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S
CHANGED
@@ -136,6 +136,7 @@ movdqa %xmm1,304(%rsp)
|
|
136
136
|
movdqa %xmm2,320(%rsp)
|
137
137
|
movdqa %xmm0,336(%rsp)
|
138
138
|
|
139
|
+
.p2align 4
|
139
140
|
._bytesatleast256:
|
140
141
|
movq 472(%rsp),%rdx
|
141
142
|
mov %rdx,%rcx
|
@@ -182,6 +183,7 @@ movdqa 224(%rsp),%xmm13
|
|
182
183
|
movdqa 304(%rsp),%xmm14
|
183
184
|
movdqa 352(%rsp),%xmm15
|
184
185
|
|
186
|
+
.p2align 4
|
185
187
|
._mainloop1:
|
186
188
|
movdqa %xmm1,384(%rsp)
|
187
189
|
movdqa %xmm2,400(%rsp)
|
@@ -425,6 +427,7 @@ movdqa 384(%rsp),%xmm12
|
|
425
427
|
movdqa 400(%rsp),%xmm0
|
426
428
|
sub $2,%rdx
|
427
429
|
ja ._mainloop1
|
430
|
+
|
428
431
|
paddd 176(%rsp),%xmm12
|
429
432
|
paddd 240(%rsp),%xmm7
|
430
433
|
paddd 288(%rsp),%xmm10
|
@@ -687,12 +690,14 @@ add $256,%rsi
|
|
687
690
|
add $256,%rdi
|
688
691
|
cmp $256,%r9
|
689
692
|
jae ._bytesatleast256
|
693
|
+
|
690
694
|
cmp $0,%r9
|
691
695
|
jbe ._done
|
692
696
|
|
693
697
|
._bytesbetween1and255:
|
694
698
|
cmp $64,%r9
|
695
699
|
jae ._nocopy
|
700
|
+
|
696
701
|
mov %rdi,%rdx
|
697
702
|
leaq 0(%rsp),%rdi
|
698
703
|
mov %r9,%rcx
|
@@ -709,6 +714,7 @@ movdqa 96(%rsp),%xmm3
|
|
709
714
|
movdqa %xmm1,%xmm4
|
710
715
|
mov $20,%rcx
|
711
716
|
|
717
|
+
.p2align 4
|
712
718
|
._mainloop2:
|
713
719
|
paddd %xmm0,%xmm4
|
714
720
|
movdqa %xmm0,%xmm5
|
@@ -837,6 +843,7 @@ pxor %xmm5,%xmm0
|
|
837
843
|
pshufd $0x39,%xmm3,%xmm3
|
838
844
|
pxor %xmm6,%xmm0
|
839
845
|
ja ._mainloop2
|
846
|
+
|
840
847
|
paddd 112(%rsp),%xmm0
|
841
848
|
paddd 64(%rsp),%xmm1
|
842
849
|
paddd 80(%rsp),%xmm2
|
@@ -912,6 +919,7 @@ movq %rcx,472(%rsp)
|
|
912
919
|
cmp $64,%r9
|
913
920
|
ja ._bytesatleast65
|
914
921
|
jae ._bytesatleast64
|
922
|
+
|
915
923
|
mov %rdi,%rsi
|
916
924
|
mov %rdx,%rdi
|
917
925
|
mov %r9,%rcx
|
@@ -96,6 +96,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
|
96
96
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
97
97
|
$(top_srcdir)/m4/ax_check_define.m4 \
|
98
98
|
$(top_srcdir)/m4/ax_check_link_flag.m4 \
|
99
|
+
$(top_srcdir)/m4/ax_pthread.m4 \
|
99
100
|
$(top_srcdir)/m4/ax_valgrind_check.m4 \
|
100
101
|
$(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
|
101
102
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
@@ -293,6 +294,9 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
293
294
|
PACKAGE_URL = @PACKAGE_URL@
|
294
295
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
295
296
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
297
|
+
PTHREAD_CC = @PTHREAD_CC@
|
298
|
+
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
299
|
+
PTHREAD_LIBS = @PTHREAD_LIBS@
|
296
300
|
RANLIB = @RANLIB@
|
297
301
|
SAFECODE_HOME = @SAFECODE_HOME@
|
298
302
|
SED = @SED@
|
@@ -322,6 +326,7 @@ am__leading_dot = @am__leading_dot@
|
|
322
326
|
am__quote = @am__quote@
|
323
327
|
am__tar = @am__tar@
|
324
328
|
am__untar = @am__untar@
|
329
|
+
ax_pthread_config = @ax_pthread_config@
|
325
330
|
bindir = @bindir@
|
326
331
|
build = @build@
|
327
332
|
build_alias = @build_alias@
|
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
/*
|
5
5
|
* THREAD SAFETY: crypto_box_keypair() is thread-safe,
|
6
|
-
* provided that
|
7
|
-
*
|
6
|
+
* provided that sodium_init() was called before.
|
7
|
+
*
|
8
8
|
* Other functions are always thread-safe.
|
9
9
|
*/
|
10
10
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
#include "export.h"
|
15
15
|
|
16
16
|
#ifdef __cplusplus
|
17
|
-
#
|
17
|
+
# ifdef __GNUC__
|
18
18
|
# pragma GCC diagnostic ignored "-Wlong-long"
|
19
19
|
# endif
|
20
20
|
extern "C" {
|
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
/*
|
5
5
|
* THREAD SAFETY: crypto_sign_keypair() is thread-safe,
|
6
|
-
* provided that
|
7
|
-
*
|
6
|
+
* provided that sodium_init() was called before.
|
7
|
+
*
|
8
8
|
* Other functions, including crypto_sign_seed_keypair() are always thread-safe.
|
9
9
|
*/
|
10
10
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
#include "export.h"
|
15
15
|
|
16
16
|
#ifdef __cplusplus
|
17
|
-
#
|
17
|
+
# ifdef __GNUC__
|
18
18
|
# pragma GCC diagnostic ignored "-Wlong-long"
|
19
19
|
# endif
|
20
20
|
extern "C" {
|