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
@@ -4,35 +4,20 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
+
#include <stdint.h>
|
8
|
+
#include <stdlib.h>
|
9
|
+
|
7
10
|
#include "crypto_core_salsa2012.h"
|
11
|
+
#include "../../sodium/common.h"
|
8
12
|
|
9
13
|
#define ROUNDS 12
|
14
|
+
#define U32C(v) (v##U)
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
static uint32 rotate(uint32 u,int c)
|
16
|
+
static uint32_t rotate(uint32_t u,int c)
|
14
17
|
{
|
15
18
|
return (u << c) | (u >> (32 - c));
|
16
19
|
}
|
17
20
|
|
18
|
-
static uint32 load_littleendian(const unsigned char *x)
|
19
|
-
{
|
20
|
-
return
|
21
|
-
(uint32) (x[0]) \
|
22
|
-
| (((uint32) (x[1])) << 8) \
|
23
|
-
| (((uint32) (x[2])) << 16) \
|
24
|
-
| (((uint32) (x[3])) << 24)
|
25
|
-
;
|
26
|
-
}
|
27
|
-
|
28
|
-
static void store_littleendian(unsigned char *x,uint32 u)
|
29
|
-
{
|
30
|
-
x[0] = u; u >>= 8;
|
31
|
-
x[1] = u; u >>= 8;
|
32
|
-
x[2] = u; u >>= 8;
|
33
|
-
x[3] = u;
|
34
|
-
}
|
35
|
-
|
36
21
|
int crypto_core_salsa2012(
|
37
22
|
unsigned char *out,
|
38
23
|
const unsigned char *in,
|
@@ -40,26 +25,33 @@ int crypto_core_salsa2012(
|
|
40
25
|
const unsigned char *c
|
41
26
|
)
|
42
27
|
{
|
43
|
-
|
44
|
-
|
28
|
+
uint32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
|
29
|
+
uint32_t j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
|
45
30
|
int i;
|
46
31
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
32
|
+
if (c == NULL) {
|
33
|
+
j0 = x0 = U32C(0x61707865);
|
34
|
+
j5 = x5 = U32C(0x3320646e);
|
35
|
+
j10 = x10 = U32C(0x79622d32);
|
36
|
+
j15 = x15 = U32C(0x6b206574);
|
37
|
+
} else {
|
38
|
+
j0 = x0 = LOAD32_LE(c + 0);
|
39
|
+
j5 = x5 = LOAD32_LE(c + 4);
|
40
|
+
j10 = x10 = LOAD32_LE(c + 8);
|
41
|
+
j15 = x15 = LOAD32_LE(c + 12);
|
42
|
+
}
|
43
|
+
j1 = x1 = LOAD32_LE(k + 0);
|
44
|
+
j2 = x2 = LOAD32_LE(k + 4);
|
45
|
+
j3 = x3 = LOAD32_LE(k + 8);
|
46
|
+
j4 = x4 = LOAD32_LE(k + 12);
|
47
|
+
j6 = x6 = LOAD32_LE(in + 0);
|
48
|
+
j7 = x7 = LOAD32_LE(in + 4);
|
49
|
+
j8 = x8 = LOAD32_LE(in + 8);
|
50
|
+
j9 = x9 = LOAD32_LE(in + 12);
|
51
|
+
j11 = x11 = LOAD32_LE(k + 16);
|
52
|
+
j12 = x12 = LOAD32_LE(k + 20);
|
53
|
+
j13 = x13 = LOAD32_LE(k + 24);
|
54
|
+
j14 = x14 = LOAD32_LE(k + 28);
|
63
55
|
|
64
56
|
for (i = ROUNDS;i > 0;i -= 2) {
|
65
57
|
x4 ^= rotate( x0+x12, 7);
|
@@ -113,22 +105,22 @@ int crypto_core_salsa2012(
|
|
113
105
|
x14 += j14;
|
114
106
|
x15 += j15;
|
115
107
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
108
|
+
STORE32_LE(out + 0,x0);
|
109
|
+
STORE32_LE(out + 4,x1);
|
110
|
+
STORE32_LE(out + 8,x2);
|
111
|
+
STORE32_LE(out + 12,x3);
|
112
|
+
STORE32_LE(out + 16,x4);
|
113
|
+
STORE32_LE(out + 20,x5);
|
114
|
+
STORE32_LE(out + 24,x6);
|
115
|
+
STORE32_LE(out + 28,x7);
|
116
|
+
STORE32_LE(out + 32,x8);
|
117
|
+
STORE32_LE(out + 36,x9);
|
118
|
+
STORE32_LE(out + 40,x10);
|
119
|
+
STORE32_LE(out + 44,x11);
|
120
|
+
STORE32_LE(out + 48,x12);
|
121
|
+
STORE32_LE(out + 52,x13);
|
122
|
+
STORE32_LE(out + 56,x14);
|
123
|
+
STORE32_LE(out + 60,x15);
|
132
124
|
|
133
125
|
return 0;
|
134
126
|
}
|
@@ -4,35 +4,20 @@ D. J. Bernstein
|
|
4
4
|
Public domain.
|
5
5
|
*/
|
6
6
|
|
7
|
+
#include <stdint.h>
|
8
|
+
#include <stdlib.h>
|
9
|
+
|
7
10
|
#include "crypto_core_salsa208.h"
|
11
|
+
#include "../../sodium/common.h"
|
8
12
|
|
9
13
|
#define ROUNDS 8
|
14
|
+
#define U32C(v) (v##U)
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
static uint32 rotate(uint32 u,int c)
|
16
|
+
static uint32_t rotate(uint32_t u,int c)
|
14
17
|
{
|
15
18
|
return (u << c) | (u >> (32 - c));
|
16
19
|
}
|
17
20
|
|
18
|
-
static uint32 load_littleendian(const unsigned char *x)
|
19
|
-
{
|
20
|
-
return
|
21
|
-
(uint32) (x[0]) \
|
22
|
-
| (((uint32) (x[1])) << 8) \
|
23
|
-
| (((uint32) (x[2])) << 16) \
|
24
|
-
| (((uint32) (x[3])) << 24)
|
25
|
-
;
|
26
|
-
}
|
27
|
-
|
28
|
-
static void store_littleendian(unsigned char *x,uint32 u)
|
29
|
-
{
|
30
|
-
x[0] = u; u >>= 8;
|
31
|
-
x[1] = u; u >>= 8;
|
32
|
-
x[2] = u; u >>= 8;
|
33
|
-
x[3] = u;
|
34
|
-
}
|
35
|
-
|
36
21
|
int crypto_core_salsa208(
|
37
22
|
unsigned char *out,
|
38
23
|
const unsigned char *in,
|
@@ -40,26 +25,33 @@ int crypto_core_salsa208(
|
|
40
25
|
const unsigned char *c
|
41
26
|
)
|
42
27
|
{
|
43
|
-
|
44
|
-
|
28
|
+
uint32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
|
29
|
+
uint32_t j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
|
45
30
|
int i;
|
46
31
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
32
|
+
if (c == NULL) {
|
33
|
+
j0 = x0 = U32C(0x61707865);
|
34
|
+
j5 = x5 = U32C(0x3320646e);
|
35
|
+
j10 = x10 = U32C(0x79622d32);
|
36
|
+
j15 = x15 = U32C(0x6b206574);
|
37
|
+
} else {
|
38
|
+
j0 = x0 = LOAD32_LE(c + 0);
|
39
|
+
j5 = x5 = LOAD32_LE(c + 4);
|
40
|
+
j10 = x10 = LOAD32_LE(c + 8);
|
41
|
+
j15 = x15 = LOAD32_LE(c + 12);
|
42
|
+
}
|
43
|
+
j1 = x1 = LOAD32_LE(k + 0);
|
44
|
+
j2 = x2 = LOAD32_LE(k + 4);
|
45
|
+
j3 = x3 = LOAD32_LE(k + 8);
|
46
|
+
j4 = x4 = LOAD32_LE(k + 12);
|
47
|
+
j6 = x6 = LOAD32_LE(in + 0);
|
48
|
+
j7 = x7 = LOAD32_LE(in + 4);
|
49
|
+
j8 = x8 = LOAD32_LE(in + 8);
|
50
|
+
j9 = x9 = LOAD32_LE(in + 12);
|
51
|
+
j11 = x11 = LOAD32_LE(k + 16);
|
52
|
+
j12 = x12 = LOAD32_LE(k + 20);
|
53
|
+
j13 = x13 = LOAD32_LE(k + 24);
|
54
|
+
j14 = x14 = LOAD32_LE(k + 28);
|
63
55
|
|
64
56
|
for (i = ROUNDS;i > 0;i -= 2) {
|
65
57
|
x4 ^= rotate( x0+x12, 7);
|
@@ -113,22 +105,22 @@ int crypto_core_salsa208(
|
|
113
105
|
x14 += j14;
|
114
106
|
x15 += j15;
|
115
107
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
108
|
+
STORE32_LE(out + 0,x0);
|
109
|
+
STORE32_LE(out + 4,x1);
|
110
|
+
STORE32_LE(out + 8,x2);
|
111
|
+
STORE32_LE(out + 12,x3);
|
112
|
+
STORE32_LE(out + 16,x4);
|
113
|
+
STORE32_LE(out + 20,x5);
|
114
|
+
STORE32_LE(out + 24,x6);
|
115
|
+
STORE32_LE(out + 28,x7);
|
116
|
+
STORE32_LE(out + 32,x8);
|
117
|
+
STORE32_LE(out + 36,x9);
|
118
|
+
STORE32_LE(out + 40,x10);
|
119
|
+
STORE32_LE(out + 44,x11);
|
120
|
+
STORE32_LE(out + 48,x12);
|
121
|
+
STORE32_LE(out + 52,x13);
|
122
|
+
STORE32_LE(out + 56,x14);
|
123
|
+
STORE32_LE(out + 60,x15);
|
132
124
|
|
133
125
|
return 0;
|
134
126
|
}
|
@@ -39,3 +39,10 @@ size_t
|
|
39
39
|
crypto_generichash_blake2b_personalbytes(void) {
|
40
40
|
return crypto_generichash_blake2b_PERSONALBYTES;
|
41
41
|
}
|
42
|
+
|
43
|
+
size_t
|
44
|
+
crypto_generichash_blake2b_statebytes(void)
|
45
|
+
{
|
46
|
+
return (sizeof(crypto_generichash_blake2b_state) + (size_t) 63U)
|
47
|
+
& ~(size_t) 63U;
|
48
|
+
}
|
@@ -19,95 +19,6 @@
|
|
19
19
|
|
20
20
|
#include "utils.h"
|
21
21
|
|
22
|
-
static inline uint32_t load32( const void *src )
|
23
|
-
{
|
24
|
-
#ifdef NATIVE_LITTLE_ENDIAN
|
25
|
-
uint32_t w;
|
26
|
-
memcpy(&w, src, sizeof w);
|
27
|
-
return w;
|
28
|
-
#else
|
29
|
-
const uint8_t *p = ( const uint8_t * )src;
|
30
|
-
uint32_t w = *p++;
|
31
|
-
w |= ( uint32_t )( *p++ ) << 8;
|
32
|
-
w |= ( uint32_t )( *p++ ) << 16;
|
33
|
-
w |= ( uint32_t )( *p++ ) << 24;
|
34
|
-
return w;
|
35
|
-
#endif
|
36
|
-
}
|
37
|
-
|
38
|
-
static inline uint64_t load64( const void *src )
|
39
|
-
{
|
40
|
-
#ifdef NATIVE_LITTLE_ENDIAN
|
41
|
-
uint64_t w;
|
42
|
-
memcpy(&w, src, sizeof w);
|
43
|
-
return w;
|
44
|
-
#else
|
45
|
-
const uint8_t *p = ( const uint8_t * )src;
|
46
|
-
uint64_t w = *p++;
|
47
|
-
w |= ( uint64_t )( *p++ ) << 8;
|
48
|
-
w |= ( uint64_t )( *p++ ) << 16;
|
49
|
-
w |= ( uint64_t )( *p++ ) << 24;
|
50
|
-
w |= ( uint64_t )( *p++ ) << 32;
|
51
|
-
w |= ( uint64_t )( *p++ ) << 40;
|
52
|
-
w |= ( uint64_t )( *p++ ) << 48;
|
53
|
-
w |= ( uint64_t )( *p++ ) << 56;
|
54
|
-
return w;
|
55
|
-
#endif
|
56
|
-
}
|
57
|
-
|
58
|
-
static inline void store32( void *dst, uint32_t w )
|
59
|
-
{
|
60
|
-
#ifdef NATIVE_LITTLE_ENDIAN
|
61
|
-
memcpy(dst, &w, sizeof w);
|
62
|
-
#else
|
63
|
-
uint8_t *p = ( uint8_t * )dst;
|
64
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
65
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
66
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
67
|
-
*p++ = ( uint8_t )w;
|
68
|
-
#endif
|
69
|
-
}
|
70
|
-
|
71
|
-
static inline void store64( void *dst, uint64_t w )
|
72
|
-
{
|
73
|
-
#ifdef NATIVE_LITTLE_ENDIAN
|
74
|
-
memcpy(dst, &w, sizeof w);
|
75
|
-
#else
|
76
|
-
uint8_t *p = ( uint8_t * )dst;
|
77
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
78
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
79
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
80
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
81
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
82
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
83
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
84
|
-
*p++ = ( uint8_t )w;
|
85
|
-
#endif
|
86
|
-
}
|
87
|
-
|
88
|
-
static inline uint64_t load48( const void *src )
|
89
|
-
{
|
90
|
-
const uint8_t *p = ( const uint8_t * )src;
|
91
|
-
uint64_t w = *p++;
|
92
|
-
w |= ( uint64_t )( *p++ ) << 8;
|
93
|
-
w |= ( uint64_t )( *p++ ) << 16;
|
94
|
-
w |= ( uint64_t )( *p++ ) << 24;
|
95
|
-
w |= ( uint64_t )( *p++ ) << 32;
|
96
|
-
w |= ( uint64_t )( *p++ ) << 40;
|
97
|
-
return w;
|
98
|
-
}
|
99
|
-
|
100
|
-
static inline void store48( void *dst, uint64_t w )
|
101
|
-
{
|
102
|
-
uint8_t *p = ( uint8_t * )dst;
|
103
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
104
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
105
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
106
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
107
|
-
*p++ = ( uint8_t )w; w >>= 8;
|
108
|
-
*p++ = ( uint8_t )w;
|
109
|
-
}
|
110
|
-
|
111
22
|
static inline uint32_t rotl32( const uint32_t w, const unsigned c )
|
112
23
|
{
|
113
24
|
return ( w << c ) | ( w >> ( 32 - c ) );
|
@@ -7,9 +7,12 @@
|
|
7
7
|
and related and neighboring rights to this software to the public domain
|
8
8
|
worldwide. This software is distributed without any warranty.
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
All code is triple-licensed under the
|
11
|
+
[CC0](http://creativecommons.org/publicdomain/zero/1.0), the
|
12
|
+
[OpenSSL Licence](https://www.openssl.org/source/license.html), or
|
13
|
+
the [Apache Public License 2.0](http://www.apache.org/licenses/LICENSE-2.0),
|
14
|
+
at your choosing.
|
15
|
+
*/
|
13
16
|
|
14
17
|
#ifndef blake2_H
|
15
18
|
#define blake2_H
|
@@ -31,27 +34,14 @@
|
|
31
34
|
#define blake2b_salt_personal crypto_generichash_blake2b__blake2b_salt_personal
|
32
35
|
#define blake2b_pick_best_implementation crypto_generichash_blake2b__pick_best_implementation
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
BLAKE2S_KEYBYTES = 32,
|
43
|
-
BLAKE2S_SALTBYTES = 8,
|
44
|
-
BLAKE2S_PERSONALBYTES = 8
|
45
|
-
};
|
46
|
-
|
47
|
-
enum blake2b_constant
|
48
|
-
{
|
49
|
-
BLAKE2B_BLOCKBYTES = 128,
|
50
|
-
BLAKE2B_OUTBYTES = 64,
|
51
|
-
BLAKE2B_KEYBYTES = 64,
|
52
|
-
BLAKE2B_SALTBYTES = 16,
|
53
|
-
BLAKE2B_PERSONALBYTES = 16
|
54
|
-
};
|
37
|
+
enum blake2b_constant
|
38
|
+
{
|
39
|
+
BLAKE2B_BLOCKBYTES = 128,
|
40
|
+
BLAKE2B_OUTBYTES = 64,
|
41
|
+
BLAKE2B_KEYBYTES = 64,
|
42
|
+
BLAKE2B_SALTBYTES = 16,
|
43
|
+
BLAKE2B_PERSONALBYTES = 16
|
44
|
+
};
|
55
45
|
|
56
46
|
#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
57
47
|
# pragma pack(1)
|
@@ -59,75 +49,22 @@ extern "C" {
|
|
59
49
|
# pragma pack(push, 1)
|
60
50
|
#endif
|
61
51
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
CRYPTO_ALIGN( 64 ) typedef struct blake2s_state_
|
78
|
-
{
|
79
|
-
uint32_t h[8];
|
80
|
-
uint32_t t[2];
|
81
|
-
uint32_t f[2];
|
82
|
-
uint8_t buf[2 * BLAKE2S_BLOCKBYTES];
|
83
|
-
size_t buflen;
|
84
|
-
uint8_t last_node;
|
85
|
-
} blake2s_state ;
|
86
|
-
|
87
|
-
typedef struct blake2b_param_
|
88
|
-
{
|
89
|
-
uint8_t digest_length; // 1
|
90
|
-
uint8_t key_length; // 2
|
91
|
-
uint8_t fanout; // 3
|
92
|
-
uint8_t depth; // 4
|
93
|
-
uint32_t leaf_length; // 8
|
94
|
-
uint64_t node_offset; // 16
|
95
|
-
uint8_t node_depth; // 17
|
96
|
-
uint8_t inner_length; // 18
|
97
|
-
uint8_t reserved[14]; // 32
|
98
|
-
uint8_t salt[BLAKE2B_SALTBYTES]; // 48
|
99
|
-
uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64
|
100
|
-
} blake2b_param;
|
101
|
-
|
102
|
-
#ifndef DEFINE_BLAKE2B_STATE
|
103
|
-
typedef crypto_generichash_blake2b_state blake2b_state;
|
104
|
-
#else
|
105
|
-
CRYPTO_ALIGN( 64 ) typedef struct blake2b_state_
|
106
|
-
{
|
107
|
-
uint64_t h[8];
|
108
|
-
uint64_t t[2];
|
109
|
-
uint64_t f[2];
|
110
|
-
uint8_t buf[2 * BLAKE2B_BLOCKBYTES];
|
111
|
-
size_t buflen;
|
112
|
-
uint8_t last_node;
|
113
|
-
} blake2b_state;
|
114
|
-
#endif
|
52
|
+
typedef struct blake2b_param_
|
53
|
+
{
|
54
|
+
uint8_t digest_length; /* 1 */
|
55
|
+
uint8_t key_length; /* 2 */
|
56
|
+
uint8_t fanout; /* 3 */
|
57
|
+
uint8_t depth; /* 4 */
|
58
|
+
uint8_t leaf_length[4]; /* 8 */
|
59
|
+
uint8_t node_offset[8]; /* 16 */
|
60
|
+
uint8_t node_depth; /* 17 */
|
61
|
+
uint8_t inner_length; /* 18 */
|
62
|
+
uint8_t reserved[14]; /* 32 */
|
63
|
+
uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */
|
64
|
+
uint8_t personal[BLAKE2B_PERSONALBYTES]; /* 64 */
|
65
|
+
} blake2b_param;
|
115
66
|
|
116
|
-
|
117
|
-
{
|
118
|
-
blake2s_state S[8][1];
|
119
|
-
blake2s_state R[1];
|
120
|
-
uint8_t buf[8 * BLAKE2S_BLOCKBYTES];
|
121
|
-
size_t buflen;
|
122
|
-
} blake2sp_state;
|
123
|
-
|
124
|
-
typedef struct blake2bp_state_
|
125
|
-
{
|
126
|
-
blake2b_state S[4][1];
|
127
|
-
blake2b_state R[1];
|
128
|
-
uint8_t buf[4 * BLAKE2B_BLOCKBYTES];
|
129
|
-
size_t buflen;
|
130
|
-
} blake2bp_state;
|
67
|
+
typedef crypto_generichash_blake2b_state blake2b_state;
|
131
68
|
|
132
69
|
#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
133
70
|
# pragma pack()
|
@@ -135,54 +72,26 @@ CRYPTO_ALIGN( 64 ) typedef struct blake2b_state_
|
|
135
72
|
# pragma pack(pop)
|
136
73
|
#endif
|
137
74
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
int blake2bp_init( blake2bp_state *S, const uint8_t outlen );
|
161
|
-
int blake2bp_init_key( blake2bp_state *S, const uint8_t outlen, const void *key, const uint8_t keylen );
|
162
|
-
int blake2bp_update( blake2bp_state *S, const uint8_t *in, uint64_t inlen );
|
163
|
-
int blake2bp_final( blake2bp_state *S, uint8_t *out, uint8_t outlen );
|
164
|
-
|
165
|
-
// Simple API
|
166
|
-
int blake2s( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen );
|
167
|
-
int blake2b( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen );
|
168
|
-
int blake2b_salt_personal( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen, const void *salt, const void *personal );
|
169
|
-
|
170
|
-
int blake2sp( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen );
|
171
|
-
int blake2bp( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen );
|
172
|
-
|
173
|
-
static inline int blake2( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen )
|
174
|
-
{
|
175
|
-
return blake2b( out, in, key, outlen, inlen, keylen );
|
176
|
-
}
|
177
|
-
|
178
|
-
typedef int ( *blake2b_compress_fn )( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
179
|
-
int blake2b_pick_best_implementation(void);
|
180
|
-
int blake2b_compress_ref( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
181
|
-
int blake2b_compress_ssse3( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
182
|
-
int blake2b_compress_sse41( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
183
|
-
|
184
|
-
#if defined(__cplusplus)
|
185
|
-
}
|
186
|
-
#endif
|
75
|
+
/* Streaming API */
|
76
|
+
int blake2b_init( blake2b_state *S, const uint8_t outlen );
|
77
|
+
int blake2b_init_salt_personal( blake2b_state *S, const uint8_t outlen,
|
78
|
+
const void *personal, const void *salt );
|
79
|
+
int blake2b_init_key( blake2b_state *S, const uint8_t outlen, const void *key, const uint8_t keylen );
|
80
|
+
int blake2b_init_key_salt_personal( blake2b_state *S, const uint8_t outlen, const void *key, const uint8_t keylen,
|
81
|
+
const void *salt, const void *personal );
|
82
|
+
int blake2b_init_param( blake2b_state *S, const blake2b_param *P );
|
83
|
+
int blake2b_update( blake2b_state *S, const uint8_t *in, uint64_t inlen );
|
84
|
+
int blake2b_final( blake2b_state *S, uint8_t *out, uint8_t outlen );
|
85
|
+
|
86
|
+
/* Simple API */
|
87
|
+
int blake2b( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen );
|
88
|
+
int blake2b_salt_personal( uint8_t *out, const void *in, const void *key, const uint8_t outlen, const uint64_t inlen, uint8_t keylen, const void *salt, const void *personal );
|
89
|
+
|
90
|
+
typedef int ( *blake2b_compress_fn )( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
91
|
+
int blake2b_pick_best_implementation(void);
|
92
|
+
int blake2b_compress_ref( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
93
|
+
int blake2b_compress_ssse3( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
94
|
+
int blake2b_compress_sse41( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
95
|
+
int blake2b_compress_avx2( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] );
|
187
96
|
|
188
97
|
#endif
|