rbnacl-libsodium 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +23 -0
- data/CHANGES.md +5 -0
- data/Gemfile +5 -2
- data/Rakefile +5 -0
- data/ext/rbnacl/extconf.rb +2 -1
- data/lib/rbnacl/libsodium.rb +8 -2
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/AUTHORS +14 -0
- data/vendor/libsodium/ChangeLog +26 -0
- data/vendor/libsodium/LICENSE +1 -1
- data/vendor/libsodium/Makefile.am +1 -0
- data/vendor/libsodium/Makefile.in +9 -0
- data/vendor/libsodium/README.markdown +7 -0
- data/vendor/libsodium/aclocal.m4 +1 -0
- data/vendor/libsodium/appveyor.yml +25 -0
- data/vendor/libsodium/autom4te.cache/output.1 +640 -126
- data/vendor/libsodium/autom4te.cache/output.6 +19049 -0
- data/vendor/libsodium/autom4te.cache/requests +1151 -914
- data/vendor/libsodium/autom4te.cache/traces.1 +472 -426
- data/vendor/libsodium/autom4te.cache/traces.6 +3193 -0
- data/vendor/libsodium/builds/msvc/version.h +2 -2
- data/vendor/libsodium/builds/msvc/vs2010/libsodium.sln +50 -79
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +20 -8
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +208 -166
- data/vendor/libsodium/builds/msvc/vs2012/libsodium.sln +50 -79
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +20 -8
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +206 -164
- data/vendor/libsodium/builds/msvc/vs2013/libsodium.sln +52 -81
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +20 -8
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +206 -164
- data/vendor/libsodium/builds/msvc/vs2015/libsodium.sln +52 -81
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +20 -8
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +206 -164
- data/vendor/libsodium/configure +639 -125
- data/vendor/libsodium/configure.ac +94 -16
- data/vendor/libsodium/dist-build/Makefile.in +9 -0
- data/vendor/libsodium/dist-build/emscripten-symbols.def +370 -0
- data/vendor/libsodium/dist-build/emscripten.sh +9 -3
- data/vendor/libsodium/dist-build/generate-emscripten-symbols.sh +43 -0
- data/vendor/libsodium/libsodium-uninstalled.pc.in +1 -1
- data/vendor/libsodium/libsodium.pc.in +1 -1
- data/vendor/libsodium/libsodium.vcxproj +70 -66
- data/vendor/libsodium/libsodium.vcxproj.filters +204 -192
- data/vendor/libsodium/m4/ax_valgrind_check.m4 +190 -0
- data/vendor/libsodium/msvc-scripts/Makefile.in +9 -0
- data/vendor/libsodium/msvc-scripts/process.bat +2 -2
- data/vendor/libsodium/src/Makefile.in +9 -0
- data/vendor/libsodium/src/libsodium/Makefile.am +31 -6
- data/vendor/libsodium/src/libsodium/Makefile.in +238 -42
- data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +234 -38
- data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +208 -118
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_seal.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +1 -4
- data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +1799 -1790
- data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.h +39 -39
- data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +86 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.h +28 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +38 -46
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +47 -55
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +47 -55
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +47 -55
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +0 -89
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +50 -141
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c +45 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.h +123 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c +3 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/{blake2b-round.h → blake2b-compress-sse41.h} +2 -28
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.c +2 -4
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.h +97 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-avx2.h +339 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h +0 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h +0 -2
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +29 -18
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +4 -43
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +3 -32
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +1 -20
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +22 -41
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +12 -39
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +2 -4
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +1 -20
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c +570 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h +198 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +444 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +32 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +229 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +222 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h +40 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +238 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h +251 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +80 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +38 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +117 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +164 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c +106 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +1 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +4 -4
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +186 -186
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +2 -2
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +3 -2
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +33 -33
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +253 -254
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +16 -17
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.h +1 -0
- 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 +1 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h +3 -2
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h +5 -3
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c +41 -41
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +10 -2
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +4 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +4 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c +31 -32
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +4 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.S +4 -0
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base_namespace.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +2 -6
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +8 -28
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +75 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +6 -6
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +1 -18
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +20 -20
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +4 -4
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +6 -6
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +56 -77
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.h +1 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +2 -8
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +2 -8
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +2 -8
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +2 -8
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +2 -8
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +2 -8
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +1 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +1 -5
- data/vendor/libsodium/src/libsodium/include/Makefile.am +3 -0
- data/vendor/libsodium/src/libsodium/include/Makefile.in +19 -8
- data/vendor/libsodium/src/libsodium/include/sodium.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +50 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +94 -22
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +6 -6
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hchacha20.h +35 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h +89 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +86 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +6 -6
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +0 -11
- data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +3 -0
- data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +3 -0
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +5 -1
- data/vendor/libsodium/src/libsodium/sodium/common.h +150 -0
- data/vendor/libsodium/src/libsodium/sodium/core.c +3 -1
- data/vendor/libsodium/src/libsodium/sodium/runtime.c +37 -19
- data/vendor/libsodium/src/libsodium/sodium/utils.c +18 -9
- data/vendor/libsodium/test/Makefile.in +9 -0
- data/vendor/libsodium/test/default/Makefile.am +10 -0
- data/vendor/libsodium/test/default/Makefile.in +53 -20
- data/vendor/libsodium/test/default/aead_aes256gcm.c +43 -17
- data/vendor/libsodium/test/default/aead_chacha20poly1305.c +179 -86
- data/vendor/libsodium/test/default/auth7.c +5 -5
- data/vendor/libsodium/test/default/box.c +4 -4
- data/vendor/libsodium/test/default/box2.c +1 -1
- data/vendor/libsodium/test/default/core6.c +1 -1
- data/vendor/libsodium/test/default/generichash.c +12 -1
- data/vendor/libsodium/test/default/generichash2.c +2 -2
- data/vendor/libsodium/test/default/generichash3.c +21 -0
- data/vendor/libsodium/test/default/pwhash.c +186 -168
- data/vendor/libsodium/test/default/pwhash.exp +11 -30
- data/vendor/libsodium/test/default/pwhash_scrypt.c +349 -0
- data/vendor/libsodium/test/default/pwhash_scrypt.exp +31 -0
- data/vendor/libsodium/test/default/secretbox.c +1 -1
- data/vendor/libsodium/test/default/secretbox2.c +1 -1
- data/vendor/libsodium/test/default/sign.c +15 -0
- data/vendor/libsodium/test/default/sodium_utils2.c +8 -3
- data/vendor/libsodium/test/default/sodium_utils3.c +4 -2
- data/vendor/libsodium/test/default/verify1.c +0 -4
- data/vendor/libsodium/test/quirks/quirks.h +3 -0
- metadata +37 -22
- data/vendor/libsodium/builds/msvc/vs2010/test/test.props +0 -43
- data/vendor/libsodium/builds/msvc/vs2010/test/test.runner.bat +0 -78
- data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +0 -244
- data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +0 -192
- data/vendor/libsodium/builds/msvc/vs2012/test/test.props +0 -43
- data/vendor/libsodium/builds/msvc/vs2012/test/test.runner.bat +0 -78
- data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +0 -244
- data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +0 -192
- data/vendor/libsodium/builds/msvc/vs2013/test/test.props +0 -43
- data/vendor/libsodium/builds/msvc/vs2013/test/test.runner.bat +0 -78
- data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +0 -244
- data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +0 -192
- data/vendor/libsodium/builds/msvc/vs2015/test/test.props +0 -43
- data/vendor/libsodium/builds/msvc/vs2015/test/test.runner.bat +0 -78
- data/vendor/libsodium/builds/msvc/vs2015/test/test.vcxproj +0 -244
- data/vendor/libsodium/builds/msvc/vs2015/test/test.vcxproj.filters +0 -192
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sysendian.h +0 -146
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common_aes128ctr.c +0 -64
@@ -10,12 +10,6 @@ Public domain.
|
|
10
10
|
|
11
11
|
#ifndef HAVE_AMD64_ASM
|
12
12
|
|
13
|
-
typedef unsigned int uint32;
|
14
|
-
|
15
|
-
static const unsigned char sigma[16] = {
|
16
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
17
|
-
};
|
18
|
-
|
19
13
|
int crypto_stream_salsa20(
|
20
14
|
unsigned char *c,unsigned long long clen,
|
21
15
|
const unsigned char *n,
|
@@ -35,7 +29,7 @@ int crypto_stream_salsa20(
|
|
35
29
|
for (i = 8;i < 16;++i) in[i] = 0;
|
36
30
|
|
37
31
|
while (clen >= 64) {
|
38
|
-
crypto_core_salsa20(c,in,kcopy,
|
32
|
+
crypto_core_salsa20(c,in,kcopy,NULL);
|
39
33
|
|
40
34
|
u = 1;
|
41
35
|
for (i = 8;i < 16;++i) {
|
@@ -49,7 +43,7 @@ int crypto_stream_salsa20(
|
|
49
43
|
}
|
50
44
|
|
51
45
|
if (clen) {
|
52
|
-
crypto_core_salsa20(block,in,kcopy,
|
46
|
+
crypto_core_salsa20(block,in,kcopy,NULL);
|
53
47
|
for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i];
|
54
48
|
}
|
55
49
|
sodium_memzero(block, sizeof block);
|
@@ -12,12 +12,6 @@ Public domain.
|
|
12
12
|
|
13
13
|
#ifndef HAVE_AMD64_ASM
|
14
14
|
|
15
|
-
typedef unsigned int uint32;
|
16
|
-
|
17
|
-
static const unsigned char sigma[16] = {
|
18
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
19
|
-
};
|
20
|
-
|
21
15
|
int crypto_stream_salsa20_xor_ic(
|
22
16
|
unsigned char *c,
|
23
17
|
const unsigned char *m,unsigned long long mlen,
|
@@ -41,7 +35,7 @@ int crypto_stream_salsa20_xor_ic(
|
|
41
35
|
}
|
42
36
|
|
43
37
|
while (mlen >= 64) {
|
44
|
-
crypto_core_salsa20(block,in,kcopy,
|
38
|
+
crypto_core_salsa20(block,in,kcopy,NULL);
|
45
39
|
for (i = 0;i < 64;++i) c[i] = m[i] ^ block[i];
|
46
40
|
|
47
41
|
u = 1;
|
@@ -57,7 +51,7 @@ int crypto_stream_salsa20_xor_ic(
|
|
57
51
|
}
|
58
52
|
|
59
53
|
if (mlen) {
|
60
|
-
crypto_core_salsa20(block,in,kcopy,
|
54
|
+
crypto_core_salsa20(block,in,kcopy,NULL);
|
61
55
|
for (i = 0;i < (unsigned int) mlen;++i) c[i] = m[i] ^ block[i];
|
62
56
|
}
|
63
57
|
sodium_memzero(block, sizeof block);
|
@@ -8,12 +8,6 @@ Public domain.
|
|
8
8
|
#include "crypto_stream_salsa2012.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
|
-
typedef unsigned int uint32;
|
12
|
-
|
13
|
-
static const unsigned char sigma[16] = {
|
14
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
|
-
};
|
16
|
-
|
17
11
|
int crypto_stream_salsa2012(
|
18
12
|
unsigned char *c,unsigned long long clen,
|
19
13
|
const unsigned char *n,
|
@@ -33,7 +27,7 @@ int crypto_stream_salsa2012(
|
|
33
27
|
for (i = 8;i < 16;++i) in[i] = 0;
|
34
28
|
|
35
29
|
while (clen >= 64) {
|
36
|
-
crypto_core_salsa2012(c,in,kcopy,
|
30
|
+
crypto_core_salsa2012(c,in,kcopy,NULL);
|
37
31
|
|
38
32
|
u = 1;
|
39
33
|
for (i = 8;i < 16;++i) {
|
@@ -47,7 +41,7 @@ int crypto_stream_salsa2012(
|
|
47
41
|
}
|
48
42
|
|
49
43
|
if (clen) {
|
50
|
-
crypto_core_salsa2012(block,in,kcopy,
|
44
|
+
crypto_core_salsa2012(block,in,kcopy,NULL);
|
51
45
|
for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i];
|
52
46
|
}
|
53
47
|
sodium_memzero(block, sizeof block);
|
@@ -8,12 +8,6 @@ Public domain.
|
|
8
8
|
#include "crypto_stream_salsa2012.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
|
-
typedef unsigned int uint32;
|
12
|
-
|
13
|
-
static const unsigned char sigma[16] = {
|
14
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
|
-
};
|
16
|
-
|
17
11
|
int crypto_stream_salsa2012_xor(
|
18
12
|
unsigned char *c,
|
19
13
|
const unsigned char *m,unsigned long long mlen,
|
@@ -34,7 +28,7 @@ int crypto_stream_salsa2012_xor(
|
|
34
28
|
for (i = 8;i < 16;++i) in[i] = 0;
|
35
29
|
|
36
30
|
while (mlen >= 64) {
|
37
|
-
crypto_core_salsa2012(block,in,kcopy,
|
31
|
+
crypto_core_salsa2012(block,in,kcopy,NULL);
|
38
32
|
for (i = 0;i < 64;++i) c[i] = m[i] ^ block[i];
|
39
33
|
|
40
34
|
u = 1;
|
@@ -50,7 +44,7 @@ int crypto_stream_salsa2012_xor(
|
|
50
44
|
}
|
51
45
|
|
52
46
|
if (mlen) {
|
53
|
-
crypto_core_salsa2012(block,in,kcopy,
|
47
|
+
crypto_core_salsa2012(block,in,kcopy,NULL);
|
54
48
|
for (i = 0;i < (unsigned int) mlen;++i) c[i] = m[i] ^ block[i];
|
55
49
|
}
|
56
50
|
sodium_memzero(block, sizeof block);
|
@@ -8,12 +8,6 @@ Public domain.
|
|
8
8
|
#include "crypto_stream_salsa208.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
|
-
typedef unsigned int uint32;
|
12
|
-
|
13
|
-
static const unsigned char sigma[16] = {
|
14
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
|
-
};
|
16
|
-
|
17
11
|
int crypto_stream_salsa208(
|
18
12
|
unsigned char *c,unsigned long long clen,
|
19
13
|
const unsigned char *n,
|
@@ -33,7 +27,7 @@ int crypto_stream_salsa208(
|
|
33
27
|
for (i = 8;i < 16;++i) in[i] = 0;
|
34
28
|
|
35
29
|
while (clen >= 64) {
|
36
|
-
crypto_core_salsa208(c,in,kcopy,
|
30
|
+
crypto_core_salsa208(c,in,kcopy,NULL);
|
37
31
|
|
38
32
|
u = 1;
|
39
33
|
for (i = 8;i < 16;++i) {
|
@@ -47,7 +41,7 @@ int crypto_stream_salsa208(
|
|
47
41
|
}
|
48
42
|
|
49
43
|
if (clen) {
|
50
|
-
crypto_core_salsa208(block,in,kcopy,
|
44
|
+
crypto_core_salsa208(block,in,kcopy,NULL);
|
51
45
|
for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i];
|
52
46
|
}
|
53
47
|
sodium_memzero(block, sizeof block);
|
@@ -8,12 +8,6 @@ Public domain.
|
|
8
8
|
#include "crypto_stream_salsa208.h"
|
9
9
|
#include "utils.h"
|
10
10
|
|
11
|
-
typedef unsigned int uint32;
|
12
|
-
|
13
|
-
static const unsigned char sigma[16] = {
|
14
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
15
|
-
};
|
16
|
-
|
17
11
|
int crypto_stream_salsa208_xor(
|
18
12
|
unsigned char *c,
|
19
13
|
const unsigned char *m,unsigned long long mlen,
|
@@ -34,7 +28,7 @@ int crypto_stream_salsa208_xor(
|
|
34
28
|
for (i = 8;i < 16;++i) in[i] = 0;
|
35
29
|
|
36
30
|
while (mlen >= 64) {
|
37
|
-
crypto_core_salsa208(block,in,kcopy,
|
31
|
+
crypto_core_salsa208(block,in,kcopy,NULL);
|
38
32
|
for (i = 0;i < 64;++i) c[i] = m[i] ^ block[i];
|
39
33
|
|
40
34
|
u = 1;
|
@@ -50,7 +44,7 @@ int crypto_stream_salsa208_xor(
|
|
50
44
|
}
|
51
45
|
|
52
46
|
if (mlen) {
|
53
|
-
crypto_core_salsa208(block,in,kcopy,
|
47
|
+
crypto_core_salsa208(block,in,kcopy,NULL);
|
54
48
|
for (i = 0;i < (unsigned int) mlen;++i) c[i] = m[i] ^ block[i];
|
55
49
|
}
|
56
50
|
sodium_memzero(block, sizeof block);
|
@@ -9,10 +9,6 @@ Public domain.
|
|
9
9
|
#include "crypto_stream_xsalsa20.h"
|
10
10
|
#include "utils.h"
|
11
11
|
|
12
|
-
static const unsigned char sigma[16] = {
|
13
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
14
|
-
};
|
15
|
-
|
16
12
|
int crypto_stream_xsalsa20(
|
17
13
|
unsigned char *c,unsigned long long clen,
|
18
14
|
const unsigned char *n,
|
@@ -21,7 +17,7 @@ int crypto_stream_xsalsa20(
|
|
21
17
|
{
|
22
18
|
unsigned char subkey[32];
|
23
19
|
int ret;
|
24
|
-
crypto_core_hsalsa20(subkey,n,k,
|
20
|
+
crypto_core_hsalsa20(subkey,n,k,NULL);
|
25
21
|
ret = crypto_stream_salsa20(c,clen,n + 16,subkey);
|
26
22
|
sodium_memzero(subkey, sizeof subkey);
|
27
23
|
return ret;
|
@@ -9,10 +9,6 @@ Public domain.
|
|
9
9
|
#include "crypto_stream_xsalsa20.h"
|
10
10
|
#include "utils.h"
|
11
11
|
|
12
|
-
static const unsigned char sigma[16] = {
|
13
|
-
'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'
|
14
|
-
};
|
15
|
-
|
16
12
|
int crypto_stream_xsalsa20_xor_ic(
|
17
13
|
unsigned char *c,
|
18
14
|
const unsigned char *m,unsigned long long mlen,
|
@@ -22,7 +18,7 @@ int crypto_stream_xsalsa20_xor_ic(
|
|
22
18
|
{
|
23
19
|
unsigned char subkey[32];
|
24
20
|
int ret;
|
25
|
-
crypto_core_hsalsa20(subkey,n,k,
|
21
|
+
crypto_core_hsalsa20(subkey,n,k,NULL);
|
26
22
|
ret = crypto_stream_salsa20_xor_ic(c,m,mlen,n + 16,ic,subkey);
|
27
23
|
sodium_memzero(subkey, sizeof subkey);
|
28
24
|
return ret;
|
@@ -10,6 +10,7 @@ SODIUM_EXPORT = \
|
|
10
10
|
sodium/crypto_auth_hmacsha512256.h \
|
11
11
|
sodium/crypto_box.h \
|
12
12
|
sodium/crypto_box_curve25519xsalsa20poly1305.h \
|
13
|
+
sodium/crypto_core_hchacha20.h \
|
13
14
|
sodium/crypto_core_hsalsa20.h \
|
14
15
|
sodium/crypto_core_salsa20.h \
|
15
16
|
sodium/crypto_core_salsa2012.h \
|
@@ -21,6 +22,8 @@ SODIUM_EXPORT = \
|
|
21
22
|
sodium/crypto_hash_sha512.h \
|
22
23
|
sodium/crypto_onetimeauth.h \
|
23
24
|
sodium/crypto_onetimeauth_poly1305.h \
|
25
|
+
sodium/crypto_pwhash.h \
|
26
|
+
sodium/crypto_pwhash_argon2i.h \
|
24
27
|
sodium/crypto_pwhash_scryptsalsa208sha256.h \
|
25
28
|
sodium/crypto_scalarmult.h \
|
26
29
|
sodium/crypto_scalarmult_curve25519.h \
|
@@ -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_valgrind_check.m4 \
|
99
100
|
$(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
|
100
101
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
101
102
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
@@ -133,13 +134,14 @@ am__nobase_include_HEADERS_DIST = sodium.h sodium/core.h \
|
|
133
134
|
sodium/crypto_auth_hmacsha512.h \
|
134
135
|
sodium/crypto_auth_hmacsha512256.h sodium/crypto_box.h \
|
135
136
|
sodium/crypto_box_curve25519xsalsa20poly1305.h \
|
136
|
-
sodium/
|
137
|
-
sodium/
|
138
|
-
sodium/crypto_generichash.h \
|
137
|
+
sodium/crypto_core_hchacha20.h sodium/crypto_core_hsalsa20.h \
|
138
|
+
sodium/crypto_core_salsa20.h sodium/crypto_core_salsa2012.h \
|
139
|
+
sodium/crypto_core_salsa208.h sodium/crypto_generichash.h \
|
139
140
|
sodium/crypto_generichash_blake2b.h sodium/crypto_hash.h \
|
140
141
|
sodium/crypto_hash_sha256.h sodium/crypto_hash_sha512.h \
|
141
142
|
sodium/crypto_onetimeauth.h \
|
142
|
-
sodium/crypto_onetimeauth_poly1305.h \
|
143
|
+
sodium/crypto_onetimeauth_poly1305.h sodium/crypto_pwhash.h \
|
144
|
+
sodium/crypto_pwhash_argon2i.h \
|
143
145
|
sodium/crypto_pwhash_scryptsalsa208sha256.h \
|
144
146
|
sodium/crypto_scalarmult.h \
|
145
147
|
sodium/crypto_scalarmult_curve25519.h \
|
@@ -227,6 +229,8 @@ CCASFLAGS = @CCASFLAGS@
|
|
227
229
|
CCDEPMODE = @CCDEPMODE@
|
228
230
|
CFLAGS = @CFLAGS@
|
229
231
|
CFLAGS_AESNI = @CFLAGS_AESNI@
|
232
|
+
CFLAGS_AVX = @CFLAGS_AVX@
|
233
|
+
CFLAGS_AVX2 = @CFLAGS_AVX2@
|
230
234
|
CFLAGS_MMX = @CFLAGS_MMX@
|
231
235
|
CFLAGS_PCLMUL = @CFLAGS_PCLMUL@
|
232
236
|
CFLAGS_SSE2 = @CFLAGS_SSE2@
|
@@ -299,6 +303,12 @@ SODIUM_LIBRARY_VERSION_MAJOR = @SODIUM_LIBRARY_VERSION_MAJOR@
|
|
299
303
|
SODIUM_LIBRARY_VERSION_MINOR = @SODIUM_LIBRARY_VERSION_MINOR@
|
300
304
|
STRIP = @STRIP@
|
301
305
|
TEST_LDFLAGS = @TEST_LDFLAGS@
|
306
|
+
VALGRIND = @VALGRIND@
|
307
|
+
VALGRIND_ENABLED = @VALGRIND_ENABLED@
|
308
|
+
VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
|
309
|
+
VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
|
310
|
+
VALGRIND_HAVE_TOOL_helgrind = @VALGRIND_HAVE_TOOL_helgrind@
|
311
|
+
VALGRIND_HAVE_TOOL_memcheck = @VALGRIND_HAVE_TOOL_memcheck@
|
302
312
|
VERSION = @VERSION@
|
303
313
|
abs_builddir = @abs_builddir@
|
304
314
|
abs_srcdir = @abs_srcdir@
|
@@ -358,13 +368,14 @@ SODIUM_EXPORT = sodium.h sodium/core.h sodium/crypto_aead_aes256gcm.h \
|
|
358
368
|
sodium/crypto_auth_hmacsha512.h \
|
359
369
|
sodium/crypto_auth_hmacsha512256.h sodium/crypto_box.h \
|
360
370
|
sodium/crypto_box_curve25519xsalsa20poly1305.h \
|
361
|
-
sodium/
|
362
|
-
sodium/
|
363
|
-
sodium/crypto_generichash.h \
|
371
|
+
sodium/crypto_core_hchacha20.h sodium/crypto_core_hsalsa20.h \
|
372
|
+
sodium/crypto_core_salsa20.h sodium/crypto_core_salsa2012.h \
|
373
|
+
sodium/crypto_core_salsa208.h sodium/crypto_generichash.h \
|
364
374
|
sodium/crypto_generichash_blake2b.h sodium/crypto_hash.h \
|
365
375
|
sodium/crypto_hash_sha256.h sodium/crypto_hash_sha512.h \
|
366
376
|
sodium/crypto_onetimeauth.h \
|
367
|
-
sodium/crypto_onetimeauth_poly1305.h \
|
377
|
+
sodium/crypto_onetimeauth_poly1305.h sodium/crypto_pwhash.h \
|
378
|
+
sodium/crypto_pwhash_argon2i.h \
|
368
379
|
sodium/crypto_pwhash_scryptsalsa208sha256.h \
|
369
380
|
sodium/crypto_scalarmult.h \
|
370
381
|
sodium/crypto_scalarmult_curve25519.h \
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#include "sodium/crypto_box.h"
|
13
13
|
#include "sodium/crypto_box_curve25519xsalsa20poly1305.h"
|
14
14
|
#include "sodium/crypto_core_hsalsa20.h"
|
15
|
+
#include "sodium/crypto_core_hchacha20.h"
|
15
16
|
#include "sodium/crypto_core_salsa20.h"
|
16
17
|
#include "sodium/crypto_core_salsa2012.h"
|
17
18
|
#include "sodium/crypto_core_salsa208.h"
|
@@ -22,6 +23,8 @@
|
|
22
23
|
#include "sodium/crypto_hash_sha512.h"
|
23
24
|
#include "sodium/crypto_onetimeauth.h"
|
24
25
|
#include "sodium/crypto_onetimeauth_poly1305.h"
|
26
|
+
#include "sodium/crypto_pwhash.h"
|
27
|
+
#include "sodium/crypto_pwhash_argon2i.h"
|
25
28
|
#include "sodium/crypto_pwhash_scryptsalsa208sha256.h"
|
26
29
|
#include "sodium/crypto_scalarmult.h"
|
27
30
|
#include "sodium/crypto_scalarmult_curve25519.h"
|
@@ -57,6 +57,32 @@ int crypto_aead_aes256gcm_decrypt(unsigned char *m,
|
|
57
57
|
const unsigned char *k)
|
58
58
|
__attribute__ ((warn_unused_result));
|
59
59
|
|
60
|
+
SODIUM_EXPORT
|
61
|
+
int crypto_aead_aes256gcm_encrypt_detached(unsigned char *c,
|
62
|
+
unsigned char *mac,
|
63
|
+
unsigned long long *maclen_p,
|
64
|
+
const unsigned char *m,
|
65
|
+
unsigned long long mlen,
|
66
|
+
const unsigned char *ad,
|
67
|
+
unsigned long long adlen,
|
68
|
+
const unsigned char *nsec,
|
69
|
+
const unsigned char *npub,
|
70
|
+
const unsigned char *k);
|
71
|
+
|
72
|
+
SODIUM_EXPORT
|
73
|
+
int crypto_aead_aes256gcm_decrypt_detached(unsigned char *m,
|
74
|
+
unsigned char *nsec,
|
75
|
+
const unsigned char *c,
|
76
|
+
unsigned long long clen,
|
77
|
+
const unsigned char *mac,
|
78
|
+
const unsigned char *ad,
|
79
|
+
unsigned long long adlen,
|
80
|
+
const unsigned char *npub,
|
81
|
+
const unsigned char *k)
|
82
|
+
__attribute__ ((warn_unused_result));
|
83
|
+
|
84
|
+
/* -- Precomputation interface -- */
|
85
|
+
|
60
86
|
SODIUM_EXPORT
|
61
87
|
int crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *ctx_,
|
62
88
|
const unsigned char *k);
|
@@ -84,6 +110,30 @@ int crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m,
|
|
84
110
|
const crypto_aead_aes256gcm_state *ctx_)
|
85
111
|
__attribute__ ((warn_unused_result));
|
86
112
|
|
113
|
+
SODIUM_EXPORT
|
114
|
+
int crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c,
|
115
|
+
unsigned char *mac,
|
116
|
+
unsigned long long *maclen_p,
|
117
|
+
const unsigned char *m,
|
118
|
+
unsigned long long mlen,
|
119
|
+
const unsigned char *ad,
|
120
|
+
unsigned long long adlen,
|
121
|
+
const unsigned char *nsec,
|
122
|
+
const unsigned char *npub,
|
123
|
+
const crypto_aead_aes256gcm_state *ctx_);
|
124
|
+
|
125
|
+
SODIUM_EXPORT
|
126
|
+
int crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m,
|
127
|
+
unsigned char *nsec,
|
128
|
+
const unsigned char *c,
|
129
|
+
unsigned long long clen,
|
130
|
+
const unsigned char *mac,
|
131
|
+
const unsigned char *ad,
|
132
|
+
unsigned long long adlen,
|
133
|
+
const unsigned char *npub,
|
134
|
+
const crypto_aead_aes256gcm_state *ctx_)
|
135
|
+
__attribute__ ((warn_unused_result));
|
136
|
+
|
87
137
|
#ifdef __cplusplus
|
88
138
|
}
|
89
139
|
#endif
|
@@ -11,6 +11,74 @@
|
|
11
11
|
extern "C" {
|
12
12
|
#endif
|
13
13
|
|
14
|
+
/* -- IETF ChaCha20-Poly1305 construction with a 96-bit nonce and a 32-bit internal counter -- */
|
15
|
+
|
16
|
+
#define crypto_aead_chacha20poly1305_ietf_KEYBYTES 32U
|
17
|
+
SODIUM_EXPORT
|
18
|
+
size_t crypto_aead_chacha20poly1305_ietf_keybytes(void);
|
19
|
+
|
20
|
+
#define crypto_aead_chacha20poly1305_ietf_NSECBYTES 0U
|
21
|
+
SODIUM_EXPORT
|
22
|
+
size_t crypto_aead_chacha20poly1305_ietf_nsecbytes(void);
|
23
|
+
|
24
|
+
#define crypto_aead_chacha20poly1305_ietf_NPUBBYTES 12U
|
25
|
+
|
26
|
+
SODIUM_EXPORT
|
27
|
+
size_t crypto_aead_chacha20poly1305_ietf_npubbytes(void);
|
28
|
+
|
29
|
+
#define crypto_aead_chacha20poly1305_ietf_ABYTES 16U
|
30
|
+
SODIUM_EXPORT
|
31
|
+
size_t crypto_aead_chacha20poly1305_ietf_abytes(void);
|
32
|
+
|
33
|
+
SODIUM_EXPORT
|
34
|
+
int crypto_aead_chacha20poly1305_ietf_encrypt(unsigned char *c,
|
35
|
+
unsigned long long *clen_p,
|
36
|
+
const unsigned char *m,
|
37
|
+
unsigned long long mlen,
|
38
|
+
const unsigned char *ad,
|
39
|
+
unsigned long long adlen,
|
40
|
+
const unsigned char *nsec,
|
41
|
+
const unsigned char *npub,
|
42
|
+
const unsigned char *k);
|
43
|
+
|
44
|
+
SODIUM_EXPORT
|
45
|
+
int crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *m,
|
46
|
+
unsigned long long *mlen_p,
|
47
|
+
unsigned char *nsec,
|
48
|
+
const unsigned char *c,
|
49
|
+
unsigned long long clen,
|
50
|
+
const unsigned char *ad,
|
51
|
+
unsigned long long adlen,
|
52
|
+
const unsigned char *npub,
|
53
|
+
const unsigned char *k)
|
54
|
+
__attribute__ ((warn_unused_result));
|
55
|
+
|
56
|
+
SODIUM_EXPORT
|
57
|
+
int crypto_aead_chacha20poly1305_ietf_encrypt_detached(unsigned char *c,
|
58
|
+
unsigned char *mac,
|
59
|
+
unsigned long long *maclen_p,
|
60
|
+
const unsigned char *m,
|
61
|
+
unsigned long long mlen,
|
62
|
+
const unsigned char *ad,
|
63
|
+
unsigned long long adlen,
|
64
|
+
const unsigned char *nsec,
|
65
|
+
const unsigned char *npub,
|
66
|
+
const unsigned char *k);
|
67
|
+
|
68
|
+
SODIUM_EXPORT
|
69
|
+
int crypto_aead_chacha20poly1305_ietf_decrypt_detached(unsigned char *m,
|
70
|
+
unsigned char *nsec,
|
71
|
+
const unsigned char *c,
|
72
|
+
unsigned long long clen,
|
73
|
+
const unsigned char *mac,
|
74
|
+
const unsigned char *ad,
|
75
|
+
unsigned long long adlen,
|
76
|
+
const unsigned char *npub,
|
77
|
+
const unsigned char *k)
|
78
|
+
__attribute__ ((warn_unused_result));
|
79
|
+
|
80
|
+
/* -- Original ChaCha20-Poly1305 construction with a 64-bit nonce and a 64-bit internal counter -- */
|
81
|
+
|
14
82
|
#define crypto_aead_chacha20poly1305_KEYBYTES 32U
|
15
83
|
SODIUM_EXPORT
|
16
84
|
size_t crypto_aead_chacha20poly1305_keybytes(void);
|
@@ -50,32 +118,36 @@ int crypto_aead_chacha20poly1305_decrypt(unsigned char *m,
|
|
50
118
|
const unsigned char *k)
|
51
119
|
__attribute__ ((warn_unused_result));
|
52
120
|
|
53
|
-
#define crypto_aead_chacha20poly1305_IETF_NPUBBYTES 12U
|
54
121
|
SODIUM_EXPORT
|
55
|
-
|
122
|
+
int crypto_aead_chacha20poly1305_encrypt_detached(unsigned char *c,
|
123
|
+
unsigned char *mac,
|
124
|
+
unsigned long long *maclen_p,
|
125
|
+
const unsigned char *m,
|
126
|
+
unsigned long long mlen,
|
127
|
+
const unsigned char *ad,
|
128
|
+
unsigned long long adlen,
|
129
|
+
const unsigned char *nsec,
|
130
|
+
const unsigned char *npub,
|
131
|
+
const unsigned char *k);
|
56
132
|
|
57
133
|
SODIUM_EXPORT
|
58
|
-
int
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
134
|
+
int crypto_aead_chacha20poly1305_decrypt_detached(unsigned char *m,
|
135
|
+
unsigned char *nsec,
|
136
|
+
const unsigned char *c,
|
137
|
+
unsigned long long clen,
|
138
|
+
const unsigned char *mac,
|
139
|
+
const unsigned char *ad,
|
140
|
+
unsigned long long adlen,
|
141
|
+
const unsigned char *npub,
|
142
|
+
const unsigned char *k)
|
143
|
+
__attribute__ ((warn_unused_result));
|
67
144
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
const unsigned char *ad,
|
75
|
-
unsigned long long adlen,
|
76
|
-
const unsigned char *npub,
|
77
|
-
const unsigned char *k)
|
78
|
-
__attribute__ ((warn_unused_result));
|
145
|
+
/* Aliases */
|
146
|
+
|
147
|
+
#define crypto_aead_chacha20poly1305_IETF_KEYBYTES crypto_aead_chacha20poly1305_ietf_KEYBYTES
|
148
|
+
#define crypto_aead_chacha20poly1305_IETF_NSECBYTES crypto_aead_chacha20poly1305_ietf_NSECBYTES
|
149
|
+
#define crypto_aead_chacha20poly1305_IETF_NPUBBYTES crypto_aead_chacha20poly1305_ietf_NPUBBYTES
|
150
|
+
#define crypto_aead_chacha20poly1305_IETF_ABYTES crypto_aead_chacha20poly1305_ietf_ABYTES
|
79
151
|
|
80
152
|
#ifdef __cplusplus
|
81
153
|
}
|