libsodium-1.0.19-stable.tar.gz

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4490 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-10-05 00:32:37 +00:00
parent d1e494b730
commit 424b9b5a2f
175 changed files with 10484 additions and 4227 deletions

View File

@ -204,6 +204,7 @@ CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAGS_AESNI = @CFLAGS_AESNI@
CFLAGS_ARMCRYPTO = @CFLAGS_ARMCRYPTO@
CFLAGS_AVX = @CFLAGS_AVX@
CFLAGS_AVX2 = @CFLAGS_AVX2@
CFLAGS_AVX512F = @CFLAGS_AVX512F@

View File

@ -2,8 +2,19 @@ lib_LTLIBRARIES = \
libsodium.la
libsodium_la_SOURCES = \
crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \
crypto_aead/aegis128l/aead_aegis128l.c \
crypto_aead/aegis128l/aegis128l_common.h \
crypto_aead/aegis128l/aegis128l_soft.c \
crypto_aead/aegis128l/aegis128l_soft.h \
crypto_aead/aegis128l/implementations.h \
crypto_aead/aegis256/aead_aegis256.c \
crypto_aead/aegis256/aegis256_common.h \
crypto_aead/aegis256/aegis256_soft.c \
crypto_aead/aegis256/aegis256_soft.h \
crypto_aead/aegis256/implementations.h \
crypto_aead/aes256gcm/aead_aes256gcm.c \
crypto_aead/chacha20poly1305/aead_chacha20poly1305.c \
crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c \
crypto_auth/crypto_auth.c \
crypto_auth/hmacsha256/auth_hmacsha256.c \
crypto_auth/hmacsha512/auth_hmacsha512.c \
@ -17,6 +28,7 @@ libsodium_la_SOURCES = \
crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c \
crypto_core/hsalsa20/core_hsalsa20.c \
crypto_core/salsa/ref/core_salsa_ref.c \
crypto_core/softaes/softaes.c \
crypto_generichash/crypto_generichash.c \
crypto_generichash/blake2b/generichash_blake2.c \
crypto_generichash/blake2b/ref/blake2.h \
@ -33,6 +45,8 @@ libsodium_la_SOURCES = \
crypto_hash/sha512/cp/hash_sha512_cp.c \
crypto_kdf/blake2b/kdf_blake2b.c \
crypto_kdf/crypto_kdf.c \
crypto_kdf/hkdf/kdf_hkdf_sha256.c \
crypto_kdf/hkdf/kdf_hkdf_sha512.c \
crypto_kx/crypto_kx.c \
crypto_onetimeauth/crypto_onetimeauth.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \
@ -81,13 +95,15 @@ libsodium_la_SOURCES = \
crypto_stream/salsa20/stream_salsa20.c \
crypto_stream/salsa20/stream_salsa20.h \
crypto_stream/xsalsa20/stream_xsalsa20.c \
crypto_verify/sodium/verify.c \
crypto_verify/verify.c \
include/sodium/private/asm_cet.h \
include/sodium/private/chacha20_ietf_ext.h \
include/sodium/private/common.h \
include/sodium/private/ed25519_ref10.h \
include/sodium/private/implementations.h \
include/sodium/private/mutex.h \
include/sodium/private/sse2_64_32.h \
include/sodium/private/softaes.h \
randombytes/randombytes.c \
sodium/codecs.c \
sodium/core.c \
@ -194,8 +210,8 @@ endif
SUBDIRS = \
include
libsodium_la_LIBADD = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
noinst_LTLIBRARIES = libaesni.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
libsodium_la_LIBADD = libaesni.la libarmcrypto.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
noinst_LTLIBRARIES = libaesni.la libarmcrypto.la libsse2.la libssse3.la libsse41.la libavx2.la libavx512f.la
librdrand_la_LDFLAGS = $(libsodium_la_LDFLAGS)
librdrand_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
@ -211,10 +227,24 @@ libsodium_la_SOURCES += \
randombytes/sysrandom/randombytes_sysrandom.c
endif
libarmcrypto_la_LDFLAGS = $(libsodium_la_LDFLAGS)
libarmcrypto_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
@CFLAGS_ARMCRYPTO@
libarmcrypto_la_SOURCES = \
crypto_aead/aegis128l/aegis128l_armcrypto.c \
crypto_aead/aegis128l/aegis128l_armcrypto.h \
crypto_aead/aegis256/aegis256_armcrypto.c \
crypto_aead/aegis256/aegis256_armcrypto.h \
crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c
libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS)
libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
@CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@
@CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AVX@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@
libaesni_la_SOURCES = \
crypto_aead/aegis128l/aegis128l_aesni.c \
crypto_aead/aegis128l/aegis128l_aesni.h \
crypto_aead/aegis256/aegis256_aesni.c \
crypto_aead/aegis256/aegis256_aesni.h \
crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
libsse2_la_LDFLAGS = $(libsodium_la_LDFLAGS)

View File

