rbnacl-libsodium 1.0.13 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/rbnacl/libsodium.rb +1 -0
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/AUTHORS +2 -2
- data/vendor/libsodium/ChangeLog +64 -0
- data/vendor/libsodium/Makefile.am +1 -0
- data/vendor/libsodium/README.markdown +1 -3
- data/vendor/libsodium/THANKS +13 -3
- data/vendor/libsodium/builds/Makefile.am +65 -0
- data/vendor/libsodium/builds/msvc/resource.rc +2 -2
- data/vendor/libsodium/builds/msvc/version.h +3 -3
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +168 -173
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +382 -394
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +168 -173
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +382 -394
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +168 -173
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +382 -394
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +168 -173
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +382 -394
- data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj +168 -173
- data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +382 -394
- data/vendor/libsodium/configure.ac +59 -10
- data/vendor/libsodium/contrib/Findsodium.cmake +2 -0
- data/vendor/libsodium/dist-build/emscripten-symbols.def +72 -32
- data/vendor/libsodium/dist-build/emscripten.sh +33 -6
- data/vendor/libsodium/dist-build/generate-emscripten-symbols.sh +52 -38
- data/vendor/libsodium/dist-build/ios.sh +2 -2
- data/vendor/libsodium/libsodium.vcxproj +168 -173
- data/vendor/libsodium/libsodium.vcxproj.filters +220 -235
- data/vendor/libsodium/m4/ax_check_catchable_abrt.m4 +57 -0
- data/vendor/libsodium/m4/ax_check_gnu_make.m4 +2 -2
- data/vendor/libsodium/m4/ax_pthread.m4 +2 -2
- data/vendor/libsodium/msvc-scripts/process.bat +3 -3
- data/vendor/libsodium/packaging/dotnet-core/README.md +5 -5
- data/vendor/libsodium/packaging/dotnet-core/libsodium.props +5 -2
- data/vendor/libsodium/packaging/dotnet-core/prepare.py +13 -31
- data/vendor/libsodium/packaging/dotnet-core/recipes/linux-x64 +4 -0
- data/vendor/libsodium/packaging/nuget/package.config +1 -1
- data/vendor/libsodium/src/libsodium/Makefile.am +11 -12
- data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +11 -4
- data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +17 -4
- data/vendor/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c +8 -1
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +5 -4
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +11 -4
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +78 -17
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +74 -64
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +2 -0
- data/vendor/libsodium/src/libsodium/crypto_kx/crypto_kx.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +17 -17
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c +53 -48
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h +37 -11
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +23 -179
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c +4 -12
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c +244 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +3 -12
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +4 -12
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +1 -5
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-avx512f.h +145 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +91 -14
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +35 -14
- data/vendor/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c +41 -4
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +31 -17
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +4 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +5 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +30 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +8 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +3 -3
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +5 -4
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c +11 -4
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c +311 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ed25519_ref10.h +3 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +9 -2
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +1 -1
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +6 -5
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c +3 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c +3 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c +3 -2
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +12 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +7 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/sodium/verify.c +66 -29
- data/vendor/libsodium/src/libsodium/include/Makefile.am +1 -1
- data/vendor/libsodium/src/libsodium/include/sodium.h +2 -2
- data/vendor/libsodium/src/libsodium/include/sodium/core.h +9 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +26 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +16 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h +10 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h +6 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +24 -15
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h +8 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h +40 -18
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +8 -2
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +8 -2
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +11 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h +6 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +17 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretstream_xchacha20poly1305.h +102 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +1 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_chacha20.h +10 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +15 -5
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xchacha20.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/export.h +9 -0
- data/vendor/libsodium/src/libsodium/include/sodium/private/common.h +11 -0
- data/vendor/libsodium/src/libsodium/include/sodium/private/curve25519_ref10.h +2 -30
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +2 -0
- data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +12 -9
- data/vendor/libsodium/src/libsodium/include/sodium/utils.h +36 -0
- data/vendor/libsodium/src/libsodium/randombytes/nativeclient/randombytes_nativeclient.c +3 -2
- data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +18 -14
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +11 -10
- data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +20 -8
- data/vendor/libsodium/src/libsodium/sodium/codecs.c +333 -0
- data/vendor/libsodium/src/libsodium/sodium/core.c +36 -4
- data/vendor/libsodium/src/libsodium/sodium/runtime.c +18 -0
- data/vendor/libsodium/src/libsodium/sodium/utils.c +87 -100
- data/vendor/libsodium/test/constcheck.sh +19 -0
- data/vendor/libsodium/test/default/Makefile.am +39 -7
- data/vendor/libsodium/test/default/aead_aes256gcm.c +6 -0
- data/vendor/libsodium/test/default/aead_chacha20poly1305.c +16 -0
- data/vendor/libsodium/test/default/aead_xchacha20poly1305.c +25 -15
- data/vendor/libsodium/test/default/auth.c +13 -0
- data/vendor/libsodium/test/default/auth.exp +8 -0
- data/vendor/libsodium/test/default/box.c +3 -0
- data/vendor/libsodium/test/default/box2.c +2 -0
- data/vendor/libsodium/test/default/box_easy.c +1 -4
- data/vendor/libsodium/test/default/box_easy2.c +7 -3
- data/vendor/libsodium/test/default/chacha20.c +9 -2
- data/vendor/libsodium/test/default/cmptest.h +47 -1
- data/vendor/libsodium/test/default/codecs.c +226 -0
- data/vendor/libsodium/test/default/codecs.exp +28 -0
- data/vendor/libsodium/test/default/core3.c +42 -15
- data/vendor/libsodium/test/default/ed25519_convert.c +17 -0
- data/vendor/libsodium/test/default/kdf.c +8 -4
- data/vendor/libsodium/test/default/keygen.c +5 -2
- data/vendor/libsodium/test/default/kx.c +30 -0
- data/vendor/libsodium/test/default/metamorphic.c +187 -0
- data/vendor/libsodium/test/default/metamorphic.exp +1 -0
- data/vendor/libsodium/test/default/misuse.c +145 -0
- data/vendor/libsodium/test/default/misuse.exp +0 -0
- data/vendor/libsodium/test/default/onetimeauth.c +2 -0
- data/vendor/libsodium/test/default/{pwhash.c → pwhash_argon2i.c} +133 -106
- data/vendor/libsodium/test/default/{pwhash.exp → pwhash_argon2i.exp} +0 -1
- data/vendor/libsodium/test/default/pwhash_argon2id.c +254 -144
- data/vendor/libsodium/test/default/pwhash_argon2id.exp +2 -3
- data/vendor/libsodium/test/default/pwhash_scrypt.c +61 -18
- data/vendor/libsodium/test/default/pwhash_scrypt.exp +6 -0
- data/vendor/libsodium/test/default/randombytes.c +8 -3
- data/vendor/libsodium/test/default/secretbox.c +8 -0
- data/vendor/libsodium/test/default/secretbox2.c +5 -0
- data/vendor/libsodium/test/default/secretbox_easy.c +19 -1
- data/vendor/libsodium/test/default/secretbox_easy.exp +2 -0
- data/vendor/libsodium/test/default/secretbox_easy2.c +4 -0
- data/vendor/libsodium/test/default/secretstream.c +280 -0
- data/vendor/libsodium/test/default/secretstream.exp +1 -0
- data/vendor/libsodium/test/default/sign.c +31 -0
- data/vendor/libsodium/test/default/sodium_core.c +23 -1
- data/vendor/libsodium/test/default/sodium_core.exp +1 -1
- data/vendor/libsodium/test/default/sodium_utils.c +45 -56
- data/vendor/libsodium/test/default/sodium_utils.exp +0 -8
- data/vendor/libsodium/test/default/stream.c +2 -0
- data/vendor/libsodium/test/default/stream2.c +1 -0
- data/vendor/libsodium/test/default/xchacha20.c +58 -7
- metadata +21 -18
- data/vendor/libsodium/dist-build/emscripten-wasm.sh +0 -132
- data/vendor/libsodium/m4/pkg.m4 +0 -214
- data/vendor/libsodium/packaging/dotnet-core/desktop.targets +0 -16
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c +0 -174
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/beforenm_aes128ctr.c +0 -66
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/common.h +0 -766
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/consts.h +0 -28
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/consts_aes128ctr.c +0 -28
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/int128.h +0 -50
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c +0 -149
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/stream_aes128ctr_nacl.c +0 -31
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c +0 -195
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr.c +0 -19
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +0 -65
@@ -0,0 +1,57 @@
|
|
1
|
+
# SYNOPSIS
|
2
|
+
#
|
3
|
+
# AX_CHECK_CATCHABLE_ABRT
|
4
|
+
#
|
5
|
+
# DESCRIPTION
|
6
|
+
#
|
7
|
+
# Check whether SIGABRT can be caught using signal handlers.
|
8
|
+
|
9
|
+
#serial 1
|
10
|
+
|
11
|
+
AC_DEFUN([AX_CHECK_CATCHABLE_ABRT], [dnl
|
12
|
+
AC_PREREQ(2.64)
|
13
|
+
AS_VAR_PUSHDEF([CACHEVAR], [ax_cv_check_[]_AC_LANG_ABBREV[]CATCHABLE_ABRT])dnl
|
14
|
+
AC_CACHE_CHECK([whether SIGABRT can be caught when using the _AC_LANG compiler], CACHEVAR, [
|
15
|
+
AC_RUN_IFELSE([
|
16
|
+
AC_LANG_PROGRAM([[
|
17
|
+
#include <signal.h>
|
18
|
+
#include <stdlib.h>
|
19
|
+
|
20
|
+
#ifndef SIGABRT
|
21
|
+
# error SIGABRT is not defined
|
22
|
+
#endif
|
23
|
+
|
24
|
+
static void sigabrt_handler_3(int _)
|
25
|
+
{
|
26
|
+
exit(0);
|
27
|
+
}
|
28
|
+
|
29
|
+
static void sigabrt_handler_2(int _)
|
30
|
+
{
|
31
|
+
signal(SIGABRT, sigabrt_handler_3);
|
32
|
+
abort();
|
33
|
+
exit(1);
|
34
|
+
}
|
35
|
+
|
36
|
+
static void sigabrt_handler_1(int _)
|
37
|
+
{
|
38
|
+
signal(SIGABRT, sigabrt_handler_2);
|
39
|
+
abort();
|
40
|
+
exit(1);
|
41
|
+
}
|
42
|
+
]], [[
|
43
|
+
signal(SIGABRT, sigabrt_handler_1);
|
44
|
+
abort();
|
45
|
+
exit(1);
|
46
|
+
]])],
|
47
|
+
[AS_VAR_SET(CACHEVAR, [yes])],
|
48
|
+
[AS_VAR_SET(CACHEVAR, [no])],
|
49
|
+
[AS_VAR_SET(CACHEVAR, [unknown])]
|
50
|
+
)
|
51
|
+
])
|
52
|
+
AS_VAR_IF(CACHEVAR, yes,
|
53
|
+
[AC_DEFINE([HAVE_CATCHABLE_ABRT], [1], [Define if SIGABRT can be caught using signal handlers])],
|
54
|
+
[AC_MSG_WARN([On this platform, SIGABRT cannot be caught using signal handlers.])]
|
55
|
+
)
|
56
|
+
AS_VAR_POPDEF([CACHEVAR])dnl
|
57
|
+
])
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# ===========================================================================
|
2
|
-
#
|
2
|
+
# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
|
3
3
|
# ===========================================================================
|
4
4
|
#
|
5
5
|
# SYNOPSIS
|
@@ -61,7 +61,7 @@
|
|
61
61
|
# and this notice are preserved. This file is offered as-is, without any
|
62
62
|
# warranty.
|
63
63
|
|
64
|
-
#serial
|
64
|
+
#serial 9
|
65
65
|
|
66
66
|
AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
|
67
67
|
[AC_PROG_AWK
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# ===========================================================================
|
2
|
-
#
|
2
|
+
# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
3
3
|
# ===========================================================================
|
4
4
|
#
|
5
5
|
# SYNOPSIS
|
@@ -67,7 +67,7 @@
|
|
67
67
|
# Public License for more details.
|
68
68
|
#
|
69
69
|
# You should have received a copy of the GNU General Public License along
|
70
|
-
# with this program. If not, see <
|
70
|
+
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
71
71
|
#
|
72
72
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
73
73
|
# gives unlimited permission to copy, distribute and modify the configure
|
@@ -1,5 +1,5 @@
|
|
1
|
-
cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.
|
2
|
-
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/
|
3
|
-
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/
|
1
|
+
cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.15/ < src\libsodium\include\sodium\version.h.in > tmp
|
2
|
+
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/10/ < tmp > tmp2
|
3
|
+
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/0/ < tmp2 > tmp3
|
4
4
|
cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h
|
5
5
|
del tmp tmp2 tmp3
|
@@ -31,15 +31,15 @@ Version numbers for the packages for .NET Core consist of three components:
|
|
31
31
|
It may be necessary to release more than one package for a libsodium version,
|
32
32
|
e.g., when adding support for a new platform or if a release contains a broken
|
33
33
|
binary. In this case, a package revision number is added as a fourth part to
|
34
|
-
the libsodium version, starting at `1`. For example, `1.0.
|
35
|
-
release of the package for libsodium 1.0.
|
34
|
+
the libsodium version, starting at `1`. For example, `1.0.15` is the initial
|
35
|
+
release of the package for libsodium 1.0.15 and `1.0.15.5` is the fifth
|
36
36
|
revision (sixth release) of that package.
|
37
37
|
* *pre-release label*
|
38
38
|
If a package is a pre-release, a label is appended to the version number in
|
39
39
|
`-preview-##` format where `##` is the number of the pre-release, starting at
|
40
|
-
`01`. For example, `1.0.
|
41
|
-
for libsodium 1.0.
|
42
|
-
fifth revision of the package for libsodium 1.0.
|
40
|
+
`01`. For example, `1.0.15-preview-01` is the first pre-release of the package
|
41
|
+
for libsodium 1.0.15 and `1.0.15.5-preview-02` the second pre-release of the
|
42
|
+
fifth revision of the package for libsodium 1.0.15.
|
43
43
|
|
44
44
|
|
45
45
|
**Making a release**
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<Project>
|
3
3
|
|
4
4
|
<PropertyGroup>
|
5
|
-
<
|
5
|
+
<TargetFramework>netstandard1.1</TargetFramework>
|
6
6
|
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
7
7
|
<NoBuild>true</NoBuild>
|
8
8
|
<IncludeBuildOutput>false</IncludeBuildOutput>
|
@@ -22,12 +22,15 @@
|
|
22
22
|
<MinClientVersion>4.0</MinClientVersion>
|
23
23
|
</PropertyGroup>
|
24
24
|
|
25
|
+
<ItemGroup>
|
26
|
+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="1.0.1" />
|
27
|
+
</ItemGroup>
|
28
|
+
|
25
29
|
<ItemGroup>
|
26
30
|
<Content Include="LICENSE" PackagePath="" />
|
27
31
|
<Content Include="AUTHORS" PackagePath="" />
|
28
32
|
<Content Include="ChangeLog" PackagePath="" />
|
29
33
|
<Content Include="runtimes\**\*.*" PackagePath="runtimes\" />
|
30
|
-
<Content Include="build\**\*.*" PackagePath="build\" />
|
31
34
|
</ItemGroup>
|
32
35
|
|
33
36
|
</Project>
|
@@ -8,8 +8,8 @@ WINDOWS = [
|
|
8
8
|
# --------------------- ----------------- #
|
9
9
|
# Runtime ID Platform #
|
10
10
|
# --------------------- ----------------- #
|
11
|
-
( '
|
12
|
-
( '
|
11
|
+
( 'win-x64', 'x64' ),
|
12
|
+
( 'win-x86', 'Win32' ),
|
13
13
|
# --------------------- ----------------- #
|
14
14
|
]
|
15
15
|
|
@@ -17,9 +17,7 @@ MACOS = [
|
|
17
17
|
# --------------------- ----------------- #
|
18
18
|
# Runtime ID Codename #
|
19
19
|
# --------------------- ----------------- #
|
20
|
-
( 'osx
|
21
|
-
( 'osx.10.11-x64', 'el_capitan' ),
|
22
|
-
( 'osx.10.12-x64', 'sierra' ),
|
20
|
+
( 'osx-x64', 'sierra' ),
|
23
21
|
# --------------------- ----------------- #
|
24
22
|
]
|
25
23
|
|
@@ -27,22 +25,13 @@ LINUX = [
|
|
27
25
|
# --------------------- ----------------- #
|
28
26
|
# Runtime ID Docker Image #
|
29
27
|
# --------------------- ----------------- #
|
30
|
-
( '
|
31
|
-
( 'debian.8-x64', 'debian:8.2' ),
|
32
|
-
( 'fedora.24-x64', 'fedora:24' ),
|
33
|
-
( 'fedora.25-x64', 'fedora:25' ),
|
34
|
-
( 'fedora.26-x64', 'fedora:26' ),
|
35
|
-
( 'opensuse.42.1-x64', 'opensuse:42.1' ),
|
36
|
-
( 'ubuntu.14.04-x64', 'ubuntu:trusty' ),
|
37
|
-
( 'ubuntu.16.04-x64', 'ubuntu:xenial' ),
|
38
|
-
( 'ubuntu.16.10-x64', 'ubuntu:yakkety' ),
|
28
|
+
( 'linux-x64', 'debian:stretch' ),
|
39
29
|
# --------------------- ----------------- #
|
40
30
|
]
|
41
31
|
|
42
32
|
EXTRAS = [ 'LICENSE', 'AUTHORS', 'ChangeLog' ]
|
43
33
|
|
44
34
|
PROPSFILE = 'libsodium.props'
|
45
|
-
DESKTOPTARGETSFILE = 'desktop.targets'
|
46
35
|
MAKEFILE = 'Makefile'
|
47
36
|
BUILDDIR = 'build'
|
48
37
|
CACHEDIR = 'cache'
|
@@ -64,7 +53,6 @@ class Version:
|
|
64
53
|
self.projfile = os.path.join(self.builddir, '{0}.{1}.pkgproj'.format(PACKAGE, package_version))
|
65
54
|
self.propsfile = os.path.join(self.builddir, '{0}.props'.format(PACKAGE))
|
66
55
|
self.pkgfile = os.path.join(BUILDDIR, '{0}.{1}.nupkg'.format(PACKAGE, package_version))
|
67
|
-
self.desktoptargetsfile = os.path.join(self.builddir, 'build', 'net46', '{0}.targets'.format(PACKAGE))
|
68
56
|
|
69
57
|
class WindowsItem:
|
70
58
|
|
@@ -182,13 +170,13 @@ def main(args):
|
|
182
170
|
print(' python3 prepare.py <version>')
|
183
171
|
print()
|
184
172
|
print('Examples:')
|
185
|
-
print(' python3 prepare.py 1.0.
|
186
|
-
print(' python3 prepare.py 1.0.
|
187
|
-
print(' python3 prepare.py 1.0.
|
188
|
-
print(' python3 prepare.py 1.0.
|
189
|
-
print(' python3 prepare.py 1.0.
|
190
|
-
print(' python3 prepare.py 1.0.
|
191
|
-
print(' python3 prepare.py 1.0.
|
173
|
+
print(' python3 prepare.py 1.0.15-preview-01')
|
174
|
+
print(' python3 prepare.py 1.0.15-preview-02')
|
175
|
+
print(' python3 prepare.py 1.0.15-preview-03')
|
176
|
+
print(' python3 prepare.py 1.0.15')
|
177
|
+
print(' python3 prepare.py 1.0.15.1-preview-01')
|
178
|
+
print(' python3 prepare.py 1.0.15.1')
|
179
|
+
print(' python3 prepare.py 1.0.15.2')
|
192
180
|
return 1
|
193
181
|
|
194
182
|
version = Version(m.group(2), m.group(0))
|
@@ -212,11 +200,6 @@ def main(args):
|
|
212
200
|
for item in items:
|
213
201
|
item.make(f)
|
214
202
|
|
215
|
-
f.write('\n')
|
216
|
-
f.write('{0}: {1}\n'.format(version.desktoptargetsfile, DESKTOPTARGETSFILE))
|
217
|
-
f.write('\t@mkdir -p $(dir $@)\n')
|
218
|
-
f.write('\tcp -f $< $@\n')
|
219
|
-
|
220
203
|
f.write('\n')
|
221
204
|
f.write('{0}: {1}\n'.format(version.propsfile, PROPSFILE))
|
222
205
|
f.write('\t@mkdir -p $(dir $@)\n')
|
@@ -237,7 +220,6 @@ def main(args):
|
|
237
220
|
f.write('{0}:'.format(version.pkgfile))
|
238
221
|
f.write(' \\\n\t\t{0}'.format(version.projfile))
|
239
222
|
f.write(' \\\n\t\t{0}'.format(version.propsfile))
|
240
|
-
f.write(' \\\n\t\t{0}'.format(version.desktoptargetsfile))
|
241
223
|
for item in items:
|
242
224
|
f.write(' \\\n\t\t{0}'.format(item.packfile))
|
243
225
|
f.write('\n')
|
@@ -246,14 +228,14 @@ def main(args):
|
|
246
228
|
'-v $(abspath recipes):/io/recipes ' +
|
247
229
|
'-v $(abspath $(dir $<)):/io/input ' +
|
248
230
|
'-v $(abspath $(dir $@)):/io/output ' +
|
249
|
-
'{0} sh -x -e /io/recipes/{1} {2}\n'.format('microsoft/dotnet:
|
231
|
+
'{0} sh -x -e /io/recipes/{1} {2}\n'.format('microsoft/dotnet:2.0-sdk', 'pack', os.path.relpath(version.projfile, version.builddir)))
|
250
232
|
|
251
233
|
f.write('\n')
|
252
234
|
f.write('test: {0}\n'.format(version.pkgfile))
|
253
235
|
f.write('\t{0} run --rm '.format(DOCKER) +
|
254
236
|
'-v $(abspath recipes):/io/recipes ' +
|
255
237
|
'-v $(abspath $(dir $<)):/io/packages ' +
|
256
|
-
'{0} sh -x -e /io/recipes/{1} "{2}"\n'.format('microsoft/dotnet:
|
238
|
+
'{0} sh -x -e /io/recipes/{1} "{2}"\n'.format('microsoft/dotnet:2.0-sdk', 'test', version.package_version))
|
257
239
|
|
258
240
|
print('prepared', MAKEFILE, 'to make', version.pkgfile, 'for libsodium', version.libsodium_version)
|
259
241
|
return 0
|
@@ -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 = "1.0.
|
4
|
+
<package id="libsodium_vc120" target="libsodium" version = "1.0.15.0" pathversion="1_0_15_0" platformtoolset="v120" />
|
@@ -62,6 +62,7 @@ libsodium_la_SOURCES = \
|
|
62
62
|
crypto_secretbox/crypto_secretbox.c \
|
63
63
|
crypto_secretbox/crypto_secretbox_easy.c \
|
64
64
|
crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c \
|
65
|
+
crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c \
|
65
66
|
crypto_shorthash/crypto_shorthash.c \
|
66
67
|
crypto_shorthash/siphash24/shorthash_siphash24.c \
|
67
68
|
crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c \
|
@@ -87,6 +88,7 @@ libsodium_la_SOURCES = \
|
|
87
88
|
include/sodium/private/mutex.h \
|
88
89
|
include/sodium/private/sse2_64_32.h \
|
89
90
|
randombytes/randombytes.c \
|
91
|
+
sodium/codecs.c \
|
90
92
|
sodium/core.c \
|
91
93
|
sodium/runtime.c \
|
92
94
|
sodium/utils.c \
|
@@ -167,16 +169,6 @@ libsodium_la_SOURCES += \
|
|
167
169
|
crypto_shorthash/siphash24/shorthash_siphashx24.c \
|
168
170
|
crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c \
|
169
171
|
crypto_sign/ed25519/ref10/obsolete.c \
|
170
|
-
crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c \
|
171
|
-
crypto_stream/aes128ctr/nacl/beforenm_aes128ctr.c \
|
172
|
-
crypto_stream/aes128ctr/nacl/common.h \
|
173
|
-
crypto_stream/aes128ctr/nacl/consts.h \
|
174
|
-
crypto_stream/aes128ctr/nacl/consts_aes128ctr.c \
|
175
|
-
crypto_stream/aes128ctr/nacl/int128.h \
|
176
|
-
crypto_stream/aes128ctr/nacl/int128_aes128ctr.c \
|
177
|
-
crypto_stream/aes128ctr/nacl/stream_aes128ctr_nacl.c \
|
178
|
-
crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c \
|
179
|
-
crypto_stream/aes128ctr/stream_aes128ctr.c \
|
180
172
|
crypto_stream/salsa2012/ref/stream_salsa2012_ref.c \
|
181
173
|
crypto_stream/salsa2012/stream_salsa2012.c \
|
182
174
|
crypto_stream/salsa208/ref/stream_salsa208_ref.c \
|
@@ -206,8 +198,8 @@ endif
|
|
206
198
|
SUBDIRS = \
|
207
199
|
include
|
208
200
|
|
209
|
-
libsodium_la_LIBADD = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la
|
210
|
-
noinst_LTLIBRARIES = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la
|
201
|
+
libsodium_la_LIBADD = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
|
202
|
+
noinst_LTLIBRARIES = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
|
211
203
|
|
212
204
|
libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS)
|
213
205
|
libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
|
@@ -273,3 +265,10 @@ libavx2_la_SOURCES = \
|
|
273
265
|
crypto_stream/salsa20/xmm6int/u1.h \
|
274
266
|
crypto_stream/salsa20/xmm6int/u4.h \
|
275
267
|
crypto_stream/salsa20/xmm6int/u8.h
|
268
|
+
|
269
|
+
libavx512f_la_LDFLAGS = $(libsodium_la_LDFLAGS)
|
270
|
+
libavx512f_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
|
271
|
+
@CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_SSE41@ @CFLAGS_AVX@ @CFLAGS_AVX2@ @CFLAGS_AVX512F@
|
272
|
+
libavx512f_la_SOURCES = \
|
273
|
+
crypto_pwhash/argon2/argon2-fill-block-avx512f.c \
|
274
|
+
crypto_pwhash/argon2/blamka-round-avx512f.h
|
@@ -10,6 +10,7 @@
|
|
10
10
|
#include <stdlib.h>
|
11
11
|
#include <string.h>
|
12
12
|
|
13
|
+
#include "core.h"
|
13
14
|
#include "crypto_aead_aes256gcm.h"
|
14
15
|
#include "export.h"
|
15
16
|
#include "private/common.h"
|
@@ -523,8 +524,8 @@ crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c,
|
|
523
524
|
|
524
525
|
(void) nsec;
|
525
526
|
memcpy(H, ctx->H, sizeof H);
|
526
|
-
if (mlen >
|
527
|
-
|
527
|
+
if (mlen > crypto_aead_aes256gcm_MESSAGEBYTES_MAX) {
|
528
|
+
sodium_misuse(); /* LCOV_EXCL_LINE */
|
528
529
|
}
|
529
530
|
memcpy(&n2[0], npub, 3 * 4);
|
530
531
|
n2[3] = 0x01000000;
|
@@ -661,8 +662,8 @@ crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, unsigned char *
|
|
661
662
|
CRYPTO_ALIGN(16) unsigned char fb[16];
|
662
663
|
|
663
664
|
(void) nsec;
|
664
|
-
if (clen >
|
665
|
-
|
665
|
+
if (clen > crypto_aead_aes256gcm_MESSAGEBYTES_MAX) {
|
666
|
+
sodium_misuse(); /* LCOV_EXCL_LINE */
|
666
667
|
}
|
667
668
|
mlen = clen;
|
668
669
|
|
@@ -1057,6 +1058,12 @@ crypto_aead_aes256gcm_statebytes(void)
|
|
1057
1058
|
return (sizeof(crypto_aead_aes256gcm_state) + (size_t) 15U) & ~(size_t) 15U;
|
1058
1059
|
}
|
1059
1060
|
|
1061
|
+
size_t
|
1062
|
+
crypto_aead_aes256gcm_messagebytes_max(void)
|
1063
|
+
{
|
1064
|
+
return crypto_aead_aes256gcm_MESSAGEBYTES_MAX;
|
1065
|
+
}
|
1066
|
+
|
1060
1067
|
void
|
1061
1068
|
crypto_aead_aes256gcm_keygen(unsigned char k[crypto_aead_aes256gcm_KEYBYTES])
|
1062
1069
|
{
|
data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
#include <limits.h>
|
5
5
|
#include <string.h>
|
6
6
|
|
7
|
+
#include "core.h"
|
7
8
|
#include "crypto_aead_chacha20poly1305.h"
|
8
9
|
#include "crypto_onetimeauth_poly1305.h"
|
9
10
|
#include "crypto_stream_chacha20.h"
|
@@ -69,8 +70,8 @@ crypto_aead_chacha20poly1305_encrypt(unsigned char *c,
|
|
69
70
|
unsigned long long clen = 0ULL;
|
70
71
|
int ret;
|
71
72
|
|
72
|
-
if (mlen >
|
73
|
-
|
73
|
+
if (mlen > crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX) {
|
74
|
+
sodium_misuse();
|
74
75
|
}
|
75
76
|
ret = crypto_aead_chacha20poly1305_encrypt_detached(c,
|
76
77
|
c + mlen, NULL,
|
@@ -144,8 +145,8 @@ crypto_aead_chacha20poly1305_ietf_encrypt(unsigned char *c,
|
|
144
145
|
unsigned long long clen = 0ULL;
|
145
146
|
int ret;
|
146
147
|
|
147
|
-
if (mlen >
|
148
|
-
|
148
|
+
if (mlen > crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX) {
|
149
|
+
sodium_misuse();
|
149
150
|
}
|
150
151
|
ret = crypto_aead_chacha20poly1305_ietf_encrypt_detached(c,
|
151
152
|
c + mlen, NULL,
|
@@ -349,6 +350,12 @@ crypto_aead_chacha20poly1305_ietf_abytes(void)
|
|
349
350
|
return crypto_aead_chacha20poly1305_ietf_ABYTES;
|
350
351
|
}
|
351
352
|
|
353
|
+
size_t
|
354
|
+
crypto_aead_chacha20poly1305_ietf_messagebytes_max(void)
|
355
|
+
{
|
356
|
+
return crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX;
|
357
|
+
}
|
358
|
+
|
352
359
|
void
|
353
360
|
crypto_aead_chacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_chacha20poly1305_ietf_KEYBYTES])
|
354
361
|
{
|
@@ -379,6 +386,12 @@ crypto_aead_chacha20poly1305_abytes(void)
|
|
379
386
|
return crypto_aead_chacha20poly1305_ABYTES;
|
380
387
|
}
|
381
388
|
|
389
|
+
size_t
|
390
|
+
crypto_aead_chacha20poly1305_messagebytes_max(void)
|
391
|
+
{
|
392
|
+
return crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX;
|
393
|
+
}
|
394
|
+
|
382
395
|
void
|
383
396
|
crypto_aead_chacha20poly1305_keygen(unsigned char k[crypto_aead_chacha20poly1305_KEYBYTES])
|
384
397
|
{
|
data/vendor/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
#include <limits.h>
|
5
5
|
#include <string.h>
|
6
6
|
|
7
|
+
#include "core.h"
|
7
8
|
#include "crypto_aead_xchacha20poly1305.h"
|
8
9
|
#include "crypto_aead_chacha20poly1305.h"
|
9
10
|
#include "crypto_core_hchacha20.h"
|
@@ -53,7 +54,7 @@ crypto_aead_xchacha20poly1305_ietf_encrypt(unsigned char *c,
|
|
53
54
|
int ret;
|
54
55
|
|
55
56
|
if (mlen > UINT64_MAX - crypto_aead_xchacha20poly1305_ietf_ABYTES) {
|
56
|
-
|
57
|
+
sodium_misuse();
|
57
58
|
}
|
58
59
|
ret = crypto_aead_xchacha20poly1305_ietf_encrypt_detached
|
59
60
|
(c, c + mlen, NULL, m, mlen, ad, adlen, nsec, npub, k);
|
@@ -146,6 +147,12 @@ crypto_aead_xchacha20poly1305_ietf_abytes(void)
|
|
146
147
|
return crypto_aead_xchacha20poly1305_ietf_ABYTES;
|
147
148
|
}
|
148
149
|
|
150
|
+
size_t
|
151
|
+
crypto_aead_xchacha20poly1305_ietf_messagebytes_max(void)
|
152
|
+
{
|
153
|
+
return crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX;
|
154
|
+
}
|
155
|
+
|
149
156
|
void
|
150
157
|
crypto_aead_xchacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_xchacha20poly1305_ietf_KEYBYTES])
|
151
158
|
{
|