@ -219,7 +219,10 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(defexecdir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libaesni_la_LIBADD =
am__dirstamp = $(am__leading_dot)dirstamp
am_libaesni_la_OBJECTS = crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo
am_libaesni_la_OBJECTS = \
crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo \
crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo \
crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo
libaesni_la_OBJECTS = $(am_libaesni_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@ -228,6 +231,16 @@ am__v_lt_1 =
libaesni_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libaesni_la_LDFLAGS) $(LDFLAGS) -o $@
libarmcrypto_la_LIBADD =
am_libarmcrypto_la_OBJECTS = \
crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo \
crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo \
crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo
libarmcrypto_la_OBJECTS = $(am_libarmcrypto_la_OBJECTS)
libarmcrypto_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(libarmcrypto_la_LDFLAGS) $(LDFLAGS) \
-o $@
libavx2_la_LIBADD =
am_libavx2_la_OBJECTS = crypto_generichash/blake2b/ref/libavx2_la-blake2b-compress-avx2.lo \
crypto_pwhash/argon2/libavx2_la-argon2-fill-block-avx2.lo \
@ -250,11 +263,23 @@ librdrand_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(librdrand_la_LDFLAGS) $(LDFLAGS) -o $@
@EMSCRIPTEN_FALSE@am_librdrand_la_rpath =
libsodium_la_DEPENDENCIES = libaesni.la libsse2.la libssse3.la \
libsse41.la libavx2.la libavx512f.la $(am__append_8)
libsodium_la_DEPENDENCIES = libaesni.la libarmcrypto.la libsse2.la \
libssse3.la libsse41.la libavx2.la libavx512f.la \
$(am__append_8)
am__libsodium_la_SOURCES_DIST = \
crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \
crypto_aead/aegis128l/aead_aegis128l.c \
crypto_aead/aegis128l/aegis128l_common.h \
crypto_aead/aegis128l/aegis128l_soft.c \
crypto_aead/aegis128l/aegis128l_soft.h \
crypto_aead/aegis128l/implementations.h \
crypto_aead/aegis256/aead_aegis256.c \
crypto_aead/aegis256/aegis256_common.h \
crypto_aead/aegis256/aegis256_soft.c \
crypto_aead/aegis256/aegis256_soft.h \
crypto_aead/aegis256/implementations.h \
crypto_aead/aes256gcm/aead_aes256gcm.c \
crypto_aead/chacha20poly1305/aead_chacha20poly1305.c \
crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c \
crypto_auth/crypto_auth.c \
crypto_auth/hmacsha256/auth_hmacsha256.c \
crypto_auth/hmacsha512/auth_hmacsha512.c \
@ -267,6 +292,7 @@ am__libsodium_la_SOURCES_DIST = \
crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c \
crypto_core/hsalsa20/core_hsalsa20.c \
crypto_core/salsa/ref/core_salsa_ref.c \
crypto_core/softaes/softaes.c \
crypto_generichash/crypto_generichash.c \
crypto_generichash/blake2b/generichash_blake2.c \
crypto_generichash/blake2b/ref/blake2.h \
@ -281,7 +307,9 @@ am__libsodium_la_SOURCES_DIST = \
crypto_hash/sha512/hash_sha512.c \
crypto_hash/sha512/cp/hash_sha512_cp.c \
crypto_kdf/blake2b/kdf_blake2b.c crypto_kdf/crypto_kdf.c \
crypto_kx/crypto_kx.c crypto_onetimeauth/crypto_onetimeauth.c \
crypto_kdf/hkdf/kdf_hkdf_sha256.c \
crypto_kdf/hkdf/kdf_hkdf_sha512.c crypto_kx/crypto_kx.c \
crypto_onetimeauth/crypto_onetimeauth.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.h \
crypto_onetimeauth/poly1305/donna/poly1305_donna.h \
@ -326,13 +354,14 @@ am__libsodium_la_SOURCES_DIST = \
crypto_stream/salsa20/stream_salsa20.c \
crypto_stream/salsa20/stream_salsa20.h \
crypto_stream/xsalsa20/stream_xsalsa20.c \
crypto_verify/sodium/verify.c \
crypto_verify/verify.c include/sodium/private/asm_cet.h \
include/sodium/private/chacha20_ietf_ext.h \
include/sodium/private/common.h \
include/sodium/private/ed25519_ref10.h \
include/sodium/private/implementations.h \
include/sodium/private/mutex.h \
include/sodium/private/sse2_64_32.h randombytes/randombytes.c \
include/sodium/private/sse2_64_32.h \
include/sodium/private/softaes.h randombytes/randombytes.c \
sodium/codecs.c sodium/core.c sodium/runtime.c sodium/utils.c \
sodium/version.c crypto_core/ed25519/ref10/fe_51/base.h \
crypto_core/ed25519/ref10/fe_51/base2.h \
@ -412,8 +441,14 @@ am__objects_1 =
@MINIMAL_FALSE@ crypto_stream/salsa208/libsodium_la-stream_salsa208.lo \
@MINIMAL_FALSE@ crypto_stream/xchacha20/libsodium_la-stream_xchacha20.lo
@EMSCRIPTEN_FALSE@am__objects_6 = randombytes/sysrandom/libsodium_la-randombytes_sysrandom.lo
am_libsodium_la_OBJECTS = crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo \
crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo \
am_libsodium_la_OBJECTS = \
crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo \
crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo \
crypto_aead/aegis256/libsodium_la-aead_aegis256.lo \
crypto_aead/aegis256/libsodium_la-aegis256_soft.lo \
crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo \
crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo \
crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo \
crypto_auth/libsodium_la-crypto_auth.lo \
crypto_auth/hmacsha256/libsodium_la-auth_hmacsha256.lo \
crypto_auth/hmacsha512/libsodium_la-auth_hmacsha512.lo \
@ -427,6 +462,7 @@ am_libsodium_la_OBJECTS = crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_
crypto_core/hsalsa20/ref2/libsodium_la-core_hsalsa20_ref2.lo \
crypto_core/hsalsa20/libsodium_la-core_hsalsa20.lo \
crypto_core/salsa/ref/libsodium_la-core_salsa_ref.lo \
crypto_core/softaes/libsodium_la-softaes.lo \
crypto_generichash/libsodium_la-crypto_generichash.lo \
crypto_generichash/blake2b/libsodium_la-generichash_blake2.lo \
crypto_generichash/blake2b/ref/libsodium_la-blake2b-compress-ref.lo \
@ -439,6 +475,8 @@ am_libsodium_la_OBJECTS = crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_
crypto_hash/sha512/cp/libsodium_la-hash_sha512_cp.lo \
crypto_kdf/blake2b/libsodium_la-kdf_blake2b.lo \
crypto_kdf/libsodium_la-crypto_kdf.lo \
crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo \
crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo \
crypto_kx/libsodium_la-crypto_kx.lo \
crypto_onetimeauth/libsodium_la-crypto_onetimeauth.lo \
crypto_onetimeauth/poly1305/libsodium_la-onetimeauth_poly1305.lo \
@ -471,7 +509,7 @@ am_libsodium_la_OBJECTS = crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_
crypto_stream/libsodium_la-crypto_stream.lo \
crypto_stream/salsa20/libsodium_la-stream_salsa20.lo \
crypto_stream/xsalsa20/libsodium_la-stream_xsalsa20.lo \
crypto_verify/sodium/libsodium_la-verify.lo \
crypto_verify/libsodium_la-verify.lo \
randombytes/libsodium_la-randombytes.lo \
sodium/libsodium_la-codecs.lo sodium/libsodium_la-core.lo \
sodium/libsodium_la-runtime.lo sodium/libsodium_la-utils.lo \
@ -530,9 +568,19 @@ am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo \
crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo \
crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo \
am__depfiles_remade = crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Plo \
crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Plo \
crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Plo \
crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Plo \
crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Plo \
crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Plo \
crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Plo \
crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Plo \
crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Plo \
crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo \
crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Plo \
crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo \
crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo \
crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo \
crypto_auth/hmacsha256/$(DEPDIR)/libsodium_la-auth_hmacsha256.Plo \
crypto_auth/hmacsha512/$(DEPDIR)/libsodium_la-auth_hmacsha512.Plo \
@ -550,6 +598,7 @@ am__depfiles_remade = crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes
crypto_core/hsalsa20/$(DEPDIR)/libsodium_la-core_hsalsa20.Plo \
crypto_core/hsalsa20/ref2/$(DEPDIR)/libsodium_la-core_hsalsa20_ref2.Plo \
crypto_core/salsa/ref/$(DEPDIR)/libsodium_la-core_salsa_ref.Plo \
crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Plo \
crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Plo \
crypto_generichash/blake2b/$(DEPDIR)/libsodium_la-generichash_blake2.Plo \
crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Plo \
@ -565,6 +614,8 @@ am__depfiles_remade = crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes
crypto_hash/sha512/cp/$(DEPDIR)/libsodium_la-hash_sha512_cp.Plo \
crypto_kdf/$(DEPDIR)/libsodium_la-crypto_kdf.Plo \
crypto_kdf/blake2b/$(DEPDIR)/libsodium_la-kdf_blake2b.Plo \
crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Plo \
crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Plo \
crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Plo \
crypto_onetimeauth/$(DEPDIR)/libsodium_la-crypto_onetimeauth.Plo \
crypto_onetimeauth/poly1305/$(DEPDIR)/libsodium_la-onetimeauth_poly1305.Plo \
@ -629,7 +680,7 @@ am__depfiles_remade = crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes
crypto_stream/salsa208/ref/$(DEPDIR)/libsodium_la-stream_salsa208_ref.Plo \
crypto_stream/xchacha20/$(DEPDIR)/libsodium_la-stream_xchacha20.Plo \
crypto_stream/xsalsa20/$(DEPDIR)/libsodium_la-stream_xsalsa20.Plo \
crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Plo \
crypto_verify/$(DEPDIR)/libsodium_la-verify.Plo \
randombytes/$(DEPDIR)/libsodium_la-randombytes.Plo \
randombytes/internal/$(DEPDIR)/librdrand_la-randombytes_internal_random.Plo \
randombytes/sysrandom/$(DEPDIR)/libsodium_la-randombytes_sysrandom.Plo \
@ -667,13 +718,14 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libaesni_la_SOURCES) $(libavx2_la_SOURCES) \
$(libavx512f_la_SOURCES) $(librdrand_la_SOURCES) \
$(libsodium_la_SOURCES) $(libsse2_la_SOURCES) \
$(libsse41_la_SOURCES) $(libssse3_la_SOURCES)
DIST_SOURCES = $(libaesni_la_SOURCES) $(libavx2_la_SOURCES) \
$(libavx512f_la_SOURCES) $(librdrand_la_SOURCES) \
$(am__libsodium_la_SOURCES_DIST) \
SOURCES = $(libaesni_la_SOURCES) $(libarmcrypto_la_SOURCES) \
$(libavx2_la_SOURCES) $(libavx512f_la_SOURCES) \
$(librdrand_la_SOURCES) $(libsodium_la_SOURCES) \
$(libsse2_la_SOURCES) $(libsse41_la_SOURCES) \
$(libssse3_la_SOURCES)
DIST_SOURCES = $(libaesni_la_SOURCES) $(libarmcrypto_la_SOURCES) \
$(libavx2_la_SOURCES) $(libavx512f_la_SOURCES) \
$(librdrand_la_SOURCES) $(am__libsodium_la_SOURCES_DIST) \
$(am__libsse2_la_SOURCES_DIST) $(libsse41_la_SOURCES) \
$(libssse3_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
@ -761,6 +813,7 @@ CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAGS_AESNI = @CFLAGS_AESNI@
CFLAGS_ARMCRYPTO = @CFLAGS_ARMCRYPTO@
CFLAGS_AVX = @CFLAGS_AVX@
CFLAGS_AVX2 = @CFLAGS_AVX2@
CFLAGS_AVX512F = @CFLAGS_AVX512F@
@ -916,9 +969,19 @@ valgrind_tools = @valgrind_tools@
lib_LTLIBRARIES = \
libsodium.la
libsodium_la_SOURCES = \
crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \
libsodium_la_SOURCES = crypto_aead/aegis128l/aead_aegis128l.c \
crypto_aead/aegis128l/aegis128l_common.h \
crypto_aead/aegis128l/aegis128l_soft.c \
crypto_aead/aegis128l/aegis128l_soft.h \
crypto_aead/aegis128l/implementations.h \
crypto_aead/aegis256/aead_aegis256.c \
crypto_aead/aegis256/aegis256_common.h \
crypto_aead/aegis256/aegis256_soft.c \
crypto_aead/aegis256/aegis256_soft.h \
crypto_aead/aegis256/implementations.h \
crypto_aead/aes256gcm/aead_aes256gcm.c \
crypto_aead/chacha20poly1305/aead_chacha20poly1305.c \
crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c \
crypto_auth/crypto_auth.c \
crypto_auth/hmacsha256/auth_hmacsha256.c \
crypto_auth/hmacsha512/auth_hmacsha512.c \
@ -931,6 +994,7 @@ libsodium_la_SOURCES = \
crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c \
crypto_core/hsalsa20/core_hsalsa20.c \
crypto_core/salsa/ref/core_salsa_ref.c \
crypto_core/softaes/softaes.c \
crypto_generichash/crypto_generichash.c \
crypto_generichash/blake2b/generichash_blake2.c \
crypto_generichash/blake2b/ref/blake2.h \
@ -945,7 +1009,9 @@ libsodium_la_SOURCES = \
crypto_hash/sha512/hash_sha512.c \
crypto_hash/sha512/cp/hash_sha512_cp.c \
crypto_kdf/blake2b/kdf_blake2b.c crypto_kdf/crypto_kdf.c \
crypto_kx/crypto_kx.c crypto_onetimeauth/crypto_onetimeauth.c \
crypto_kdf/hkdf/kdf_hkdf_sha256.c \
crypto_kdf/hkdf/kdf_hkdf_sha512.c crypto_kx/crypto_kx.c \
crypto_onetimeauth/crypto_onetimeauth.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \
crypto_onetimeauth/poly1305/onetimeauth_poly1305.h \
crypto_onetimeauth/poly1305/donna/poly1305_donna.h \
@ -990,13 +1056,14 @@ libsodium_la_SOURCES = \
crypto_stream/salsa20/stream_salsa20.c \
crypto_stream/salsa20/stream_salsa20.h \
crypto_stream/xsalsa20/stream_xsalsa20.c \
crypto_verify/sodium/verify.c \
crypto_verify/verify.c include/sodium/private/asm_cet.h \
include/sodium/private/chacha20_ietf_ext.h \
include/sodium/private/common.h \
include/sodium/private/ed25519_ref10.h \
include/sodium/private/implementations.h \
include/sodium/private/mutex.h \
include/sodium/private/sse2_64_32.h randombytes/randombytes.c \
include/sodium/private/sse2_64_32.h \
include/sodium/private/softaes.h randombytes/randombytes.c \
sodium/codecs.c sodium/core.c sodium/runtime.c sodium/utils.c \
sodium/version.c $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4) $(am__append_5) \
@ -1022,10 +1089,12 @@ libsodium_la_CPPFLAGS = \
SUBDIRS = \
include
libsodium_la_LIBADD = libaesni.la libsse2.la libssse3.la libsse41.la \
libavx2.la libavx512f.la $(am__append_8)
noinst_LTLIBRARIES = libaesni.la libsse2.la libssse3.la libsse41.la \
libavx2.la libavx512f.la $(am__append_9)
libsodium_la_LIBADD = libaesni.la libarmcrypto.la libsse2.la \
libssse3.la libsse41.la libavx2.la libavx512f.la \
$(am__append_8)
noinst_LTLIBRARIES = libaesni.la libarmcrypto.la libsse2.la \
libssse3.la libsse41.la libavx2.la libavx512f.la \
$(am__append_9)
librdrand_la_LDFLAGS = $(libsodium_la_LDFLAGS)
librdrand_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
@CFLAGS_RDRAND@
@ -1033,11 +1102,26 @@ librdrand_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
librdrand_la_SOURCES = \
randombytes/internal/randombytes_internal_random.c
libarmcrypto_la_LDFLAGS = $(libsodium_la_LDFLAGS)
libarmcrypto_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
@CFLAGS_ARMCRYPTO@
libarmcrypto_la_SOURCES = \
crypto_aead/aegis128l/aegis128l_armcrypto.c \
crypto_aead/aegis128l/aegis128l_armcrypto.h \
crypto_aead/aegis256/aegis256_armcrypto.c \
crypto_aead/aegis256/aegis256_armcrypto.h \
crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c
libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS)
libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \
@CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@
@CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AVX@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@
libaesni_la_SOURCES = \
crypto_aead/aegis128l/aegis128l_aesni.c \
crypto_aead/aegis128l/aegis128l_aesni.h \
crypto_aead/aegis256/aegis256_aesni.c \
crypto_aead/aegis256/aegis256_aesni.h \
crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
libsse2_la_LDFLAGS = $(libsodium_la_LDFLAGS)
@ -1176,6 +1260,24 @@ clean-noinstLTLIBRARIES:
echo rm -f $${locs}; \
rm -f $${locs}; \
}
crypto_aead/aegis128l/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aegis128l
@: > crypto_aead/aegis128l/$(am__dirstamp)
crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aegis128l/$(DEPDIR)
@: > crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo: \
crypto_aead/aegis128l/$(am__dirstamp) \
crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis256/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aegis256
@: > crypto_aead/aegis256/$(am__dirstamp)
crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aegis256/$(DEPDIR)
@: > crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo: \
crypto_aead/aegis256/$(am__dirstamp) \
crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aes256gcm/aesni/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aes256gcm/aesni
@: > crypto_aead/aes256gcm/aesni/$(am__dirstamp)
@ -1188,6 +1290,24 @@ crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo: \
libaesni.la: $(libaesni_la_OBJECTS) $(libaesni_la_DEPENDENCIES) $(EXTRA_libaesni_la_DEPENDENCIES)
$(AM_V_CCLD)$(libaesni_la_LINK) $(libaesni_la_OBJECTS) $(libaesni_la_LIBADD) $(LIBS)
crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo: \
crypto_aead/aegis128l/$(am__dirstamp) \
crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo: \
crypto_aead/aegis256/$(am__dirstamp) \
crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aes256gcm/armcrypto/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aes256gcm/armcrypto
@: > crypto_aead/aes256gcm/armcrypto/$(am__dirstamp)
crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aes256gcm/armcrypto/$(DEPDIR)
@: > crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo: \
crypto_aead/aes256gcm/armcrypto/$(am__dirstamp) \
crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/$(am__dirstamp)
libarmcrypto.la: $(libarmcrypto_la_OBJECTS) $(libarmcrypto_la_DEPENDENCIES) $(EXTRA_libarmcrypto_la_DEPENDENCIES)
$(AM_V_CCLD)$(libarmcrypto_la_LINK) $(libarmcrypto_la_OBJECTS) $(libarmcrypto_la_LIBADD) $(LIBS)
crypto_generichash/blake2b/ref/$(am__dirstamp):
@$(MKDIR_P) crypto_generichash/blake2b/ref
@: > crypto_generichash/blake2b/ref/$(am__dirstamp)
@ -1245,24 +1365,45 @@ randombytes/internal/librdrand_la-randombytes_internal_random.lo: \
librdrand.la: $(librdrand_la_OBJECTS) $(librdrand_la_DEPENDENCIES) $(EXTRA_librdrand_la_DEPENDENCIES)
$(AM_V_CCLD)$(librdrand_la_LINK) $(am_librdrand_la_rpath) $(librdrand_la_OBJECTS) $(librdrand_la_LIBADD) $(LIBS)
crypto_aead/chacha20poly1305/sodium/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/chacha20poly1305/sodium
@: > crypto_aead/chacha20poly1305/sodium/$(am__dirstamp)
crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/chacha20poly1305/sodium/$(DEPDIR)
@: > crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp)
crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo: \
crypto_aead/chacha20poly1305/sodium/$(am__dirstamp) \
crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp)
crypto_aead/xchacha20poly1305/sodium/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/xchacha20poly1305/sodium
@: > crypto_aead/xchacha20poly1305/sodium/$(am__dirstamp)
crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)
@: > crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp)
crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo: \
crypto_aead/xchacha20poly1305/sodium/$(am__dirstamp) \
crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo: \
crypto_aead/aegis128l/$(am__dirstamp) \
crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo: \
crypto_aead/aegis128l/$(am__dirstamp) \
crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis256/libsodium_la-aead_aegis256.lo: \
crypto_aead/aegis256/$(am__dirstamp) \
crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aegis256/libsodium_la-aegis256_soft.lo: \
crypto_aead/aegis256/$(am__dirstamp) \
crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aes256gcm/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aes256gcm
@: > crypto_aead/aes256gcm/$(am__dirstamp)
crypto_aead/aes256gcm/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/aes256gcm/$(DEPDIR)
@: > crypto_aead/aes256gcm/$(DEPDIR)/$(am__dirstamp)
crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo: \
crypto_aead/aes256gcm/$(am__dirstamp) \
crypto_aead/aes256gcm/$(DEPDIR)/$(am__dirstamp)
crypto_aead/chacha20poly1305/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/chacha20poly1305
@: > crypto_aead/chacha20poly1305/$(am__dirstamp)
crypto_aead/chacha20poly1305/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/chacha20poly1305/$(DEPDIR)
@: > crypto_aead/chacha20poly1305/$(DEPDIR)/$(am__dirstamp)
crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo: \
crypto_aead/chacha20poly1305/$(am__dirstamp) \
crypto_aead/chacha20poly1305/$(DEPDIR)/$(am__dirstamp)
crypto_aead/xchacha20poly1305/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/xchacha20poly1305
@: > crypto_aead/xchacha20poly1305/$(am__dirstamp)
crypto_aead/xchacha20poly1305/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_aead/xchacha20poly1305/$(DEPDIR)
@: > crypto_aead/xchacha20poly1305/$(DEPDIR)/$(am__dirstamp)
crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo: \
crypto_aead/xchacha20poly1305/$(am__dirstamp) \
crypto_aead/xchacha20poly1305/$(DEPDIR)/$(am__dirstamp)
crypto_auth/$(am__dirstamp):
@$(MKDIR_P) crypto_auth
@: > crypto_auth/$(am__dirstamp)
@ -1366,6 +1507,15 @@ crypto_core/salsa/ref/$(DEPDIR)/$(am__dirstamp):
crypto_core/salsa/ref/libsodium_la-core_salsa_ref.lo: \
crypto_core/salsa/ref/$(am__dirstamp) \
crypto_core/salsa/ref/$(DEPDIR)/$(am__dirstamp)
crypto_core/softaes/$(am__dirstamp):
@$(MKDIR_P) crypto_core/softaes
@: > crypto_core/softaes/$(am__dirstamp)
crypto_core/softaes/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_core/softaes/$(DEPDIR)
@: > crypto_core/softaes/$(DEPDIR)/$(am__dirstamp)
crypto_core/softaes/libsodium_la-softaes.lo: \
crypto_core/softaes/$(am__dirstamp) \
crypto_core/softaes/$(DEPDIR)/$(am__dirstamp)
crypto_generichash/$(am__dirstamp):
@$(MKDIR_P) crypto_generichash
@: > crypto_generichash/$(am__dirstamp)
@ -1454,6 +1604,18 @@ crypto_kdf/$(DEPDIR)/$(am__dirstamp):
@: > crypto_kdf/$(DEPDIR)/$(am__dirstamp)
crypto_kdf/libsodium_la-crypto_kdf.lo: crypto_kdf/$(am__dirstamp) \
crypto_kdf/$(DEPDIR)/$(am__dirstamp)
crypto_kdf/hkdf/$(am__dirstamp):
@$(MKDIR_P) crypto_kdf/hkdf
@: > crypto_kdf/hkdf/$(am__dirstamp)
crypto_kdf/hkdf/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_kdf/hkdf/$(DEPDIR)
@: > crypto_kdf/hkdf/$(DEPDIR)/$(am__dirstamp)
crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo: \
crypto_kdf/hkdf/$(am__dirstamp) \
crypto_kdf/hkdf/$(DEPDIR)/$(am__dirstamp)
crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo: \
crypto_kdf/hkdf/$(am__dirstamp) \
crypto_kdf/hkdf/$(DEPDIR)/$(am__dirstamp)
crypto_kx/$(am__dirstamp):
@$(MKDIR_P) crypto_kx
@: > crypto_kx/$(am__dirstamp)
@ -1680,15 +1842,14 @@ crypto_stream/xsalsa20/$(DEPDIR)/$(am__dirstamp):
crypto_stream/xsalsa20/libsodium_la-stream_xsalsa20.lo: \
crypto_stream/xsalsa20/$(am__dirstamp) \
crypto_stream/xsalsa20/$(DEPDIR)/$(am__dirstamp)
crypto_verify/sodium/$(am__dirstamp):
@$(MKDIR_P) crypto_verify/sodium
@: > crypto_verify/sodium/$(am__dirstamp)
crypto_verify/sodium/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_verify/sodium/$(DEPDIR)
@: > crypto_verify/sodium/$(DEPDIR)/$(am__dirstamp)
crypto_verify/sodium/libsodium_la-verify.lo: \
crypto_verify/sodium/$(am__dirstamp) \
crypto_verify/sodium/$(DEPDIR)/$(am__dirstamp)
crypto_verify/$(am__dirstamp):
@$(MKDIR_P) crypto_verify
@: > crypto_verify/$(am__dirstamp)
crypto_verify/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) crypto_verify/$(DEPDIR)
@: > crypto_verify/$(DEPDIR)/$(am__dirstamp)
crypto_verify/libsodium_la-verify.lo: crypto_verify/$(am__dirstamp) \
crypto_verify/$(DEPDIR)/$(am__dirstamp)
randombytes/$(am__dirstamp):
@$(MKDIR_P) randombytes
@: > randombytes/$(am__dirstamp)
@ -1941,12 +2102,20 @@ libssse3.la: $(libssse3_la_OBJECTS) $(libssse3_la_DEPENDENCIES) $(EXTRA_libssse3
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f crypto_aead/aegis128l/*.$(OBJEXT)
-rm -f crypto_aead/aegis128l/*.lo
-rm -f crypto_aead/aegis256/*.$(OBJEXT)
-rm -f crypto_aead/aegis256/*.lo
-rm -f crypto_aead/aes256gcm/*.$(OBJEXT)
-rm -f crypto_aead/aes256gcm/*.lo
-rm -f crypto_aead/aes256gcm/aesni/*.$(OBJEXT)
-rm -f crypto_aead/aes256gcm/aesni/*.lo
-rm -f crypto_aead/chacha20poly1305/sodium/*.$(OBJEXT)
-rm -f crypto_aead/chacha20poly1305/sodium/*.lo
-rm -f crypto_aead/xchacha20poly1305/sodium/*.$(OBJEXT)
-rm -f crypto_aead/xchacha20poly1305/sodium/*.lo
-rm -f crypto_aead/aes256gcm/armcrypto/*.$(OBJEXT)
-rm -f crypto_aead/aes256gcm/armcrypto/*.lo
-rm -f crypto_aead/chacha20poly1305/*.$(OBJEXT)
-rm -f crypto_aead/chacha20poly1305/*.lo
-rm -f crypto_aead/xchacha20poly1305/*.$(OBJEXT)
-rm -f crypto_aead/xchacha20poly1305/*.lo
-rm -f crypto_auth/*.$(OBJEXT)
-rm -f crypto_auth/*.lo
-rm -f crypto_auth/hmacsha256/*.$(OBJEXT)
@ -1973,6 +2142,8 @@ mostlyclean-compile:
-rm -f crypto_core/hsalsa20/ref2/*.lo
-rm -f crypto_core/salsa/ref/*.$(OBJEXT)
-rm -f crypto_core/salsa/ref/*.lo
-rm -f crypto_core/softaes/*.$(OBJEXT)
-rm -f crypto_core/softaes/*.lo
-rm -f crypto_generichash/*.$(OBJEXT)
-rm -f crypto_generichash/*.lo
-rm -f crypto_generichash/blake2b/*.$(OBJEXT)
@ -1993,6 +2164,8 @@ mostlyclean-compile:
-rm -f crypto_kdf/*.lo
-rm -f crypto_kdf/blake2b/*.$(OBJEXT)
-rm -f crypto_kdf/blake2b/*.lo
-rm -f crypto_kdf/hkdf/*.$(OBJEXT)
-rm -f crypto_kdf/hkdf/*.lo
-rm -f crypto_kx/*.$(OBJEXT)
-rm -f crypto_kx/*.lo
-rm -f crypto_onetimeauth/*.$(OBJEXT)
@ -2073,8 +2246,8 @@ mostlyclean-compile:
-rm -f crypto_stream/xchacha20/*.lo
-rm -f crypto_stream/xsalsa20/*.$(OBJEXT)
-rm -f crypto_stream/xsalsa20/*.lo
-rm -f crypto_verify/sodium/*.$(OBJEXT)
-rm -f crypto_verify/sodium/*.lo
-rm -f crypto_verify/*.$(OBJEXT)
-rm -f crypto_verify/*.lo
-rm -f randombytes/*.$(OBJEXT)
-rm -f randombytes/*.lo
-rm -f randombytes/internal/*.$(OBJEXT)
@ -2087,9 +2260,19 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_auth/hmacsha256/$(DEPDIR)/libsodium_la-auth_hmacsha256.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_auth/hmacsha512/$(DEPDIR)/libsodium_la-auth_hmacsha512.Plo@am__quote@ # am--include-marker
@ -2107,6 +2290,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@crypto_core/hsalsa20/$(DEPDIR)/libsodium_la-core_hsalsa20.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_core/hsalsa20/ref2/$(DEPDIR)/libsodium_la-core_hsalsa20_ref2.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_core/salsa/ref/$(DEPDIR)/libsodium_la-core_salsa_ref.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_generichash/blake2b/$(DEPDIR)/libsodium_la-generichash_blake2.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Plo@am__quote@ # am--include-marker
@ -2122,6 +2306,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@crypto_hash/sha512/cp/$(DEPDIR)/libsodium_la-hash_sha512_cp.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_kdf/$(DEPDIR)/libsodium_la-crypto_kdf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_kdf/blake2b/$(DEPDIR)/libsodium_la-kdf_blake2b.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_onetimeauth/$(DEPDIR)/libsodium_la-crypto_onetimeauth.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_onetimeauth/poly1305/$(DEPDIR)/libsodium_la-onetimeauth_poly1305.Plo@am__quote@ # am--include-marker
@ -2186,7 +2372,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@crypto_stream/salsa208/ref/$(DEPDIR)/libsodium_la-stream_salsa208_ref.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_stream/xchacha20/$(DEPDIR)/libsodium_la-stream_xchacha20.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_stream/xsalsa20/$(DEPDIR)/libsodium_la-stream_xsalsa20.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@crypto_verify/$(DEPDIR)/libsodium_la-verify.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@randombytes/$(DEPDIR)/libsodium_la-randombytes.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@randombytes/internal/$(DEPDIR)/librdrand_la-randombytes_internal_random.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@randombytes/sysrandom/$(DEPDIR)/libsodium_la-randombytes_sysrandom.Plo@am__quote@ # am--include-marker
@ -2264,6 +2450,20 @@ crypto_scalarmult/curve25519/sandy2x/libsodium_la-sandy2x.lo: crypto_scalarmult/
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo: crypto_aead/aegis128l/aegis128l_aesni.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libaesni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo -MD -MP -MF crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Tpo -c -o crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo `test -f 'crypto_aead/aegis128l/aegis128l_aesni.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aegis128l_aesni.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Tpo crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis128l/aegis128l_aesni.c' object='crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libaesni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis128l/libaesni_la-aegis128l_aesni.lo `test -f 'crypto_aead/aegis128l/aegis128l_aesni.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aegis128l_aesni.c
crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo: crypto_aead/aegis256/aegis256_aesni.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libaesni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo -MD -MP -MF crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Tpo -c -o crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo `test -f 'crypto_aead/aegis256/aegis256_aesni.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aegis256_aesni.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Tpo crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis256/aegis256_aesni.c' object='crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libaesni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis256/libaesni_la-aegis256_aesni.lo `test -f 'crypto_aead/aegis256/aegis256_aesni.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aegis256_aesni.c
crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo: crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libaesni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo -MD -MP -MF crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Tpo -c -o crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo `test -f 'crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c' || echo '$(srcdir)/'`crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Tpo crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo
@ -2271,6 +2471,27 @@ crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo: crypto_aead/aes
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libaesni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aes256gcm/aesni/libaesni_la-aead_aes256gcm_aesni.lo `test -f 'crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c' || echo '$(srcdir)/'`crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo: crypto_aead/aegis128l/aegis128l_armcrypto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarmcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo -MD -MP -MF crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Tpo -c -o crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo `test -f 'crypto_aead/aegis128l/aegis128l_armcrypto.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aegis128l_armcrypto.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Tpo crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis128l/aegis128l_armcrypto.c' object='crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarmcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis128l/libarmcrypto_la-aegis128l_armcrypto.lo `test -f 'crypto_aead/aegis128l/aegis128l_armcrypto.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aegis128l_armcrypto.c
crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo: crypto_aead/aegis256/aegis256_armcrypto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarmcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo -MD -MP -MF crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Tpo -c -o crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo `test -f 'crypto_aead/aegis256/aegis256_armcrypto.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aegis256_armcrypto.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Tpo crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis256/aegis256_armcrypto.c' object='crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarmcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis256/libarmcrypto_la-aegis256_armcrypto.lo `test -f 'crypto_aead/aegis256/aegis256_armcrypto.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aegis256_armcrypto.c
crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo: crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarmcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo -MD -MP -MF crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Tpo -c -o crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo `test -f 'crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c' || echo '$(srcdir)/'`crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Tpo crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c' object='crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarmcrypto_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo `test -f 'crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c' || echo '$(srcdir)/'`crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c
crypto_generichash/blake2b/ref/libavx2_la-blake2b-compress-avx2.lo: crypto_generichash/blake2b/ref/blake2b-compress-avx2.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavx2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_generichash/blake2b/ref/libavx2_la-blake2b-compress-avx2.lo -MD -MP -MF crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Tpo -c -o crypto_generichash/blake2b/ref/libavx2_la-blake2b-compress-avx2.lo `test -f 'crypto_generichash/blake2b/ref/blake2b-compress-avx2.c' || echo '$(srcdir)/'`crypto_generichash/blake2b/ref/blake2b-compress-avx2.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Tpo crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Plo
@ -2313,19 +2534,54 @@ randombytes/internal/librdrand_la-randombytes_internal_random.lo: randombytes/in
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librdrand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o randombytes/internal/librdrand_la-randombytes_internal_random.lo `test -f 'randombytes/internal/randombytes_internal_random.c' || echo '$(srcdir)/'`randombytes/internal/randombytes_internal_random.c
crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo: crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo -MD -MP -MF crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Tpo -c -o crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo `test -f 'crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Tpo crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c' object='crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo' libtool=yes @AMDEPBACKSLASH@
crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo: crypto_aead/aegis128l/aead_aegis128l.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo -MD -MP -MF crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Tpo -c -o crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo `test -f 'crypto_aead/aegis128l/aead_aegis128l.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aead_aegis128l.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Tpo crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis128l/aead_aegis128l.c' object='crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo `test -f 'crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis128l/libsodium_la-aead_aegis128l.lo `test -f 'crypto_aead/aegis128l/aead_aegis128l.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aead_aegis128l.c
crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo: crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo -MD -MP -MF crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Tpo -c -o crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo `test -f 'crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Tpo crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c' object='crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo' libtool=yes @AMDEPBACKSLASH@
crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo: crypto_aead/aegis128l/aegis128l_soft.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo -MD -MP -MF crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Tpo -c -o crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo `test -f 'crypto_aead/aegis128l/aegis128l_soft.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aegis128l_soft.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Tpo crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis128l/aegis128l_soft.c' object='crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo `test -f 'crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis128l/libsodium_la-aegis128l_soft.lo `test -f 'crypto_aead/aegis128l/aegis128l_soft.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aegis128l_soft.c
crypto_aead/aegis256/libsodium_la-aead_aegis256.lo: crypto_aead/aegis256/aead_aegis256.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis256/libsodium_la-aead_aegis256.lo -MD -MP -MF crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Tpo -c -o crypto_aead/aegis256/libsodium_la-aead_aegis256.lo `test -f 'crypto_aead/aegis256/aead_aegis256.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aead_aegis256.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Tpo crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis256/aead_aegis256.c' object='crypto_aead/aegis256/libsodium_la-aead_aegis256.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis256/libsodium_la-aead_aegis256.lo `test -f 'crypto_aead/aegis256/aead_aegis256.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aead_aegis256.c
crypto_aead/aegis256/libsodium_la-aegis256_soft.lo: crypto_aead/aegis256/aegis256_soft.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aegis256/libsodium_la-aegis256_soft.lo -MD -MP -MF crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Tpo -c -o crypto_aead/aegis256/libsodium_la-aegis256_soft.lo `test -f 'crypto_aead/aegis256/aegis256_soft.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aegis256_soft.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Tpo crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aegis256/aegis256_soft.c' object='crypto_aead/aegis256/libsodium_la-aegis256_soft.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aegis256/libsodium_la-aegis256_soft.lo `test -f 'crypto_aead/aegis256/aegis256_soft.c' || echo '$(srcdir)/'`crypto_aead/aegis256/aegis256_soft.c
crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo: crypto_aead/aes256gcm/aead_aes256gcm.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo -MD -MP -MF crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Tpo -c -o crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo `test -f 'crypto_aead/aes256gcm/aead_aes256gcm.c' || echo '$(srcdir)/'`crypto_aead/aes256gcm/aead_aes256gcm.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Tpo crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/aes256gcm/aead_aes256gcm.c' object='crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo `test -f 'crypto_aead/aes256gcm/aead_aes256gcm.c' || echo '$(srcdir)/'`crypto_aead/aes256gcm/aead_aes256gcm.c
crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo: crypto_aead/chacha20poly1305/aead_chacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo -MD -MP -MF crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Tpo -c -o crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo `test -f 'crypto_aead/chacha20poly1305/aead_chacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/chacha20poly1305/aead_chacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Tpo crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/chacha20poly1305/aead_chacha20poly1305.c' object='crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/chacha20poly1305/libsodium_la-aead_chacha20poly1305.lo `test -f 'crypto_aead/chacha20poly1305/aead_chacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/chacha20poly1305/aead_chacha20poly1305.c
crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo: crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo -MD -MP -MF crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Tpo -c -o crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo `test -f 'crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Tpo crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c' object='crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_aead/xchacha20poly1305/libsodium_la-aead_xchacha20poly1305.lo `test -f 'crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c' || echo '$(srcdir)/'`crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c
crypto_auth/libsodium_la-crypto_auth.lo: crypto_auth/crypto_auth.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_auth/libsodium_la-crypto_auth.lo -MD -MP -MF crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Tpo -c -o crypto_auth/libsodium_la-crypto_auth.lo `test -f 'crypto_auth/crypto_auth.c' || echo '$(srcdir)/'`crypto_auth/crypto_auth.c
@ -2418,6 +2674,13 @@ crypto_core/salsa/ref/libsodium_la-core_salsa_ref.lo: crypto_core/salsa/ref/core
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_core/salsa/ref/libsodium_la-core_salsa_ref.lo `test -f 'crypto_core/salsa/ref/core_salsa_ref.c' || echo '$(srcdir)/'`crypto_core/salsa/ref/core_salsa_ref.c
crypto_core/softaes/libsodium_la-softaes.lo: crypto_core/softaes/softaes.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_core/softaes/libsodium_la-softaes.lo -MD -MP -MF crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Tpo -c -o crypto_core/softaes/libsodium_la-softaes.lo `test -f 'crypto_core/softaes/softaes.c' || echo '$(srcdir)/'`crypto_core/softaes/softaes.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Tpo crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_core/softaes/softaes.c' object='crypto_core/softaes/libsodium_la-softaes.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_core/softaes/libsodium_la-softaes.lo `test -f 'crypto_core/softaes/softaes.c' || echo '$(srcdir)/'`crypto_core/softaes/softaes.c
crypto_generichash/libsodium_la-crypto_generichash.lo: crypto_generichash/crypto_generichash.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_generichash/libsodium_la-crypto_generichash.lo -MD -MP -MF crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Tpo -c -o crypto_generichash/libsodium_la-crypto_generichash.lo `test -f 'crypto_generichash/crypto_generichash.c' || echo '$(srcdir)/'`crypto_generichash/crypto_generichash.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Tpo crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Plo
@ -2502,6 +2765,20 @@ crypto_kdf/libsodium_la-crypto_kdf.lo: crypto_kdf/crypto_kdf.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_kdf/libsodium_la-crypto_kdf.lo `test -f 'crypto_kdf/crypto_kdf.c' || echo '$(srcdir)/'`crypto_kdf/crypto_kdf.c
crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo: crypto_kdf/hkdf/kdf_hkdf_sha256.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo -MD -MP -MF crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Tpo -c -o crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo `test -f 'crypto_kdf/hkdf/kdf_hkdf_sha256.c' || echo '$(srcdir)/'`crypto_kdf/hkdf/kdf_hkdf_sha256.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Tpo crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_kdf/hkdf/kdf_hkdf_sha256.c' object='crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo `test -f 'crypto_kdf/hkdf/kdf_hkdf_sha256.c' || echo '$(srcdir)/'`crypto_kdf/hkdf/kdf_hkdf_sha256.c
crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo: crypto_kdf/hkdf/kdf_hkdf_sha512.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo -MD -MP -MF crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Tpo -c -o crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo `test -f 'crypto_kdf/hkdf/kdf_hkdf_sha512.c' || echo '$(srcdir)/'`crypto_kdf/hkdf/kdf_hkdf_sha512.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Tpo crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_kdf/hkdf/kdf_hkdf_sha512.c' object='crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo `test -f 'crypto_kdf/hkdf/kdf_hkdf_sha512.c' || echo '$(srcdir)/'`crypto_kdf/hkdf/kdf_hkdf_sha512.c
crypto_kx/libsodium_la-crypto_kx.lo: crypto_kx/crypto_kx.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_kx/libsodium_la-crypto_kx.lo -MD -MP -MF crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Tpo -c -o crypto_kx/libsodium_la-crypto_kx.lo `test -f 'crypto_kx/crypto_kx.c' || echo '$(srcdir)/'`crypto_kx/crypto_kx.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Tpo crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Plo
@ -2726,12 +3003,12 @@ crypto_stream/xsalsa20/libsodium_la-stream_xsalsa20.lo: crypto_stream/xsalsa20/s
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_stream/xsalsa20/libsodium_la-stream_xsalsa20.lo `test -f 'crypto_stream/xsalsa20/stream_xsalsa20.c' || echo '$(srcdir)/'`crypto_stream/xsalsa20/stream_xsalsa20.c
crypto_verify/sodium/libsodium_la-verify.lo: crypto_verify/sodium/verify.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_verify/sodium/libsodium_la-verify.lo -MD -MP -MF crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Tpo -c -o crypto_verify/sodium/libsodium_la-verify.lo `test -f 'crypto_verify/sodium/verify.c' || echo '$(srcdir)/'`crypto_verify/sodium/verify.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Tpo crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_verify/sodium/verify.c' object='crypto_verify/sodium/libsodium_la-verify.lo' libtool=yes @AMDEPBACKSLASH@
crypto_verify/libsodium_la-verify.lo: crypto_verify/verify.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT crypto_verify/libsodium_la-verify.lo -MD -MP -MF crypto_verify/$(DEPDIR)/libsodium_la-verify.Tpo -c -o crypto_verify/libsodium_la-verify.lo `test -f 'crypto_verify/verify.c' || echo '$(srcdir)/'`crypto_verify/verify.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_verify/$(DEPDIR)/libsodium_la-verify.Tpo crypto_verify/$(DEPDIR)/libsodium_la-verify.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto_verify/verify.c' object='crypto_verify/libsodium_la-verify.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_verify/sodium/libsodium_la-verify.lo `test -f 'crypto_verify/sodium/verify.c' || echo '$(srcdir)/'`crypto_verify/sodium/verify.c
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o crypto_verify/libsodium_la-verify.lo `test -f 'crypto_verify/verify.c' || echo '$(srcdir)/'`crypto_verify/verify.c
randombytes/libsodium_la-randombytes.lo: randombytes/randombytes.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsodium_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT randombytes/libsodium_la-randombytes.lo -MD -MP -MF randombytes/$(DEPDIR)/libsodium_la-randombytes.Tpo -c -o randombytes/libsodium_la-randombytes.lo `test -f 'randombytes/randombytes.c' || echo '$(srcdir)/'`randombytes/randombytes.c
@ -3011,9 +3288,13 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-rm -rf crypto_aead/aegis128l/.libs crypto_aead/aegis128l/_libs
-rm -rf crypto_aead/aegis256/.libs crypto_aead/aegis256/_libs
-rm -rf crypto_aead/aes256gcm/.libs crypto_aead/aes256gcm/_libs
-rm -rf crypto_aead/aes256gcm/aesni/.libs crypto_aead/aes256gcm/aesni/_libs
-rm -rf crypto_aead/chacha20poly1305/sodium/.libs crypto_aead/chacha20poly1305/sodium/_libs
-rm -rf crypto_aead/xchacha20poly1305/sodium/.libs crypto_aead/xchacha20poly1305/sodium/_libs
-rm -rf crypto_aead/aes256gcm/armcrypto/.libs crypto_aead/aes256gcm/armcrypto/_libs
-rm -rf crypto_aead/chacha20poly1305/.libs crypto_aead/chacha20poly1305/_libs
-rm -rf crypto_aead/xchacha20poly1305/.libs crypto_aead/xchacha20poly1305/_libs
-rm -rf crypto_auth/.libs crypto_auth/_libs
-rm -rf crypto_auth/hmacsha256/.libs crypto_auth/hmacsha256/_libs
-rm -rf crypto_auth/hmacsha512/.libs crypto_auth/hmacsha512/_libs
@ -3027,6 +3308,7 @@ clean-libtool:
-rm -rf crypto_core/hsalsa20/.libs crypto_core/hsalsa20/_libs
-rm -rf crypto_core/hsalsa20/ref2/.libs crypto_core/hsalsa20/ref2/_libs
-rm -rf crypto_core/salsa/ref/.libs crypto_core/salsa/ref/_libs
-rm -rf crypto_core/softaes/.libs crypto_core/softaes/_libs
-rm -rf crypto_generichash/.libs crypto_generichash/_libs
-rm -rf crypto_generichash/blake2b/.libs crypto_generichash/blake2b/_libs
-rm -rf crypto_generichash/blake2b/ref/.libs crypto_generichash/blake2b/ref/_libs
@ -3037,6 +3319,7 @@ clean-libtool:
-rm -rf crypto_hash/sha512/cp/.libs crypto_hash/sha512/cp/_libs
-rm -rf crypto_kdf/.libs crypto_kdf/_libs
-rm -rf crypto_kdf/blake2b/.libs crypto_kdf/blake2b/_libs
-rm -rf crypto_kdf/hkdf/.libs crypto_kdf/hkdf/_libs
-rm -rf crypto_kx/.libs crypto_kx/_libs
-rm -rf crypto_onetimeauth/.libs crypto_onetimeauth/_libs
-rm -rf crypto_onetimeauth/poly1305/.libs crypto_onetimeauth/poly1305/_libs
@ -3077,7 +3360,7 @@ clean-libtool:
-rm -rf crypto_stream/salsa208/ref/.libs crypto_stream/salsa208/ref/_libs
-rm -rf crypto_stream/xchacha20/.libs crypto_stream/xchacha20/_libs
-rm -rf crypto_stream/xsalsa20/.libs crypto_stream/xsalsa20/_libs
-rm -rf crypto_verify/sodium/.libs crypto_verify/sodium/_libs
-rm -rf crypto_verify/.libs crypto_verify/_libs
-rm -rf randombytes/.libs randombytes/_libs
-rm -rf randombytes/internal/.libs randombytes/internal/_libs
-rm -rf randombytes/sysrandom/.libs randombytes/sysrandom/_libs
@ -3295,12 +3578,20 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f crypto_aead/aegis128l/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/aegis128l/$(am__dirstamp)
-rm -f crypto_aead/aegis256/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/aegis256/$(am__dirstamp)
-rm -f crypto_aead/aes256gcm/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/aes256gcm/$(am__dirstamp)
-rm -f crypto_aead/aes256gcm/aesni/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/aes256gcm/aesni/$(am__dirstamp)
-rm -f crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/chacha20poly1305/sodium/$(am__dirstamp)
-rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/xchacha20poly1305/sodium/$(am__dirstamp)
-rm -f crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/aes256gcm/armcrypto/$(am__dirstamp)
-rm -f crypto_aead/chacha20poly1305/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/chacha20poly1305/$(am__dirstamp)
-rm -f crypto_aead/xchacha20poly1305/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_aead/xchacha20poly1305/$(am__dirstamp)
-rm -f crypto_auth/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_auth/$(am__dirstamp)
-rm -f crypto_auth/hmacsha256/$(DEPDIR)/$(am__dirstamp)
@ -3327,6 +3618,8 @@ distclean-generic:
-rm -f crypto_core/hsalsa20/ref2/$(am__dirstamp)
-rm -f crypto_core/salsa/ref/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_core/salsa/ref/$(am__dirstamp)
-rm -f crypto_core/softaes/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_core/softaes/$(am__dirstamp)
-rm -f crypto_generichash/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_generichash/$(am__dirstamp)
-rm -f crypto_generichash/blake2b/$(DEPDIR)/$(am__dirstamp)
@ -3347,6 +3640,8 @@ distclean-generic:
-rm -f crypto_kdf/$(am__dirstamp)
-rm -f crypto_kdf/blake2b/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_kdf/blake2b/$(am__dirstamp)
-rm -f crypto_kdf/hkdf/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_kdf/hkdf/$(am__dirstamp)
-rm -f crypto_kx/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_kx/$(am__dirstamp)
-rm -f crypto_onetimeauth/$(DEPDIR)/$(am__dirstamp)
@ -3427,8 +3722,8 @@ distclean-generic:
-rm -f crypto_stream/xchacha20/$(am__dirstamp)
-rm -f crypto_stream/xsalsa20/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_stream/xsalsa20/$(am__dirstamp)
-rm -f crypto_verify/sodium/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_verify/sodium/$(am__dirstamp)
-rm -f crypto_verify/$(DEPDIR)/$(am__dirstamp)
-rm -f crypto_verify/$(am__dirstamp)
-rm -f randombytes/$(DEPDIR)/$(am__dirstamp)
-rm -f randombytes/$(am__dirstamp)
-rm -f randombytes/internal/$(DEPDIR)/$(am__dirstamp)
@ -3447,9 +3742,19 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
-rm -f crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo
-rm -f crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo
-rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Plo
-rm -f crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Plo
-rm -f crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo
-rm -f crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Plo
-rm -f crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo
-rm -f crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo
-rm -f crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo
-rm -f crypto_auth/hmacsha256/$(DEPDIR)/libsodium_la-auth_hmacsha256.Plo
-rm -f crypto_auth/hmacsha512/$(DEPDIR)/libsodium_la-auth_hmacsha512.Plo
@ -3467,6 +3772,7 @@ distclean: distclean-recursive
-rm -f crypto_core/hsalsa20/$(DEPDIR)/libsodium_la-core_hsalsa20.Plo
-rm -f crypto_core/hsalsa20/ref2/$(DEPDIR)/libsodium_la-core_hsalsa20_ref2.Plo
-rm -f crypto_core/salsa/ref/$(DEPDIR)/libsodium_la-core_salsa_ref.Plo
-rm -f crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Plo
-rm -f crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Plo
-rm -f crypto_generichash/blake2b/$(DEPDIR)/libsodium_la-generichash_blake2.Plo
-rm -f crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Plo
@ -3482,6 +3788,8 @@ distclean: distclean-recursive
-rm -f crypto_hash/sha512/cp/$(DEPDIR)/libsodium_la-hash_sha512_cp.Plo
-rm -f crypto_kdf/$(DEPDIR)/libsodium_la-crypto_kdf.Plo
-rm -f crypto_kdf/blake2b/$(DEPDIR)/libsodium_la-kdf_blake2b.Plo
-rm -f crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Plo
-rm -f crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Plo
-rm -f crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Plo
-rm -f crypto_onetimeauth/$(DEPDIR)/libsodium_la-crypto_onetimeauth.Plo
-rm -f crypto_onetimeauth/poly1305/$(DEPDIR)/libsodium_la-onetimeauth_poly1305.Plo
@ -3546,7 +3854,7 @@ distclean: distclean-recursive
-rm -f crypto_stream/salsa208/ref/$(DEPDIR)/libsodium_la-stream_salsa208_ref.Plo
-rm -f crypto_stream/xchacha20/$(DEPDIR)/libsodium_la-stream_xchacha20.Plo
-rm -f crypto_stream/xsalsa20/$(DEPDIR)/libsodium_la-stream_xsalsa20.Plo
-rm -f crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Plo
-rm -f crypto_verify/$(DEPDIR)/libsodium_la-verify.Plo
-rm -f randombytes/$(DEPDIR)/libsodium_la-randombytes.Plo
-rm -f randombytes/internal/$(DEPDIR)/librdrand_la-randombytes_internal_random.Plo
-rm -f randombytes/sysrandom/$(DEPDIR)/libsodium_la-randombytes_sysrandom.Plo
@ -3600,9 +3908,19 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo
-rm -f crypto_aead/chacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo
-rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libaesni_la-aegis128l_aesni.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libarmcrypto_la-aegis128l_armcrypto.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aead_aegis128l.Plo
-rm -f crypto_aead/aegis128l/$(DEPDIR)/libsodium_la-aegis128l_soft.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libaesni_la-aegis256_aesni.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libarmcrypto_la-aegis256_armcrypto.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aead_aegis256.Plo
-rm -f crypto_aead/aegis256/$(DEPDIR)/libsodium_la-aegis256_soft.Plo
-rm -f crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.Plo
-rm -f crypto_aead/aes256gcm/aesni/$(DEPDIR)/libaesni_la-aead_aes256gcm_aesni.Plo
-rm -f crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Plo
-rm -f crypto_aead/chacha20poly1305/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo
-rm -f crypto_aead/xchacha20poly1305/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo
-rm -f crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo
-rm -f crypto_auth/hmacsha256/$(DEPDIR)/libsodium_la-auth_hmacsha256.Plo
-rm -f crypto_auth/hmacsha512/$(DEPDIR)/libsodium_la-auth_hmacsha512.Plo
@ -3620,6 +3938,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f crypto_core/hsalsa20/$(DEPDIR)/libsodium_la-core_hsalsa20.Plo
-rm -f crypto_core/hsalsa20/ref2/$(DEPDIR)/libsodium_la-core_hsalsa20_ref2.Plo
-rm -f crypto_core/salsa/ref/$(DEPDIR)/libsodium_la-core_salsa_ref.Plo
-rm -f crypto_core/softaes/$(DEPDIR)/libsodium_la-softaes.Plo
-rm -f crypto_generichash/$(DEPDIR)/libsodium_la-crypto_generichash.Plo
-rm -f crypto_generichash/blake2b/$(DEPDIR)/libsodium_la-generichash_blake2.Plo
-rm -f crypto_generichash/blake2b/ref/$(DEPDIR)/libavx2_la-blake2b-compress-avx2.Plo
@ -3635,6 +3954,8 @@ maintainer-clean: maintainer-clean-recursive
-rm -f crypto_hash/sha512/cp/$(DEPDIR)/libsodium_la-hash_sha512_cp.Plo
-rm -f crypto_kdf/$(DEPDIR)/libsodium_la-crypto_kdf.Plo
-rm -f crypto_kdf/blake2b/$(DEPDIR)/libsodium_la-kdf_blake2b.Plo
-rm -f crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha256.Plo
-rm -f crypto_kdf/hkdf/$(DEPDIR)/libsodium_la-kdf_hkdf_sha512.Plo
-rm -f crypto_kx/$(DEPDIR)/libsodium_la-crypto_kx.Plo
-rm -f crypto_onetimeauth/$(DEPDIR)/libsodium_la-crypto_onetimeauth.Plo
-rm -f crypto_onetimeauth/poly1305/$(DEPDIR)/libsodium_la-onetimeauth_poly1305.Plo
@ -3699,7 +4020,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f crypto_stream/salsa208/ref/$(DEPDIR)/libsodium_la-stream_salsa208_ref.Plo
-rm -f crypto_stream/xchacha20/$(DEPDIR)/libsodium_la-stream_xchacha20.Plo
-rm -f crypto_stream/xsalsa20/$(DEPDIR)/libsodium_la-stream_xsalsa20.Plo
-rm -f crypto_verify/sodium/$(DEPDIR)/libsodium_la-verify.Plo
-rm -f crypto_verify/$(DEPDIR)/libsodium_la-verify.Plo
-rm -f randombytes/$(DEPDIR)/libsodium_la-randombytes.Plo
-rm -f randombytes/internal/$(DEPDIR)/librdrand_la-randombytes_internal_random.Plo
-rm -f randombytes/sysrandom/$(DEPDIR)/libsodium_la-randombytes_sysrandom.Plo

View File

@ -0,0 +1,159 @@
#include <errno.h>
#include <stdlib.h>
#include "core.h"
#include "crypto_aead_aegis128l.h"
#include "private/common.h"
#include "private/implementations.h"
#include "randombytes.h"
#include "runtime.h"
#include "aegis128l_soft.h"
#if defined(HAVE_ARMCRYPTO) && defined(NATIVE_LITTLE_ENDIAN)
#include "aegis128l_armcrypto.h"
#endif
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
#include "aegis128l_aesni.h"
#endif
static const aegis128l_implementation *implementation = &aegis128l_soft_implementation;
size_t
crypto_aead_aegis128l_keybytes(void)
{
return crypto_aead_aegis128l_KEYBYTES;
}
size_t
crypto_aead_aegis128l_nsecbytes(void)
{
return crypto_aead_aegis128l_NSECBYTES;
}
size_t
crypto_aead_aegis128l_npubbytes(void)
{
return crypto_aead_aegis128l_NPUBBYTES;
}
size_t
crypto_aead_aegis128l_abytes(void)
{
return crypto_aead_aegis128l_ABYTES;
}
size_t
crypto_aead_aegis128l_messagebytes_max(void)
{
return crypto_aead_aegis128l_MESSAGEBYTES_MAX;
}
void
crypto_aead_aegis128l_keygen(unsigned char k[crypto_aead_aegis128l_KEYBYTES])
{
randombytes_buf(k, crypto_aead_aegis128l_KEYBYTES);
}
int
crypto_aead_aegis128l_encrypt(unsigned char *c, unsigned long long *clen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
unsigned long long clen = 0ULL;
int ret;
ret = crypto_aead_aegis128l_encrypt_detached(c, c + mlen, NULL, m, mlen, ad, adlen, nsec, npub,
k);
if (clen_p != NULL) {
if (ret == 0) {
clen = mlen + crypto_aead_aegis128l_ABYTES;
}
*clen_p = clen;
}
return ret;
}
int
crypto_aead_aegis128l_decrypt(unsigned char *m, unsigned long long *mlen_p, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *npub, const unsigned char *k)
{
unsigned long long mlen = 0ULL;
int ret = -1;
if (clen >= crypto_aead_aegis128l_ABYTES) {
ret = crypto_aead_aegis128l_decrypt_detached(
m, nsec, c, clen - crypto_aead_aegis128l_ABYTES,
c + clen - crypto_aead_aegis128l_ABYTES, ad, adlen, npub, k);
}
if (mlen_p != NULL) {
if (ret == 0) {
mlen = clen - crypto_aead_aegis128l_ABYTES;
}
*mlen_p = mlen;
}
return ret;
}
int
crypto_aead_aegis128l_encrypt_detached(unsigned char *c, unsigned char *mac,
unsigned long long *maclen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
const size_t maclen = crypto_aead_aegis128l_ABYTES;
if (maclen_p != NULL) {
*maclen_p = maclen;
}
if (mlen > crypto_aead_aegis128l_MESSAGEBYTES_MAX ||
adlen > crypto_aead_aegis128l_MESSAGEBYTES_MAX) {
sodium_misuse();
}
return implementation->encrypt_detached(c, mac, maclen, m, (size_t) mlen, ad, (size_t) adlen,
npub, k);
}
int
crypto_aead_aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *mac, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const unsigned char *k)
{
const size_t maclen = crypto_aead_aegis128l_ABYTES;
if (clen > crypto_aead_aegis128l_MESSAGEBYTES_MAX ||
adlen > crypto_aead_aegis128l_MESSAGEBYTES_MAX) {
return -1;
}
return implementation->decrypt_detached(m, c, (size_t) clen, mac, maclen, ad, (size_t) adlen,
npub, k);
}
int
_crypto_aead_aegis128l_pick_best_implementation(void)
{
implementation = &aegis128l_soft_implementation;
#if defined(HAVE_ARMCRYPTO) && defined(NATIVE_LITTLE_ENDIAN)
if (sodium_runtime_has_armcrypto()) {
implementation = &aegis128l_armcrypto_implementation;
return 0;
}
#endif
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
if (sodium_runtime_has_aesni() & sodium_runtime_has_avx()) {
implementation = &aegis128l_aesni_implementation;
return 0;
}
#endif
return 0; /* LCOV_EXCL_LINE */
}

View File

@ -0,0 +1,70 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "core.h"
#include "crypto_aead_aegis128l.h"
#include "crypto_verify_16.h"
#include "crypto_verify_32.h"
#include "export.h"
#include "utils.h"
#include "private/common.h"
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
#include "aegis128l_aesni.h"
#ifdef __clang__
#pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
#elif defined(__GNUC__)
#pragma GCC target("aes,avx")
#endif
#include "private/sse2_64_32.h"
#include <immintrin.h>
#include <wmmintrin.h>
#define AES_BLOCK_LENGTH 16
typedef __m128i aes_block_t;
#define AES_BLOCK_XOR(A, B) _mm_xor_si128((A), (B))
#define AES_BLOCK_AND(A, B) _mm_and_si128((A), (B))
#define AES_BLOCK_LOAD(A) _mm_loadu_si128((const aes_block_t *) (const void *) (A))
#define AES_BLOCK_LOAD_64x2(A, B) _mm_set_epi64x((long long) (A), (long long) (B))
#define AES_BLOCK_STORE(A, B) _mm_storeu_si128((aes_block_t *) (void *) (A), (B))
#define AES_ENC(A, B) _mm_aesenc_si128((A), (B))
static inline void
aegis128l_update(aes_block_t *const state, const aes_block_t d1, const aes_block_t d2)
{
aes_block_t tmp;
tmp = state[7];
state[7] = AES_ENC(state[6], state[7]);
state[6] = AES_ENC(state[5], state[6]);
state[5] = AES_ENC(state[4], state[5]);
state[4] = AES_ENC(state[3], state[4]);
state[3] = AES_ENC(state[2], state[3]);
state[2] = AES_ENC(state[1], state[2]);
state[1] = AES_ENC(state[0], state[1]);
state[0] = AES_ENC(tmp, state[0]);
state[0] = AES_BLOCK_XOR(state[0], d1);
state[4] = AES_BLOCK_XOR(state[4], d2);
}
#include "aegis128l_common.h"
struct aegis128l_implementation aegis128l_aesni_implementation = { SODIUM_C99(.encrypt_detached =)
encrypt_detached,
SODIUM_C99(.decrypt_detached =)
decrypt_detached };
#ifdef __clang__
#pragma clang attribute pop
#endif
#endif

View File

@ -0,0 +1,8 @@
#ifndef aegis128l_aesni_H
#define aegis128l_aesni_H
#include "implementations.h"
extern struct aegis128l_implementation aegis128l_aesni_implementation;
#endif

View File

@ -0,0 +1,72 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "core.h"
#include "crypto_aead_aegis128l.h"
#include "crypto_verify_16.h"
#include "crypto_verify_32.h"
#include "export.h"
#include "utils.h"
#include "private/common.h"
#if defined(HAVE_ARMCRYPTO) && defined(NATIVE_LITTLE_ENDIAN)
#include "aegis128l_armcrypto.h"
#ifdef __clang__
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
#elif defined(__GNUC__)
#pragma GCC target("+simd+crypto")
#endif
#ifndef __ARM_FEATURE_CRYPTO
#define __ARM_FEATURE_CRYPTO 1
#endif
#ifndef __ARM_FEATURE_AES
#define __ARM_FEATURE_AES 1
#endif
#include <arm_neon.h>
#define AES_BLOCK_LENGTH 16
typedef uint8x16_t aes_block_t;
#define AES_BLOCK_XOR(A, B) veorq_u8((A), (B))
#define AES_BLOCK_AND(A, B) vandq_u8((A), (B))
#define AES_BLOCK_LOAD(A) vld1q_u8(A)
#define AES_BLOCK_LOAD_64x2(A, B) vreinterpretq_u8_u64(vsetq_lane_u64((A), vmovq_n_u64(B), 1))
#define AES_BLOCK_STORE(A, B) vst1q_u8((A), (B))
#define AES_ENC(A, B) veorq_u8(vaesmcq_u8(vaeseq_u8((A), vmovq_n_u8(0))), (B))
static inline void
aegis128l_update(aes_block_t *const state, const aes_block_t d1, const aes_block_t d2)
{
aes_block_t tmp;
tmp = state[7];
state[7] = AES_ENC(state[6], state[7]);
state[6] = AES_ENC(state[5], state[6]);
state[5] = AES_ENC(state[4], state[5]);
state[4] = AES_BLOCK_XOR(AES_ENC(state[3], state[4]), d2);
state[3] = AES_ENC(state[2], state[3]);
state[2] = AES_ENC(state[1], state[2]);
state[1] = AES_ENC(state[0], state[1]);
state[0] = AES_BLOCK_XOR(AES_ENC(tmp, state[0]), d1);
}
#include "aegis128l_common.h"
struct aegis128l_implementation aegis128l_armcrypto_implementation = {
SODIUM_C99(.encrypt_detached =) encrypt_detached,
SODIUM_C99(.decrypt_detached =) decrypt_detached
};
#ifdef __clang__
#pragma clang attribute pop
#endif
#endif

View File

@ -0,0 +1,8 @@
#ifndef aegis128l_armcrypto_H
#define aegis128l_armcrypto_H
#include "implementations.h"
extern struct aegis128l_implementation aegis128l_armcrypto_implementation;
#endif

View File

@ -0,0 +1,229 @@
#define RATE 32
static void
aegis128l_init(const uint8_t *key, const uint8_t *nonce, aes_block_t *const state)
{
static CRYPTO_ALIGN(AES_BLOCK_LENGTH)
const uint8_t c0_[AES_BLOCK_LENGTH] = { 0x00, 0x01, 0x01, 0x02, 0x03, 0x05, 0x08, 0x0d,
0x15, 0x22, 0x37, 0x59, 0x90, 0xe9, 0x79, 0x62 };
static CRYPTO_ALIGN(AES_BLOCK_LENGTH)
const uint8_t c1_[AES_BLOCK_LENGTH] = { 0xdb, 0x3d, 0x18, 0x55, 0x6d, 0xc2, 0x2f, 0xf1,
0x20, 0x11, 0x31, 0x42, 0x73, 0xb5, 0x28, 0xdd };
const aes_block_t c0 = AES_BLOCK_LOAD(c0_);
const aes_block_t c1 = AES_BLOCK_LOAD(c1_);
aes_block_t k;
aes_block_t n;
int i;
k = AES_BLOCK_LOAD(key);
n = AES_BLOCK_LOAD(nonce);
state[0] = AES_BLOCK_XOR(k, n);
state[1] = c1;
state[2] = c0;
state[3] = c1;
state[4] = AES_BLOCK_XOR(k, n);
state[5] = AES_BLOCK_XOR(k, c0);
state[6] = AES_BLOCK_XOR(k, c1);
state[7] = AES_BLOCK_XOR(k, c0);
for (i = 0; i < 10; i++) {
aegis128l_update(state, n, k);
}
}
static void
aegis128l_mac(uint8_t *mac, size_t maclen, size_t adlen, size_t mlen, aes_block_t *const state)
{
aes_block_t tmp;
int i;
tmp = AES_BLOCK_LOAD_64x2(((uint64_t) mlen) << 3, ((uint64_t) adlen) << 3);
tmp = AES_BLOCK_XOR(tmp, state[2]);
for (i = 0; i < 7; i++) {
aegis128l_update(state, tmp, tmp);
}
if (maclen == 16) {
tmp = AES_BLOCK_XOR(state[6], AES_BLOCK_XOR(state[5], state[4]));
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[3], state[2]));
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[1], state[0]));
AES_BLOCK_STORE(mac, tmp);
} else if (maclen == 32) {
tmp = AES_BLOCK_XOR(state[3], state[2]);
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[1], state[0]));
AES_BLOCK_STORE(mac, tmp);
tmp = AES_BLOCK_XOR(state[7], state[6]);
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[5], state[4]));
AES_BLOCK_STORE(mac + 16, tmp);
} else {
memset(mac, 0, maclen);
}
}
static inline void
aegis128l_absorb(const uint8_t *const src, aes_block_t *const state)
{
aes_block_t msg0, msg1;
msg0 = AES_BLOCK_LOAD(src);
msg1 = AES_BLOCK_LOAD(src + AES_BLOCK_LENGTH);
aegis128l_update(state, msg0, msg1);
}
static void
aegis128l_enc(uint8_t *const dst, const uint8_t *const src, aes_block_t *const state)
{
aes_block_t msg0, msg1;
aes_block_t tmp0, tmp1;
msg0 = AES_BLOCK_LOAD(src);
msg1 = AES_BLOCK_LOAD(src + AES_BLOCK_LENGTH);
tmp0 = AES_BLOCK_XOR(msg0, state[6]);
tmp0 = AES_BLOCK_XOR(tmp0, state[1]);
tmp1 = AES_BLOCK_XOR(msg1, state[5]);
tmp1 = AES_BLOCK_XOR(tmp1, state[2]);
tmp0 = AES_BLOCK_XOR(tmp0, AES_BLOCK_AND(state[2], state[3]));
tmp1 = AES_BLOCK_XOR(tmp1, AES_BLOCK_AND(state[6], state[7]));
AES_BLOCK_STORE(dst, tmp0);
AES_BLOCK_STORE(dst + AES_BLOCK_LENGTH, tmp1);
aegis128l_update(state, msg0, msg1);
}
static void
aegis128l_dec(uint8_t *const dst, const uint8_t *const src, aes_block_t *const state)
{
aes_block_t msg0, msg1;
msg0 = AES_BLOCK_LOAD(src);
msg1 = AES_BLOCK_LOAD(src + AES_BLOCK_LENGTH);
msg0 = AES_BLOCK_XOR(msg0, state[6]);
msg0 = AES_BLOCK_XOR(msg0, state[1]);
msg1 = AES_BLOCK_XOR(msg1, state[5]);
msg1 = AES_BLOCK_XOR(msg1, state[2]);
msg0 = AES_BLOCK_XOR(msg0, AES_BLOCK_AND(state[2], state[3]));
msg1 = AES_BLOCK_XOR(msg1, AES_BLOCK_AND(state[6], state[7]));
AES_BLOCK_STORE(dst, msg0);
AES_BLOCK_STORE(dst + AES_BLOCK_LENGTH, msg1);
aegis128l_update(state, msg0, msg1);
}
static void
aegis128l_declast(uint8_t *const dst, const uint8_t *const src, size_t len,
aes_block_t *const state)
{
uint8_t pad[RATE];
aes_block_t msg0, msg1;
memset(pad, 0, sizeof pad);
memcpy(pad, src, len);
msg0 = AES_BLOCK_LOAD(pad);
msg1 = AES_BLOCK_LOAD(pad + AES_BLOCK_LENGTH);
msg0 = AES_BLOCK_XOR(msg0, state[6]);
msg0 = AES_BLOCK_XOR(msg0, state[1]);
msg1 = AES_BLOCK_XOR(msg1, state[5]);
msg1 = AES_BLOCK_XOR(msg1, state[2]);
msg0 = AES_BLOCK_XOR(msg0, AES_BLOCK_AND(state[2], state[3]));
msg1 = AES_BLOCK_XOR(msg1, AES_BLOCK_AND(state[6], state[7]));
AES_BLOCK_STORE(pad, msg0);
AES_BLOCK_STORE(pad + AES_BLOCK_LENGTH, msg1);
memset(pad + len, 0, sizeof pad - len);
memcpy(dst, pad, len);
msg0 = AES_BLOCK_LOAD(pad);
msg1 = AES_BLOCK_LOAD(pad + AES_BLOCK_LENGTH);
aegis128l_update(state, msg0, msg1);
}
static int
encrypt_detached(uint8_t *c, uint8_t *mac, size_t maclen, const uint8_t *m, size_t mlen,
const uint8_t *ad, size_t adlen, const uint8_t *npub, const uint8_t *k)
{
aes_block_t state[8];
CRYPTO_ALIGN(RATE) uint8_t src[RATE];
CRYPTO_ALIGN(RATE) uint8_t dst[RATE];
size_t i;
aegis128l_init(k, npub, state);
for (i = 0; i + RATE <= adlen; i += RATE) {
aegis128l_absorb(ad + i, state);
}
if (adlen % RATE) {
memset(src, 0, RATE);
memcpy(src, ad + i, adlen % RATE);
aegis128l_absorb(src, state);
}
for (i = 0; i + RATE <= mlen; i += RATE) {
aegis128l_enc(c + i, m + i, state);
}
if (mlen % RATE) {
memset(src, 0, RATE);
memcpy(src, m + i, mlen % RATE);
aegis128l_enc(dst, src, state);
memcpy(c + i, dst, mlen % RATE);
}
aegis128l_mac(mac, maclen, adlen, mlen, state);
return 0;
}
static int
decrypt_detached(uint8_t *m, const uint8_t *c, size_t clen, const uint8_t *mac, size_t maclen,
const uint8_t *ad, size_t adlen, const uint8_t *npub, const uint8_t *k)
{
aes_block_t state[8];
CRYPTO_ALIGN(RATE) uint8_t src[RATE];
CRYPTO_ALIGN(RATE) uint8_t dst[RATE];
CRYPTO_ALIGN(16) uint8_t computed_mac[32];
const size_t mlen = clen;
size_t i;
int ret;
aegis128l_init(k, npub, state);
for (i = 0; i + RATE <= adlen; i += RATE) {
aegis128l_absorb(ad + i, state);
}
if (adlen % RATE) {
memset(src, 0, RATE);
memcpy(src, ad + i, adlen % RATE);
aegis128l_absorb(src, state);
}
if (m != NULL) {
for (i = 0; i + RATE <= mlen; i += RATE) {
aegis128l_dec(m + i, c + i, state);
}
} else {
for (i = 0; i + RATE <= mlen; i += RATE) {
aegis128l_dec(dst, c + i, state);
}
}
if (mlen % RATE) {
if (m != NULL) {
aegis128l_declast(m + i, c + i, mlen % RATE, state);
} else {
aegis128l_declast(dst, c + i, mlen % RATE, state);
}
}
COMPILER_ASSERT(sizeof computed_mac >= 32);
aegis128l_mac(computed_mac, maclen, adlen, mlen, state);
ret = -1;
if (maclen == 16) {
ret = crypto_verify_16(computed_mac, mac);
} else if (maclen == 32) {
ret = crypto_verify_32(computed_mac, mac);
}
if (ret != 0 && m != NULL) {
memset(m, 0, mlen);
}
return ret;
}

View File

@ -0,0 +1,59 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "core.h"
#include "crypto_aead_aegis128l.h"
#include "crypto_verify_16.h"
#include "crypto_verify_32.h"
#include "export.h"
#include "utils.h"
#include "private/common.h"
#include "crypto_aead_aegis128l.h"
#include "private/softaes.h"
#if 1
#include "aegis128l_soft.h"
#define AES_BLOCK_LENGTH 16
typedef SoftAesBlock aes_block_t;
#define AES_BLOCK_XOR(A, B) softaes_block_xor((A), (B))
#define AES_BLOCK_AND(A, B) softaes_block_and((A), (B))
#define AES_BLOCK_LOAD(A) softaes_block_load(A)
#define AES_BLOCK_LOAD_64x2(A, B) softaes_block_load64x2((A), (B))
#define AES_BLOCK_STORE(A, B) softaes_block_store((A), (B))
#define AES_ENC(A, B) softaes_block_encrypt((A), (B))
static inline void
aegis128l_update(aes_block_t *const state, const aes_block_t d1, const aes_block_t d2)
{
aes_block_t tmp;
tmp = state[7];
state[7] = AES_ENC(state[6], state[7]);
state[6] = AES_ENC(state[5], state[6]);
state[5] = AES_ENC(state[4], state[5]);
state[4] = AES_ENC(state[3], state[4]);
state[3] = AES_ENC(state[2], state[3]);
state[2] = AES_ENC(state[1], state[2]);
state[1] = AES_ENC(state[0], state[1]);
state[0] = AES_ENC(tmp, state[0]);
state[0] = AES_BLOCK_XOR(state[0], d1);
state[4] = AES_BLOCK_XOR(state[4], d2);
}
#include "aegis128l_common.h"
struct aegis128l_implementation aegis128l_soft_implementation = { SODIUM_C99(.encrypt_detached =)
encrypt_detached,
SODIUM_C99(.decrypt_detached =)
decrypt_detached };
#endif

View File

@ -0,0 +1,8 @@
#ifndef aegis128l_soft_H
#define aegis128l_soft_H
#include "implementations.h"
extern struct aegis128l_implementation aegis128l_soft_implementation;
#endif

View File

@ -0,0 +1,17 @@
#ifndef aegis128l_implementations_H
#define aegis128l_implementations_H
#include <stddef.h>
#include <stdint.h>
#include "crypto_aead_aegis128l.h"
typedef struct aegis128l_implementation {
int (*encrypt_detached)(uint8_t *c, uint8_t *mac, size_t maclen, const uint8_t *m, size_t mlen,
const uint8_t *ad, size_t adlen, const uint8_t *npub, const uint8_t *k);
int (*decrypt_detached)(uint8_t *m, const uint8_t *c, size_t clen, const uint8_t *mac,
size_t maclen, const uint8_t *ad, size_t adlen, const uint8_t *npub,
const uint8_t *k);
} aegis128l_implementation;
#endif

View File

@ -0,0 +1,158 @@
#include <errno.h>
#include <stdlib.h>
#include "core.h"
#include "crypto_aead_aegis256.h"
#include "private/common.h"
#include "private/implementations.h"
#include "randombytes.h"
#include "runtime.h"
#include "aegis256_soft.h"
#if defined(HAVE_ARMCRYPTO) && defined(NATIVE_LITTLE_ENDIAN)
#include "aegis256_armcrypto.h"
#endif
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
#include "aegis256_aesni.h"
#endif
static const aegis256_implementation *implementation = &aegis256_soft_implementation;
size_t
crypto_aead_aegis256_keybytes(void)
{
return crypto_aead_aegis256_KEYBYTES;
}
size_t
crypto_aead_aegis256_nsecbytes(void)
{
return crypto_aead_aegis256_NSECBYTES;
}
size_t
crypto_aead_aegis256_npubbytes(void)
{
return crypto_aead_aegis256_NPUBBYTES;
}
size_t
crypto_aead_aegis256_abytes(void)
{
return crypto_aead_aegis256_ABYTES;
}
size_t
crypto_aead_aegis256_messagebytes_max(void)
{
return crypto_aead_aegis256_MESSAGEBYTES_MAX;
}
void
crypto_aead_aegis256_keygen(unsigned char k[crypto_aead_aegis256_KEYBYTES])
{
randombytes_buf(k, crypto_aead_aegis256_KEYBYTES);
}
int
crypto_aead_aegis256_encrypt(unsigned char *c, unsigned long long *clen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
unsigned long long clen = 0ULL;
int ret;
ret =
crypto_aead_aegis256_encrypt_detached(c, c + mlen, NULL, m, mlen, ad, adlen, nsec, npub, k);
if (clen_p != NULL) {
if (ret == 0) {
clen = mlen + crypto_aead_aegis256_ABYTES;
}
*clen_p = clen;
}
return ret;
}
int
crypto_aead_aegis256_decrypt(unsigned char *m, unsigned long long *mlen_p, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *npub, const unsigned char *k)
{
unsigned long long mlen = 0ULL;
int ret = -1;
if (clen >= crypto_aead_aegis256_ABYTES) {
ret = crypto_aead_aegis256_decrypt_detached(m, nsec, c, clen - crypto_aead_aegis256_ABYTES,
c + clen - crypto_aead_aegis256_ABYTES, ad,
adlen, npub, k);
}
if (mlen_p != NULL) {
if (ret == 0) {
mlen = clen - crypto_aead_aegis256_ABYTES;
}
*mlen_p = mlen;
}
return ret;
}
int
crypto_aead_aegis256_encrypt_detached(unsigned char *c, unsigned char *mac,
unsigned long long *maclen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
const size_t maclen = crypto_aead_aegis256_ABYTES;
if (maclen_p != NULL) {
*maclen_p = maclen;
}
if (mlen > crypto_aead_aegis256_MESSAGEBYTES_MAX ||
adlen > crypto_aead_aegis256_MESSAGEBYTES_MAX) {
sodium_misuse();
}
return implementation->encrypt_detached(c, mac, maclen, m, (size_t) mlen, ad, (size_t) adlen,
npub, k);
}
int
crypto_aead_aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned char *c,
unsigned long long clen, const unsigned char *mac,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *npub, const unsigned char *k)
{
const size_t maclen = crypto_aead_aegis256_ABYTES;
if (clen > crypto_aead_aegis256_MESSAGEBYTES_MAX ||
adlen > crypto_aead_aegis256_MESSAGEBYTES_MAX) {
return -1;
}
return implementation->decrypt_detached(m, c, (size_t) clen, mac, maclen, ad, (size_t) adlen,
npub, k);
}
int
_crypto_aead_aegis256_pick_best_implementation(void)
{
implementation = &aegis256_soft_implementation;
#if defined(HAVE_ARMCRYPTO) && defined(NATIVE_LITTLE_ENDIAN)
if (sodium_runtime_has_armcrypto()) {
implementation = &aegis256_armcrypto_implementation;
return 0;
}
#endif
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
if (sodium_runtime_has_aesni() & sodium_runtime_has_avx()) {
implementation = &aegis256_aesni_implementation;
return 0;
}
#endif
return 0; /* LCOV_EXCL_LINE */
}

View File

@ -0,0 +1,65 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "core.h"
#include "crypto_aead_aegis256.h"
#include "crypto_verify_16.h"
#include "crypto_verify_32.h"
#include "export.h"
#include "utils.h"
#include "private/common.h"
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
#include "aegis256_aesni.h"
#ifdef __clang__
#pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
#elif defined(__GNUC__)
#pragma GCC target("aes,avx")
#endif
#include "private/sse2_64_32.h"
#include <immintrin.h>
#include <wmmintrin.h>
#define AES_BLOCK_LENGTH 16
typedef __m128i aes_block_t;
#define AES_BLOCK_XOR(A, B) _mm_xor_si128((A), (B))
#define AES_BLOCK_AND(A, B) _mm_and_si128((A), (B))
#define AES_BLOCK_LOAD(A) _mm_loadu_si128((const aes_block_t *) (const void *) (A))
#define AES_BLOCK_LOAD_64x2(A, B) _mm_set_epi64x((long long) (A), (long long) (B))
#define AES_BLOCK_STORE(A, B) _mm_storeu_si128((aes_block_t *) (void *) (A), (B))
#define AES_ENC(A, B) _mm_aesenc_si128((A), (B))
static inline void
aegis256_update(aes_block_t *const state, const aes_block_t d)
{
aes_block_t tmp;
tmp = state[5];
state[5] = AES_ENC(state[4], state[5]);
state[4] = AES_ENC(state[3], state[4]);
state[3] = AES_ENC(state[2], state[3]);
state[2] = AES_ENC(state[1], state[2]);
state[1] = AES_ENC(state[0], state[1]);
state[0] = AES_BLOCK_XOR(AES_ENC(tmp, state[0]), d);
}
#include "aegis256_common.h"
struct aegis256_implementation aegis256_aesni_implementation = { SODIUM_C99(.encrypt_detached =)
encrypt_detached,
SODIUM_C99(.decrypt_detached =)
decrypt_detached };
#ifdef __clang__
#pragma clang attribute pop
#endif
#endif

View File

@ -0,0 +1,8 @@
#ifndef aegis256_aesni_H
#define aegis256_aesni_H
#include "implementations.h"
extern struct aegis256_implementation aegis256_aesni_implementation;
#endif

View File

@ -0,0 +1,70 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "core.h"
#include "crypto_aead_aegis256.h"
#include "crypto_verify_16.h"
#include "crypto_verify_32.h"
#include "export.h"
#include "utils.h"
#include "private/common.h"
#if defined(HAVE_ARMCRYPTO) && defined(NATIVE_LITTLE_ENDIAN)
#include "aegis256_armcrypto.h"
#ifdef __clang__
#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function)
#elif defined(__GNUC__)
#pragma GCC target("+simd+crypto")
#endif
#ifndef __ARM_FEATURE_CRYPTO
#define __ARM_FEATURE_CRYPTO 1
#endif
#ifndef __ARM_FEATURE_AES
#define __ARM_FEATURE_AES 1
#endif
#include <arm_neon.h>
#define AES_BLOCK_LENGTH 16
typedef uint8x16_t aes_block_t;
#define AES_BLOCK_XOR(A, B) veorq_u8((A), (B))
#define AES_BLOCK_AND(A, B) vandq_u8((A), (B))
#define AES_BLOCK_LOAD(A) vld1q_u8(A)
#define AES_BLOCK_LOAD_64x2(A, B) vreinterpretq_u8_u64(vsetq_lane_u64((A), vmovq_n_u64(B), 1))
#define AES_BLOCK_STORE(A, B) vst1q_u8((A), (B))
#define AES_ENC(A, B) veorq_u8(vaesmcq_u8(vaeseq_u8((A), vmovq_n_u8(0))), (B))
static inline void
aegis256_update(aes_block_t *const state, const aes_block_t d)
{
aes_block_t tmp;
tmp = state[5];
state[5] = AES_ENC(state[4], state[5]);
state[4] = AES_ENC(state[3], state[4]);
state[3] = AES_ENC(state[2], state[3]);
state[2] = AES_ENC(state[1], state[2]);
state[1] = AES_ENC(state[0], state[1]);
state[0] = AES_BLOCK_XOR(AES_ENC(tmp, state[0]), d);
}
#include "aegis256_common.h"
struct aegis256_implementation aegis256_armcrypto_implementation = { SODIUM_C99(.encrypt_detached =)
encrypt_detached,
SODIUM_C99(.decrypt_detached =)
decrypt_detached };
#ifdef __clang__
#pragma clang attribute pop
#endif
#endif

View File

@ -0,0 +1,8 @@
#ifndef aegis256_armcrypto_H
#define aegis256_armcrypto_H
#include "implementations.h"
extern struct aegis256_implementation aegis256_armcrypto_implementation;
#endif

View File

@ -0,0 +1,214 @@
#define RATE 16
static void
aegis256_init(const uint8_t *key, const uint8_t *nonce, aes_block_t *const state)
{
static CRYPTO_ALIGN(AES_BLOCK_LENGTH)
const uint8_t c0_[AES_BLOCK_LENGTH] = { 0x00, 0x01, 0x01, 0x02, 0x03, 0x05, 0x08, 0x0d,
0x15, 0x22, 0x37, 0x59, 0x90, 0xe9, 0x79, 0x62 };
static CRYPTO_ALIGN(AES_BLOCK_LENGTH)
const uint8_t c1_[AES_BLOCK_LENGTH] = { 0xdb, 0x3d, 0x18, 0x55, 0x6d, 0xc2, 0x2f, 0xf1,
0x20, 0x11, 0x31, 0x42, 0x73, 0xb5, 0x28, 0xdd };
const aes_block_t c0 = AES_BLOCK_LOAD(c0_);
const aes_block_t c1 = AES_BLOCK_LOAD(c1_);
const aes_block_t k0 = AES_BLOCK_LOAD(key);
const aes_block_t k1 = AES_BLOCK_LOAD(key + AES_BLOCK_LENGTH);
const aes_block_t n0 = AES_BLOCK_LOAD(nonce);
const aes_block_t n1 = AES_BLOCK_LOAD(nonce + AES_BLOCK_LENGTH);
const aes_block_t k0_n0 = AES_BLOCK_XOR(k0, n0);
const aes_block_t k1_n1 = AES_BLOCK_XOR(k1, n1);
int i;
state[0] = k0_n0;
state[1] = k1_n1;
state[2] = c1;
state[3] = c0;
state[4] = AES_BLOCK_XOR(k0, c0);
state[5] = AES_BLOCK_XOR(k1, c1);
for (i = 0; i < 4; i++) {
aegis256_update(state, k0);
aegis256_update(state, k1);
aegis256_update(state, k0_n0);
aegis256_update(state, k1_n1);
}
}
static void
aegis256_mac(uint8_t *mac, size_t maclen, size_t adlen, size_t mlen, aes_block_t *const state)
{
aes_block_t tmp;
int i;
tmp = AES_BLOCK_LOAD_64x2(((uint64_t) mlen) << 3, ((uint64_t) adlen) << 3);
tmp = AES_BLOCK_XOR(tmp, state[3]);
for (i = 0; i < 7; i++) {
aegis256_update(state, tmp);
}
if (maclen == 16) {
tmp = AES_BLOCK_XOR(state[5], state[4]);
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[3], state[2]));
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[1], state[0]));
AES_BLOCK_STORE(mac, tmp);
} else if (maclen == 32) {
tmp = AES_BLOCK_XOR(AES_BLOCK_XOR(state[2], state[1]), state[0]);
AES_BLOCK_STORE(mac, tmp);
tmp = AES_BLOCK_XOR(AES_BLOCK_XOR(state[5], state[4]), state[3]);
AES_BLOCK_STORE(mac + 16, tmp);
} else {
memset(mac, 0, maclen);
}
}
static inline void
aegis256_absorb(const uint8_t *const src, aes_block_t *const state)
{
aes_block_t msg;
msg = AES_BLOCK_LOAD(src);
aegis256_update(state, msg);
}
static void
aegis256_enc(uint8_t *const dst, const uint8_t *const src, aes_block_t *const state)
{
aes_block_t msg;
aes_block_t tmp;
msg = AES_BLOCK_LOAD(src);
tmp = AES_BLOCK_XOR(msg, state[5]);
tmp = AES_BLOCK_XOR(tmp, state[4]);
tmp = AES_BLOCK_XOR(tmp, state[1]);
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_AND(state[2], state[3]));
AES_BLOCK_STORE(dst, tmp);
aegis256_update(state, msg);
}
static void
aegis256_dec(uint8_t *const dst, const uint8_t *const src, aes_block_t *const state)
{
aes_block_t msg;
msg = AES_BLOCK_LOAD(src);
msg = AES_BLOCK_XOR(msg, state[5]);
msg = AES_BLOCK_XOR(msg, state[4]);
msg = AES_BLOCK_XOR(msg, state[1]);
msg = AES_BLOCK_XOR(msg, AES_BLOCK_AND(state[2], state[3]));
AES_BLOCK_STORE(dst, msg);
aegis256_update(state, msg);
}
static void
aegis256_declast(uint8_t *const dst, const uint8_t *const src, size_t len, aes_block_t *const state)
{
uint8_t pad[RATE];
aes_block_t msg;
memset(pad, 0, sizeof pad);
memcpy(pad, src, len);
msg = AES_BLOCK_LOAD(pad);
msg = AES_BLOCK_XOR(msg, state[5]);
msg = AES_BLOCK_XOR(msg, state[4]);
msg = AES_BLOCK_XOR(msg, state[1]);
msg = AES_BLOCK_XOR(msg, AES_BLOCK_AND(state[2], state[3]));
AES_BLOCK_STORE(pad, msg);
memset(pad + len, 0, sizeof pad - len);
memcpy(dst, pad, len);
msg = AES_BLOCK_LOAD(pad);
aegis256_update(state, msg);
}
static int
encrypt_detached(uint8_t *c, uint8_t *mac, size_t maclen, const uint8_t *m, size_t mlen,
const uint8_t *ad, size_t adlen, const uint8_t *npub, const uint8_t *k)
{
aes_block_t state[6];
CRYPTO_ALIGN(RATE) uint8_t src[RATE];
CRYPTO_ALIGN(RATE) uint8_t dst[RATE];
size_t i;
aegis256_init(k, npub, state);
for (i = 0; i + RATE <= adlen; i += RATE) {
aegis256_absorb(ad + i, state);
}
if (adlen % RATE) {
memset(src, 0, RATE);
memcpy(src, ad + i, adlen % RATE);
aegis256_absorb(src, state);
}
for (i = 0; i + RATE <= mlen; i += RATE) {
aegis256_enc(c + i, m + i, state);
}
if (mlen % RATE) {
memset(src, 0, RATE);
memcpy(src, m + i, mlen % RATE);
aegis256_enc(dst, src, state);
memcpy(c + i, dst, mlen % RATE);
}
aegis256_mac(mac, maclen, adlen, mlen, state);
return 0;
}
static int
decrypt_detached(uint8_t *m, const uint8_t *c, size_t clen, const uint8_t *mac, size_t maclen,
const uint8_t *ad, size_t adlen, const uint8_t *npub, const uint8_t *k)
{
aes_block_t state[6];
CRYPTO_ALIGN(RATE) uint8_t src[RATE];
CRYPTO_ALIGN(RATE) uint8_t dst[RATE];
CRYPTO_ALIGN(16) uint8_t computed_mac[32];
const size_t mlen = clen;
size_t i;
int ret;
aegis256_init(k, npub, state);
for (i = 0; i + RATE <= adlen; i += RATE) {
aegis256_absorb(ad + i, state);
}
if (adlen % RATE) {
memset(src, 0, RATE);
memcpy(src, ad + i, adlen % RATE);
aegis256_absorb(src, state);
}
if (m != NULL) {
for (i = 0; i + RATE <= mlen; i += RATE) {
aegis256_dec(m + i, c + i, state);
}
} else {
for (i = 0; i + RATE <= mlen; i += RATE) {
aegis256_dec(dst, c + i, state);
}
}
if (mlen % RATE) {
if (m != NULL) {
aegis256_declast(m + i, c + i, mlen % RATE, state);
} else {
aegis256_declast(dst, c + i, mlen % RATE, state);
}
}
COMPILER_ASSERT(sizeof computed_mac >= 32);
aegis256_mac(computed_mac, maclen, adlen, mlen, state);
ret = -1;
if (maclen == 16) {
ret = crypto_verify_16(computed_mac, mac);
} else if (maclen == 32) {
ret = crypto_verify_32(computed_mac, mac);
}
if (ret != 0 && m != NULL) {
memset(m, 0, mlen);
}
return ret;
}

View File

@ -0,0 +1,54 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "core.h"
#include "crypto_aead_aegis256.h"
#include "crypto_verify_16.h"
#include "crypto_verify_32.h"
#include "export.h"
#include "utils.h"
#include "private/common.h"
#include "crypto_aead_aegis256.h"
#include "private/softaes.h"
#if 1
#include "aegis256_soft.h"
#define AES_BLOCK_LENGTH 16
typedef SoftAesBlock aes_block_t;
#define AES_BLOCK_XOR(A, B) softaes_block_xor((A), (B))
#define AES_BLOCK_AND(A, B) softaes_block_and((A), (B))
#define AES_BLOCK_LOAD(A) softaes_block_load(A)
#define AES_BLOCK_LOAD_64x2(A, B) softaes_block_load64x2((A), (B))
#define AES_BLOCK_STORE(A, B) softaes_block_store((A), (B))
#define AES_ENC(A, B) softaes_block_encrypt((A), (B))
static inline void
aegis256_update(aes_block_t *const state, const aes_block_t d)
{
aes_block_t tmp;
tmp = state[5];
state[5] = AES_ENC(state[4], state[5]);
state[4] = AES_ENC(state[3], state[4]);
state[3] = AES_ENC(state[2], state[3]);
state[2] = AES_ENC(state[1], state[2]);
state[1] = AES_ENC(state[0], state[1]);
state[0] = AES_BLOCK_XOR(AES_ENC(tmp, state[0]), d);
}
#include "aegis256_common.h"
struct aegis256_implementation aegis256_soft_implementation = { SODIUM_C99(.encrypt_detached =)
encrypt_detached,
SODIUM_C99(.decrypt_detached =)
decrypt_detached };
#endif

View File

@ -0,0 +1,8 @@
#ifndef aegis256_soft_H
#define aegis256_soft_H
#include "implementations.h"
extern struct aegis256_implementation aegis256_soft_implementation;
#endif

View File

@ -0,0 +1,17 @@
#ifndef aegis256_implementations_H
#define aegis256_implementations_H
#include <stddef.h>
#include <stdint.h>
#include "crypto_aead_aegis256.h"
typedef struct aegis256_implementation {
int (*encrypt_detached)(uint8_t *c, uint8_t *mac, size_t maclen, const uint8_t *m, size_t mlen,
const uint8_t *ad, size_t adlen, const uint8_t *npub, const uint8_t *k);
int (*decrypt_detached)(uint8_t *m, const uint8_t *c, size_t clen, const uint8_t *mac,
size_t maclen, const uint8_t *ad, size_t adlen, const uint8_t *npub,
const uint8_t *k);
} aegis256_implementation;
#endif

View File

@ -0,0 +1,157 @@
#include <errno.h>
#include <stdlib.h>
#include "crypto_aead_aes256gcm.h"
#include "private/common.h"
#include "randombytes.h"
size_t
crypto_aead_aes256gcm_keybytes(void)
{
return crypto_aead_aes256gcm_KEYBYTES;
}
size_t
crypto_aead_aes256gcm_nsecbytes(void)
{
return crypto_aead_aes256gcm_NSECBYTES;
}
size_t
crypto_aead_aes256gcm_npubbytes(void)
{
return crypto_aead_aes256gcm_NPUBBYTES;
}
size_t
crypto_aead_aes256gcm_abytes(void)
{
return crypto_aead_aes256gcm_ABYTES;
}
size_t
crypto_aead_aes256gcm_statebytes(void)
{
return (sizeof(crypto_aead_aes256gcm_state) + (size_t) 15U) & ~(size_t) 15U;
}
size_t
crypto_aead_aes256gcm_messagebytes_max(void)
{
return crypto_aead_aes256gcm_MESSAGEBYTES_MAX;
}
void
crypto_aead_aes256gcm_keygen(unsigned char k[crypto_aead_aes256gcm_KEYBYTES])
{
randombytes_buf(k, crypto_aead_aes256gcm_KEYBYTES);
}
#if !((defined(HAVE_ARMCRYPTO) && defined(__clang__) && defined(NATIVE_LITTLE_ENDIAN)) || \
(defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H)))
#ifndef ENOSYS
#define ENOSYS ENXIO
#endif
int
crypto_aead_aes256gcm_encrypt_detached(unsigned char *c, unsigned char *mac,
unsigned long long *maclen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_encrypt(unsigned char *c, unsigned long long *clen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt_detached(unsigned char *m, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *mac, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt(unsigned char *m, unsigned long long *mlen_p, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *npub, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *st_, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c, unsigned char *mac,
unsigned long long *maclen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen_p,
const unsigned char *m, unsigned long long mlen,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *nsec, const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *mac, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen_p,
unsigned char *nsec, const unsigned char *c,
unsigned long long clen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_is_available(void)
{
return 0;
}
#endif

View File

@ -17,9 +17,7 @@
#if defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H)
#ifdef __GNUC__
#pragma GCC target("ssse3")
#pragma GCC target("aes")
#pragma GCC target("pclmul")
#pragma GCC target("avx,aes,pclmul")
#endif
#if !defined(_MSC_VER) || _MSC_VER < 1800
@ -444,6 +442,11 @@ aes_gcm_encrypt_generic(const State *st, GHash *sth, unsigned char mac[ABYTES],
counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS);
encrypt_xor_wide(st, dst + i, src + i, rev_counters);
PREFETCH_READ(src + i + PARALLEL_BLOCKS * 16);
#if PARALLEL_BLOCKS >= 64 / 16
PREFETCH_READ(src + i + PARALLEL_BLOCKS * 16 + 64);
#endif
pi = i - PARALLEL_BLOCKS * 16;
u = gh_update0(sth, dst + pi, st->hx[2 * PARALLEL_BLOCKS - 1 - 0]);
for (j = 1; j < PARALLEL_BLOCKS; j += 1) {
@ -454,6 +457,10 @@ aes_gcm_encrypt_generic(const State *st, GHash *sth, unsigned char mac[ABYTES],
encrypt_xor_wide(st, dst + i + PARALLEL_BLOCKS * 16, src + i + PARALLEL_BLOCKS * 16,
rev_counters);
PREFETCH_READ(src + i + 2 * PARALLEL_BLOCKS * 16);
#if PARALLEL_BLOCKS >= 64 / 16
PREFETCH_READ(src + i + 2 * PARALLEL_BLOCKS * 16 + 64);
#endif
pi = i;
for (j = 0; j < PARALLEL_BLOCKS; j += 1) {
gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]);
@ -748,7 +755,7 @@ crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c, unsigned char *
}
gh_required_blocks = required_blocks(ad_len, m_len);
if (gh_required_blocks == 0) {
memset(mac, 0x00, ABYTES);
memset(mac, 0xd0, ABYTES);
memset(c, 0, m_len);
return -1;
}
@ -923,7 +930,7 @@ crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, unsigned char *
if (crypto_verify_16(mac, computed_mac) != 0) {
sodium_memzero(computed_mac, sizeof computed_mac);
memset(m, 0x00, m_len);
memset(m, 0xd0, m_len);
return -1;
}
return 0;
@ -996,155 +1003,7 @@ crypto_aead_aes256gcm_decrypt(unsigned char *m, unsigned long long *mlen_p, unsi
int
crypto_aead_aes256gcm_is_available(void)
{
return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni();
}
#else
#ifndef ENOSYS
#define ENOSYS ENXIO
#endif
int
crypto_aead_aes256gcm_encrypt_detached(unsigned char *c, unsigned char *mac,
unsigned long long *maclen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_encrypt(unsigned char *c, unsigned long long *clen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt_detached(unsigned char *m, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *mac, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt(unsigned char *m, unsigned long long *mlen_p, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *npub, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *st_, const unsigned char *k)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c, unsigned char *mac,
unsigned long long *maclen_p, const unsigned char *m,
unsigned long long mlen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *nsec,
const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen_p,
const unsigned char *m, unsigned long long mlen,
const unsigned char *ad, unsigned long long adlen,
const unsigned char *nsec, const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, unsigned char *nsec,
const unsigned char *c, unsigned long long clen,
const unsigned char *mac, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen_p,
unsigned char *nsec, const unsigned char *c,
unsigned long long clen, const unsigned char *ad,
unsigned long long adlen, const unsigned char *npub,
const crypto_aead_aes256gcm_state *st_)
{
errno = ENOSYS;
return -1;
}
int
crypto_aead_aes256gcm_is_available(void)
{
return 0;
return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni() & sodium_runtime_has_avx();
}
#endif
size_t
crypto_aead_aes256gcm_keybytes(void)
{
return crypto_aead_aes256gcm_KEYBYTES;
}
size_t
crypto_aead_aes256gcm_nsecbytes(void)
{
return crypto_aead_aes256gcm_NSECBYTES;
}
size_t
crypto_aead_aes256gcm_npubbytes(void)
{
return crypto_aead_aes256gcm_NPUBBYTES;
}
size_t
crypto_aead_aes256gcm_abytes(void)
{
return crypto_aead_aes256gcm_ABYTES;
}
size_t
crypto_aead_aes256gcm_statebytes(void)
{
return (sizeof(crypto_aead_aes256gcm_state) + (size_t) 15U) & ~(size_t) 15U;
}
size_t
crypto_aead_aes256gcm_messagebytes_max(void)
{
return crypto_aead_aes256gcm_MESSAGEBYTES_MAX;
}
void
crypto_aead_aes256gcm_keygen(unsigned char k[crypto_aead_aes256gcm_KEYBYTES])
{
randombytes_buf(k, crypto_aead_aes256gcm_KEYBYTES);
}

File diff suppressed because it is too large Load Diff

View File

@ -2512,6 +2512,21 @@ sc25519_is_canonical(const unsigned char s[32])
return (c != 0);
}
/* multiply by the cofactor */
static void
ge25519_clear_cofactor(ge25519_p3 *p3)
{
ge25519_p1p1 p1;
ge25519_p2 p2;
ge25519_p3_dbl(&p1, p3);
ge25519_p1p1_to_p2(&p2, &p1);
ge25519_p2_dbl(&p1, &p2);
ge25519_p1p1_to_p2(&p2, &p1);
ge25519_p2_dbl(&p1, &p2);
ge25519_p1p1_to_p3(p3, &p1);
}
static void
ge25519_elligator2(unsigned char s[32], const fe25519 r, const unsigned char x_sign)
{
@ -2520,8 +2535,6 @@ ge25519_elligator2(unsigned char s[32], const fe25519 r, const unsigned char x_s
fe25519 rr2;
fe25519 x, x2, x3;
ge25519_p3 p3;
ge25519_p1p1 p1;
ge25519_p2 p2;
unsigned int notsquare;
fe25519_sq2(rr2, r);
@ -2565,14 +2578,7 @@ ge25519_elligator2(unsigned char s[32], const fe25519 r, const unsigned char x_s
abort(); /* LCOV_EXCL_LINE */
}
/* multiply by the cofactor */
ge25519_p3_dbl(&p1, &p3);
ge25519_p1p1_to_p2(&p2, &p1);
ge25519_p2_dbl(&p1, &p2);
ge25519_p1p1_to_p2(&p2, &p1);
ge25519_p2_dbl(&p1, &p2);
ge25519_p1p1_to_p3(&p3, &p1);
ge25519_clear_cofactor(&p3);
ge25519_p3_tobytes(s, &p3);
}

View File

@ -1,5 +1,5 @@
/*
Ignores top bit of h.
Ignores top bit of s.
*/
void

View File

@ -1,5 +1,5 @@
/*
Ignores top bit of h.
Ignores top bit of s.
*/
void

View File

@ -0,0 +1,143 @@
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "private/common.h"
#include "private/softaes.h"
uint32_t _aes_lut[256] __attribute__ ((visibility ("hidden"))) = {
0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, 0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591,
0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56, 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec,
0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, 0x15fafaef, 0xeb5959b2, 0xc947478e, 0x0bf0f0fb,
0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b,
0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, 0x5a36366c, 0x413f3f7e, 0x02f7f7f5, 0x4fcccc83,
0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x08f1f1f9, 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a,
0x0c040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, 0x28181830, 0xa1969637, 0x0f05050a, 0xb59a9a2f,
0x0907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea,
0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b,
0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413,
0xf55353a6, 0x68d1d1b9, 0x00000000, 0x2cededc1, 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6,
0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85,
0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511,
0xcf45458a, 0x10f9f9e9, 0x06020204, 0x817f7ffe, 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b,
0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, 0xad92923f, 0xbc9d9d21, 0x48383870, 0x04f5f5f1,
0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, 0x30101020, 0x1affffe5, 0x0ef3f3fd, 0x6dd2d2bf,
0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e,
0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a, 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6,
0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3, 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b,
0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428, 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad,
0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, 0xdb494992, 0x0a06060c, 0x6c242448, 0xe45c5cb8,
0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4, 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2,
0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda, 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949,
0xb46c6cd8, 0xfa5656ac, 0x07f4f4f3, 0x25eaeacf, 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810,
0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c, 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697,
0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f,
0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc, 0xd8484890, 0x05030306, 0x01f6f6f7, 0x120e0e1c,
0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969, 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27,
0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122, 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433,
0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9, 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5,
0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0,
0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e, 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c
};
static const uint32_t * const LUT = _aes_lut;
#ifndef SOFTAES_STRIDE
# ifdef FAVOR_PERFORMANCE
# define SOFTAES_STRIDE 256
# else
# define SOFTAES_STRIDE 16
# endif
#endif
static SoftAesBlock
_encrypt(const uint8_t ix0[4], const uint8_t ix1[4], const uint8_t ix2[4], const uint8_t ix3[4])
{
CRYPTO_ALIGN(64) uint32_t t[4][4][256 / SOFTAES_STRIDE];
CRYPTO_ALIGN(64) uint8_t of[4][4];
CRYPTO_ALIGN(64) SoftAesBlock out;
size_t i;
size_t j;
for (j = 0; j < 4; j++) {
of[j][0] = ix0[j] % SOFTAES_STRIDE;
of[j][1] = ix1[j] % SOFTAES_STRIDE;
of[j][2] = ix2[j] % SOFTAES_STRIDE;
of[j][3] = ix3[j] % SOFTAES_STRIDE;
}
for (i = 0; i < 256 / SOFTAES_STRIDE; i++) {
for (j = 0; j < 4; j++) {
t[j][0][i] = LUT[(i * SOFTAES_STRIDE) | of[j][0]];
t[j][1][i] = LUT[(i * SOFTAES_STRIDE) | of[j][1]];
t[j][2][i] = LUT[(i * SOFTAES_STRIDE) | of[j][2]];
t[j][3][i] = LUT[(i * SOFTAES_STRIDE) | of[j][3]];
}
}
#ifdef HAVE_INLINE_ASM
__asm__ __volatile__("" : : "r"(t) : "memory");
#endif
out.w0 = t[0][0][ix0[0] / SOFTAES_STRIDE];
out.w0 ^= ROTL32(t[0][1][ix1[0] / SOFTAES_STRIDE], 8);
out.w0 ^= ROTL32(t[0][2][ix2[0] / SOFTAES_STRIDE], 16);
out.w0 ^= ROTL32(t[0][3][ix3[0] / SOFTAES_STRIDE], 24);
out.w1 = t[1][0][ix0[1] / SOFTAES_STRIDE];
out.w1 ^= ROTL32(t[1][1][ix1[1] / SOFTAES_STRIDE], 8);
out.w1 ^= ROTL32(t[1][2][ix2[1] / SOFTAES_STRIDE], 16);
out.w1 ^= ROTL32(t[1][3][ix3[1] / SOFTAES_STRIDE], 24);
out.w2 = t[2][0][ix0[2] / SOFTAES_STRIDE];
out.w2 ^= ROTL32(t[2][1][ix1[2] / SOFTAES_STRIDE], 8);
out.w2 ^= ROTL32(t[2][2][ix2[2] / SOFTAES_STRIDE], 16);
out.w2 ^= ROTL32(t[2][3][ix3[2] / SOFTAES_STRIDE], 24);
out.w3 = t[3][0][ix0[3] / SOFTAES_STRIDE];
out.w3 ^= ROTL32(t[3][1][ix1[3] / SOFTAES_STRIDE], 8);
out.w3 ^= ROTL32(t[3][2][ix2[3] / SOFTAES_STRIDE], 16);
out.w3 ^= ROTL32(t[3][3][ix3[3] / SOFTAES_STRIDE], 24);
return out;
}
SoftAesBlock
softaes_block_encrypt(const SoftAesBlock block, const SoftAesBlock rk)
{
CRYPTO_ALIGN(64) SoftAesBlock out;
CRYPTO_ALIGN(64) uint8_t ix0[4], ix1[4], ix2[4], ix3[4];
const uint32_t s0 = block.w0;
const uint32_t s1 = block.w1;
const uint32_t s2 = block.w2;
const uint32_t s3 = block.w3;
ix0[0] = (uint8_t) s0;
ix0[1] = (uint8_t) s1;
ix0[2] = (uint8_t) s2;
ix0[3] = (uint8_t) s3;
ix1[0] = (uint8_t) (s1 >> 8);
ix1[1] = (uint8_t) (s2 >> 8);
ix1[2] = (uint8_t) (s3 >> 8);
ix1[3] = (uint8_t) (s0 >> 8);
ix2[0] = (uint8_t) (s2 >> 16);
ix2[1] = (uint8_t) (s3 >> 16);
ix2[2] = (uint8_t) (s0 >> 16);
ix2[3] = (uint8_t) (s1 >> 16);
ix3[0] = (uint8_t) (s3 >> 24);
ix3[1] = (uint8_t) (s0 >> 24);
ix3[2] = (uint8_t) (s1 >> 24);
ix3[3] = (uint8_t) (s2 >> 24);
out = _encrypt(ix0, ix1, ix2, ix3);
out.w0 ^= rk.w0;
out.w1 ^= rk.w1;
out.w2 ^= rk.w2;
out.w3 ^= rk.w3;
return out;
}

View File

@ -5,6 +5,8 @@
#define LOADU(p) _mm_loadu_si128((const __m128i *) (const void *) (p))
#define STOREU(p, r) _mm_storeu_si128((__m128i *) (void *) (p), r)
#if !(defined(_mm_roti_epi64) && defined(__XOP__))
#undef _mm_roti_epi64
#define _mm_roti_epi64(x, c) \
(-(c) == 32) \
? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \
@ -17,6 +19,7 @@
_mm_add_epi64((x), (x))) \
: _mm_xor_si128(_mm_srli_epi64((x), -(c)), \
_mm_slli_epi64((x), 64 - (-(c))))
#endif
#define G1(row1l, row2l, row3l, row4l, row1h, row2h, row3h, row4h, b0, b1) \
row1l = _mm_add_epi64(_mm_add_epi64(row1l, b0), row2l); \

View File

@ -5,6 +5,8 @@
#define LOADU(p) _mm_loadu_si128((const __m128i *) (const void *) (p))
#define STOREU(p, r) _mm_storeu_si128((__m128i *) (void *) (p), r)
#if !(defined(_mm_roti_epi64) && defined(__XOP__))
#undef _mm_roti_epi64
#define _mm_roti_epi64(x, c) \
(-(c) == 32) \
? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \
@ -17,6 +19,7 @@
_mm_add_epi64((x), (x))) \
: _mm_xor_si128(_mm_srli_epi64((x), -(c)), \
_mm_slli_epi64((x), 64 - (-(c))))
#endif
#define G1(row1l, row2l, row3l, row4l, row1h, row2h, row3h, row4h, b0, b1) \
row1l = _mm_add_epi64(_mm_add_epi64(row1l, b0), row2l); \

View File

@ -156,6 +156,7 @@ SHA256_Pad(crypto_hash_sha256_state *state, uint32_t tmp32[64 + 8])
unsigned int r;
unsigned int i;
ACQUIRE_FENCE;
r = (unsigned int) ((state->count >> 3) & 0x3f);
if (r < 56) {
for (i = 0; i < 56 - r; i++) {
@ -197,6 +198,7 @@ crypto_hash_sha256_update(crypto_hash_sha256_state *state,
if (inlen <= 0U) {
return 0;
}
ACQUIRE_FENCE;
r = (unsigned long long) ((state->count >> 3) & 0x3f);
state->count += ((uint64_t) inlen) << 3;

View File

@ -175,6 +175,7 @@ SHA512_Pad(crypto_hash_sha512_state *state, uint64_t tmp64[80 + 8])
unsigned int r;
unsigned int i;
ACQUIRE_FENCE;
r = (unsigned int) ((state->count[1] >> 3) & 0x7f);
if (r < 112) {
for (i = 0; i < 112 - r; i++) {
@ -218,6 +219,7 @@ crypto_hash_sha512_update(crypto_hash_sha512_state *state,
if (inlen <= 0U) {
return 0;
}
ACQUIRE_FENCE;
r = (unsigned long long) ((state->count[1] >> 3) & 0x7f);
bitlen[1] = ((uint64_t) inlen) << 3;

View File

@ -0,0 +1,123 @@
#include <errno.h>
#include <string.h>
#include "crypto_auth_hmacsha256.h"
#include "crypto_kdf.h"
#include "crypto_kdf_hkdf_sha256.h"
#include "randombytes.h"
#include "utils.h"
int
crypto_kdf_hkdf_sha256_extract_init(crypto_kdf_hkdf_sha256_state *state,
const unsigned char *salt, size_t salt_len)
{
return crypto_auth_hmacsha256_init(&state->st, salt, salt_len);
}
int
crypto_kdf_hkdf_sha256_extract_update(crypto_kdf_hkdf_sha256_state *state,
const unsigned char *ikm, size_t ikm_len)
{
return crypto_auth_hmacsha256_update(&state->st, ikm, ikm_len);
}
int
crypto_kdf_hkdf_sha256_extract_final(crypto_kdf_hkdf_sha256_state *state,
unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES])
{
crypto_auth_hmacsha256_final(&state->st, prk);
sodium_memzero(state, sizeof state);
return 0;
}
int
crypto_kdf_hkdf_sha256_extract(
unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES],
const unsigned char *salt, size_t salt_len, const unsigned char *ikm,
size_t ikm_len)
{
crypto_kdf_hkdf_sha256_state state;
crypto_kdf_hkdf_sha256_extract_init(&state, salt, salt_len);
crypto_kdf_hkdf_sha256_extract_update(&state, ikm, ikm_len);
return crypto_kdf_hkdf_sha256_extract_final(&state, prk);
}
void
crypto_kdf_hkdf_sha256_keygen(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES])
{
randombytes_buf(prk, crypto_kdf_hkdf_sha256_KEYBYTES);
}
int
crypto_kdf_hkdf_sha256_expand(unsigned char *out, size_t out_len,
const char *ctx, size_t ctx_len,
const unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES])
{
crypto_auth_hmacsha256_state st;
unsigned char tmp[crypto_auth_hmacsha256_BYTES];
size_t i;
size_t left;
unsigned char counter = 1U;
if (out_len > crypto_kdf_hkdf_sha256_BYTES_MAX) {
errno = EINVAL;
return -1;
}
for (i = (size_t) 0U; i + crypto_auth_hmacsha256_BYTES <= out_len;
i += crypto_auth_hmacsha256_BYTES) {
crypto_auth_hmacsha256_init(&st, prk, crypto_kdf_hkdf_sha256_KEYBYTES);
if (i != (size_t) 0U) {
crypto_auth_hmacsha256_update(&st,
&out[i - crypto_auth_hmacsha256_BYTES],
crypto_auth_hmacsha256_BYTES);
}
crypto_auth_hmacsha256_update(&st,
(const unsigned char *) ctx, ctx_len);
crypto_auth_hmacsha256_update(&st, &counter, (size_t) 1U);
crypto_auth_hmacsha256_final(&st, &out[i]);
counter++;
}
if ((left = out_len & (crypto_auth_hmacsha256_BYTES - 1U)) != (size_t) 0U) {
crypto_auth_hmacsha256_init(&st, prk, crypto_kdf_hkdf_sha256_KEYBYTES);
if (i != (size_t) 0U) {
crypto_auth_hmacsha256_update(&st,
&out[i - crypto_auth_hmacsha256_BYTES],
crypto_auth_hmacsha256_BYTES);
}
crypto_auth_hmacsha256_update(&st,
(const unsigned char *) ctx, ctx_len);
crypto_auth_hmacsha256_update(&st, &counter, (size_t) 1U);
crypto_auth_hmacsha256_final(&st, tmp);
memcpy(&out[i], tmp, left);
sodium_memzero(tmp, sizeof tmp);
}
sodium_memzero(&st, sizeof st);
return 0;
}
size_t
crypto_kdf_hkdf_sha256_keybytes(void)
{
return crypto_kdf_hkdf_sha256_KEYBYTES;
}
size_t
crypto_kdf_hkdf_sha256_bytes_min(void)
{
return crypto_kdf_hkdf_sha256_BYTES_MIN;
}
size_t
crypto_kdf_hkdf_sha256_bytes_max(void)
{
return crypto_kdf_hkdf_sha256_BYTES_MAX;
}
size_t crypto_kdf_hkdf_sha256_statebytes(void)
{
return sizeof(crypto_kdf_hkdf_sha256_state);
}

View File

@ -0,0 +1,118 @@
#include <errno.h>
#include <string.h>
#include "crypto_auth_hmacsha512.h"
#include "crypto_kdf.h"
#include "crypto_kdf_hkdf_sha512.h"
#include "randombytes.h"
#include "utils.h"
int
crypto_kdf_hkdf_sha512_extract_init(crypto_kdf_hkdf_sha512_state *state,
const unsigned char *salt, size_t salt_len)
{
return crypto_auth_hmacsha512_init(&state->st, salt, salt_len);
}
int
crypto_kdf_hkdf_sha512_extract_update(crypto_kdf_hkdf_sha512_state *state,
const unsigned char *ikm, size_t ikm_len)
{
return crypto_auth_hmacsha512_update(&state->st, ikm, ikm_len);
}
int
crypto_kdf_hkdf_sha512_extract_final(crypto_kdf_hkdf_sha512_state *state,
unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
{
crypto_auth_hmacsha512_final(&state->st, prk);
sodium_memzero(state, sizeof state);
return 0;
}
int
crypto_kdf_hkdf_sha512_extract(
unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES],
const unsigned char *salt, size_t salt_len, const unsigned char *ikm,
size_t ikm_len)
{
crypto_kdf_hkdf_sha512_state state;
crypto_kdf_hkdf_sha512_extract_init(&state, salt, salt_len);
crypto_kdf_hkdf_sha512_extract_update(&state, ikm, ikm_len);
return crypto_kdf_hkdf_sha512_extract_final(&state, prk);
}
void
crypto_kdf_hkdf_sha512_keygen(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
{
randombytes_buf(prk, crypto_kdf_hkdf_sha512_KEYBYTES);
}
int
crypto_kdf_hkdf_sha512_expand(unsigned char *out, size_t out_len,
const char *ctx, size_t ctx_len,
const unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
{
crypto_auth_hmacsha512_state st;
unsigned char tmp[crypto_auth_hmacsha512_BYTES];
size_t i;
size_t left;
unsigned char counter = 1U;
if (out_len > crypto_kdf_hkdf_sha512_BYTES_MAX) {
errno = EINVAL;
return -1;
}
for (i = (size_t) 0U; i + crypto_auth_hmacsha512_BYTES <= out_len;
i += crypto_auth_hmacsha512_BYTES) {
crypto_auth_hmacsha512_init(&st, prk, crypto_kdf_hkdf_sha512_KEYBYTES);
if (i != (size_t) 0U) {
crypto_auth_hmacsha512_update(&st,
&out[i - crypto_auth_hmacsha512_BYTES],
crypto_auth_hmacsha512_BYTES);
}
crypto_auth_hmacsha512_update(&st,
(const unsigned char *) ctx, ctx_len);
crypto_auth_hmacsha512_update(&st, &counter, (size_t) 1U);
crypto_auth_hmacsha512_final(&st, &out[i]);
counter++;
}
if ((left = out_len & (crypto_auth_hmacsha512_BYTES - 1U)) != (size_t) 0U) {
crypto_auth_hmacsha512_init(&st, prk, crypto_kdf_hkdf_sha512_KEYBYTES);
if (i != (size_t) 0U) {
crypto_auth_hmacsha512_update(&st,
&out[i - crypto_auth_hmacsha512_BYTES],
crypto_auth_hmacsha512_BYTES);
}
crypto_auth_hmacsha512_update(&st,
(const unsigned char *) ctx, ctx_len);
crypto_auth_hmacsha512_update(&st, &counter, (size_t) 1U);
crypto_auth_hmacsha512_final(&st, tmp);
memcpy(&out[i], tmp, left);
sodium_memzero(tmp, sizeof tmp);
}
sodium_memzero(&st, sizeof st);
return 0;
}
size_t
crypto_kdf_hkdf_sha512_keybytes(void)
{
return crypto_kdf_hkdf_sha512_KEYBYTES;
}
size_t
crypto_kdf_hkdf_sha512_bytes_min(void)
{
return crypto_kdf_hkdf_sha512_BYTES_MIN;
}
size_t
crypto_kdf_hkdf_sha512_bytes_max(void)
{
return crypto_kdf_hkdf_sha512_BYTES_MAX;
}

View File

@ -122,7 +122,7 @@ poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m,
h4 = (unsigned long) d4 & 0x3ffffff;
h0 += c * 5;
c = (h0 >> 26);
h0 = h0 & 0x3ffffff;
h0 &= 0x3ffffff;
h1 += c;
m += poly1305_block_size;

View File

@ -120,7 +120,7 @@ poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m,
h2 = LO(d2) & 0x3ffffffffff;
h0 += c * 5;
c = (h0 >> 44);
h0 = h0 & 0xfffffffffff;
h0 &= 0xfffffffffff;
h1 += c;
m += poly1305_block_size;

View File

@ -41,14 +41,14 @@ typedef struct poly1305_state_internal_t {
union {
uint64_t h[3];
uint32_t hh[10];
} H; /* 40 bytes */
uint32_t R[5]; /* 20 bytes */
uint32_t R2[5]; /* 20 bytes */
uint32_t R4[5]; /* 20 bytes */
uint64_t pad[2]; /* 16 bytes */
uint64_t flags; /* 8 bytes */
unsigned long long leftover; /* 8 bytes */
unsigned char buffer[poly1305_block_size]; /* 32 bytes */
} H; /* 40 bytes */
uint32_t R[5]; /* 20 bytes */
uint32_t R2[5]; /* 20 bytes */
uint32_t R4[5]; /* 20 bytes */
uint64_t pad[2]; /* 16 bytes */
uint64_t flags; /* 8 bytes */
unsigned long long leftover; /* 8 bytes */
unsigned char buffer[poly1305_block_size]; /* 32 bytes */
} poly1305_state_internal_t; /* 164 bytes total */
/*

View File

@ -261,7 +261,7 @@ argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen,
free(ctx.ad);
free(ctx.salt);
if (ret != ARGON2_OK || sodium_memcmp(out, ctx.out, ctx.outlen) != 0) {
if (ret == ARGON2_OK && sodium_memcmp(out, ctx.out, ctx.outlen) != 0) {
ret = ARGON2_VERIFY_MISMATCH;
}
free(out);

View File

@ -8,6 +8,9 @@
(_mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9))
#define r24 \
(_mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10))
#if !(defined(_mm_roti_epi64) && defined(__XOP__))
#undef _mm_roti_epi64
#define _mm_roti_epi64(x, c) \
(-(c) == 32) \
? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \
@ -20,6 +23,7 @@
_mm_add_epi64((x), (x))) \
: _mm_xor_si128(_mm_srli_epi64((x), -(c)), \
_mm_slli_epi64((x), 64 - (-(c))))
#endif
static inline __m128i
fBlaMka(__m128i x, __m128i y)

View File

@ -214,8 +214,8 @@ crypto_pwhash_argon2i_str(char out[crypto_pwhash_argon2i_STRBYTES],
}
int
crypto_pwhash_argon2i_str_verify(const char str[crypto_pwhash_argon2i_STRBYTES],
const char *const passwd,
crypto_pwhash_argon2i_str_verify(const char * str,
const char * const passwd,
unsigned long long passwdlen)
{
int verify_ret;
@ -280,14 +280,14 @@ _needs_rehash(const char *str, unsigned long long opslimit, size_t memlimit,
}
int
crypto_pwhash_argon2i_str_needs_rehash(const char str[crypto_pwhash_argon2i_STRBYTES],
crypto_pwhash_argon2i_str_needs_rehash(const char * str,
unsigned long long opslimit, size_t memlimit)
{
return _needs_rehash(str, opslimit, memlimit, Argon2_i);
}
int
crypto_pwhash_argon2id_str_needs_rehash(const char str[crypto_pwhash_argon2id_STRBYTES],
crypto_pwhash_argon2id_str_needs_rehash(const char * str,
unsigned long long opslimit, size_t memlimit)
{
return _needs_rehash(str, opslimit, memlimit, Argon2_id);

View File

@ -210,8 +210,8 @@ crypto_pwhash_argon2id_str(char out[crypto_pwhash_argon2id_STRBYTES],
}
int
crypto_pwhash_argon2id_str_verify(const char str[crypto_pwhash_argon2id_STRBYTES],
const char *const passwd,
crypto_pwhash_argon2id_str_verify(const char * str,
const char * const passwd,
unsigned long long passwdlen)
{
int verify_ret;

View File

@ -172,7 +172,7 @@ crypto_pwhash_str_alg(char out[crypto_pwhash_STRBYTES],
}
int
crypto_pwhash_str_verify(const char str[crypto_pwhash_STRBYTES],
crypto_pwhash_str_verify(const char * str,
const char * const passwd,
unsigned long long passwdlen)
{
@ -190,7 +190,7 @@ crypto_pwhash_str_verify(const char str[crypto_pwhash_STRBYTES],
}
int
crypto_pwhash_str_needs_rehash(const char str[crypto_pwhash_STRBYTES],
crypto_pwhash_str_needs_rehash(const char * str,
unsigned long long opslimit, size_t memlimit)
{
if (strncmp(str, crypto_pwhash_argon2id_STRPREFIX,

View File

@ -34,12 +34,6 @@
#include <stddef.h>
#include <stdint.h>
#if SIZE_MAX > 0xffffffffULL
#define ARCH_BITS 64
#else
#define ARCH_BITS 32
#endif
#define crypto_pwhash_scryptsalsa208sha256_STRPREFIXBYTES 14
#define crypto_pwhash_scryptsalsa208sha256_STRSETTINGBYTES 57
#define crypto_pwhash_scryptsalsa208sha256_STRSALTBYTES 32

View File

@ -49,17 +49,9 @@ blkxor(uint32_t *dest, const uint32_t *src, size_t len)
{
size_t i;
#if ARCH_BITS == 32
for (i = 0; i < len * 16; i++) {
dest[i] ^= src[i];
}
#else
uint64_t *dest_ = (uint64_t *) (void *) dest;
const uint64_t *src_ = (const uint64_t *) (const void *) src;
for (i = 0; i < len * 8; i++) {
dest_[i] ^= src_[i];
}
#endif
}
/*
@ -163,9 +155,9 @@ blockmix_salsa8(const uint32_t *Bin, uint32_t *Bout, uint32_t *X, size_t r)
* Return the result of parsing B_{2r-1} as a little-endian integer.
*/
static inline uint64_t
integerify(const void *B, size_t r)
integerify(const uint32_t *B, size_t r)
{
const uint32_t *X = ((const uint32_t *) B) + (2 * r - 1) * 16;
const uint32_t *X = B + (2 * r - 1) * 16;
return ((uint64_t) (X[1]) << 32) + X[0];
}

View File

@ -57,6 +57,7 @@ sodium_strnlen(const char *str, size_t maxlen)
{
size_t i = 0U;
ACQUIRE_FENCE;
while (i < maxlen && str[i] != 0) {
i++;
}
@ -242,7 +243,7 @@ crypto_pwhash_scryptsalsa208sha256_str(
int
crypto_pwhash_scryptsalsa208sha256_str_verify(
const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
const char *str,
const char *const passwd, unsigned long long passwdlen)
{
char wanted[crypto_pwhash_scryptsalsa208sha256_STRBYTES];
@ -272,7 +273,7 @@ crypto_pwhash_scryptsalsa208sha256_str_verify(
int
crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(
const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
const char * str,
unsigned long long opslimit, size_t memlimit)
{
uint32_t N_log2, N_log2_;

View File

@ -210,11 +210,13 @@ blockmix_salsa8_xor(const __m128i *Bin1, const __m128i *Bin2, __m128i *Bout,
* Note that B's layout is permuted compared to the generic implementation.
*/
static inline uint64_t
integerify(const void *B, size_t r)
integerify(const __m128i *B, size_t r)
{
const uint64_t *X = ((const uint64_t *) B) + (2 * r - 1) * 8;
const __m128i * X = B + (2*r - 1) * 4;
const uint32_t X0 = (uint32_t) _mm_cvtsi128_si32(X[0]);
const uint32_t X13 = (uint32_t) _mm_cvtsi128_si32(_mm_srli_si128(X[3], 4));
return *X;
return (((uint64_t)(X13) << 32) + X0);
}
/*

View File

@ -3,6 +3,7 @@
/*
This file is basically amd64-51/fe25519_mul.s.
*/
#include "private/asm_cet.h"
#include "fe51_namespace.h"
#include "consts_namespace.h"
.text
@ -19,6 +20,8 @@ ASM_HIDE_SYMBOL _fe51_mul
#endif
fe51_mul:
_fe51_mul:
_CET_ENDBR
mov %rsp,%r11
and $31,%r11
add $96,%r11

View File

@ -4,6 +4,7 @@
This file is adapted from amd64-51/fe25519_square.s:
Adding loop to perform n squares.
*/
#include "private/asm_cet.h"
#include "fe51_namespace.h"
#include "consts_namespace.h"
.p2align 5
@ -21,6 +22,7 @@ ASM_HIDE_SYMBOL _fe51_nsquare
fe51_nsquare:
_fe51_nsquare:
_CET_ENDBR
mov %rsp,%r11
and $31,%r11
add $64,%r11

View File

@ -4,6 +4,7 @@
This file is the result of merging
amd64-51/fe25519_pack.c and amd64-51/fe25519_freeze.s.
*/
#include "private/asm_cet.h"
#include "fe51_namespace.h"
#include "consts_namespace.h"
.p2align 5
@ -21,6 +22,7 @@ ASM_HIDE_SYMBOL _fe51_pack
fe51_pack:
_fe51_pack:
_CET_ENDBR
mov %rsp,%r11
and $31,%r11
add $32,%r11

View File

@ -1,5 +1,6 @@
#ifdef IN_SANDY2X
#include "private/asm_cet.h"
#include "ladder_namespace.h"
#include "consts_namespace.h"
.p2align 5
@ -17,6 +18,7 @@ ASM_HIDE_SYMBOL _ladder
ladder:
_ladder:
_CET_ENDBR
mov %rsp,%r11
and $31,%r11
add $1856,%r11

View File

@ -7,6 +7,7 @@
#include "crypto_sign_ed25519.h"
#include "crypto_verify_32.h"
#include "sign_ed25519_ref10.h"
#include "private/common.h"
#include "private/ed25519_ref10.h"
#include "utils.h"
@ -23,6 +24,7 @@ _crypto_sign_ed25519_verify_detached(const unsigned char *sig,
ge25519_p3 A;
ge25519_p2 R;
ACQUIRE_FENCE;
#ifdef ED25519_COMPAT
if (sig[63] & 224) {
return -1;

View File

@ -33,31 +33,16 @@ _crypto_sign_ed25519_clamp(unsigned char k[32])
}
#ifdef ED25519_NONDETERMINISTIC
/* r = hash(B || empty_labelset || Z || pad1 || k || pad2 || empty_labelset || K || extra || M) (mod q) */
/* r = hash(k || K || noise || pad || M) (mod q) */
static void
_crypto_sign_ed25519_synthetic_r_hv(crypto_hash_sha512_state *hs,
unsigned char Z[32],
const unsigned char sk[64])
unsigned char tmp[64],
const unsigned char az[64])
{
static const unsigned char B[32] = {
0x58, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
};
static const unsigned char zeros[128] = { 0x00 };
static const unsigned char empty_labelset[3] = { 0x02, 0x00, 0x00 };
crypto_hash_sha512_update(hs, B, 32);
crypto_hash_sha512_update(hs, empty_labelset, 3);
randombytes_buf(Z, 32);
crypto_hash_sha512_update(hs, Z, 32);
crypto_hash_sha512_update(hs, zeros, 128 - (32 + 3 + 32) % 128);
crypto_hash_sha512_update(hs, sk, 32);
crypto_hash_sha512_update(hs, zeros, 128 - 32 % 128);
crypto_hash_sha512_update(hs, empty_labelset, 3);
crypto_hash_sha512_update(hs, sk + 32, 32);
/* empty extra */
crypto_hash_sha512_update(hs, az, 64);
randombytes_buf(tmp, 32);
memset(tmp + 32, 0, 32);
crypto_hash_sha512_update(hs, tmp, 64);
}
#endif
@ -76,7 +61,7 @@ _crypto_sign_ed25519_detached(unsigned char *sig, unsigned long long *siglen_p,
crypto_hash_sha512(az, sk, 32);
#ifdef ED25519_NONDETERMINISTIC
_crypto_sign_ed25519_synthetic_r_hv(&hs, nonce /* Z */, az);
_crypto_sign_ed25519_synthetic_r_hv(&hs, nonce /* tmp */, az);
#else
crypto_hash_sha512_update(&hs, az + 32, 32);
#endif

View File

@ -1,5 +1,7 @@
#ifdef HAVE_AMD64_ASM
#include "private/asm_cet.h"
.text
.p2align 5
@ -15,6 +17,8 @@ ASM_HIDE_SYMBOL _stream_salsa20_xmm6
#endif
stream_salsa20_xmm6:
_stream_salsa20_xmm6:
_CET_ENDBR
mov %rsp,%r11
and $31,%r11
add $512,%r11
@ -56,6 +60,7 @@ ASM_HIDE_SYMBOL _stream_salsa20_xmm6_xor_ic
stream_salsa20_xmm6_xor_ic:
_stream_salsa20_xmm6_xor_ic:
_CET_ENDBR
mov %rsp,%r11
and $31,%r11
add $512,%r11

View File

@ -3,6 +3,8 @@ SODIUM_EXPORT = \
sodium.h \
sodium/core.h \
sodium/crypto_aead_aes256gcm.h \
sodium/crypto_aead_aegis128l.h \
sodium/crypto_aead_aegis256.h \
sodium/crypto_aead_chacha20poly1305.h \
sodium/crypto_aead_xchacha20poly1305.h \
sodium/crypto_auth.h \
@ -25,6 +27,8 @@ SODIUM_EXPORT = \
sodium/crypto_hash_sha256.h \
sodium/crypto_hash_sha512.h \
sodium/crypto_kdf.h \
sodium/crypto_kdf_hkdf_sha256.h \
sodium/crypto_kdf_hkdf_sha512.h \
sodium/crypto_kdf_blake2b.h \
sodium/crypto_kx.h \
sodium/crypto_onetimeauth.h \

View File

@ -193,6 +193,7 @@ CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAGS_AESNI = @CFLAGS_AESNI@
CFLAGS_ARMCRYPTO = @CFLAGS_ARMCRYPTO@
CFLAGS_AVX = @CFLAGS_AVX@
CFLAGS_AVX2 = @CFLAGS_AVX2@
CFLAGS_AVX512F = @CFLAGS_AVX512F@
@ -349,6 +350,8 @@ SODIUM_EXPORT = \
sodium.h \
sodium/core.h \
sodium/crypto_aead_aes256gcm.h \
sodium/crypto_aead_aegis128l.h \
sodium/crypto_aead_aegis256.h \
sodium/crypto_aead_chacha20poly1305.h \
sodium/crypto_aead_xchacha20poly1305.h \
sodium/crypto_auth.h \
@ -371,6 +374,8 @@ SODIUM_EXPORT = \
sodium/crypto_hash_sha256.h \
sodium/crypto_hash_sha512.h \
sodium/crypto_kdf.h \
sodium/crypto_kdf_hkdf_sha256.h \
sodium/crypto_kdf_hkdf_sha512.h \
sodium/crypto_kdf_blake2b.h \
sodium/crypto_kx.h \
sodium/crypto_onetimeauth.h \

View File

@ -5,6 +5,8 @@
#include "sodium/version.h"
#include "sodium/core.h"
#include "sodium/crypto_aead_aegis128l.h"
#include "sodium/crypto_aead_aegis256.h"
#include "sodium/crypto_aead_aes256gcm.h"
#include "sodium/crypto_aead_chacha20poly1305.h"
#include "sodium/crypto_aead_xchacha20poly1305.h"
@ -14,8 +16,8 @@
#include "sodium/crypto_auth_hmacsha512256.h"
#include "sodium/crypto_box.h"
#include "sodium/crypto_box_curve25519xsalsa20poly1305.h"
#include "sodium/crypto_core_hsalsa20.h"
#include "sodium/crypto_core_hchacha20.h"
#include "sodium/crypto_core_hsalsa20.h"
#include "sodium/crypto_core_salsa20.h"
#include "sodium/crypto_core_salsa2012.h"
#include "sodium/crypto_core_salsa208.h"
@ -25,7 +27,11 @@
#include "sodium/crypto_hash_sha256.h"
#include "sodium/crypto_hash_sha512.h"
#include "sodium/crypto_kdf.h"
#include "sodium/crypto_kdf_hkdf_sha256.h"
#include "sodium/crypto_kdf_hkdf_sha512.h"
#include "sodium/crypto_kdf_blake2b.h"
#include "sodium/crypto_kdf_hkdf_sha256.h"
#include "sodium/crypto_kdf_hkdf_sha512.h"
#include "sodium/crypto_kx.h"
#include "sodium/crypto_onetimeauth.h"
#include "sodium/crypto_onetimeauth_poly1305.h"
@ -54,16 +60,16 @@
#include "sodium/utils.h"
#ifndef SODIUM_LIBRARY_MINIMAL
# include "sodium/crypto_box_curve25519xchacha20poly1305.h"
# include "sodium/crypto_core_ed25519.h"
# include "sodium/crypto_core_ristretto255.h"
# include "sodium/crypto_scalarmult_ed25519.h"
# include "sodium/crypto_scalarmult_ristretto255.h"
# include "sodium/crypto_secretbox_xchacha20poly1305.h"
# include "sodium/crypto_pwhash_scryptsalsa208sha256.h"
# include "sodium/crypto_stream_salsa2012.h"
# include "sodium/crypto_stream_salsa208.h"
# include "sodium/crypto_stream_xchacha20.h"
#include "sodium/crypto_box_curve25519xchacha20poly1305.h"
#include "sodium/crypto_core_ed25519.h"
#include "sodium/crypto_core_ristretto255.h"
#include "sodium/crypto_pwhash_scryptsalsa208sha256.h"
#include "sodium/crypto_scalarmult_ed25519.h"
#include "sodium/crypto_scalarmult_ristretto255.h"
#include "sodium/crypto_secretbox_xchacha20poly1305.h"
#include "sodium/crypto_stream_salsa2012.h"
#include "sodium/crypto_stream_salsa208.h"
#include "sodium/crypto_stream_xchacha20.h"
#endif
#endif

View File

@ -0,0 +1,92 @@
#ifndef crypto_aead_aegis128l_H
#define crypto_aead_aegis128l_H
#include <stddef.h>
#include "export.h"
#ifdef __cplusplus
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wlong-long"
#endif
extern "C" {
#endif
#define crypto_aead_aegis128l_KEYBYTES 16U
SODIUM_EXPORT
size_t crypto_aead_aegis128l_keybytes(void);
#define crypto_aead_aegis128l_NSECBYTES 0U
SODIUM_EXPORT
size_t crypto_aead_aegis128l_nsecbytes(void);
#define crypto_aead_aegis128l_NPUBBYTES 16U
SODIUM_EXPORT
size_t crypto_aead_aegis128l_npubbytes(void);
#define crypto_aead_aegis128l_ABYTES 32U
SODIUM_EXPORT
size_t crypto_aead_aegis128l_abytes(void);
#define crypto_aead_aegis128l_MESSAGEBYTES_MAX \
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aegis128l_ABYTES, (1ULL << 61) - 1)
SODIUM_EXPORT
size_t crypto_aead_aegis128l_messagebytes_max(void);
SODIUM_EXPORT
int crypto_aead_aegis128l_encrypt(unsigned char *c,
unsigned long long *clen_p,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k) __attribute__((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aegis128l_decrypt(unsigned char *m,
unsigned long long *mlen_p,
unsigned char *nsec,
const unsigned char *c,
unsigned long long clen,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k) __attribute__((warn_unused_result))
__attribute__((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aegis128l_encrypt_detached(unsigned char *c,
unsigned char *mac,
unsigned long long *maclen_p,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k)
__attribute__((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_aegis128l_decrypt_detached(unsigned char *m,
unsigned char *nsec,
const unsigned char *c,
unsigned long long clen,
const unsigned char *mac,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__((warn_unused_result)) __attribute__((nonnull(3, 5, 8, 9)));
SODIUM_EXPORT
void crypto_aead_aegis128l_keygen(unsigned char k[crypto_aead_aegis128l_KEYBYTES])
__attribute__((nonnull));
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,92 @@
#ifndef crypto_aead_aegis256_H
#define crypto_aead_aegis256_H
#include <stddef.h>
#include "export.h"
#ifdef __cplusplus
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wlong-long"
#endif
extern "C" {
#endif
#define crypto_aead_aegis256_KEYBYTES 32U
SODIUM_EXPORT
size_t crypto_aead_aegis256_keybytes(void);
#define crypto_aead_aegis256_NSECBYTES 0U
SODIUM_EXPORT
size_t crypto_aead_aegis256_nsecbytes(void);
#define crypto_aead_aegis256_NPUBBYTES 32U
SODIUM_EXPORT
size_t crypto_aead_aegis256_npubbytes(void);
#define crypto_aead_aegis256_ABYTES 32U
SODIUM_EXPORT
size_t crypto_aead_aegis256_abytes(void);
#define crypto_aead_aegis256_MESSAGEBYTES_MAX \
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aegis256_ABYTES, (1ULL << 61) - 1)
SODIUM_EXPORT
size_t crypto_aead_aegis256_messagebytes_max(void);
SODIUM_EXPORT
int crypto_aead_aegis256_encrypt(unsigned char *c,
unsigned long long *clen_p,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k) __attribute__((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aegis256_decrypt(unsigned char *m,
unsigned long long *mlen_p,
unsigned char *nsec,
const unsigned char *c,
unsigned long long clen,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k) __attribute__((warn_unused_result))
__attribute__((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aegis256_encrypt_detached(unsigned char *c,
unsigned char *mac,
unsigned long long *maclen_p,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k)
__attribute__((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_aegis256_decrypt_detached(unsigned char *m,
unsigned char *nsec,
const unsigned char *c,
unsigned long long clen,
const unsigned char *mac,
const unsigned char *ad,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__((warn_unused_result)) __attribute__((nonnull(3, 5, 8, 9)));
SODIUM_EXPORT
void crypto_aead_aegis256_keygen(unsigned char k[crypto_aead_aegis256_KEYBYTES])
__attribute__((nonnull));
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,74 @@
#ifndef crypto_kdf_hkdf_sha256_H
#define crypto_kdf_hkdf_sha256_H
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include "crypto_kdf.h"
#include "crypto_auth_hmacsha256.h"
#include "export.h"
#ifdef __cplusplus
# ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wlong-long"
# endif
extern "C" {
#endif
#define crypto_kdf_hkdf_sha256_KEYBYTES crypto_auth_hmacsha256_BYTES
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha256_keybytes(void);
#define crypto_kdf_hkdf_sha256_BYTES_MIN 0U
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha256_bytes_min(void);
#define crypto_kdf_hkdf_sha256_BYTES_MAX (0xff * crypto_auth_hmacsha256_BYTES)
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha256_bytes_max(void);
SODIUM_EXPORT
int crypto_kdf_hkdf_sha256_extract(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES],
const unsigned char *salt, size_t salt_len,
const unsigned char *ikm, size_t ikm_len)
__attribute__ ((nonnull(4)));
SODIUM_EXPORT
void crypto_kdf_hkdf_sha256_keygen(unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES]);
SODIUM_EXPORT
int crypto_kdf_hkdf_sha256_expand(unsigned char *out, size_t out_len,
const char *ctx, size_t ctx_len,
const unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES])
__attribute__ ((nonnull(1)));
/* ------------------------------------------------------------------------- */
typedef struct crypto_kdf_hkdf_sha256_state {
crypto_auth_hmacsha256_state st;
} crypto_kdf_hkdf_sha256_state;
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha256_statebytes(void);
SODIUM_EXPORT
int crypto_kdf_hkdf_sha256_extract_init(crypto_kdf_hkdf_sha256_state *state,
const unsigned char *salt, size_t salt_len)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_kdf_hkdf_sha256_extract_update(crypto_kdf_hkdf_sha256_state *state,
const unsigned char *ikm, size_t ikm_len)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_kdf_hkdf_sha256_extract_final(crypto_kdf_hkdf_sha256_state *state,
unsigned char prk[crypto_kdf_hkdf_sha256_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,75 @@
#ifndef crypto_kdf_hkdf_sha512_H
#define crypto_kdf_hkdf_sha512_H
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include "crypto_kdf.h"
#include "crypto_auth_hmacsha512.h"
#include "export.h"
#ifdef __cplusplus
# ifdef __GNUC__
# pragma GCC diagnostic ignored "-Wlong-long"
# endif
extern "C" {
#endif
#define crypto_kdf_hkdf_sha512_KEYBYTES crypto_auth_hmacsha512_BYTES
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha512_keybytes(void);
#define crypto_kdf_hkdf_sha512_BYTES_MIN 0U
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha512_bytes_min(void);
#define crypto_kdf_hkdf_sha512_BYTES_MAX (0xff * crypto_auth_hmacsha512_BYTES)
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha512_bytes_max(void);
SODIUM_EXPORT
int crypto_kdf_hkdf_sha512_extract(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES],
const unsigned char *salt, size_t salt_len,
const unsigned char *ikm, size_t ikm_len)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
void crypto_kdf_hkdf_sha512_keygen(unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_kdf_hkdf_sha512_expand(unsigned char *out, size_t out_len,
const char *ctx, size_t ctx_len,
const unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
__attribute__ ((nonnull(1)));
/* ------------------------------------------------------------------------- */
typedef struct crypto_kdf_hkdf_sha512_state {
crypto_auth_hmacsha512_state st;
} crypto_kdf_hkdf_sha512_state;
SODIUM_EXPORT
size_t crypto_kdf_hkdf_sha512_statebytes(void);
SODIUM_EXPORT
int crypto_kdf_hkdf_sha512_extract_init(crypto_kdf_hkdf_sha512_state *state,
const unsigned char *salt, size_t salt_len)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_kdf_hkdf_sha512_extract_update(crypto_kdf_hkdf_sha512_state *state,
const unsigned char *ikm, size_t ikm_len)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_kdf_hkdf_sha512_extract_final(crypto_kdf_hkdf_sha512_state *state,
unsigned char prk[crypto_kdf_hkdf_sha512_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}
#endif
#endif

View File

@ -125,13 +125,13 @@ int crypto_pwhash_str_alg(char out[crypto_pwhash_STRBYTES],
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_str_verify(const char str[crypto_pwhash_STRBYTES],
int crypto_pwhash_str_verify(const char *str,
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_str_needs_rehash(const char str[crypto_pwhash_STRBYTES],
int crypto_pwhash_str_needs_rehash(const char *str,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));

View File

@ -105,13 +105,13 @@ int crypto_pwhash_argon2i_str(char out[crypto_pwhash_argon2i_STRBYTES],
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2i_str_verify(const char str[crypto_pwhash_argon2i_STRBYTES],
int crypto_pwhash_argon2i_str_verify(const char * str,
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2i_str_needs_rehash(const char str[crypto_pwhash_argon2i_STRBYTES],
int crypto_pwhash_argon2i_str_needs_rehash(const char * str,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));

View File

@ -105,13 +105,13 @@ int crypto_pwhash_argon2id_str(char out[crypto_pwhash_argon2id_STRBYTES],
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2id_str_verify(const char str[crypto_pwhash_argon2id_STRBYTES],
int crypto_pwhash_argon2id_str_verify(const char * str,
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2id_str_needs_rehash(const char str[crypto_pwhash_argon2id_STRBYTES],
int crypto_pwhash_argon2id_str_needs_rehash(const char * str,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));

View File

@ -95,7 +95,7 @@ int crypto_pwhash_scryptsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_scryptsalsa208sha256_str_verify(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
int crypto_pwhash_scryptsalsa208sha256_str_verify(const char * str,
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
@ -108,7 +108,7 @@ int crypto_pwhash_scryptsalsa208sha256_ll(const uint8_t * passwd, size_t passwdl
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
int crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(const char * str,
unsigned long long opslimit,
size_t memlimit)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));

View File

@ -0,0 +1,11 @@
#ifndef asm_cet_H
#define asm_cet_H 1
#if HAVE_CET_H
# include <cet.h>
#endif
#ifndef _CET_ENDBR
# define _CET_ENDBR
#endif
#endif

View File

@ -226,24 +226,37 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n)
# endif
#endif
#if defined(_MSC_VER) && \
(defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))
#ifdef _MSC_VER
# include <intrin.h>
# if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)
# include <intrin.h>
# define HAVE_INTRIN_H 1
# define HAVE_MMINTRIN_H 1
# define HAVE_EMMINTRIN_H 1
# define HAVE_PMMINTRIN_H 1
# define HAVE_TMMINTRIN_H 1
# define HAVE_SMMINTRIN_H 1
# define HAVE_AVXINTRIN_H 1
# if _MSC_VER >= 1600
# define HAVE_WMMINTRIN_H 1
# endif
# if _MSC_VER >= 1700 && defined(_M_X64)
# define HAVE_AVX2INTRIN_H 1
# endif
# if _MSC_VER >= 1910 && defined(_M_X64)
# define HAVE_AVX512FINTRIN_H 1
# endif
# elif defined(_M_ARM64)
# ifndef __ARM_NEON
# define __ARM_NEON 1
# endif
# define HAVE_ARMCRYPTO 1
# endif /* _MSC_VER */
# define HAVE_INTRIN_H 1
# define HAVE_MMINTRIN_H 1
# define HAVE_EMMINTRIN_H 1
# define HAVE_PMMINTRIN_H 1
# define HAVE_TMMINTRIN_H 1
# define HAVE_SMMINTRIN_H 1
# define HAVE_AVXINTRIN_H 1
# if _MSC_VER >= 1600
# define HAVE_WMMINTRIN_H 1
# endif
# if _MSC_VER >= 1700 && defined(_M_X64)
# define HAVE_AVX2INTRIN_H 1
# endif
#elif defined(HAVE_INTRIN_H)
# include <intrin.h>
#endif
@ -258,4 +271,12 @@ extern void ct_unpoison(const void *, size_t);
# define UNPOISON(X, L) (void) 0
#endif
#ifdef HAVE_GCC_MEMORY_FENCES
# define ACQUIRE_FENCE __atomic_thread_fence(__ATOMIC_ACQUIRE)
#elif defined(HAVE_C11_MEMORY_FENCES)
# define ACQUIRE_FENCE atomic_thread_fence(memory_order_acquire)
#else
# define ACQUIRE_FENCE (void) 0
#endif
#endif

View File

@ -273,27 +273,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
static inline void
fe25519_copy(fe25519 h, const fe25519 f)
{
int32_t f0 = f[0];
int32_t f1 = f[1];
int32_t f2 = f[2];
int32_t f3 = f[3];
int32_t f4 = f[4];
int32_t f5 = f[5];
int32_t f6 = f[6];
int32_t f7 = f[7];
int32_t f8 = f[8];
int32_t f9 = f[9];
h[0] = f0;
h[1] = f1;
h[2] = f2;
h[3] = f3;
h[4] = f4;
h[5] = f5;
h[6] = f6;
h[7] = f7;
h[8] = f8;
h[9] = f9;
memcpy(h, f, 10 * sizeof h[0]);
}
/*
@ -978,7 +958,7 @@ fe25519_sq2(fe25519 h, const fe25519 f)
h[9] = (int32_t) h9;
}
static void
static inline void
fe25519_mul32(fe25519 h, const fe25519 f, uint32_t n)
{
int64_t sn = (int64_t) n;

View File

@ -191,17 +191,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b)
static inline void
fe25519_copy(fe25519 h, const fe25519 f)
{
uint64_t f0 = f[0];
uint64_t f1 = f[1];
uint64_t f2 = f[2];
uint64_t f3 = f[3];
uint64_t f4 = f[4];
h[0] = f0;
h[1] = f1;
h[2] = f2;
h[3] = f3;
h[4] = f4;
memcpy(h, f, 5 * sizeof h[0]);
}
/*
@ -489,7 +479,7 @@ fe25519_sq2(fe25519 h, const fe25519 f)
h[4] = r04;
}
static void
static inline void
fe25519_mul32(fe25519 h, const fe25519 f, uint32_t n)
{
const uint64_t mask = 0x7ffffffffffffULL;

View File

@ -7,5 +7,7 @@ int _crypto_pwhash_argon2_pick_best_implementation(void);
int _crypto_scalarmult_curve25519_pick_best_implementation(void);
int _crypto_stream_chacha20_pick_best_implementation(void);
int _crypto_stream_salsa20_pick_best_implementation(void);
int _crypto_aead_aegis128l_pick_best_implementation(void);
int _crypto_aead_aegis256_pick_best_implementation(void);
#endif

View File

@ -0,0 +1,56 @@
#ifndef softaes_H
#define softaes_H 1
#include <stdint.h>
#include "private/common.h"
typedef struct SoftAesBlock {
uint32_t w0;
uint32_t w1;
uint32_t w2;
uint32_t w3;
} SoftAesBlock;
SoftAesBlock softaes_block_encrypt(const SoftAesBlock block, const SoftAesBlock rk);
static inline SoftAesBlock
softaes_block_load(const uint8_t in[16])
{
const SoftAesBlock out = { LOAD32_LE(in + 0), LOAD32_LE(in + 4), LOAD32_LE(in + 8),
LOAD32_LE(in + 12) };
return out;
}
static inline SoftAesBlock
softaes_block_load64x2(const uint64_t a, const uint64_t b)
{
const SoftAesBlock out = { (uint32_t) b, (uint32_t) (b >> 32), (uint32_t) a,
(uint32_t) (a >> 32) };
return out;
}
static inline void
softaes_block_store(uint8_t out[16], const SoftAesBlock in)
{
STORE32_LE(out + 0, in.w0);
STORE32_LE(out + 4, in.w1);
STORE32_LE(out + 8, in.w2);
STORE32_LE(out + 12, in.w3);
}
static inline SoftAesBlock
softaes_block_xor(const SoftAesBlock a, const SoftAesBlock b)
{
const SoftAesBlock out = { a.w0 ^ b.w0, a.w1 ^ b.w1, a.w2 ^ b.w2, a.w3 ^ b.w3 };
return out;
}
static inline SoftAesBlock
softaes_block_and(const SoftAesBlock a, const SoftAesBlock b)
{
const SoftAesBlock out = { a.w0 & b.w0, a.w1 & b.w1, a.w2 & b.w2, a.w3 & b.w3 };
return out;
}
#endif

View File

@ -53,7 +53,7 @@ SODIUM_EXPORT
int randombytes_close(void);
SODIUM_EXPORT
int randombytes_set_implementation(randombytes_implementation *impl)
int randombytes_set_implementation(const randombytes_implementation *impl)
__attribute__ ((nonnull));
SODIUM_EXPORT

View File

@ -11,6 +11,9 @@ extern "C" {
SODIUM_EXPORT_WEAK
int sodium_runtime_has_neon(void);
SODIUM_EXPORT_WEAK
int sodium_runtime_has_armcrypto(void);
SODIUM_EXPORT_WEAK
int sodium_runtime_has_sse2(void);

View File

@ -93,6 +93,10 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
# endif
#endif
#if !defined(TLS) && !defined(__STDC_NO_THREADS__) && \
defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define TLS _Thread_local
#endif
#ifndef TLS
# ifdef _WIN32
# define TLS __declspec(thread)

View File

@ -44,7 +44,7 @@ randombytes_init_if_needed(void)
}
int
randombytes_set_implementation(randombytes_implementation *impl)
randombytes_set_implementation(const randombytes_implementation *impl)
{
implementation = impl;

View File

@ -1,4 +1,3 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>

View File

@ -7,6 +7,7 @@
#include <string.h>
#include "core.h"
#include "private/common.h"
#include "utils.h"
/* Derived from original code by CodesInChaos */
@ -250,6 +251,7 @@ _sodium_base642bin_skip_padding(const char * const b64, const size_t b64_len,
errno = ERANGE;
return -1;
}
ACQUIRE_FENCE;
c = b64[*b64_pos_p];
if (c == '=') {
padding_len--;

View File

@ -45,6 +45,8 @@ sodium_init(void)
_crypto_scalarmult_curve25519_pick_best_implementation();
_crypto_stream_chacha20_pick_best_implementation();
_crypto_stream_salsa20_pick_best_implementation();
_crypto_aead_aegis128l_pick_best_implementation();
_crypto_aead_aegis256_pick_best_implementation();
initialized = 1;
if (sodium_crit_leave() != 0) {
return -1; /* LCOV_EXCL_LINE */

View File

@ -3,6 +3,14 @@
#ifdef HAVE_ANDROID_GETCPUFEATURES
# include <cpu-features.h>
#endif
#ifdef __APPLE__
# include <sys/types.h>
# include <sys/sysctl.h>
# include <mach/machine.h>
#endif
#ifdef HAVE_SYS_AUXV_H
# include <sys/auxv.h>
#endif
#include "private/common.h"
#include "runtime.h"
@ -10,6 +18,7 @@
typedef struct CPUFeatures_ {
int initialized;
int has_neon;
int has_armcrypto;
int has_sse2;
int has_sse3;
int has_ssse3;
@ -48,25 +57,94 @@ static CPUFeatures _cpu_features;
static int
_sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features)
{
#ifndef __arm__
cpu_features->has_neon = 0;
return -1;
#else
# ifdef __APPLE__
# ifdef __ARM_NEON__
cpu_features->has_neon = 1;
# else
cpu_features->has_neon = 0;
# endif
# elif defined(HAVE_ANDROID_GETCPUFEATURES) && \
defined(ANDROID_CPU_ARM_FEATURE_NEON)
cpu_features->has_neon =
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0x0;
# else
cpu_features->has_neon = 0;
# endif
return 0;
cpu_features->has_armcrypto = 0;
#ifndef __ARM_ARCH
return -1; /* LCOV_EXCL_LINE */
#endif
#if defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)
cpu_features->has_neon = 1;
#elif defined(HAVE_ANDROID_GETCPUFEATURES)
cpu_features->has_neon =
(android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_ASIMD) != 0x0;
#elif (defined(__aarch64__) || defined(_M_ARM64)) && defined(AT_HWCAP)
# ifdef HAVE_GETAUXVAL
cpu_features->has_neon = (getauxval(AT_HWCAP) & (1L << 1)) != 0;
# elif defined(HAVE_ELF_AUX_INFO)
{
unsigned long buf;
if (elf_aux_info(AT_HWCAP, (void *) &buf, (int) sizeof buf) == 0) {
cpu_features->has_neon = (buf & (1L << 1)) != 0;
}
}
# endif
#elif defined(__arm__) && defined(AT_HWCAP)
# ifdef HAVE_GETAUXVAL
cpu_features->has_neon = (getauxval(AT_HWCAP) & (1L << 12)) != 0;
# elif defined(HAVE_ELF_AUX_INFO)
{
unsigned long buf;
if (elf_aux_info(AT_HWCAP, (void *) &buf, (int) sizeof buf) == 0) {
cpu_features->has_neon = (buf & (1L << 12)) != 0;
}
}
# endif
#endif
if (cpu_features->has_neon == 0) {
return 0;
}
#if defined(__ARM_FEATURE_CRYPTO) && defined(__ARM_FEATURE_AES)
cpu_features->has_armcrypto = 1;
#elif defined(_M_ARM64)
cpu_features->has_armcrypto = 1; /* assuming all CPUs supported by ARM Windows have the crypto extensions */
#elif defined(__APPLE__) && defined(CPU_TYPE_ARM64) && defined(CPU_SUBTYPE_ARM64E)
{
cpu_type_t cpu_type;
cpu_subtype_t cpu_subtype;
size_t cpu_type_len = sizeof cpu_type;
size_t cpu_subtype_len = sizeof cpu_subtype;
if (sysctlbyname("hw.cputype", &cpu_type, &cpu_type_len,
NULL, 0) == 0 && cpu_type == CPU_TYPE_ARM64 &&
sysctlbyname("hw.cpusubtype", &cpu_subtype, &cpu_subtype_len,
NULL, 0) == 0 &&
(cpu_subtype == CPU_SUBTYPE_ARM64E ||
cpu_subtype == CPU_SUBTYPE_ARM64_V8)) {
cpu_features->has_armcrypto = 1;
}
}
#elif defined(HAVE_ANDROID_GETCPUFEATURES)
cpu_features->has_armcrypto =
(android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_AES) != 0x0;
#elif (defined(__aarch64__) || defined(_M_ARM64)) && defined(AT_HWCAP)
# ifdef HAVE_GETAUXVAL
cpu_features->has_armcrypto = (getauxval(AT_HWCAP) & (1L << 3)) != 0;
# elif defined(HAVE_ELF_AUX_INFO)
{
unsigned long buf;
if (elf_aux_info(AT_HWCAP, (void *) &buf, (int) sizeof buf) == 0) {
cpu_features->has_armcrypto = (buf & (1L << 3)) != 0;
}
}
# endif
#elif defined(__arm__) && defined(AT_HWCAP2)
# ifdef HAVE_GETAUXVAL
cpu_features->has_armcrypto = (getauxval(AT_HWCAP2) & (1L << 0)) != 0;
# elif defined(HAVE_ELF_AUX_INFO)
{
unsigned long buf;
if (elf_aux_info(AT_HWCAP2, (void *) &buf, (int) sizeof buf) == 0) {
cpu_features->has_armcrypto = (buf & (1L << 0)) != 0;
}
}
# endif
#endif
return 0;
}
static void
@ -116,11 +194,10 @@ static int
_sodium_runtime_intel_cpu_features(CPUFeatures * const cpu_features)
{
unsigned int cpu_info[4];
unsigned int id;
uint32_t xcr0 = 0U;
_cpuid(cpu_info, 0x0);
if ((id = cpu_info[0]) == 0U) {
if (cpu_info[0] == 0U) {
return -1; /* LCOV_EXCL_LINE */
}
_cpuid(cpu_info, 0x00000001);
@ -248,6 +325,12 @@ sodium_runtime_has_neon(void)
return _cpu_features.has_neon;
}
int
sodium_runtime_has_armcrypto(void)
{
return _cpu_features.has_armcrypto;
}
int
sodium_runtime_has_sse2(void)
{

View File

@ -79,6 +79,7 @@ void *alloca (size_t);
defined(HAVE_POSIX_MEMALIGN)
# define HAVE_ALIGNED_MALLOC
#endif
#if defined(HAVE_MPROTECT) && \
!(defined(PROT_NONE) && defined(PROT_READ) && defined(PROT_WRITE))
# undef HAVE_MPROTECT
@ -507,7 +508,9 @@ __attribute__((noreturn)) static void
_out_of_bounds(void)
{
# if defined(HAVE_RAISE) && !defined(__wasm__)
# ifdef SIGSEGV
# ifdef SIGPROT
raise(SIGPROT);
# elif defined(SIGSEGV)
raise(SIGSEGV);
# elif defined(SIGKILL)
raise(SIGKILL);