From 609f0897649d5c1af58bb7e569f482a1d6e6c5d2 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 23 May 2023 01:36:18 +0200 Subject: [PATCH 01/73] Azure Pipelines: remove WASI CI checks for now --- azure-pipelines.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 63083510..f6c72951 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,31 +5,6 @@ trigger: pr: none jobs: - - job: "wasi" - pool: - vmImage: "ubuntu-20.04" - steps: - - script: | - sudo apt-get install build-essential curl cmake lld - displayName: Install system packages - - script: | - curl https://get.wasmer.io -sSfL | sh - displayName: Install wasmer - - script: | - curl -sL -o - https://ziglang.org/download/0.10.1/zig-linux-x86_64-0.10.1.tar.xz | tar xJ -f - -C /opt/ - sudo mv /opt/zig-* /opt/zig - export PATH=/opt/zig/bin:/opt/zig:$PATH - displayName: Install the Zig SDK - - script: | - . ~/.wasmer/wasmer.sh - dist-build/wasm32-wasi.sh - displayName: Compile libsodium - - task: PublishBuildArtifacts@1 - condition: not(canceled()) - inputs: - pathToPublish: libsodium-wasm32-wasi - artifactName: libsodium-wasm32-wasi - - job: "windows" pool: vmImage: "windows-2022" From a1348978e6fd4df033f4a0a719c1aa196d18c842 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 15 Jun 2023 04:59:56 -0700 Subject: [PATCH 02/73] build: do not define the sodium target when not found by CMake (#1287) --- contrib/Findsodium.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/Findsodium.cmake b/contrib/Findsodium.cmake index 076ff370..316c5e94 100644 --- a/contrib/Findsodium.cmake +++ b/contrib/Findsodium.cmake @@ -231,6 +231,10 @@ find_package_handle_standard_args(sodium VERSION_VAR sodium_VERSION_STRING) +if (NOT sodium_FOUND) + return() +endif() + # mark file paths as advanced mark_as_advanced(sodium_INCLUDE_DIR) mark_as_advanced(sodium_LIBRARY_DEBUG) From e4fd497b98259fb914f603c20de25846bc1a3094 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 16 Jun 2023 19:01:20 +0200 Subject: [PATCH 03/73] sodium_utils{2,3} are not worth running in benchmarks --- test/default/sodium_utils2.c | 4 ++++ test/default/sodium_utils3.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/test/default/sodium_utils2.c b/test/default/sodium_utils2.c index 2fef6cfe..22648da9 100644 --- a/test/default/sodium_utils2.c +++ b/test/default/sodium_utils2.c @@ -49,6 +49,10 @@ main(void) size_t size; unsigned int i; +#ifdef BENCHMARKS + return 0; +#endif + if (sodium_malloc(SIZE_MAX - 1U) != NULL) { return 1; } diff --git a/test/default/sodium_utils3.c b/test/default/sodium_utils3.c index 8eacc44d..1a110e2e 100644 --- a/test/default/sodium_utils3.c +++ b/test/default/sodium_utils3.c @@ -44,6 +44,10 @@ main(void) void * buf; size_t size; +#ifdef BENCHMARKS + return 0; +#endif + #ifdef SIG_DFL # ifdef SIGSEGV signal(SIGSEGV, segv_handler); From da27f75b1c129866b234d44a429100c87aff9dd7 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 18 Jul 2023 17:42:40 +0200 Subject: [PATCH 04/73] config.sub update --- build-aux/config.sub | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/build-aux/config.sub b/build-aux/config.sub index de4259e4..9865d6ea 100644 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-01-21' +timestamp='2023-06-26' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -82,7 +82,7 @@ This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" -Try \`$me --help' for more information." +Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do @@ -130,7 +130,7 @@ IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) - echo Invalid configuration \`"$1"\': more than four components >&2 + echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) @@ -145,7 +145,8 @@ case $1 in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ + | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; @@ -943,7 +944,7 @@ $basic_machine EOF IFS=$saved_IFS ;; - # We use `pc' rather than `unknown' + # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) @@ -1285,7 +1286,7 @@ case $cpu-$vendor in ;; *) - echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac @@ -1766,11 +1767,11 @@ case $os in ;; none) ;; - kernel* ) + kernel* | msvc* ) # Restricted further below ;; *) - echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac @@ -1785,18 +1786,24 @@ case $kernel-$os in ;; managarm-mlibc* | managarm-kernel* ) ;; + windows*-gnu* | windows*-msvc*) + ;; -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. - echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel* ) - echo "Invalid configuration \`$1': \`$os' needs explicit kernel." 1>&2 + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel* ) - echo "Invalid configuration \`$1': \`$kernel' does not support \`$os'." 1>&2 + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-msvc* ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) @@ -1813,7 +1820,7 @@ case $kernel-$os in # Blank kernel with real OS is always fine. ;; *-*) - echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac From 5fe02c89a7dc1d0ba78f69717d78de304b4a2021 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Tue, 18 Jul 2023 11:56:18 -0400 Subject: [PATCH 05/73] Build correctly with IBT and Shadow Stack (#1289) Add .gnu.property notes to indicate support for IBT and shadow stacks when libsodium is built with it. There's no stack switching code in here, so this should not need any other codegen changes. --- .../curve25519/sandy2x/sandy2x.S | 18 ++++++++++++++++++ .../salsa20/xmm6/salsa20_xmm6-asm.S | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S index 585804fb..eb4fe671 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S +++ b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S @@ -10,6 +10,24 @@ #include "ladder.S" #if defined(__linux__) && defined(__ELF__) +#if defined(__CET__) +.section .note.gnu.property,"a" +.p2align 3 +.long 1f - 0f +.long 4f - 1f +.long 5 +0: +.string "GNU" +1: +.p2align 3 +.long 0xc0000002 +.long 3f - 2f +2: +.long __CET__ +3: +.p2align 3 +4: +#endif .section .note.GNU-stack,"",%progbits #endif diff --git a/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S b/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S index 6d9f354e..b53a4f4a 100644 --- a/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S +++ b/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S @@ -956,5 +956,23 @@ jmp ._bytesbetween1and255 #endif #if defined(__linux__) && defined(__ELF__) +#if defined(__CET__) +.section .note.gnu.property,"a" +.p2align 3 +.long 1f - 0f +.long 4f - 1f +.long 5 +0: +.string "GNU" +1: +.p2align 3 +.long 0xc0000002 +.long 3f - 2f +2: +.long __CET__ +3: +.p2align 3 +4: +#endif .section .note.GNU-stack,"",%progbits #endif From f3bd149feb9cf6335490720a0618f63783940815 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 19 Jul 2023 15:10:52 +0200 Subject: [PATCH 06/73] Revert "Build correctly with IBT and Shadow Stack (#1289)" This reverts commit 5fe02c89a7dc1d0ba78f69717d78de304b4a2021. --- .../curve25519/sandy2x/sandy2x.S | 18 ------------------ .../salsa20/xmm6/salsa20_xmm6-asm.S | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S index eb4fe671..585804fb 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S +++ b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S @@ -10,24 +10,6 @@ #include "ladder.S" #if defined(__linux__) && defined(__ELF__) -#if defined(__CET__) -.section .note.gnu.property,"a" -.p2align 3 -.long 1f - 0f -.long 4f - 1f -.long 5 -0: -.string "GNU" -1: -.p2align 3 -.long 0xc0000002 -.long 3f - 2f -2: -.long __CET__ -3: -.p2align 3 -4: -#endif .section .note.GNU-stack,"",%progbits #endif diff --git a/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S b/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S index b53a4f4a..6d9f354e 100644 --- a/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S +++ b/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S @@ -956,23 +956,5 @@ jmp ._bytesbetween1and255 #endif #if defined(__linux__) && defined(__ELF__) -#if defined(__CET__) -.section .note.gnu.property,"a" -.p2align 3 -.long 1f - 0f -.long 4f - 1f -.long 5 -0: -.string "GNU" -1: -.p2align 3 -.long 0xc0000002 -.long 3f - 2f -2: -.long __CET__ -3: -.p2align 3 -4: -#endif .section .note.GNU-stack,"",%progbits #endif From 4f099fc59333205164f411653a518c5c57a0b7c4 Mon Sep 17 00:00:00 2001 From: Frank Denis <124872+jedisct1@users.noreply.github.com> Date: Wed, 19 Jul 2023 18:27:36 +0200 Subject: [PATCH 07/73] Add proper CET support (followup to #1290) (#1291) --- builds/msvc/vs2010/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2010/libsodium/libsodium.vcxproj.filters | 3 +++ builds/msvc/vs2012/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2012/libsodium/libsodium.vcxproj.filters | 3 +++ builds/msvc/vs2013/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2013/libsodium/libsodium.vcxproj.filters | 3 +++ builds/msvc/vs2015/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2015/libsodium/libsodium.vcxproj.filters | 3 +++ builds/msvc/vs2017/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2017/libsodium/libsodium.vcxproj.filters | 3 +++ builds/msvc/vs2019/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2019/libsodium/libsodium.vcxproj.filters | 3 +++ builds/msvc/vs2022/libsodium/libsodium.vcxproj | 1 + .../msvc/vs2022/libsodium/libsodium.vcxproj.filters | 3 +++ configure | 7 +++++++ configure.ac | 1 + libsodium.vcxproj | 1 + libsodium.vcxproj.filters | 3 +++ src/libsodium/Makefile.am | 1 + src/libsodium/Makefile.in | 4 ++-- .../crypto_scalarmult/curve25519/sandy2x/fe51_mul.S | 3 +++ .../curve25519/sandy2x/fe51_nsquare.S | 2 ++ .../crypto_scalarmult/curve25519/sandy2x/fe51_pack.S | 2 ++ .../crypto_scalarmult/curve25519/sandy2x/ladder.S | 2 ++ .../crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S | 5 +++++ src/libsodium/include/sodium/private/asm_cet.h | 11 +++++++++++ 26 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 src/libsodium/include/sodium/private/asm_cet.h diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj b/builds/msvc/vs2010/libsodium/libsodium.vcxproj index dc209abe..f3a583d5 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj b/builds/msvc/vs2012/libsodium/libsodium.vcxproj index e6996119..1dd1edda 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj b/builds/msvc/vs2013/libsodium/libsodium.vcxproj index 34299f0c..65df6a06 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj b/builds/msvc/vs2015/libsodium/libsodium.vcxproj index 47218f0e..dcf7d14b 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj b/builds/msvc/vs2017/libsodium/libsodium.vcxproj index 7220e6ca..e2274cda 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj b/builds/msvc/vs2019/libsodium/libsodium.vcxproj index fe2f2a2c..61e8fe29 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index 3e81bce6..57c5f660 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -260,6 +260,7 @@ + diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters index bd41cf43..6425d6ea 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters @@ -569,6 +569,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private diff --git a/configure b/configure index 7b5b8803..adb0e868 100755 --- a/configure +++ b/configure @@ -19767,6 +19767,13 @@ then : fi +ac_fn_c_check_header_compile "$LINENO" "cet.h" "ac_cv_header_cet_h" "$ac_includes_default" +if test "x$ac_cv_header_cet_h" = xyes +then : + printf "%s\n" "#define HAVE_CET_H 1" >>confdefs.h + +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _xgetbv() is available" >&5 printf %s "checking if _xgetbv() is available... " >&6; } diff --git a/configure.ac b/configure.ac index 51ad0f7b..de285a1a 100644 --- a/configure.ac +++ b/configure.ac @@ -585,6 +585,7 @@ AC_SUBST(CFLAGS_PCLMUL) AC_SUBST(CFLAGS_RDRAND) AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/random.h intrin.h]) +AC_CHECK_HEADERS([cet.h]) AC_MSG_CHECKING([if _xgetbv() is available]) AC_LINK_IFELSE( diff --git a/libsodium.vcxproj b/libsodium.vcxproj index 65f5fab5..a37ce3ea 100644 --- a/libsodium.vcxproj +++ b/libsodium.vcxproj @@ -498,6 +498,7 @@ + diff --git a/libsodium.vcxproj.filters b/libsodium.vcxproj.filters index e443ed39..ac201d69 100644 --- a/libsodium.vcxproj.filters +++ b/libsodium.vcxproj.filters @@ -560,6 +560,9 @@ Header Files + + Header Files + Header Files diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 92de4fd3..d65af0e3 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -82,6 +82,7 @@ libsodium_la_SOURCES = \ crypto_stream/salsa20/stream_salsa20.h \ crypto_stream/xsalsa20/stream_xsalsa20.c \ crypto_verify/sodium/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 \ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index ada6b052..f28959f6 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -326,7 +326,7 @@ 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/sodium/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 \ @@ -990,7 +990,7 @@ 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/sodium/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 \ diff --git a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S index 83501b03..94e36150 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S +++ b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_mul.S @@ -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 diff --git a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S index 41c30548..75465b0b 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S +++ b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S @@ -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 diff --git a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S index 500c8584..fb7a39a5 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S +++ b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_pack.S @@ -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 diff --git a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S index c5c06021..a25e57b3 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S +++ b/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.S @@ -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 diff --git a/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S b/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S index 6d9f354e..51ac26ab 100644 --- a/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S +++ b/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S @@ -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 diff --git a/src/libsodium/include/sodium/private/asm_cet.h b/src/libsodium/include/sodium/private/asm_cet.h new file mode 100644 index 00000000..4428c97f --- /dev/null +++ b/src/libsodium/include/sodium/private/asm_cet.h @@ -0,0 +1,11 @@ +#ifndef asm_cet_H +#define asm_cet_H 1 + +#if HAVE_CET_H +# include +#endif +#ifndef _CET_ENDBR +# define _CET_ENDBR +#endif + +#endif From dd7f1ce488800cd7c8286dd3e4a039ba4993097f Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 27 Jul 2023 12:13:21 +0200 Subject: [PATCH 08/73] Remove --experimental-wasm-bigint for the tests using Node --- test/default/wasi-test-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index 9835c75f..1adb3385 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -64,7 +64,7 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "node" ]; then echo " wasi.start(instance);" echo "})().catch(e => { console.error(e); process.exit(1); });" } >"${1}.mjs" - node --experimental-wasm-bigint --experimental-wasi-unstable-preview1 "${1}.mjs" 2>/tmp/err && + node --experimental-wasi-unstable-preview1 "${1}.mjs" 2>/tmp/err && rm -f "${1}.mjs" && exit 0 fi fi From bfc88823e34f6f4d8b53f30d6a70ee0d1d97ddec Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 3 Aug 2023 22:33:10 +0200 Subject: [PATCH 09/73] config.sub update --- build-aux/config.sub | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/build-aux/config.sub b/build-aux/config.sub index 9865d6ea..6ae25027 100644 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2023-06-26' +timestamp='2023-07-31' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1206,6 +1206,7 @@ case $cpu-$vendor in | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ + | kvx \ | le32 | le64 \ | lm32 \ | loongarch32 | loongarch64 \ @@ -1214,31 +1215,7 @@ case $cpu-$vendor in | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64eb | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r3 | mipsisa32r3el \ - | mipsisa32r5 | mipsisa32r5el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r3 | mipsisa64r3el \ - | mipsisa64r5 | mipsisa64r5el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ + | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ @@ -1733,7 +1710,7 @@ case $os in | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ - | os9* | macos* | osx* | ios* \ + | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ @@ -1759,7 +1736,7 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* | mlibc* ) + | fiwix* | mlibc* | cos* | mbr* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1816,6 +1793,10 @@ case $kernel-$os in ;; *-eabi* | *-gnueabi*) ;; + none-coff* | none-elf*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an output format "OS" + ;; -*) # Blank kernel with real OS is always fine. ;; From 2300119c4f8520f7a37aa557efb2aad732ab4502 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 3 Aug 2023 22:35:07 +0200 Subject: [PATCH 10/73] Update for Zig 0.11 --- build.zig | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/build.zig b/build.zig index 59f85e72..12388832 100644 --- a/build.zig +++ b/build.zig @@ -11,20 +11,18 @@ pub fn build(b: *std.build.Builder) !void { const src_dir = try fs.Dir.openIterableDir(fs.cwd(), src_path, .{ .no_follow = true }); const target = b.standardTargetOptions(.{}); - const mode = b.standardReleaseOptions(); + const optimize = b.standardOptimizeOption(.{}); const enable_benchmarks = b.option(bool, "enable_benchmarks", "Whether tests should be benchmarks.") orelse false; const benchmarks_iterations = b.option(u32, "iterations", "Number of iterations for benchmarks.") orelse 200; - const shared = b.addSharedLibrary( - if (target.isWindows()) "sodium_shared" else "sodium", - null, - .unversioned, - ); - const static = b.addStaticLibrary("sodium", null); + const static = b.addStaticLibrary(.{ + .name = "sodium", + .target = target, + .optimize = optimize, + }); - const libs_ = [_]*LibExeObjStep{ shared, static }; - const libs = if (target.getOsTag() == .wasi) libs_[1..] else libs_[0..]; + const libs = [_]*LibExeObjStep{static}; const prebuilt_version_file_path = "builds/msvc/version.h"; const version_file_path = "include/sodium/version.h"; @@ -34,20 +32,19 @@ pub fn build(b: *std.build.Builder) !void { } for (libs) |lib| { - lib.setTarget(target); - lib.setBuildMode(mode); - lib.install(); - if (mode != .Debug) { + b.installArtifact(lib); + if (optimize != .Debug) { lib.strip = true; } lib.linkLibC(); - lib.addIncludePath("src/libsodium/include/sodium"); + lib.addIncludePath(.{ .path = "src/libsodium/include/sodium" }); lib.defineCMacro("_GNU_SOURCE", "1"); lib.defineCMacro("CONFIGURED", "1"); lib.defineCMacro("DEV_MODE", "1"); lib.defineCMacro("HAVE_ATOMIC_OPS", "1"); lib.defineCMacro("HAVE_C11_MEMORY_FENCES", "1"); + lib.defineCMacro("HAVE_CET_H", "1"); lib.defineCMacro("HAVE_GCC_MEMORY_FENCES", "1"); lib.defineCMacro("HAVE_INLINE_ASM", "1"); lib.defineCMacro("HAVE_INTTYPES_H", "1"); @@ -149,8 +146,8 @@ pub fn build(b: *std.build.Builder) !void { }, .aarch64, .aarch64_be => { const cpu_features = target.getCpuFeatures(); - const has_neon = cpu_features.isEnabled(@enumToInt(Target.aarch64.Feature.neon)); - const has_crypto = cpu_features.isEnabled(@enumToInt(Target.aarch64.Feature.crypto)); + const has_neon = cpu_features.isEnabled(@intFromEnum(Target.aarch64.Feature.neon)); + const has_crypto = cpu_features.isEnabled(@intFromEnum(Target.aarch64.Feature.crypto)); if (has_neon and has_crypto) { lib.defineCMacro("HAVE_ARMCRYPTO", "1"); } @@ -170,9 +167,9 @@ pub fn build(b: *std.build.Builder) !void { switch (target.getCpuArch()) { .x86_64 => { - lib.target.cpu_features_add.addFeature(@enumToInt(Target.x86.Feature.sse4_1)); - lib.target.cpu_features_add.addFeature(@enumToInt(Target.x86.Feature.aes)); - lib.target.cpu_features_add.addFeature(@enumToInt(Target.x86.Feature.pclmul)); + lib.target.cpu_features_add.addFeature(@intFromEnum(Target.x86.Feature.sse4_1)); + lib.target.cpu_features_add.addFeature(@intFromEnum(Target.x86.Feature.aes)); + lib.target.cpu_features_add.addFeature(@intFromEnum(Target.x86.Feature.pclmul)); }, else => {}, } @@ -192,7 +189,7 @@ pub fn build(b: *std.build.Builder) !void { }); } else if (mem.endsWith(u8, name, ".S")) { const full_path = try fmt.allocPrint(allocator, "{s}/{s}", .{ src_path, entry.path }); - lib.addAssemblyFile(full_path); + lib.addAssemblyFile(.{ .path = full_path }); } } } @@ -215,15 +212,16 @@ pub fn build(b: *std.build.Builder) !void { continue; } const exe_name = name[0 .. name.len - 2]; - var exe = b.addExecutable(exe_name, null); - exe.setTarget(target); - exe.setBuildMode(mode); + var exe = b.addExecutable(.{ + .name = exe_name, + .target = target, + .optimize = optimize, + }); exe.linkLibC(); - exe.want_lto = false; exe.strip = true; exe.linkLibrary(static); - exe.addIncludePath("src/libsodium/include"); - exe.addIncludePath("test/quirks"); + exe.addIncludePath(.{ .path = "src/libsodium/include" }); + exe.addIncludePath(.{ .path = "test/quirks" }); const full_path = try fmt.allocPrint(allocator, "{s}/{s}", .{ test_path, entry.path }); exe.addCSourceFiles(&.{full_path}, &.{}); @@ -233,6 +231,6 @@ pub fn build(b: *std.build.Builder) !void { exe.defineCMacro("ITERATIONS", std.fmt.bufPrintIntToSlice(&buf, benchmarks_iterations, 10, .lower, .{})); } - exe.install(); + b.installArtifact(exe); } } From 70f5c8f767c18a0f8230a6e118e26804b91e41ba Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 3 Aug 2023 22:39:31 +0200 Subject: [PATCH 11/73] Update CI for Zig 0.11.0 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/dotnet-core.yml | 36 +++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f79c9c95..f28e9732 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: - name: Install dependencies run: | - curl -sL -o - https://ziglang.org/download/0.10.1/zig-linux-x86_64-0.10.1.tar.xz | tar xJ -f - -C /opt/ + curl -sL -o - https://ziglang.org/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz | tar xJ -f - -C /opt/ sudo mv /opt/zig-* /opt/zig - name: Autogen @@ -59,7 +59,7 @@ jobs: zig build -Dtarget=x86_64-macos zig build -Dtarget=aarch64-macos zig build -Dtarget=wasm32-wasi - zig build -Drelease-fast + zig build -Doptimize=ReleaseFast rm -fr zig-cache zig-out regular: diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 0ab2ff98..2f88ebcc 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -28,13 +28,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Zig - uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb + uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: - version: 0.10.1 + version: 0.11.0 - uses: actions/checkout@v3 - name: build run: | - zig build -Drelease-fast -Dtarget=x86_64-linux-gnu.2.17 + zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 - name: tests run: cd zig-out/bin && ./run.sh - uses: actions/upload-artifact@v3 @@ -46,9 +46,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Zig - uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb + uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: - version: 0.10.1 + version: 0.11.0 - name: Fix ARM support run: | curl -L https://raw.githubusercontent.com/ziglang/zig/master/lib/libc/glibc/sysdeps/arm/arm-features.h | sudo tee /opt/hostedtoolcache/zig/zig-linux-x86_64-*/x64/lib/libc/glibc/sysdeps/arm/sysdep.h >/dev/null @@ -64,7 +64,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Drelease-fast -Dtarget=arm-linux-gnueabihf.2.23 + zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-gnueabihf.2.23 - name: tests run: | cd zig-out/bin && env LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib ./run.sh @@ -77,9 +77,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Zig - uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb + uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: - version: 0.10.1 + version: 0.11.0 - name: Set up emulation environment run: | export DEBIAN_FRONTEND=noninteractive @@ -92,7 +92,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Drelease-fast -Dtarget=aarch64-linux-gnu.2.23 + zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-gnu.2.23 - name: tests run: | cd zig-out/bin && env LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib ./run.sh @@ -111,13 +111,13 @@ jobs: apk update apk add alpine-sdk ca-certificates xz - name: Install Zig - uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb + uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: - version: 0.10.1 + version: 0.11.0 - uses: actions/checkout@v3 - name: build run: | - zig build -Drelease-fast -Dtarget=x86_64-linux-musl + zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl - name: tests run: | cd zig-out/bin && ./run.sh @@ -130,13 +130,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Zig - uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb + uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: - version: 0.10.1 + version: 0.11.0 - uses: actions/checkout@v3 - name: build run: | - zig build -Drelease-fast -Dtarget=arm-linux-musleabihf + zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-musleabihf - uses: actions/upload-artifact@v3 with: name: build-linux-musl-arm @@ -146,13 +146,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Zig - uses: goto-bus-stop/setup-zig@869a4299cf8ac7db4ebffaec36ad82a682f88acb + uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: - version: 0.10.1 + version: 0.11.0 - uses: actions/checkout@v3 - name: build run: | - zig build -Drelease-fast -Dtarget=aarch64-linux-musl + zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-musl - uses: actions/upload-artifact@v3 with: name: build-linux-musl-arm64 From 1686b524abf2d11ba8afa5ac6e8801533e3ae2c5 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 4 Aug 2023 10:52:17 +0200 Subject: [PATCH 12/73] Remove fix for ARM --- .github/workflows/dotnet-core.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 2f88ebcc..306c6a9d 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -49,9 +49,6 @@ jobs: uses: goto-bus-stop/setup-zig@6fede2f0550d71291c0accf2834b216e69a2d67a with: version: 0.11.0 - - name: Fix ARM support - run: | - curl -L https://raw.githubusercontent.com/ziglang/zig/master/lib/libc/glibc/sysdeps/arm/arm-features.h | sudo tee /opt/hostedtoolcache/zig/zig-linux-x86_64-*/x64/lib/libc/glibc/sysdeps/arm/sysdep.h >/dev/null - name: Set up emulation environment run: | export DEBIAN_FRONTEND=noninteractive From 4388ef37dbcf46aab7628ee549d06d1f2f177386 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Aug 2023 09:39:11 +0200 Subject: [PATCH 13/73] Require/enable AVX for AES256-GCM --- src/libsodium/Makefile.am | 2 +- src/libsodium/Makefile.in | 2 +- .../crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index d65af0e3..4c2b506c 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -214,7 +214,7 @@ endif 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/aes256gcm/aesni/aead_aes256gcm_aesni.c diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index f28959f6..5bbf847f 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -1035,7 +1035,7 @@ librdrand_la_SOURCES = \ 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/aes256gcm/aesni/aead_aes256gcm_aesni.c diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 7faf0be0..034fdf90 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -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("aes,pclmul,avx") #endif #if !defined(_MSC_VER) || _MSC_VER < 1800 @@ -996,7 +994,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(); + return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni() & sodium_runtime_has_avx(); } #else From 4936130b917916f33d28942d36dd7c3cdefea345 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Aug 2023 10:25:10 +0200 Subject: [PATCH 14/73] Build shared libraries again, even on Windows --- build.zig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 12388832..33faf033 100644 --- a/build.zig +++ b/build.zig @@ -22,7 +22,13 @@ pub fn build(b: *std.build.Builder) !void { .optimize = optimize, }); - const libs = [_]*LibExeObjStep{static}; + const shared = b.addSharedLibrary(.{ + .name = if (target.isWindows()) "sodium_shared" else "sodium", + .target = target, + .optimize = optimize, + }); + + const libs = [_]*LibExeObjStep{ static, shared }; const prebuilt_version_file_path = "builds/msvc/version.h"; const version_file_path = "include/sodium/version.h"; @@ -33,7 +39,7 @@ pub fn build(b: *std.build.Builder) !void { for (libs) |lib| { b.installArtifact(lib); - if (optimize != .Debug) { + if (optimize != .Debug and !target.isWindows() and lib != static) { lib.strip = true; } lib.linkLibC(); From c298d1a8c624c7168fa07ed1f526b543db469063 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Aug 2023 11:07:20 +0200 Subject: [PATCH 15/73] Only create a shared library where we know it works --- build.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.zig b/build.zig index 33faf033..9f48d4d5 100644 --- a/build.zig +++ b/build.zig @@ -38,6 +38,12 @@ pub fn build(b: *std.build.Builder) !void { } for (libs) |lib| { + if (lib == shared and + !(target.isDarwin() or target.isDragonFlyBSD() or target.isFreeBSD() or + target.isLinux() or target.isNetBSD() or target.isOpenBSD() or target.isWindows())) + { + continue; + } b.installArtifact(lib); if (optimize != .Debug and !target.isWindows() and lib != static) { lib.strip = true; From 411905f83b9af47e8cbc284353e76dbf874c86fb Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Aug 2023 11:08:32 +0200 Subject: [PATCH 16/73] Reorder --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 9f48d4d5..ac964d63 100644 --- a/build.zig +++ b/build.zig @@ -44,10 +44,10 @@ pub fn build(b: *std.build.Builder) !void { { continue; } - b.installArtifact(lib); if (optimize != .Debug and !target.isWindows() and lib != static) { lib.strip = true; } + b.installArtifact(lib); lib.linkLibC(); lib.addIncludePath(.{ .path = "src/libsodium/include/sodium" }); From 29f8978f78757b207860b24cb65af6da256e6260 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Aug 2023 22:43:58 +0200 Subject: [PATCH 17/73] Update resource.rc --- builds/msvc/resource.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builds/msvc/resource.rc b/builds/msvc/resource.rc index feb27d5a..e2600dd5 100644 --- a/builds/msvc/resource.rc +++ b/builds/msvc/resource.rc @@ -44,10 +44,10 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "FileDescription", "The Sodium crypto library (libsodium) " + VALUE "FileDescription", "The Sodium crypto library (libsodium)" VALUE "FileVersion", LIBSODIUM_VERSION_STRING VALUE "InternalName", "libsodium" - VALUE "LegalCopyright", "Copyright (c) 2013-2019 The libsodium authors." + VALUE "LegalCopyright", "Copyright (c) 2013-2023 The libsodium authors." VALUE "OriginalFilename", "libsodium.dll" VALUE "ProductName", LIBSODIUM_PRODUCT_NAME VALUE "ProductVersion", LIBSODIUM_VERSION_STRING From d569fe35b3510ed363f888b8f601c862f714f6e6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 5 Aug 2023 22:52:26 +0200 Subject: [PATCH 18/73] Copy libsodium.sln from Visual Studio 2019 to Visual Studio 2022x --- builds/msvc/resource.rc | 2 ++ builds/msvc/vs2022/libsodium.sln | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/builds/msvc/resource.rc b/builds/msvc/resource.rc index e2600dd5..11baa2e8 100644 --- a/builds/msvc/resource.rc +++ b/builds/msvc/resource.rc @@ -12,6 +12,8 @@ #define LIBSODIUM_PRODUCT_NAME "libsodium (x64)" #elif defined(Win32) #define LIBSODIUM_PRODUCT_NAME "libsodium (x86)" +#elif defined(ARM64) + #define LIBSODIUM_PRODUCT_NAME "libsodium (arm64)" #else #define LIBSODIUM_PRODUCT_NAME "libsodium" #endif diff --git a/builds/msvc/vs2022/libsodium.sln b/builds/msvc/vs2022/libsodium.sln index 0f3f7306..43296cb0 100644 --- a/builds/msvc/vs2022/libsodium.sln +++ b/builds/msvc/vs2022/libsodium.sln @@ -9,42 +9,60 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution DynDebug|Win32 = DynDebug|Win32 DynDebug|x64 = DynDebug|x64 + DynDebug|ARM64 = DynDebug|ARM64 DynRelease|Win32 = DynRelease|Win32 DynRelease|x64 = DynRelease|x64 + DynRelease|ARM64 = DynRelease|ARM64 LtcgDebug|Win32 = LtcgDebug|Win32 LtcgDebug|x64 = LtcgDebug|x64 + LtcgDebug|ARM64 = LtcgDebug|ARM64 LtcgRelease|Win32 = LtcgRelease|Win32 LtcgRelease|x64 = LtcgRelease|x64 + LtcgRelease|ARM64 = LtcgRelease|ARM64 StaticDebug|Win32 = StaticDebug|Win32 StaticDebug|x64 = StaticDebug|x64 + StaticDebug|ARM64 = StaticDebug|ARM64 StaticRelease|Win32 = StaticRelease|Win32 StaticRelease|x64 = StaticRelease|x64 + StaticRelease|ARM64 = StaticRelease|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynDebug|Win32.ActiveCfg = DebugDLL|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynDebug|Win32.Build.0 = DebugDLL|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynDebug|x64.ActiveCfg = DebugDLL|x64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynDebug|x64.Build.0 = DebugDLL|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynDebug|ARM64.ActiveCfg = DebugDLL|ARM64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynDebug|ARM64.Build.0 = DebugDLL|ARM64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynRelease|Win32.ActiveCfg = ReleaseDLL|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynRelease|Win32.Build.0 = ReleaseDLL|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynRelease|x64.ActiveCfg = ReleaseDLL|x64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynRelease|x64.Build.0 = ReleaseDLL|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynRelease|ARM64.ActiveCfg = ReleaseDLL|ARM64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DynRelease|ARM64.Build.0 = ReleaseDLL|ARM64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgDebug|Win32.ActiveCfg = DebugLTCG|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgDebug|Win32.Build.0 = DebugLTCG|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgDebug|x64.ActiveCfg = DebugLTCG|x64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgDebug|x64.Build.0 = DebugLTCG|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgDebug|ARM64.ActiveCfg = DebugLTCG|ARM64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgDebug|ARM64.Build.0 = DebugLTCG|ARM64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgRelease|Win32.ActiveCfg = ReleaseLTCG|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgRelease|Win32.Build.0 = ReleaseLTCG|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgRelease|x64.ActiveCfg = ReleaseLTCG|x64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgRelease|x64.Build.0 = ReleaseLTCG|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgRelease|ARM64.ActiveCfg = ReleaseLTCG|ARM64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.LtcgRelease|ARM64.Build.0 = ReleaseLTCG|ARM64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticDebug|Win32.ActiveCfg = DebugLIB|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticDebug|Win32.Build.0 = DebugLIB|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticDebug|x64.ActiveCfg = DebugLIB|x64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticDebug|x64.Build.0 = DebugLIB|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticDebug|ARM64.ActiveCfg = DebugLIB|ARM64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticDebug|ARM64.Build.0 = DebugLIB|ARM64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticRelease|Win32.ActiveCfg = ReleaseLIB|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticRelease|Win32.Build.0 = ReleaseLIB|Win32 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticRelease|x64.ActiveCfg = ReleaseLIB|x64 {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticRelease|x64.Build.0 = ReleaseLIB|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticRelease|ARM64.ActiveCfg = ReleaseLIB|ARM64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.StaticRelease|ARM64.Build.0 = ReleaseLIB|ARM64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 1913882616c8e01b4f80f3385db759ed2299bbc3 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 31 Aug 2023 23:08:56 +0200 Subject: [PATCH 19/73] scrypt_nosse: no need to use void * in integerify() --- .../nosse/pwhash_scryptsalsa208sha256_nosse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c index 21089e6d..79483c37 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c @@ -163,9 +163,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]; } From 9e420943433c85b721d06cd0328fd540a6b93ab8 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 31 Aug 2023 23:18:09 +0200 Subject: [PATCH 20/73] scrypt_integerify_sse: be consistent with the no_sse version --- .../sse/pwhash_scryptsalsa208sha256_sse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c index 73ee4025..c3ea0a3b 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c @@ -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); } /* From 6256e097c9dea214b6dbbcc8429ebf84a096c86e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 31 Aug 2023 23:23:30 +0200 Subject: [PATCH 21/73] scrypt_nosse: Remove the 64-bit version of blkxor() It broke strict aliasing. Also remove ARCH_BITS that is not required any longer. Fixes #1301 --- .../crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h | 6 ------ .../nosse/pwhash_scryptsalsa208sha256_nosse.c | 8 -------- 2 files changed, 14 deletions(-) diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h index eee7b8b1..1224c0f1 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h @@ -34,12 +34,6 @@ #include #include -#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 diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c index 79483c37..9ecaf52f 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c @@ -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 } /* From 52b90532f630fe1e6387a0af11424d33be1cf094 Mon Sep 17 00:00:00 2001 From: Scr3amer Date: Fri, 1 Sep 2023 17:37:36 -0400 Subject: [PATCH 22/73] Define TLS as _Thread_local if the compiler supports C11 (#1304) --- .../randombytes/internal/randombytes_internal_random.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsodium/randombytes/internal/randombytes_internal_random.c b/src/libsodium/randombytes/internal/randombytes_internal_random.c index f0794f80..1176cd66 100644 --- a/src/libsodium/randombytes/internal/randombytes_internal_random.c +++ b/src/libsodium/randombytes/internal/randombytes_internal_random.c @@ -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) From 4322f15012e9ac46421467cf5b71cc55bd411788 Mon Sep 17 00:00:00 2001 From: Scr3amer Date: Sat, 2 Sep 2023 09:22:20 -0400 Subject: [PATCH 23/73] Do not redefine _mm_roti_epi64 if xop target feature is enabled. (#1305) Undefine compiler macro if present and XOP not enable to avoid preprocessor warnings due to macro redefinition --- .../crypto_generichash/blake2b/ref/blake2b-compress-sse41.h | 3 +++ .../crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h | 2 ++ src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h index ac78e5bb..c4c93f77 100644 --- a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h +++ b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h @@ -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); \ diff --git a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h index 9a7164fe..127c0f7e 100644 --- a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +++ b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h @@ -5,6 +5,7 @@ #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__)) #define _mm_roti_epi64(x, c) \ (-(c) == 32) \ ? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \ @@ -17,6 +18,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); \ diff --git a/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h b/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h index 98a47b93..5134b67c 100644 --- a/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +++ b/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h @@ -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) From 375a01d722d38200f6265ed9ece9f5a664f9402f Mon Sep 17 00:00:00 2001 From: Scr3amer Date: Sat, 2 Sep 2023 16:16:15 -0400 Subject: [PATCH 24/73] Add missing undef in _mm_roti_epi64 definition for blake2b-ssse3 (#1306) --- .../crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h index 127c0f7e..9b96b8f9 100644 --- a/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +++ b/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h @@ -6,6 +6,7 @@ #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)) \ From 9683141c86e3d76c6bbae232a9e12bf4c59da10d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 8 Sep 2023 21:57:51 +0200 Subject: [PATCH 25/73] Update m4 scripts Update ax_check_define.m4 Update ax_check_gnu_make.m4 Update ax_pthread.m4 Update ax_valgrind_check.m4 Update ax_add_fortify_source.m4 --- m4/ax_add_fortify_source.m4 | 79 +++++++++++++++++++++++++++++-------- m4/ax_check_define.m4 | 33 ++++------------ m4/ax_check_gnu_make.m4 | 15 ++++++- m4/ax_pthread.m4 | 12 +++--- m4/ax_valgrind_check.m4 | 48 +++++++++++----------- 5 files changed, 112 insertions(+), 75 deletions(-) diff --git a/m4/ax_add_fortify_source.m4 b/m4/ax_add_fortify_source.m4 index b88d496f..c0b089c0 100644 --- a/m4/ax_add_fortify_source.m4 +++ b/m4/ax_add_fortify_source.m4 @@ -9,9 +9,9 @@ # DESCRIPTION # # Check whether -D_FORTIFY_SOURCE=2 can be added to CPPFLAGS without macro -# redefinition warnings or linker errors. Some distributions (such as -# Gentoo Linux) enable _FORTIFY_SOURCE globally in their compilers, -# leading to unnecessary warnings in the form of +# redefinition warnings, other cpp warnings or linker. Some distributions +# (such as Ubuntu or Gentoo Linux) enable _FORTIFY_SOURCE globally in +# their compilers, leading to unnecessary warnings in the form of # # :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] # : note: this is the location of the previous definition @@ -21,41 +21,45 @@ # to CPPFLAGS. # # Newer mingw-w64 msys2 package comes with a bug in -# headers-git-7.0.0.5546.d200317d-1. It broke -D_FORTIFY_SOURCE -# support, and would need -lssp or -fstack-protector. See -# https://github.com/msys2/MINGW-packages/issues/5803. Try to -# actually link it. +# headers-git-7.0.0.5546.d200317d-1. It broke -D_FORTIFY_SOURCE support, +# and would need -lssp or -fstack-protector. See +# https://github.com/msys2/MINGW-packages/issues/5803. Try to actually +# link it. # # LICENSE # # Copyright (c) 2017 David Seifert -# Copyright (c) 2019 Reini Urban +# Copyright (c) 2019, 2023 Reini Urban # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 3 +#serial 8 AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[ - AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS]) + ac_save_cflags=$CFLAGS + ac_cwerror_flag=yes + AX_CHECK_COMPILE_FLAG([-Werror],[CFLAGS="$CFLAGS -Werror"]) + ax_add_fortify_3_failed= + AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=3 to CPPFLAGS]) AC_LINK_IFELSE([ AC_LANG_PROGRAM([], [[ #ifndef _FORTIFY_SOURCE return 0; #else - this_is_an_error; + _FORTIFY_SOURCE_already_defined; #endif ]] )], AC_LINK_IFELSE([ AC_LANG_SOURCE([[ - #define _FORTIFY_SOURCE 2 + #define _FORTIFY_SOURCE 3 #include int main() { - const char *s = " "; + char *s = " "; strcpy(s, "x"); return strlen(s)-1; } @@ -63,12 +67,55 @@ AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[ )], [ AC_MSG_RESULT([yes]) - CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2" + CFLAGS=$ac_save_cflags + CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=3" ], [ AC_MSG_RESULT([no]) + CFLAGS=$ac_save_cflags + ax_add_fortify_3_failed=1 ], ), [ - AC_MSG_RESULT([no]) - ]) + AC_MSG_RESULT([no]) + CFLAGS=$ac_save_cflags + ax_add_fortify_3_failed=1 + ]) + if test -n "$ax_add_fortify_3_failed" + then + AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS]) + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([], + [[ + #ifndef _FORTIFY_SOURCE + return 0; + #else + _FORTIFY_SOURCE_already_defined; + #endif + ]] + )], + AC_LINK_IFELSE([ + AC_LANG_SOURCE([[ + #define _FORTIFY_SOURCE 2 + #include + int main(void) { + char *s = " "; + strcpy(s, "x"); + return strlen(s)-1; + } + ]] + )], + [ + AC_MSG_RESULT([yes]) + CFLAGS=$ac_save_cflags + CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2" + ], [ + AC_MSG_RESULT([no]) + CFLAGS=$ac_save_cflags + ], + ), + [ + AC_MSG_RESULT([no]) + CFLAGS=$ac_save_cflags + ]) + fi ]) diff --git a/m4/ax_check_define.m4 b/m4/ax_check_define.m4 index 20ba8086..c10d1137 100644 --- a/m4/ax_check_define.m4 +++ b/m4/ax_check_define.m4 @@ -18,33 +18,12 @@ # # Copyright (c) 2008 Guido U. Draheim # -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. -#serial 9 +#serial 11 AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE]) AC_DEFUN([AC_CHECK_DEFINE],[ @@ -53,6 +32,7 @@ AC_CACHE_CHECK([for $1 defined], ac_var, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #ifdef $1 int ok; + (void)ok; #else choke me #endif @@ -68,6 +48,7 @@ AC_CACHE_CHECK([for $2 defined in $1], ac_var, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[ #ifdef $2 int ok; + (void)ok; #else choke me #endif diff --git a/m4/ax_check_gnu_make.m4 b/m4/ax_check_gnu_make.m4 index 4c761ea0..785dc96d 100644 --- a/m4/ax_check_gnu_make.m4 +++ b/m4/ax_check_gnu_make.m4 @@ -4,7 +4,7 @@ # # SYNOPSIS # -# AX_CHECK_GNU_MAKE() +# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false]) # # DESCRIPTION # @@ -13,6 +13,10 @@ # * The makefile variable `ifGNUmake' is set to the empty string, otherwise # it is set to "#". This is useful for including a special features in a # Makefile, which cannot be handled by other versions of make. +# * The makefile variable `ifnGNUmake' is set to #, otherwise +# it is set to the empty string. This is useful for including a special +# features in a Makefile, which can be handled +# by other versions of make or to specify else like clause. # * The variable `_cv_gnu_make_command` is set to the command to invoke # GNU make if it exists, the empty string otherwise. # * The variable `ax_cv_gnu_make_command` is set to the command to invoke @@ -20,6 +24,8 @@ # * If GNU Make is found, its version is extracted from the output of # `make --version` as the last field of a record of space-separated # columns and saved into the variable `ax_check_gnu_make_version`. +# * Additionally if GNU Make is found, run shell code run-if-true +# else run shell code run-if-false. # # Here is an example of its use: # @@ -31,6 +37,8 @@ # # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND))) # @ifGNUmake@ include $(DEPEND) +# @ifGNUmake@ else +# fallback code # @ifGNUmake@ endif # # Then configure.in would normally contain: @@ -61,7 +69,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 9 +#serial 12 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl [AC_PROG_AWK @@ -79,6 +87,9 @@ dnl Search all the common names for GNU make done ;]) dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])]) + AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifnGNUmake], ["#"])]) AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])]) + AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1]) AC_SUBST([ifGNUmake]) + AC_SUBST([ifnGNUmake]) ]) diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index e5858e50..9f35d139 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -87,11 +87,11 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 30 +#serial 31 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_TARGET]) +AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_SED]) AC_LANG_PUSH([C]) @@ -158,7 +158,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread -- # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case $target_os in +case $host_os in freebsd*) @@ -248,7 +248,7 @@ AS_IF([test "x$ax_pthread_clang" = "xyes"], # definitions is, on some systems, a strong hint that pthreads support is # correctly enabled -case $target_os in +case $host_os in darwin* | hpux* | linux* | osf* | solaris*) ax_pthread_check_macro="_REENTRANT" ;; @@ -450,7 +450,7 @@ if test "x$ax_pthread_ok" = "xyes"; then AC_CACHE_CHECK([whether more special flags are required for pthreads], [ax_cv_PTHREAD_SPECIAL_FLAGS], [ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $target_os in + case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; @@ -480,7 +480,7 @@ if test "x$ax_pthread_ok" = "xyes"; then # More AIX lossage: compile with *_r variant if test "x$GCC" != "xyes"; then - case $target_os in + case $host_os in aix*) AS_CASE(["x/$CC"], [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], diff --git a/m4/ax_valgrind_check.m4 b/m4/ax_valgrind_check.m4 index 876f8876..e0d8a2f3 100644 --- a/m4/ax_valgrind_check.m4 +++ b/m4/ax_valgrind_check.m4 @@ -36,21 +36,19 @@ # AX_VALGRIND_DFLT([sgcheck], [off]) # AX_VALGRIND_CHECK # -# Makefile.am: +# in each Makefile.am with tests: # # @VALGRIND_CHECK_RULES@ # VALGRIND_SUPPRESSIONS_FILES = my-project.supp # EXTRA_DIST = my-project.supp # -# This results in a "check-valgrind" rule being added to any Makefile.am -# which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been -# configured with --enable-valgrind). Running `make check-valgrind` in -# that directory will run the module's test suite (`make check`) once for -# each of the available Valgrind tools (out of memcheck, helgrind and drd) -# while the sgcheck will be skipped unless enabled again on the -# commandline with --enable-valgrind-sgcheck. The results for each check -# will be output to test-suite-$toolname.log. The target will succeed if -# there are zero errors and fail otherwise. +# This results in a "check-valgrind" rule being added. Running `make +# check-valgrind` in that directory will recursively run the module's test +# suite (`make check`) once for each of the available Valgrind tools (out +# of memcheck, helgrind and drd) while the sgcheck will be skipped unless +# enabled again on the commandline with --enable-valgrind-sgcheck. The +# results for each check will be output to test-suite-$toolname.log. The +# target will succeed if there are zero errors and fail otherwise. # # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in # memcheck, helgrind, drd and sgcheck. These are useful because often only @@ -67,7 +65,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 15 +#serial 23 dnl Configured tools m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]]) @@ -80,10 +78,14 @@ AC_DEFUN([AX_VALGRIND_DFLT],[ ])dnl AC_DEFUN([AX_VALGRIND_CHECK],[ + AM_EXTRA_RECURSIVE_TARGETS([check-valgrind]) + m4_foreach([vgtool], [valgrind_tool_list], + [AM_EXTRA_RECURSIVE_TARGETS([check-valgrind-]vgtool)]) + dnl Check for --enable-valgrind AC_ARG_ENABLE([valgrind], - [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU make)])], - [enable_valgrind=$enableval],[enable_valgrind=no]) + [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])], + [enable_valgrind=$enableval],[enable_valgrind=]) AS_IF([test "$enable_valgrind" != "no"],[ # Check for Valgrind. @@ -175,7 +177,7 @@ valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) -valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-local,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) @@ -185,12 +187,12 @@ valgrind_lt = endif # Use recursive makes in order to ignore errors during check -check-valgrind: +check-valgrind-local: ifeq ($(VALGRIND_ENABLED),yes) $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \ $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool)) else - @echo "Need to use GNU make and reconfigure with --enable-valgrind" + @echo "Need to reconfigure with --enable-valgrind" endif # Valgrind running @@ -204,14 +206,16 @@ VALGRIND_LOG_COMPILER = \ $(valgrind_lt) \ $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) -define valgrind_tool_rule = -check-valgrind-$(1): +define valgrind_tool_rule +check-valgrind-$(1)-local: ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) +ifneq ($$(TESTS),) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log +endif else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @@ -227,15 +231,9 @@ A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind MOSTLYCLEANFILES ?= MOSTLYCLEANFILES += $(valgrind_log_files) -.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) +.PHONY: check-valgrind $(addprefix check-valgrind-,$(valgrind_tools)) '] - AS_IF([test "$enable_valgrind" != "yes"], [ - VALGRIND_CHECK_RULES=' -check-valgrind: - @echo "Need to use GNU make and reconfigure with --enable-valgrind"' - ]) - AC_SUBST([VALGRIND_CHECK_RULES]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) ]) From a77269a21bc6d53b573ad3c820ad839a64bfbd64 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 8 Sep 2023 22:03:03 +0200 Subject: [PATCH 26/73] Regen --- Makefile.in | 36 ++++++- aclocal.m4 | 17 ++++ builds/Makefile.in | 36 ++++++- configure | 160 +++++++++++++++++++++++++----- contrib/Makefile.in | 36 ++++++- dist-build/Makefile.in | 36 ++++++- msvc-scripts/Makefile.in | 36 ++++++- src/Makefile.in | 42 +++++++- src/libsodium/Makefile.in | 36 ++++++- src/libsodium/include/Makefile.in | 49 +++++++-- test/Makefile.in | 42 +++++++- test/default/Makefile.in | 52 ++++++++-- 12 files changed, 522 insertions(+), 56 deletions(-) diff --git a/Makefile.in b/Makefile.in index b6e54c27..5d006150 100644 --- a/Makefile.in +++ b/Makefile.in @@ -177,6 +177,10 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -546,6 +550,11 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -853,6 +862,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-recursive + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-recursive + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-recursive + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-recursive + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-recursive + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -926,7 +955,12 @@ uninstall-am: uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--refresh check check-am clean clean-cscope clean-generic \ + am--refresh check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ diff --git a/aclocal.m4 b/aclocal.m4 index 4b734d58..d85192c0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -418,6 +418,23 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) +# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- + +# Copyright (C) 2012-2021 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_EXTRA_RECURSIVE_TARGETS +# -------------------------- +# Define the list of user recursive targets. This macro exists only to +# be traced by Automake, which will ensure that a proper definition of +# user-defined recursive targets (and associated rules) is propagated +# into all the generated Makefiles. +# TODO: We should really reject non-literal arguments here... +AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) + # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. diff --git a/builds/Makefile.in b/builds/Makefile.in index 4e63a6e9..86cc8cd7 100644 --- a/builds/Makefile.in +++ b/builds/Makefile.in @@ -127,6 +127,10 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -409,6 +413,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -482,6 +491,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-am + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-am + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-am + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-am + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -550,7 +579,12 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/configure b/configure index adb0e868..967f88f7 100755 --- a/configure +++ b/configure @@ -1550,7 +1550,6 @@ Optional Features: --enable-opt Optimize for the native CPU - The resulting library will be faster but not portable --enable-valgrind Whether to enable Valgrind on the unit tests - (requires GNU make) --disable-valgrind-memcheck Whether to skip memcheck during the Valgrind tests --disable-valgrind-helgrind @@ -6122,7 +6121,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread -- # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) -case $target_os in +case $host_os in freebsd*) @@ -6240,7 +6239,7 @@ fi # definitions is, on some systems, a strong hint that pthreads support is # correctly enabled -case $target_os in +case $host_os in darwin* | hpux* | linux* | osf* | solaris*) ax_pthread_check_macro="_REENTRANT" ;; @@ -6565,7 +6564,7 @@ then : printf %s "(cached) " >&6 else $as_nop ax_cv_PTHREAD_SPECIAL_FLAGS=no - case $target_os in + case $host_os in solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" ;; @@ -6626,7 +6625,7 @@ fi # More AIX lossage: compile with *_r variant if test "x$GCC" != "xyes"; then - case $target_os in + case $host_os in aix*) case "x/$CC" in #( x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : @@ -7282,12 +7281,15 @@ fi + + + # Check whether --enable-valgrind was given. if test ${enable_valgrind+y} then : enableval=$enable_valgrind; enable_valgrind=$enableval else $as_nop - enable_valgrind=no + enable_valgrind= fi @@ -7666,7 +7668,7 @@ valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) -valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-local,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) @@ -7676,12 +7678,12 @@ valgrind_lt = endif # Use recursive makes in order to ignore errors during check -check-valgrind: +check-valgrind-local: ifeq ($(VALGRIND_ENABLED),yes) $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \ $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool)) else - @echo "Need to use GNU make and reconfigure with --enable-valgrind" + @echo "Need to reconfigure with --enable-valgrind" endif # Valgrind running @@ -7695,14 +7697,16 @@ VALGRIND_LOG_COMPILER = \ $(valgrind_lt) \ $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) -define valgrind_tool_rule = -check-valgrind-$(1): +define valgrind_tool_rule +check-valgrind-$(1)-local: ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) +ifneq ($$(TESTS),) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log +endif else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @@ -7718,18 +7722,9 @@ A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind MOSTLYCLEANFILES ?= MOSTLYCLEANFILES += $(valgrind_log_files) -.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) +.PHONY: check-valgrind $(addprefix check-valgrind-,$(valgrind_tools)) ' - if test "$enable_valgrind" != "yes" -then : - - VALGRIND_CHECK_RULES=' -check-valgrind: - @echo "Need to use GNU make and reconfigure with --enable-valgrind"' - -fi - @@ -7834,6 +7829,7 @@ main (void) #ifdef __wasi__ int ok; + (void)ok; #else choke me #endif @@ -7860,6 +7856,116 @@ fi case $host_os in #( linux-gnu) : + ac_save_cflags=$CFLAGS + ac_cwerror_flag=yes + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror" >&5 +printf %s "checking whether C compiler accepts -Werror... " >&6; } +if test ${ax_cv_check_cflags___Werror+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_cflags___Werror=yes +else $as_nop + ax_cv_check_cflags___Werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror" >&5 +printf "%s\n" "$ax_cv_check_cflags___Werror" >&6; } +if test "x$ax_cv_check_cflags___Werror" = xyes +then : + CFLAGS="$CFLAGS -Werror" +else $as_nop + : +fi + + ax_add_fortify_3_failed= + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to add -D_FORTIFY_SOURCE=3 to CPPFLAGS" >&5 +printf %s "checking whether to add -D_FORTIFY_SOURCE=3 to CPPFLAGS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main (void) +{ + + #ifndef _FORTIFY_SOURCE + return 0; + #else + _FORTIFY_SOURCE_already_defined; + #endif + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #define _FORTIFY_SOURCE 3 + #include + int main() { + char *s = " "; + strcpy(s, "x"); + return strlen(s)-1; + } + + +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + CFLAGS=$ac_save_cflags + CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=3" + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + CFLAGS=$ac_save_cflags + ax_add_fortify_3_failed=1 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + CFLAGS=$ac_save_cflags + ax_add_fortify_3_failed=1 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test -n "$ax_add_fortify_3_failed" + then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS" >&5 printf %s "checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7873,7 +7979,7 @@ main (void) #ifndef _FORTIFY_SOURCE return 0; #else - this_is_an_error; + _FORTIFY_SOURCE_already_defined; #endif @@ -7889,8 +7995,8 @@ then : #define _FORTIFY_SOURCE 2 #include - int main() { - const char *s = " "; + int main(void) { + char *s = " "; strcpy(s, "x"); return strlen(s)-1; } @@ -7902,24 +8008,28 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } + CFLAGS=$ac_save_cflags CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + CFLAGS=$ac_save_cflags fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } + CFLAGS=$ac_save_cflags fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext + fi ;; #( *) : ;; diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 7707c589..eeb90129 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -127,6 +127,10 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -339,6 +343,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -412,6 +421,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-am + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-am + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-am + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-am + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -480,7 +509,12 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/dist-build/Makefile.in b/dist-build/Makefile.in index a2d7d18d..36d8e33a 100644 --- a/dist-build/Makefile.in +++ b/dist-build/Makefile.in @@ -127,6 +127,10 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -353,6 +357,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -426,6 +435,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-am + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-am + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-am + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-am + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -494,7 +523,12 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/msvc-scripts/Makefile.in b/msvc-scripts/Makefile.in index e44362ef..0b38cca4 100644 --- a/msvc-scripts/Makefile.in +++ b/msvc-scripts/Makefile.in @@ -127,6 +127,10 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -341,6 +345,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -414,6 +423,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-am + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-am + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-am + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-am + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -482,7 +511,12 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/src/Makefile.in b/src/Makefile.in index 79706ec0..e1bea909 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -143,6 +143,10 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -431,6 +435,11 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -589,6 +598,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-recursive + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-recursive + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-recursive + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-recursive + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-recursive + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -658,10 +687,15 @@ uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ + check-am check-valgrind-am check-valgrind-drd-am \ + check-valgrind-drd-local check-valgrind-helgrind-am \ + check-valgrind-helgrind-local check-valgrind-local \ + check-valgrind-memcheck-am check-valgrind-memcheck-local \ + check-valgrind-sgcheck-am check-valgrind-sgcheck-local clean \ + clean-generic clean-libtool cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index 5bbf847f..c175fcc3 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -699,6 +699,10 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -3137,6 +3141,11 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -3441,6 +3450,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-recursive + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-recursive + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-recursive + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-recursive + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-recursive + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ @@ -3729,7 +3758,12 @@ uninstall-am: uninstall-defexecDATA uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--depfiles check check-am clean clean-generic \ + am--depfiles check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ diff --git a/src/libsodium/include/Makefile.in b/src/libsodium/include/Makefile.in index 4fee631a..b19a7e61 100644 --- a/src/libsodium/include/Makefile.in +++ b/src/libsodium/include/Makefile.in @@ -158,6 +158,10 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) $(nobase_nodist_include_HEADERS) +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -502,6 +506,11 @@ uninstall-nobase_nodist_includeHEADERS: @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -624,6 +633,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-am + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-am + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-am + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-am + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -694,14 +723,18 @@ uninstall-am: uninstall-nobase_includeHEADERS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool cscopelist-am ctags ctags-am distclean \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man \ - install-nobase_includeHEADERS \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-valgrind-am \ + check-valgrind-drd-am check-valgrind-drd-local \ + check-valgrind-helgrind-am check-valgrind-helgrind-local \ + check-valgrind-local check-valgrind-memcheck-am \ + check-valgrind-memcheck-local check-valgrind-sgcheck-am \ + check-valgrind-sgcheck-local clean clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ diff --git a/test/Makefile.in b/test/Makefile.in index ff403d4a..6dbbab81 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -143,6 +143,10 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -434,6 +438,11 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -592,6 +601,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-recursive + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-recursive + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-recursive + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-recursive + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-recursive + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -661,10 +690,15 @@ uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ + check-am check-valgrind-am check-valgrind-drd-am \ + check-valgrind-drd-local check-valgrind-helgrind-am \ + check-valgrind-helgrind-local check-valgrind-local \ + check-valgrind-memcheck-am check-valgrind-memcheck-local \ + check-valgrind-sgcheck-am check-valgrind-sgcheck-local clean \ + clean-generic clean-libtool cscopelist-am ctags ctags-am \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ diff --git a/test/default/Makefile.in b/test/default/Makefile.in index c86f35dd..88c37c9d 100644 --- a/test/default/Makefile.in +++ b/test/default/Makefile.in @@ -506,6 +506,10 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__extra_recursive_targets = check-valgrind-recursive \ + check-valgrind-memcheck-recursive \ + check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ + check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -1714,6 +1718,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +check-valgrind-local: +check-valgrind-memcheck-local: +check-valgrind-helgrind-local: +check-valgrind-drd-local: +check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -2534,6 +2543,26 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +check-valgrind-drd: check-valgrind-drd-am + +check-valgrind-drd-am: check-valgrind-drd-local + +check-valgrind-helgrind: check-valgrind-helgrind-am + +check-valgrind-helgrind-am: check-valgrind-helgrind-local + +check-valgrind-memcheck: check-valgrind-memcheck-am + +check-valgrind-memcheck-am: check-valgrind-memcheck-local + +check-valgrind-sgcheck: check-valgrind-sgcheck-am + +check-valgrind-sgcheck-am: check-valgrind-sgcheck-local + clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ @@ -2760,15 +2789,20 @@ uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + check-am check-valgrind-am check-valgrind-drd-am \ + check-valgrind-drd-local check-valgrind-helgrind-am \ + check-valgrind-helgrind-local check-valgrind-local \ + check-valgrind-memcheck-am check-valgrind-memcheck-local \ + check-valgrind-sgcheck-am check-valgrind-sgcheck-local clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am From 2a72d4501b8051f67027f0bfbc16cf4571abf0e4 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 8 Sep 2023 23:30:25 +0200 Subject: [PATCH 27/73] Simplify how non-deterministic ed25519 nonces are computed --- .../crypto_sign/ed25519/ref10/sign.c | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/src/libsodium/crypto_sign/ed25519/ref10/sign.c b/src/libsodium/crypto_sign/ed25519/ref10/sign.c index bbdd8f72..b994cb68 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/sign.c +++ b/src/libsodium/crypto_sign/ed25519/ref10/sign.c @@ -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 From a12afb7b9d8a30eadf4f2b5995fc5ba9ba095266 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 00:43:27 +0200 Subject: [PATCH 28/73] Sync build.zig with 1.0.19 and 1.0.20 --- build.zig | 104 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 63 insertions(+), 41 deletions(-) diff --git a/build.zig b/build.zig index ac964d63..9b993c47 100644 --- a/build.zig +++ b/build.zig @@ -7,47 +7,67 @@ const LibExeObjStep = std.build.LibExeObjStep; const Target = std.Target; pub fn build(b: *std.build.Builder) !void { + const root_path = b.pathFromRoot("."); + var cwd = try fs.openDirAbsolute(root_path, .{}); + defer cwd.close(); + const src_path = "src/libsodium"; - const src_dir = try fs.Dir.openIterableDir(fs.cwd(), src_path, .{ .no_follow = true }); + const src_dir = try fs.Dir.openIterableDir(cwd, src_path, .{ .no_follow = true }); const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const enable_benchmarks = b.option(bool, "enable_benchmarks", "Whether tests should be benchmarks.") orelse false; const benchmarks_iterations = b.option(u32, "iterations", "Number of iterations for benchmarks.") orelse 200; + var build_static = b.option(bool, "static", "Build libsodium as a static library.") orelse true; + const build_shared = b.option(bool, "shared", "Build libsodium as a shared library.") orelse true; - const static = b.addStaticLibrary(.{ + const build_tests = b.option(bool, "test", "Build the tests (implies -Dstatic=true)") orelse true; + + if (build_tests) { + build_static = true; + } + const static_lib = b.addStaticLibrary(.{ .name = "sodium", .target = target, .optimize = optimize, }); - - const shared = b.addSharedLibrary(.{ + const shared_lib = b.addSharedLibrary(.{ .name = if (target.isWindows()) "sodium_shared" else "sodium", .target = target, .optimize = optimize, }); - const libs = [_]*LibExeObjStep{ static, shared }; + // work out which libraries we are building + var libs = std.ArrayList(*LibExeObjStep).init(b.allocator); + defer libs.deinit(); + if (build_static) { + try libs.append(static_lib); + } + if (build_shared) { + try libs.append(shared_lib); + } const prebuilt_version_file_path = "builds/msvc/version.h"; const version_file_path = "include/sodium/version.h"; if (src_dir.dir.access(version_file_path, .{ .mode = .read_only })) {} else |_| { - try fs.cwd().copyFile(prebuilt_version_file_path, src_dir.dir, version_file_path, .{}); + try cwd.copyFile(prebuilt_version_file_path, src_dir.dir, version_file_path, .{}); } - for (libs) |lib| { - if (lib == shared and + for (libs.items) |lib| { + if (lib.isDynamicLibrary() and !(target.isDarwin() or target.isDragonFlyBSD() or target.isFreeBSD() or target.isLinux() or target.isNetBSD() or target.isOpenBSD() or target.isWindows())) { continue; } - if (optimize != .Debug and !target.isWindows() and lib != static) { + if (optimize != .Debug and !target.isWindows() and !lib.isStaticLibrary()) { lib.strip = true; } b.installArtifact(lib); + lib.installHeader(src_path ++ "/include/sodium.h", "sodium.h"); + lib.installHeadersDirectory(src_path ++ "/include/sodium", "sodium"); lib.linkLibC(); lib.addIncludePath(.{ .path = "src/libsodium/include/sodium" }); @@ -99,7 +119,7 @@ pub fn build(b: *std.build.Builder) !void { .windows => { lib.defineCMacro("HAVE_RAISE", "1"); lib.defineCMacro("HAVE_SYS_PARAM_H", "1"); - if (lib == static) { + if (lib.isStaticLibrary()) { lib.defineCMacro("SODIUM_STATIC", "1"); } }, @@ -208,41 +228,43 @@ pub fn build(b: *std.build.Builder) !void { const test_path = "test/default"; const out_bin_path = "zig-out/bin"; - const test_dir = try fs.Dir.openIterableDir(fs.cwd(), test_path, .{ .no_follow = true }); - fs.Dir.makePath(fs.cwd(), out_bin_path) catch {}; - const out_bin_dir = try fs.Dir.openDir(fs.cwd(), out_bin_path, .{}); + const test_dir = try fs.Dir.openIterableDir(cwd, test_path, .{ .no_follow = true }); + fs.Dir.makePath(cwd, out_bin_path) catch {}; + const out_bin_dir = try fs.Dir.openDir(cwd, out_bin_path, .{}); try test_dir.dir.copyFile("run.sh", out_bin_dir, "run.sh", .{}); var allocator = heap.page_allocator; var walker = try test_dir.walk(allocator); - while (try walker.next()) |entry| { - const name = entry.basename; - if (mem.endsWith(u8, name, ".exp")) { - try test_dir.dir.copyFile(name, out_bin_dir, name, .{}); - continue; - } - if (!mem.endsWith(u8, name, ".c")) { - continue; - } - const exe_name = name[0 .. name.len - 2]; - var exe = b.addExecutable(.{ - .name = exe_name, - .target = target, - .optimize = optimize, - }); - exe.linkLibC(); - exe.strip = true; - exe.linkLibrary(static); - exe.addIncludePath(.{ .path = "src/libsodium/include" }); - exe.addIncludePath(.{ .path = "test/quirks" }); - const full_path = try fmt.allocPrint(allocator, "{s}/{s}", .{ test_path, entry.path }); - exe.addCSourceFiles(&.{full_path}, &.{}); + if (build_tests) { + while (try walker.next()) |entry| { + const name = entry.basename; + if (mem.endsWith(u8, name, ".exp")) { + try test_dir.dir.copyFile(name, out_bin_dir, name, .{}); + continue; + } + if (!mem.endsWith(u8, name, ".c")) { + continue; + } + const exe_name = name[0 .. name.len - 2]; + var exe = b.addExecutable(.{ + .name = exe_name, + .target = target, + .optimize = optimize, + }); + exe.linkLibC(); + exe.strip = true; + exe.linkLibrary(static_lib); + exe.addIncludePath(.{ .path = "src/libsodium/include" }); + exe.addIncludePath(.{ .path = "test/quirks" }); + const full_path = try fmt.allocPrint(allocator, "{s}/{s}", .{ test_path, entry.path }); + exe.addCSourceFiles(&.{full_path}, &.{}); - if (enable_benchmarks) { - exe.defineCMacro("BENCHMARKS", "1"); - var buf: [16]u8 = undefined; - exe.defineCMacro("ITERATIONS", std.fmt.bufPrintIntToSlice(&buf, benchmarks_iterations, 10, .lower, .{})); - } + if (enable_benchmarks) { + exe.defineCMacro("BENCHMARKS", "1"); + var buf: [16]u8 = undefined; + exe.defineCMacro("ITERATIONS", std.fmt.bufPrintIntToSlice(&buf, benchmarks_iterations, 10, .lower, .{})); + } - b.installArtifact(exe); + b.installArtifact(exe); + } } } From 3a6a6025ccf65f333944b328d761480a57b4bc7d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 01:04:48 +0200 Subject: [PATCH 29/73] Backport aarch64 support for aes256-gcm --- Makefile.in | 1 + builds/Makefile.in | 1 + configure | 455 +++++--- configure.ac | 139 ++- contrib/Makefile.in | 1 + dist-build/Makefile.in | 1 + msvc-scripts/Makefile.in | 1 + src/Makefile.in | 1 + src/libsodium/Makefile.am | 11 +- src/libsodium/Makefile.in | 111 +- .../crypto_aead/aes256gcm/aead_aes256gcm.c | 157 +++ .../aes256gcm/aesni/aead_aes256gcm_aesni.c | 163 +-- .../armcrypto/aead_aes256gcm_armcrypto.c | 1019 +++++++++++++++++ src/libsodium/include/Makefile.in | 1 + src/libsodium/include/sodium/runtime.h | 3 + src/libsodium/sodium/runtime.c | 113 +- test/Makefile.in | 1 + test/default/Makefile.in | 1 + 18 files changed, 1785 insertions(+), 395 deletions(-) create mode 100644 src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c create mode 100644 src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c diff --git a/Makefile.in b/Makefile.in index 5d006150..795fcc71 100644 --- a/Makefile.in +++ b/Makefile.in @@ -271,6 +271,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@ diff --git a/builds/Makefile.in b/builds/Makefile.in index 86cc8cd7..627dc776 100644 --- a/builds/Makefile.in +++ b/builds/Makefile.in @@ -150,6 +150,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@ diff --git a/configure b/configure index 967f88f7..7ddc794d 100755 --- a/configure +++ b/configure @@ -693,6 +693,7 @@ CFLAGS_SSSE3 CFLAGS_SSE3 CFLAGS_SSE2 CFLAGS_MMX +CFLAGS_ARMCRYPTO LIBTOOL_DEPS LT_SYS_LIBRARY_PATH OTOOL64 @@ -1570,7 +1571,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pthreads use pthreads library, or --without-pthreads to - disable threading support. + disable threading support --with-safecode For maintainers only - please do not use --with-ctgrind For maintainers only - please do not use --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use @@ -8598,82 +8599,6 @@ fi ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a broken Xcode version" >&5 -printf %s "checking for a broken Xcode version... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ - -#if !defined(__APPLE_CC__) || __APPLE_CC__ != 6000 -#error Not Apple -#endif -#if !defined(__clang_major__) || __clang_major__ != 11 -#error Not Xcode 11 -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using unsupported Xcode version" >&5 -printf "%s\n" "$as_me: WARNING: Using unsupported Xcode version" >&2;} - as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS -fno-stack-check" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -fno-stack-check" >&5 -printf %s "checking whether C compiler accepts $CFLAGS -fno-stack-check... " >&6; } -if eval test \${$as_CACHEVAR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS $CFLAGS -fno-stack-check" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main (void) -{ -time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$as_CACHEVAR=yes" -else $as_nop - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes" -then : - CFLAGS="$CFLAGS -fno-stack-check" -else $as_nop - : -fi - - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - if test "x$enable_ssp" != "xno" then : @@ -8813,6 +8738,48 @@ else $as_nop : fi +as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS -Wno-deprecated-declarations" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -Wno-deprecated-declarations" >&5 +printf %s "checking whether C compiler accepts $CFLAGS -Wno-deprecated-declarations... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $CFLAGS -Wno-deprecated-declarations" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + CFLAGS="$CFLAGS -Wno-deprecated-declarations" +else $as_nop + : +fi + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS -Wno-unknown-pragmas" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS -Wno-unknown-pragmas" >&5 printf %s "checking whether C compiler accepts $CFLAGS -Wno-unknown-pragmas... " >&6; } @@ -18542,10 +18509,154 @@ fi +target_cpu_aarch64=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM64 target" >&5 +printf %s "checking for ARM64 target... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef __aarch64__ +#error Not aarch64 +#endif +#include + +int +main (void) +{ +(void) 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + target_cpu_aarch64=yes +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + target_cpu_aarch64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test "x$EMSCRIPTEN" = "x" then : + if test "x$target_cpu_aarch64" = "xyes" +then : + + have_armcrypto=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM crypto instructions set" >&5 +printf %s "checking for ARM crypto instructions set... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + have_armcrypto=yes + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + oldcflags="$CFLAGS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -march=armv8-a+crypto+aes" >&5 +printf %s "checking whether C compiler accepts -march=armv8-a+crypto+aes... " >&6; } +if test ${ax_cv_check_cflags___march_armv8_apcryptopaes+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -march=armv8-a+crypto+aes" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_cflags___march_armv8_apcryptopaes=yes +else $as_nop + ax_cv_check_cflags___march_armv8_apcryptopaes=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___march_armv8_apcryptopaes" >&5 +printf "%s\n" "$ax_cv_check_cflags___march_armv8_apcryptopaes" >&6; } +if test "x$ax_cv_check_cflags___march_armv8_apcryptopaes" = xyes +then : + + CFLAGS="$CFLAGS -march=armv8-a+crypto+aes" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM crypto instructions set with -march=armv8-a+crypto+aes" >&5 +printf %s "checking for ARM crypto instructions set with -march=armv8-a+crypto+aes... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - with addition of -march=armv8-a+crypto+aes" >&5 +printf "%s\n" "yes - with addition of -march=armv8-a+crypto+aes" >&6; } + have_armcrypto=yes + CFLAGS_ARMCRYPTO="-march=armv8-a+crypto+aes" + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$oldcflags" + +else $as_nop + : +fi + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + if test "$have_armcrypto" = "yes" +then : + +printf "%s\n" "#define HAVE_ARMCRYPTO 1" >>confdefs.h + +fi + +fi + oldcflags="$CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mmmx" >&5 printf %s "checking whether C compiler accepts -mmmx... " >&6; } @@ -18603,7 +18714,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -18654,7 +18765,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -18718,7 +18830,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -18769,7 +18881,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -18830,7 +18943,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -18881,7 +18994,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -18941,7 +19055,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -18992,7 +19106,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -19052,7 +19167,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19103,7 +19218,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -19163,7 +19279,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19214,7 +19330,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -19278,7 +19395,7 @@ return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19341,7 +19458,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19352,13 +19469,15 @@ printf "%s\n" "no" >&6; } printf "%s\n" "#define _mm256_broadcastsi128_si256 _mm_broadcastsi128_si256" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -19434,7 +19553,7 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19528,7 +19647,8 @@ fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -19630,7 +19750,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19722,7 +19842,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" oldcflags="$CFLAGS" @@ -19782,7 +19903,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } @@ -19834,7 +19955,8 @@ else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" @@ -19852,6 +19974,7 @@ fi + ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" if test "x$ac_cv_header_sys_mman_h" = xyes then : @@ -19875,6 +19998,19 @@ if test "x$ac_cv_header_intrin_h" = xyes then : printf "%s\n" "#define HAVE_INTRIN_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/auxv.h" "ac_cv_header_sys_auxv_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_auxv_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_AUXV_H 1" >>confdefs.h + +fi + +ac_fn_c_check_header_compile "$LINENO" "CommonCrypto/CommonRandom.h" "ac_cv_header_CommonCrypto_CommonRandom_h" "$ac_includes_default" +if test "x$ac_cv_header_CommonCrypto_CommonRandom_h" = xyes +then : + printf "%s\n" "#define HAVE_COMMONCRYPTO_COMMONRANDOM_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "cet.h" "ac_cv_header_cet_h" "$ac_includes_default" @@ -20218,7 +20354,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } @@ -20228,7 +20364,8 @@ printf "%s\n" "yes" >&6; } CPPFLAGS="$CPPFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use inline asm code" >&5 printf %s "checking whether we can use inline asm code... " >&6; } @@ -20606,49 +20743,6 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if data alignment is required" >&5 -printf %s "checking if data alignment is required... " >&6; } -aligned_access_required=yes -case $host_cpu in #( - i?86|amd64|x86_64|powerpc*|s390*) : - aligned_access_required=no ;; #( - arm*) : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef __ARM_FEATURE_UNALIGNED -# error data alignment is required -#endif - -int -main (void) -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - aligned_access_required=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ;; #( - *) : - ;; -esac -if test "x$aligned_access_required" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -printf "%s\n" "#define CPU_UNALIGNED_ACCESS 1" >>confdefs.h - -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if atomic operations are supported" >&5 printf %s "checking if atomic operations are supported... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -20674,6 +20768,68 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_ATOMIC_OPS 1" >>confdefs.h +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C11 memory fences are supported" >&5 +printf %s "checking if C11 memory fences are supported... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main (void) +{ + +atomic_thread_fence(memory_order_acquire); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_C11_MEMORY_FENCES 1" >>confdefs.h + +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gcc memory fences are supported" >&5 +printf %s "checking if gcc memory fences are supported... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + +__atomic_thread_fence(__ATOMIC_ACQUIRE); + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_GCC_MEMORY_FENCES 1" >>confdefs.h + else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } @@ -20913,16 +21069,15 @@ printf %s "checking for getrandom with a standard API... " >&6; } #ifdef HAVE_SYS_RANDOM_H # include #endif -#ifdef __SANITIZE_ADDRESS__ -# error A recent libasan version on an old system may intercept nonexistent functions -#endif int main (void) { unsigned char buf; -(void) getrandom((void *) &buf, 1U, 0U); +if (&getrandom != NULL) { + (void) getrandom((void *) &buf, 1U, 0U); +} ; return 0; @@ -20959,16 +21114,12 @@ printf %s "checking for getentropy with a standard API... " >&6; } #ifdef HAVE_SYS_RANDOM_H # include #endif -#ifdef __SANITIZE_ADDRESS__ -# error A recent libasan version on an old system may intercept nonexistent functions -#endif int main (void) { unsigned char buf; - if (&getentropy != NULL) { (void) getentropy((void *) &buf, 1U); } diff --git a/configure.ac b/configure.ac index de285a1a..9cf4e548 100644 --- a/configure.ac +++ b/configure.ac @@ -131,7 +131,7 @@ AM_CONDITIONAL([MINIMAL], [test x$enable_minimal = xyes]) AC_SUBST(SODIUM_LIBRARY_MINIMAL_DEF) AC_ARG_WITH(pthreads, AS_HELP_STRING([--with-pthreads], - [use pthreads library, or --without-pthreads to disable threading support.]), + [use pthreads library, or --without-pthreads to disable threading support]), [ ], [withval="yes"]) AS_IF([test "x$withval" = "xyes"], [ @@ -293,23 +293,6 @@ AS_CASE([$host_os], ]) ]) -AC_MSG_CHECKING(for a broken Xcode version) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ -#if !defined(__APPLE_CC__) || __APPLE_CC__ != 6000 -#error Not Apple -#endif -#if !defined(__clang_major__) || __clang_major__ != 11 -#error Not Xcode 11 -#endif -]])], - [AC_MSG_RESULT(yes) - AC_MSG_WARN([Using unsupported Xcode version]) - AX_CHECK_COMPILE_FLAG([$CFLAGS -fno-stack-check], - [CFLAGS="$CFLAGS -fno-stack-check"]) - ], - [AC_MSG_RESULT(no) -]) - AS_IF([test "x$enable_ssp" != "xno"],[ AS_CASE([$host_os], @@ -324,6 +307,7 @@ AS_CASE([$host_os], ]) AX_CHECK_COMPILE_FLAG([$CFLAGS -Wall], [CWFLAGS="$CFLAGS -Wall"]) +AX_CHECK_COMPILE_FLAG([$CFLAGS -Wno-deprecated-declarations], [CFLAGS="$CFLAGS -Wno-deprecated-declarations"]) AX_CHECK_COMPILE_FLAG([$CFLAGS -Wno-unknown-pragmas], [CFLAGS="$CFLAGS -Wno-unknown-pragmas"]) AC_ARG_VAR([CWFLAGS], [compilation flags for generating extra warnings]) @@ -392,14 +376,55 @@ AC_SUBST(LIBTOOL_DEPS) AC_ARG_VAR([AR], [path to the ar utility]) AC_CHECK_TOOL([AR], [ar], [ar]) -dnl Checks for headers +dnl Checks for headers and codegen feature flags + +target_cpu_aarch64=no +AC_MSG_CHECKING(for ARM64 target) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([ +#ifndef __aarch64__ +#error Not aarch64 +#endif +#include + ], [(void) 0])], + [AC_MSG_RESULT(yes) + target_cpu_aarch64=yes], + [AC_MSG_RESULT(no) + target_cpu_aarch64=no]) AS_IF([test "x$EMSCRIPTEN" = "x"], [ + AS_IF([test "x$target_cpu_aarch64" = "xyes"], [ + have_armcrypto=no + AC_MSG_CHECKING(for ARM crypto instructions set) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) ]])], + [ + AC_MSG_RESULT(yes) + have_armcrypto=yes + ], + [ + AC_MSG_RESULT(no) + oldcflags="$CFLAGS" + AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto+aes], [ + CFLAGS="$CFLAGS -march=armv8-a+crypto+aes" + AC_MSG_CHECKING(for ARM crypto instructions set with -march=armv8-a+crypto+aes) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) ]])], + [ + AC_MSG_RESULT(yes - with addition of -march=armv8-a+crypto+aes) + have_armcrypto=yes + CFLAGS_ARMCRYPTO="-march=armv8-a+crypto+aes" + ], + [AC_MSG_RESULT(no)]) + CFLAGS="$oldcflags" + ]) + ]) + AS_IF([test "$have_armcrypto" = "yes"],[AC_DEFINE([HAVE_ARMCRYPTO], [1], [ARM crypto extensions are available])]) + ]) + oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-mmmx], [CFLAGS="$CFLAGS -mmmx"]) AC_MSG_CHECKING(for MMX instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("mmx") #include ]], [[ __m64 x = _mm_setzero_si64(); ]])], @@ -412,7 +437,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-msse2], [CFLAGS="$CFLAGS -msse2"]) AC_MSG_CHECKING(for SSE2 instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("sse2") #ifndef __SSE2__ # define __SSE2__ @@ -429,7 +454,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-msse3], [CFLAGS="$CFLAGS -msse3"]) AC_MSG_CHECKING(for SSE3 instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("sse3") #include ]], [[ __m128 x = _mm_addsub_ps(_mm_cvtpd_ps(_mm_setzero_pd()), @@ -443,7 +468,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-mssse3], [CFLAGS="$CFLAGS -mssse3"]) AC_MSG_CHECKING(for SSSE3 instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("ssse3") #include ]], [[ __m64 x = _mm_abs_pi32(_m_from_int(0)); ]])], @@ -456,7 +481,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS="$CFLAGS -msse4.1"]) AC_MSG_CHECKING(for SSE4.1 instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("sse4.1") #include ]], [[ __m128i x = _mm_minpos_epu16(_mm_setzero_si128()); ]])], @@ -469,7 +494,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-mavx], [CFLAGS="$CFLAGS -mavx"]) AC_MSG_CHECKING(for AVX instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("avx") #include ]], [[ _mm256_zeroall(); ]])], @@ -482,7 +507,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-mavx2], [CFLAGS="$CFLAGS -mavx2"]) AC_MSG_CHECKING(for AVX2 instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("avx2") #include ]], [[ @@ -494,7 +519,7 @@ return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); AC_DEFINE([HAVE_AVX2INTRIN_H], [1], [AVX2 is available]) AX_CHECK_COMPILE_FLAG([-mavx2], [CFLAGS_AVX2="-mavx2"]) AC_MSG_CHECKING(if _mm256_broadcastsi128_si256 is correctly defined) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("avx2") #include ]], [[ __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); ]])], @@ -509,7 +534,7 @@ return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-mavx512f], [CFLAGS="$CFLAGS -mavx512f"]) AC_MSG_CHECKING(for AVX512F instructions set) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("avx512f") #include ]], [[ @@ -542,7 +567,7 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), AX_CHECK_COMPILE_FLAG([-maes], [CFLAGS="$CFLAGS -maes"]) AX_CHECK_COMPILE_FLAG([-mpclmul], [CFLAGS="$CFLAGS -mpclmul"]) AC_MSG_CHECKING(for AESNI instructions set and PCLMULQDQ) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("aes") #pragma GCC target("pclmul") #include @@ -559,7 +584,7 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), oldcflags="$CFLAGS" AX_CHECK_COMPILE_FLAG([-mrdrnd], [CFLAGS="$CFLAGS -mrdrnd"]) AC_MSG_CHECKING(for RDRAND) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #pragma GCC target("rdrnd") #include ]], [[ unsigned long long x; _rdrand64_step(&x); ]])], @@ -572,6 +597,7 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), ]) +AC_SUBST(CFLAGS_ARMCRYPTO) AC_SUBST(CFLAGS_MMX) AC_SUBST(CFLAGS_SSE2) AC_SUBST(CFLAGS_SSE3) @@ -584,7 +610,8 @@ AC_SUBST(CFLAGS_AESNI) AC_SUBST(CFLAGS_PCLMUL) AC_SUBST(CFLAGS_RDRAND) -AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/random.h intrin.h]) +AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/random.h intrin.h sys/auxv.h]) +AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h]) AC_CHECK_HEADERS([cet.h]) AC_MSG_CHECKING([if _xgetbv() is available]) @@ -609,7 +636,7 @@ AC_C_BIGENDIAN( ) AC_MSG_CHECKING(whether __STDC_LIMIT_MACROS is required) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include ]], [[ @@ -793,23 +820,6 @@ void f(void *x) { __dummy(x); } AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], [weak symbols are supported])], [AC_MSG_RESULT(no)]) -AC_MSG_CHECKING(if data alignment is required) -aligned_access_required=yes -AS_CASE([$host_cpu], - [i?86|amd64|x86_64|powerpc*|s390*], - [aligned_access_required=no], - [arm*], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifndef __ARM_FEATURE_UNALIGNED -# error data alignment is required -#endif - ]], [[]])], [aligned_access_required=no], [])] -) -AS_IF([test "x$aligned_access_required" = "xyes"], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_DEFINE([CPU_UNALIGNED_ACCESS], [1], [unaligned memory access is supported])]) - AC_MSG_CHECKING(if atomic operations are supported) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ static volatile int _sodium_lock; @@ -821,6 +831,26 @@ __sync_lock_release(&_sodium_lock); AC_DEFINE([HAVE_ATOMIC_OPS], [1], [atomic operations are supported])], [AC_MSG_RESULT(no)]) +AC_MSG_CHECKING(if C11 memory fences are supported) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include + ]], [[ +atomic_thread_fence(memory_order_acquire); +]] +)], +[AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_C11_MEMORY_FENCES], [1], [C11 memory fences are supported])], +[AC_MSG_RESULT(no)]) + +AC_MSG_CHECKING(if gcc memory fences are supported) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ +__atomic_thread_fence(__ATOMIC_ACQUIRE); +]] +)], +[AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_GCC_MEMORY_FENCES], [1], [GCC memory fences are supported])], +[AC_MSG_RESULT(no)]) + dnl Checks for functions and headers AC_FUNC_ALLOCA @@ -840,12 +870,11 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[ #ifdef HAVE_SYS_RANDOM_H # include #endif -#ifdef __SANITIZE_ADDRESS__ -# error A recent libasan version on an old system may intercept nonexistent functions -#endif ]], [[ unsigned char buf; -(void) getrandom((void *) &buf, 1U, 0U); +if (&getrandom != NULL) { + (void) getrandom((void *) &buf, 1U, 0U); +} ]])], [AC_MSG_RESULT(yes) AC_CHECK_FUNCS([getrandom])], @@ -861,12 +890,8 @@ unsigned char buf; #ifdef HAVE_SYS_RANDOM_H # include #endif -#ifdef __SANITIZE_ADDRESS__ -# error A recent libasan version on an old system may intercept nonexistent functions -#endif ]], [[ unsigned char buf; - if (&getentropy != NULL) { (void) getentropy((void *) &buf, 1U); } diff --git a/contrib/Makefile.in b/contrib/Makefile.in index eeb90129..31969e1c 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -150,6 +150,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@ diff --git a/dist-build/Makefile.in b/dist-build/Makefile.in index 36d8e33a..4ecd77d7 100644 --- a/dist-build/Makefile.in +++ b/dist-build/Makefile.in @@ -150,6 +150,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@ diff --git a/msvc-scripts/Makefile.in b/msvc-scripts/Makefile.in index 0b38cca4..39e4b60e 100644 --- a/msvc-scripts/Makefile.in +++ b/msvc-scripts/Makefile.in @@ -150,6 +150,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@ diff --git a/src/Makefile.in b/src/Makefile.in index e1bea909..de664f13 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -208,6 +208,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@ diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 4c2b506c..312f4f3d 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -2,6 +2,7 @@ lib_LTLIBRARIES = \ libsodium.la libsodium_la_SOURCES = \ + crypto_aead/aes256gcm/aead_aes256gcm.c \ crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \ crypto_auth/crypto_auth.c \ @@ -195,8 +196,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) \ @@ -212,6 +213,12 @@ 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/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c + libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS) libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AVX@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index c175fcc3..cf31cd12 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -228,6 +228,13 @@ 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/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,9 +257,11 @@ 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/aes256gcm/aead_aes256gcm.c \ crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \ crypto_auth/crypto_auth.c \ @@ -412,7 +421,9 @@ 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 \ +am_libsodium_la_OBJECTS = \ + crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo \ + crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo \ crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.lo \ crypto_auth/libsodium_la-crypto_auth.lo \ crypto_auth/hmacsha256/libsodium_la-auth_hmacsha256.lo \ @@ -530,7 +541,9 @@ 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 \ +am__depfiles_remade = 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/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo \ crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo \ crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo \ @@ -667,13 +680,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 \ @@ -765,6 +779,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@ @@ -920,7 +935,7 @@ valgrind_tools = @valgrind_tools@ lib_LTLIBRARIES = \ libsodium.la -libsodium_la_SOURCES = \ +libsodium_la_SOURCES = crypto_aead/aes256gcm/aead_aes256gcm.c \ crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \ crypto_auth/crypto_auth.c \ @@ -1026,10 +1041,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@ @@ -1037,6 +1054,13 @@ 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/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c + libaesni_la_LDFLAGS = $(libsodium_la_LDFLAGS) libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ @CFLAGS_SSE2@ @CFLAGS_SSSE3@ @CFLAGS_AVX@ @CFLAGS_AESNI@ @CFLAGS_PCLMUL@ @@ -1192,6 +1216,18 @@ 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/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) @@ -1249,6 +1285,15 @@ 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/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/sodium/$(am__dirstamp): @$(MKDIR_P) crypto_aead/chacha20poly1305/sodium @: > crypto_aead/chacha20poly1305/sodium/$(am__dirstamp) @@ -1945,8 +1990,12 @@ libssse3.la: $(libssse3_la_OBJECTS) $(libssse3_la_DEPENDENCIES) $(EXTRA_libssse3 mostlyclean-compile: -rm -f *.$(OBJEXT) + -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/aes256gcm/armcrypto/*.$(OBJEXT) + -rm -f crypto_aead/aes256gcm/armcrypto/*.lo -rm -f crypto_aead/chacha20poly1305/sodium/*.$(OBJEXT) -rm -f crypto_aead/chacha20poly1305/sodium/*.lo -rm -f crypto_aead/xchacha20poly1305/sodium/*.$(OBJEXT) @@ -2091,7 +2140,9 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@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/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.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_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo@am__quote@ # am--include-marker @@ -2275,6 +2326,13 @@ 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/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 @@ -2317,6 +2375,13 @@ 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/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/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 @@ -3015,7 +3080,9 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _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/aes256gcm/armcrypto/.libs crypto_aead/aes256gcm/armcrypto/_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_auth/.libs crypto_auth/_libs @@ -3304,8 +3371,12 @@ 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/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/aes256gcm/armcrypto/$(DEPDIR)/$(am__dirstamp) + -rm -f crypto_aead/aes256gcm/armcrypto/$(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) @@ -3476,7 +3547,9 @@ 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/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/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo -rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo -rm -f crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo @@ -3629,7 +3702,9 @@ 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/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/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo -rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.Plo -rm -f crypto_auth/$(DEPDIR)/libsodium_la-crypto_auth.Plo diff --git a/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c b/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c new file mode 100644 index 00000000..2946ba87 --- /dev/null +++ b/src/libsodium/crypto_aead/aes256gcm/aead_aes256gcm.c @@ -0,0 +1,157 @@ +#include +#include + +#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 \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c index 034fdf90..91e578df 100644 --- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c @@ -17,7 +17,7 @@ #if defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H) #ifdef __GNUC__ -#pragma GCC target("aes,pclmul,avx") +#pragma GCC target("avx,aes,pclmul") #endif #if !defined(_MSC_VER) || _MSC_VER < 1800 @@ -442,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) { @@ -452,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]); @@ -746,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; } @@ -921,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; @@ -997,152 +1006,4 @@ crypto_aead_aes256gcm_is_available(void) return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni() & sodium_runtime_has_avx(); } -#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; -} - -#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); -} diff --git a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c new file mode 100644 index 00000000..b6330642 --- /dev/null +++ b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c @@ -0,0 +1,1019 @@ +#include +#include +#include +#include +#include + +#include "core.h" +#include "crypto_aead_aes256gcm.h" +#include "crypto_verify_16.h" +#include "export.h" +#include "private/common.h" +#include "randombytes.h" +#include "runtime.h" +#include "utils.h" + +#if defined(HAVE_ARMCRYPTO) && defined(__clang__) && defined(NATIVE_LITTLE_ENDIAN) + +#if !defined(MSC_VER) || _MSC_VER < 1800 +#define __vectorcall +#endif + +#ifndef __ARM_FEATURE_AES +#define __ARM_FEATURE_AES 1 +#endif + +#include + +#define ABYTES crypto_aead_aes256gcm_ABYTES +#define NPUBBYTES crypto_aead_aes256gcm_NPUBBYTES +#define KEYBYTES crypto_aead_aes256gcm_KEYBYTES + +#define PARALLEL_BLOCKS 6 +#undef USE_KARATSUBA_MULTIPLICATION + +typedef uint64x2_t BlockVec; + +#define LOAD128(a) vld1q_u64((const uint64_t *) (const void *) (a)) +#define STORE128(a, b) vst1q_u64((uint64_t *) (void *) (a), (b)) +#define AES_XENCRYPT(block_vec, rkey) \ + vreinterpretq_u64_u8(vaesmcq_u8(vaeseq_u8(vreinterpretq_u8_u64(block_vec), rkey))) +#define AES_XENCRYPTLAST(block_vec, rkey) \ + vreinterpretq_u64_u8(vaeseq_u8(vreinterpretq_u8_u64(block_vec), rkey)) +#define XOR128(a, b) veorq_u64((a), (b)) +#define AND128(a, b) vandq_u64((a), (b)) +#define OR128(a, b) vorrq_u64((a), (b)) +#define SET64x2(a, b) vsetq_lane_u64((uint64_t) (a), vmovq_n_u64((uint64_t) (b)), 1) +#define ZERO128 vmovq_n_u8(0) +#define ONE128 SET64x2(0, 1) +#define ADD64x2(a, b) vaddq_u64((a), (b)) +#define SUB64x2(a, b) vsubq_u64((a), (b)) +#define SHL64x2(a, b) vshlq_n_u64((a), (b)) +#define SHR64x2(a, b) vshrq_n_u64((a), (b)) +#define REV128(x) \ + vreinterpretq_u64_u8(__builtin_shufflevector(vreinterpretq_u8_u64(x), vreinterpretq_u8_u64(x), \ + 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, \ + 1, 0)) +#define SHUFFLE32x4(x, a, b, c, d) \ + vreinterpretq_u64_u32(__builtin_shufflevector(vreinterpretq_u32_u64(x), \ + vreinterpretq_u32_u64(x), (a), (b), (c), (d))) +#define BYTESHL128(a, b) vreinterpretq_u64_u8(vextq_s8(vdupq_n_s8(0), (int8x16_t) a, 16 - (b))) +#define BYTESHR128(a, b) vreinterpretq_u64_u8(vextq_s8((int8x16_t) a, vdupq_n_s8(0), (b))) + +#define SHL128(a, b) OR128(SHL64x2((a), (b)), SHR64x2(BYTESHL128((a), 8), 64 - (b))) +#define CLMULLO128(a, b) \ + vreinterpretq_u64_p128(vmull_p64((poly64_t) vget_low_u64(a), (poly64_t) vget_low_u64(b))) +#define CLMULHI128(a, b) \ + vreinterpretq_u64_p128(vmull_high_p64(vreinterpretq_p64_s64(a), vreinterpretq_p64_s64(b))) +#define CLMULLOHI128(a, b) \ + vreinterpretq_u64_p128(vmull_p64((poly64_t) vget_low_u64(a), (poly64_t) vget_high_u64(b))) +#define CLMULHILO128(a, b) \ + vreinterpretq_u64_p128(vmull_p64((poly64_t) vget_high_u64(a), (poly64_t) vget_low_u64(b))) +#define PREFETCH_READ(x) __builtin_prefetch((x), 0, 2) +#define PREFETCH_WRITE(x) __builtin_prefetch((x), 1, 2); + +static inline BlockVec +AES_KEYGEN(BlockVec block_vec, const int rc) +{ + uint8x16_t a = vaeseq_u8(vreinterpretq_u8_u64(block_vec), vmovq_n_u8(0)); + const uint8x16_t b = + __builtin_shufflevector(a, a, 4, 1, 14, 11, 1, 14, 11, 4, 12, 9, 6, 3, 9, 6, 3, 12); + const uint64x2_t c = SET64x2((uint64_t) rc << 32, (uint64_t) rc << 32); + return XOR128(b, c); +} + +#define ROUNDS 14 + +#define PC_COUNT (2 * PARALLEL_BLOCKS) + +typedef struct I256 { + BlockVec hi; + BlockVec lo; + BlockVec mid; +} I256; + +typedef BlockVec Precomp; + +typedef struct GHash { + BlockVec acc; +} GHash; + +typedef struct State { + BlockVec rkeys[ROUNDS + 1]; + Precomp hx[PC_COUNT]; +} State; + +static void __vectorcall expand256(const unsigned char key[KEYBYTES], BlockVec rkeys[1 + ROUNDS]) +{ + BlockVec t1, t2, s; + size_t i = 0; + +#define EXPAND_KEY_1(RC) \ + rkeys[i++] = t2; \ + s = AES_KEYGEN(t2, RC); \ + t1 = XOR128(t1, BYTESHL128(t1, 4)); \ + t1 = XOR128(t1, BYTESHL128(t1, 8)); \ + t1 = XOR128(t1, SHUFFLE32x4(s, 3, 3, 3, 3)); + +#define EXPAND_KEY_2(RC) \ + rkeys[i++] = t1; \ + s = AES_KEYGEN(t1, RC); \ + t2 = XOR128(t2, BYTESHL128(t2, 4)); \ + t2 = XOR128(t2, BYTESHL128(t2, 8)); \ + t2 = XOR128(t2, SHUFFLE32x4(s, 2, 2, 2, 2)); + + t1 = LOAD128(&key[0]); + t2 = LOAD128(&key[16]); + + rkeys[i++] = t1; + EXPAND_KEY_1(0x01); + EXPAND_KEY_2(0x01); + EXPAND_KEY_1(0x02); + EXPAND_KEY_2(0x02); + EXPAND_KEY_1(0x04); + EXPAND_KEY_2(0x04); + EXPAND_KEY_1(0x08); + EXPAND_KEY_2(0x08); + EXPAND_KEY_1(0x10); + EXPAND_KEY_2(0x10); + EXPAND_KEY_1(0x20); + EXPAND_KEY_2(0x20); + EXPAND_KEY_1(0x40); + rkeys[i++] = t1; +} + +/* Encrypt a single AES block */ + +static inline void +encrypt(const State *st, unsigned char dst[16], const unsigned char src[16]) +{ + BlockVec t; + + size_t i; + + t = AES_XENCRYPT(LOAD128(src), st->rkeys[0]); + for (i = 1; i < ROUNDS - 1; i++) { + t = AES_XENCRYPT(t, st->rkeys[i]); + } + t = AES_XENCRYPTLAST(t, st->rkeys[i]); + t = XOR128(t, st->rkeys[ROUNDS]); + STORE128(dst, t); +} + +/* Encrypt and add a single AES block */ + +static inline void __vectorcall encrypt_xor_block(const State *st, unsigned char dst[16], + const unsigned char src[16], + const BlockVec counter) +{ + BlockVec ts; + size_t i; + + ts = AES_XENCRYPT(counter, st->rkeys[0]); + for (i = 1; i < ROUNDS - 1; i++) { + ts = AES_XENCRYPT(ts, st->rkeys[i]); + } + ts = AES_XENCRYPTLAST(ts, st->rkeys[i]); + ts = XOR128(ts, XOR128(st->rkeys[ROUNDS], LOAD128(src))); + STORE128(dst, ts); +} + +/* Encrypt and add PARALLEL_BLOCKS AES blocks */ + +static inline void __vectorcall encrypt_xor_wide(const State *st, + unsigned char dst[16 * PARALLEL_BLOCKS], + const unsigned char src[16 * PARALLEL_BLOCKS], + const BlockVec counters[PARALLEL_BLOCKS]) +{ + BlockVec ts[PARALLEL_BLOCKS]; + size_t i, j; + + for (j = 0; j < PARALLEL_BLOCKS; j++) { + ts[j] = AES_XENCRYPT(counters[j], st->rkeys[0]); + } + for (i = 1; i < ROUNDS - 1; i++) { + for (j = 0; j < PARALLEL_BLOCKS; j++) { + ts[j] = AES_XENCRYPT(ts[j], st->rkeys[i]); + } + } + for (j = 0; j < PARALLEL_BLOCKS; j++) { + ts[j] = AES_XENCRYPTLAST(ts[j], st->rkeys[i]); + ts[j] = XOR128(ts[j], XOR128(st->rkeys[ROUNDS], LOAD128(&src[16 * j]))); + } + for (j = 0; j < PARALLEL_BLOCKS; j++) { + STORE128(&dst[16 * j], ts[j]); + } +} + +/* Square a field element */ + +static inline I256 __vectorcall clsq128(const BlockVec x) +{ + const BlockVec r_lo = CLMULLO128(x, x); + const BlockVec r_hi = CLMULHI128(x, x); + + return (I256) { + SODIUM_C99(.hi =) r_hi, + SODIUM_C99(.lo =) r_lo, + SODIUM_C99(.mid =) ZERO128, + }; +} + +/* Multiply two field elements -- Textbook multiplication is faster than Karatsuba on some recent + * CPUs */ + +static inline I256 __vectorcall clmul128(const BlockVec x, const BlockVec y) +{ +#ifdef USE_KARATSUBA_MULTIPLICATION + const BlockVec x_hi = BYTESHR128(x, 8); + const BlockVec y_hi = BYTESHR128(y, 8); + const BlockVec r_lo = CLMULLO128(x, y); + const BlockVec r_hi = CLMULHI128(x, y); + const BlockVec r_mid = XOR128(CLMULLO128(XOR128(x, x_hi), XOR128(y, y_hi)), XOR128(r_lo, r_hi)); + + return (I256) { + SODIUM_C99(.hi =) r_hi, + SODIUM_C99(.lo =) r_lo, + SODIUM_C99(.mid =) r_mid, + }; +#else + const BlockVec r_hi = CLMULHI128(x, y); + const BlockVec r_lo = CLMULLO128(x, y); + const BlockVec r_mid = XOR128(CLMULHILO128(x, y), CLMULLOHI128(x, y)); + + return (I256) { + SODIUM_C99(.hi =) r_hi, + SODIUM_C99(.lo =) r_lo, + SODIUM_C99(.mid =) r_mid, + }; +#endif +} + +/* Merge the middle word and reduce a field element */ + +static inline BlockVec __vectorcall gcm_reduce(const I256 x) +{ + const BlockVec hi = XOR128(x.hi, BYTESHR128(x.mid, 8)); + const BlockVec lo = XOR128(x.lo, BYTESHL128(x.mid, 8)); + + const BlockVec p64 = SET64x2(0, 0xc200000000000000); + const BlockVec a = CLMULLO128(lo, p64); + const BlockVec b = XOR128(SHUFFLE32x4(lo, 2, 3, 0, 1), a); + const BlockVec c = CLMULLO128(b, p64); + const BlockVec d = XOR128(SHUFFLE32x4(b, 2, 3, 0, 1), c); + + return XOR128(d, hi); +} + +/* Precompute powers of H from `from` to `to` */ + +static inline void __vectorcall precomp(Precomp hx[PC_COUNT], const size_t from, const size_t to) +{ + const Precomp h = hx[0]; + size_t i; + + for (i = from & ~1U; i < to; i += 2) { + hx[i] = gcm_reduce(clmul128(hx[i - 1], h)); + hx[i + 1] = gcm_reduce(clsq128(hx[i / 2])); + } +} + +/* Precompute powers of H given a key and a block count */ + +static void __vectorcall precomp_for_block_count(Precomp hx[PC_COUNT], + const unsigned char gh_key[16], + const size_t block_count) +{ + const BlockVec h0 = REV128(LOAD128(gh_key)); + BlockVec carry = SET64x2(0xc200000000000000, 1); + BlockVec mask = SUB64x2(ZERO128, SHR64x2(h0, 63)); + BlockVec h0_shifted; + BlockVec h; + + mask = SHUFFLE32x4(mask, 3, 3, 3, 3); + carry = AND128(carry, mask); + h0_shifted = SHL128(h0, 1); + h = XOR128(h0_shifted, carry); + + hx[0] = h; + hx[1] = gcm_reduce(clsq128(hx[0])); + + if (block_count >= PC_COUNT) { + precomp(hx, 2, PC_COUNT); + } else { + precomp(hx, 2, block_count); + } +} + +/* Initialize a GHash */ + +static inline void +gh_init(GHash *sth) +{ + sth->acc = ZERO128; +} + +static inline I256 __vectorcall gh_update0(const GHash *const sth, const unsigned char *const p, + const Precomp hn) +{ + const BlockVec m = REV128(LOAD128(p)); + return clmul128(XOR128(sth->acc, m), hn); +} + +static inline void __vectorcall gh_update(I256 *const u, const unsigned char *p, const Precomp hn) +{ + const BlockVec m = REV128(LOAD128(p)); + const I256 t = clmul128(m, hn); + *u = (I256) { SODIUM_C99(.hi =) XOR128(u->hi, t.hi), SODIUM_C99(.lo =) XOR128(u->lo, t.lo), + SODIUM_C99(.mid =) XOR128(u->mid, t.mid) }; +} + +/* Absorb ad_len bytes of associated data. There has to be no partial block. */ + +static inline void +gh_ad_blocks(const State *st, GHash *sth, const unsigned char *ad, size_t ad_len) +{ + size_t i; + + i = (size_t) 0U; + for (; i + PC_COUNT * 16 <= ad_len; i += PC_COUNT * 16) { + I256 u = gh_update0(sth, ad + i, st->hx[PC_COUNT - 1 - 0]); + size_t j; + + for (j = 1; j < PC_COUNT; j += 1) { + gh_update(&u, ad + i + j * 16, st->hx[PC_COUNT - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + for (; i + PC_COUNT * 16 / 2 <= ad_len; i += PC_COUNT * 16 / 2) { + I256 u = gh_update0(sth, ad + i, st->hx[PC_COUNT / 2 - 1 - 0]); + size_t j; + + for (j = 1; j < PC_COUNT / 2; j += 1) { + gh_update(&u, ad + i + j * 16, st->hx[PC_COUNT / 2 - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + for (; i + 4 * 16 <= ad_len; i += 4 * 16) { + size_t j; + I256 u = gh_update0(sth, ad + i, st->hx[4 - 1 - 0]); + + for (j = 1; j < 4; j += 1) { + gh_update(&u, ad + i + j * 16, st->hx[4 - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + for (; i + 2 * 16 <= ad_len; i += 2 * 16) { + size_t j; + I256 u = gh_update0(sth, ad + i, st->hx[2 - 1 - 0]); + + for (j = 1; j < 2; j += 1) { + gh_update(&u, ad + i + j * 16, st->hx[2 - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + if (i < ad_len) { + I256 u = gh_update0(sth, ad + i, st->hx[0]); + sth->acc = gcm_reduce(u); + } +} + +/* Increment counters */ + +static inline BlockVec __vectorcall incr_counters(BlockVec rev_counters[], BlockVec counter, + const size_t n) +{ + size_t i; + + const BlockVec one = ONE128; + for (i = 0; i < n; i++) { + rev_counters[i] = REV128(counter); + counter = ADD64x2(counter, one); + } + return counter; +} + +/* Compute the number of required blocks to encrypt and authenticate `ad_len` of associated data, + * and `m_len` of encrypted bytes. Return `0` if limits would be exceeded.*/ + +static inline size_t +required_blocks(const size_t ad_len, const size_t m_len) +{ + const size_t ad_blocks = (ad_len + 15) / 16; + const size_t m_blocks = (m_len + 15) / 16; + + if (ad_len > SIZE_MAX - 2 * PARALLEL_BLOCKS * 16 || + m_len > SIZE_MAX - 2 * PARALLEL_BLOCKS * 16 || ad_len < ad_blocks || m_len < m_blocks || + m_blocks >= (1ULL << 32) - 2) { + return 0; + } + return ad_blocks + m_blocks + 1; +} + +/* Generic AES-GCM encryption. "Generic" as it can handle arbitrary input sizes, +unlike a length-limited version that would precompute all the required powers of H */ + +static void +aes_gcm_encrypt_generic(const State *st, GHash *sth, unsigned char mac[ABYTES], unsigned char *dst, + const unsigned char *src, size_t src_len, const unsigned char *ad, + size_t ad_len, unsigned char counter_[16]) +{ + CRYPTO_ALIGN(32) I256 u; + CRYPTO_ALIGN(16) unsigned char last_blocks[2 * 16]; + const BlockVec one = ONE128; + BlockVec final_block; + BlockVec rev_counters[PARALLEL_BLOCKS]; + BlockVec counter; + size_t i; + size_t j; + size_t left; + size_t pi; + + COMPILER_ASSERT(PC_COUNT % PARALLEL_BLOCKS == 0); + + /* Associated data */ + + if (ad != NULL && ad_len != 0) { + gh_ad_blocks(st, sth, ad, ad_len & ~15); + left = ad_len & 15; + if (left != 0) { + unsigned char pad[16]; + + memset(pad, 0, sizeof pad); + memcpy(pad, ad + ad_len - left, left); + gh_ad_blocks(st, sth, pad, sizeof pad); + } + } + + /* Encrypted data */ + + counter = REV128(LOAD128(counter_)); + i = 0; + + /* 2*PARALLEL_BLOCKS aggregation */ + + if (src_len - i >= 2 * PARALLEL_BLOCKS * 16) { + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + i += PARALLEL_BLOCKS * 16; + + for (; i + 2 * PARALLEL_BLOCKS * 16 <= src_len; i += 2 * PARALLEL_BLOCKS * 16) { + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + + 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) { + gh_update(&u, dst + pi + j * 16, st->hx[2 * PARALLEL_BLOCKS - 1 - j]); + } + + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + encrypt_xor_wide(st, dst + i + PARALLEL_BLOCKS * 16, src + i + PARALLEL_BLOCKS * 16, + rev_counters); + + pi = i; + for (j = 0; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + + pi = i - PARALLEL_BLOCKS * 16; + u = gh_update0(sth, dst + pi, st->hx[PARALLEL_BLOCKS - 1 - 0]); + for (j = 1; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + + /* PARALLEL_BLOCKS aggregation */ + + if (src_len - i >= PARALLEL_BLOCKS * 16) { + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + i += PARALLEL_BLOCKS * 16; + + for (; i + PARALLEL_BLOCKS * 16 <= src_len; i += PARALLEL_BLOCKS * 16) { + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + + pi = i - PARALLEL_BLOCKS * 16; + u = gh_update0(sth, dst + pi, st->hx[PARALLEL_BLOCKS - 1 - 0]); + for (j = 1; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + + pi = i - PARALLEL_BLOCKS * 16; + u = gh_update0(sth, dst + pi, st->hx[PARALLEL_BLOCKS - 1 - 0]); + for (j = 1; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, dst + pi + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + + /* 4-blocks aggregation */ + + for (; i + 4 * 16 <= src_len; i += 4 * 16) { + counter = incr_counters(rev_counters, counter, 4); + for (j = 0; j < 4; j++) { + encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]); + } + + u = gh_update0(sth, dst + i, st->hx[4 - 1 - 0]); + for (j = 1; j < 4; j += 1) { + gh_update(&u, dst + i + j * 16, st->hx[4 - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + + /* 2-blocks aggregation */ + + for (; i + 2 * 16 <= src_len; i += 2 * 16) { + counter = incr_counters(rev_counters, counter, 2); + for (j = 0; j < 2; j++) { + encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]); + } + + u = gh_update0(sth, dst + i, st->hx[2 - 1 - 0]); + for (j = 1; j < 2; j += 1) { + gh_update(&u, dst + i + j * 16, st->hx[2 - 1 - j]); + } + sth->acc = gcm_reduce(u); + } + + /* Remaining *partial* blocks; if we have 16 bytes left, we want to keep the + full block authenticated along with the final block, hence < and not <= */ + + for (; i + 16 < src_len; i += 16) { + encrypt_xor_block(st, dst + i, src + i, REV128(counter)); + u = gh_update0(sth, dst + i, st->hx[1 - 1 - 0]); + sth->acc = gcm_reduce(u); + counter = ADD64x2(counter, one); + } + + /* Authenticate both the last block of the message and the final block */ + + final_block = REV128(SET64x2(ad_len * 8, src_len * 8)); + STORE32_BE(counter_ + NPUBBYTES, 1); + encrypt(st, mac, counter_); + left = src_len - i; + if (left != 0) { + for (j = 0; j < left; j++) { + last_blocks[j] = src[i + j]; + } + STORE128(last_blocks + 16, final_block); + encrypt_xor_block(st, last_blocks, last_blocks, REV128(counter)); + for (; j < 16; j++) { + last_blocks[j] = 0; + } + for (j = 0; j < left; j++) { + dst[i + j] = last_blocks[j]; + } + gh_ad_blocks(st, sth, last_blocks, 32); + } else { + STORE128(last_blocks, final_block); + gh_ad_blocks(st, sth, last_blocks, 16); + } + STORE128(mac, XOR128(LOAD128(mac), REV128(sth->acc))); +} + +/* Generic AES-GCM decryption. "Generic" as it can handle arbitrary input sizes, +unlike a length-limited version that would precompute all the required powers of H */ + +static void +aes_gcm_decrypt_generic(const State *st, GHash *sth, unsigned char mac[ABYTES], unsigned char *dst, + const unsigned char *src, size_t src_len, const unsigned char *ad, + size_t ad_len, unsigned char counter_[16]) +{ + CRYPTO_ALIGN(32) I256 u; + CRYPTO_ALIGN(16) unsigned char last_blocks[2 * 16]; + const BlockVec one = ONE128; + BlockVec final_block; + BlockVec rev_counters[PARALLEL_BLOCKS]; + BlockVec counter; + size_t i; + size_t j; + size_t left; + + COMPILER_ASSERT(PC_COUNT % PARALLEL_BLOCKS == 0); + + /* Associated data */ + + if (ad != NULL && ad_len != 0) { + gh_ad_blocks(st, sth, ad, ad_len & ~15); + left = ad_len & 15; + if (left != 0) { + unsigned char pad[16]; + + memset(pad, 0, sizeof pad); + memcpy(pad, ad + ad_len - left, left); + gh_ad_blocks(st, sth, pad, sizeof pad); + } + } + + /* Encrypted data */ + + counter = REV128(LOAD128(counter_)); + i = 0; + + /* 2*PARALLEL_BLOCKS aggregation */ + + while (i + 2 * PARALLEL_BLOCKS * 16 <= src_len) { + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + + u = gh_update0(sth, src + i, st->hx[2 * PARALLEL_BLOCKS - 1 - 0]); + for (j = 1; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, src + i + j * 16, st->hx[2 * PARALLEL_BLOCKS - 1 - j]); + } + + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + + i += PARALLEL_BLOCKS * 16; + for (j = 0; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, src + i + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]); + } + sth->acc = gcm_reduce(u); + + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + i += PARALLEL_BLOCKS * 16; + } + + /* PARALLEL_BLOCKS aggregation */ + + for (; i + PARALLEL_BLOCKS * 16 <= src_len; i += PARALLEL_BLOCKS * 16) { + counter = incr_counters(rev_counters, counter, PARALLEL_BLOCKS); + + u = gh_update0(sth, src + i, st->hx[PARALLEL_BLOCKS - 1 - 0]); + for (j = 1; j < PARALLEL_BLOCKS; j += 1) { + gh_update(&u, src + i + j * 16, st->hx[PARALLEL_BLOCKS - 1 - j]); + } + sth->acc = gcm_reduce(u); + + encrypt_xor_wide(st, dst + i, src + i, rev_counters); + } + + /* 4-blocks aggregation */ + + for (; i + 4 * 16 <= src_len; i += 4 * 16) { + counter = incr_counters(rev_counters, counter, 4); + + u = gh_update0(sth, src + i, st->hx[4 - 1 - 0]); + for (j = 1; j < 4; j += 1) { + gh_update(&u, src + i + j * 16, st->hx[4 - 1 - j]); + } + sth->acc = gcm_reduce(u); + + for (j = 0; j < 4; j++) { + encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]); + } + } + + /* 2-blocks aggregation */ + + for (; i + 2 * 16 <= src_len; i += 2 * 16) { + counter = incr_counters(rev_counters, counter, 2); + + u = gh_update0(sth, src + i, st->hx[2 - 1 - 0]); + for (j = 1; j < 2; j += 1) { + gh_update(&u, src + i + j * 16, st->hx[2 - 1 - j]); + } + sth->acc = gcm_reduce(u); + + for (j = 0; j < 2; j++) { + encrypt_xor_block(st, dst + i + j * 16, src + i + j * 16, rev_counters[j]); + } + } + + /* Remaining *partial* blocks; if we have 16 bytes left, we want to keep the + full block authenticated along with the final block, hence < and not <= */ + + for (; i + 16 < src_len; i += 16) { + u = gh_update0(sth, src + i, st->hx[1 - 1 - 0]); + sth->acc = gcm_reduce(u); + encrypt_xor_block(st, dst + i, src + i, REV128(counter)); + counter = ADD64x2(counter, one); + } + + /* Authenticate both the last block of the message and the final block */ + + final_block = REV128(SET64x2(ad_len * 8, src_len * 8)); + STORE32_BE(counter_ + NPUBBYTES, 1); + encrypt(st, mac, counter_); + left = src_len - i; + if (left != 0) { + for (j = 0; j < left; j++) { + last_blocks[j] = src[i + j]; + } + for (; j < 16; j++) { + last_blocks[j] = 0; + } + STORE128(last_blocks + 16, final_block); + gh_ad_blocks(st, sth, last_blocks, 32); + encrypt_xor_block(st, last_blocks, last_blocks, REV128(counter)); + for (j = 0; j < left; j++) { + dst[i + j] = last_blocks[j]; + } + } else { + STORE128(last_blocks, final_block); + gh_ad_blocks(st, sth, last_blocks, 16); + } + STORE128(mac, XOR128(LOAD128(mac), REV128(sth->acc))); +} + +int +crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *st_, const unsigned char *k) +{ + State *st = (State *) (void *) st_; + CRYPTO_ALIGN(16) unsigned char h[16]; + + COMPILER_ASSERT(sizeof *st_ >= sizeof *st); + + expand256(k, st->rkeys); + memset(h, 0, sizeof h); + encrypt(st, h, h); + + precomp_for_block_count(st->hx, h, PC_COUNT); + + return 0; +} + +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 m_len_, const unsigned char *ad, + unsigned long long ad_len_, + const unsigned char *nsec, const unsigned char *npub, + const crypto_aead_aes256gcm_state *st_) +{ + const State *st = (const State *) (const void *) st_; + GHash sth; + CRYPTO_ALIGN(16) unsigned char j[16]; + size_t gh_required_blocks; + const size_t ad_len = (size_t) ad_len_; + const size_t m_len = (size_t) m_len_; + + (void) nsec; + if (maclen_p != NULL) { + *maclen_p = 0; + } + if (ad_len_ > SODIUM_SIZE_MAX || m_len_ > SODIUM_SIZE_MAX) { + sodium_misuse(); + } + gh_required_blocks = required_blocks(ad_len, m_len); + if (gh_required_blocks == 0) { + memset(mac, 0xd0, ABYTES); + memset(c, 0, m_len); + return -1; + } + + gh_init(&sth); + + memcpy(j, npub, NPUBBYTES); + STORE32_BE(j + NPUBBYTES, 2); + + aes_gcm_encrypt_generic(st, &sth, mac, c, m, m_len, ad, ad_len, j); + + if (maclen_p != NULL) { + *maclen_p = ABYTES; + } + return 0; +} + +int +crypto_aead_aes256gcm_encrypt(unsigned char *c, unsigned long long *clen_p, const unsigned char *m, + unsigned long long m_len, const unsigned char *ad, + unsigned long long ad_len, const unsigned char *nsec, + const unsigned char *npub, const unsigned char *k) +{ + const int ret = crypto_aead_aes256gcm_encrypt_detached(c, c + m_len, NULL, m, m_len, ad, ad_len, + nsec, npub, k); + if (clen_p != NULL) { + if (ret == 0) { + *clen_p = m_len + crypto_aead_aes256gcm_ABYTES; + } else { + *clen_p = 0; + } + } + return ret; +} + +int +crypto_aead_aes256gcm_encrypt_detached(unsigned char *c, unsigned char *mac, + unsigned long long *maclen_p, const unsigned char *m, + unsigned long long m_len, const unsigned char *ad, + unsigned long long ad_len, const unsigned char *nsec, + const unsigned char *npub, const unsigned char *k) +{ + CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state st; + int ret; + + PREFETCH_WRITE(c); + PREFETCH_READ(m); + PREFETCH_READ(ad); + + crypto_aead_aes256gcm_beforenm(&st, k); + ret = crypto_aead_aes256gcm_encrypt_detached_afternm(c, mac, maclen_p, m, m_len, ad, ad_len, + nsec, npub, &st); + sodium_memzero(&st, sizeof st); + + return ret; +} + +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_) +{ + int ret = crypto_aead_aes256gcm_encrypt_detached_afternm(c, c + mlen, NULL, m, mlen, ad, adlen, + nsec, npub, st_); + if (clen_p != NULL) { + *clen_p = mlen + crypto_aead_aes256gcm_ABYTES; + } + return ret; +} + +static int +crypto_aead_aes256gcm_verify_mac(unsigned char *nsec, const unsigned char *c, + unsigned long long c_len_, const unsigned char *mac, + const unsigned char *ad, unsigned long long ad_len_, + const unsigned char *npub, const crypto_aead_aes256gcm_state *st_) +{ + const State *st = (const State *) (const void *) st_; + GHash sth; + BlockVec final_block; + CRYPTO_ALIGN(16) unsigned char j[16]; + CRYPTO_ALIGN(16) unsigned char computed_mac[16]; + CRYPTO_ALIGN(16) unsigned char last_block[16]; + size_t gh_required_blocks; + size_t left; + const size_t ad_len = (size_t) ad_len_; + const size_t c_len = (size_t) c_len_; + int ret; + + (void) nsec; + if (ad_len_ > SODIUM_SIZE_MAX || c_len_ > SODIUM_SIZE_MAX) { + sodium_misuse(); + } + gh_required_blocks = required_blocks(ad_len, c_len); + if (gh_required_blocks == 0) { + return -1; + } + + gh_init(&sth); + + memcpy(j, npub, NPUBBYTES); + STORE32_BE(j + NPUBBYTES, 2); + + gh_ad_blocks(st, &sth, ad, ad_len & ~15); + left = ad_len & 15; + if (left != 0) { + unsigned char pad[16]; + + memset(pad, 0, sizeof pad); + memcpy(pad, ad + ad_len - left, left); + gh_ad_blocks(st, &sth, pad, sizeof pad); + } + + gh_ad_blocks(st, &sth, c, c_len & ~15); + left = c_len & 15; + if (left != 0) { + unsigned char pad[16]; + + memset(pad, 0, sizeof pad); + memcpy(pad, c + c_len - left, left); + gh_ad_blocks(st, &sth, pad, sizeof pad); + } + final_block = REV128(SET64x2(ad_len * 8, c_len * 8)); + STORE32_BE(j + NPUBBYTES, 1); + encrypt(st, computed_mac, j); + STORE128(last_block, final_block); + gh_ad_blocks(st, &sth, last_block, 16); + STORE128(computed_mac, XOR128(LOAD128(computed_mac), REV128(sth.acc))); + + ret = crypto_verify_16(mac, computed_mac); + sodium_memzero(computed_mac, sizeof computed_mac); + + return ret; +} + +int +crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m, unsigned char *nsec, + const unsigned char *c, unsigned long long c_len_, + const unsigned char *mac, const unsigned char *ad, + unsigned long long ad_len_, + const unsigned char *npub, + const crypto_aead_aes256gcm_state *st_) +{ + const State *st = (const State *) (const void *) st_; + GHash sth; + CRYPTO_ALIGN(16) unsigned char j[16]; + unsigned char computed_mac[16]; + size_t gh_required_blocks; + const size_t ad_len = (size_t) ad_len_; + const size_t c_len = (size_t) c_len_; + const size_t m_len = c_len; + + (void) nsec; + if (ad_len_ > SODIUM_SIZE_MAX || c_len_ > SODIUM_SIZE_MAX) { + sodium_misuse(); + } + if (m == NULL) { + return crypto_aead_aes256gcm_verify_mac(nsec, c, c_len, mac, ad, ad_len, npub, st_); + } + gh_required_blocks = required_blocks(ad_len, m_len); + if (gh_required_blocks == 0) { + return -1; + } + + gh_init(&sth); + + memcpy(j, npub, NPUBBYTES); + STORE32_BE(j + NPUBBYTES, 2); + + aes_gcm_decrypt_generic(st, &sth, computed_mac, m, c, m_len, ad, ad_len, j); + + if (crypto_verify_16(mac, computed_mac) != 0) { + sodium_memzero(computed_mac, sizeof computed_mac); + memset(m, 0xd0, m_len); + return -1; + } + return 0; +} + +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_) +{ + unsigned long long mlen = 0ULL; + int ret = -1; + + if (clen >= ABYTES) { + ret = crypto_aead_aes256gcm_decrypt_detached_afternm( + m, nsec, c, clen - ABYTES, c + clen - ABYTES, ad, adlen, npub, st_); + } + if (mlen_p != NULL) { + if (ret == 0) { + mlen = clen - ABYTES; + } + *mlen_p = mlen; + } + return ret; +} + +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) +{ + CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state st; + + PREFETCH_WRITE(m); + PREFETCH_READ(c); + PREFETCH_READ(ad); + + crypto_aead_aes256gcm_beforenm(&st, k); + + return crypto_aead_aes256gcm_decrypt_detached_afternm( + m, nsec, c, clen, mac, ad, adlen, npub, (const crypto_aead_aes256gcm_state *) &st); +} + +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) +{ + CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state st; + int ret; + + PREFETCH_WRITE(m); + PREFETCH_READ(c); + PREFETCH_READ(ad); + + crypto_aead_aes256gcm_beforenm(&st, k); + + ret = crypto_aead_aes256gcm_decrypt_afternm(m, mlen_p, nsec, c, clen, ad, adlen, npub, + (const crypto_aead_aes256gcm_state *) &st); + sodium_memzero(&st, sizeof st); + + return ret; +} + +int +crypto_aead_aes256gcm_is_available(void) +{ + return sodium_runtime_has_armcrypto(); +} + +#endif diff --git a/src/libsodium/include/Makefile.in b/src/libsodium/include/Makefile.in index b19a7e61..3104fbba 100644 --- a/src/libsodium/include/Makefile.in +++ b/src/libsodium/include/Makefile.in @@ -197,6 +197,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@ diff --git a/src/libsodium/include/sodium/runtime.h b/src/libsodium/include/sodium/runtime.h index 7f15d58e..c1cec853 100644 --- a/src/libsodium/include/sodium/runtime.h +++ b/src/libsodium/include/sodium/runtime.h @@ -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); diff --git a/src/libsodium/sodium/runtime.c b/src/libsodium/sodium/runtime.c index 9dfe54f8..7f0997d4 100644 --- a/src/libsodium/sodium/runtime.c +++ b/src/libsodium/sodium/runtime.c @@ -3,6 +3,14 @@ #ifdef HAVE_ANDROID_GETCPUFEATURES # include #endif +#ifdef __APPLE__ +# include +# include +# include +#endif +#ifdef HAVE_SYS_AUXV_H +# include +#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_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; -# else - cpu_features->has_neon = 0; -# endif -# elif defined(HAVE_ANDROID_GETCPUFEATURES) && \ - defined(ANDROID_CPU_ARM_FEATURE_NEON) +#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; +#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 - return 0; #endif + + if (cpu_features->has_neon == 0) { + return 0; + } + +#if __ARM_FEATURE_CRYPTO + 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) && defined(ANDROID_CPU_ARM_FEATURE_AES) + cpu_features->has_armcrypto = + (android_getCpuFeatures() & ANDROID_CPU_ARM_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) { diff --git a/test/Makefile.in b/test/Makefile.in index 6dbbab81..1f2b43d1 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -208,6 +208,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@ diff --git a/test/default/Makefile.in b/test/default/Makefile.in index 88c37c9d..259edeb4 100644 --- a/test/default/Makefile.in +++ b/test/default/Makefile.in @@ -752,6 +752,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@ From e95d437f8452adb5ff5c97eb3fedc0d7f2cf2908 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 7 Mar 2022 16:38:37 +0100 Subject: [PATCH 30/73] Add memory fences where supported --- src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c | 2 ++ src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c | 2 ++ .../scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c | 1 + src/libsodium/crypto_sign/ed25519/ref10/open.c | 2 ++ src/libsodium/include/sodium/private/common.h | 6 ++++++ src/libsodium/sodium/codecs.c | 2 ++ 6 files changed, 15 insertions(+) diff --git a/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c b/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c index 264054f9..394c3914 100644 --- a/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +++ b/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c @@ -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; diff --git a/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c b/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c index 8e0f36fb..a36841b9 100644 --- a/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +++ b/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c @@ -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; diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c index 6f0cb6bc..fe701714 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c @@ -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++; } diff --git a/src/libsodium/crypto_sign/ed25519/ref10/open.c b/src/libsodium/crypto_sign/ed25519/ref10/open.c index 26476b32..b5280a7d 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/open.c +++ b/src/libsodium/crypto_sign/ed25519/ref10/open.c @@ -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; diff --git a/src/libsodium/include/sodium/private/common.h b/src/libsodium/include/sodium/private/common.h index 339e725b..bb292e4e 100644 --- a/src/libsodium/include/sodium/private/common.h +++ b/src/libsodium/include/sodium/private/common.h @@ -258,4 +258,10 @@ extern void ct_unpoison(const void *, size_t); # define UNPOISON(X, L) (void) 0 #endif +#ifdef __ATOMIC_ACQUIRE +# define ACQUIRE_FENCE __atomic_thread_fence(__ATOMIC_ACQUIRE) +#else +# define ACQUIRE_FENCE (void) 0 +#endif + #endif diff --git a/src/libsodium/sodium/codecs.c b/src/libsodium/sodium/codecs.c index 77fa464c..36508089 100644 --- a/src/libsodium/sodium/codecs.c +++ b/src/libsodium/sodium/codecs.c @@ -7,6 +7,7 @@ #include #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--; From 5e4affe9d834572b326b9276bc2bcb3e5ec945e5 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 7 Mar 2022 16:47:43 +0100 Subject: [PATCH 31/73] Support gcc-like and C11-like memory fences --- src/libsodium/include/sodium/private/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libsodium/include/sodium/private/common.h b/src/libsodium/include/sodium/private/common.h index bb292e4e..e1417c59 100644 --- a/src/libsodium/include/sodium/private/common.h +++ b/src/libsodium/include/sodium/private/common.h @@ -258,8 +258,10 @@ extern void ct_unpoison(const void *, size_t); # define UNPOISON(X, L) (void) 0 #endif -#ifdef __ATOMIC_ACQUIRE +#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 From ac14901c30ae58f7cf7014b68f75d592e931bc82 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 10:56:02 +0200 Subject: [PATCH 32/73] Add support for VisionOS --- dist-build/apple-xcframework.sh | 82 ++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 12 deletions(-) diff --git a/dist-build/apple-xcframework.sh b/dist-build/apple-xcframework.sh index 66419da3..ed3d5563 100755 --- a/dist-build/apple-xcframework.sh +++ b/dist-build/apple-xcframework.sh @@ -15,9 +15,11 @@ export WATCHOS64_PREFIX="${PREFIX}/tmp/watchos64" export WATCHOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/watchos-simulator-arm64" export WATCHOS_SIMULATOR_I386_PREFIX="${PREFIX}/tmp/watchos-simulator-i386" export WATCHOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/watchos-simulator-x86_64" -export TVOS64_PREFIX="${PREFIX}/tmp/tvos64" +export TVOS_PREFIX="${PREFIX}/tmp/tvos" export TVOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/tvos-simulator-arm64" export TVOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/tvos-simulator-x86_64" +export VISIONOS_PREFIX="${PREFIX}/tmp/visionos" +export VISIONOS_SIMULATOR_PREFIX="${PREFIX}/tmp/visionos-simulator" export CATALYST_ARM64_PREFIX="${PREFIX}/tmp/catalyst-arm64" export CATALYST_X86_64_PREFIX="${PREFIX}/tmp/catalyst-x86_64" export LOG_FILE="${PREFIX}/tmp/build_log" @@ -40,7 +42,7 @@ echo "Define the LIBSODIUM_FULL_BUILD environment variable to build the full" echo "library (including all deprecated/undocumented/low-level functions)." echo echo "Define the LIBSODIUM_SKIP_SIMULATORS environment variable to skip building" -echo "the simulators libraries (iOS, watchOS, tvOS simulators)." +echo "the simulators libraries (iOS, watchOS, tvOS, visionOS simulators)." echo if [ -z "$LIBSODIUM_FULL_BUILD" ]; then @@ -73,7 +75,7 @@ build_macos() { export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}" make distclean >/dev/null 2>&1 - ./configure --host=arm-apple-darwin20 --prefix="$MACOS_ARM64_PREFIX" \ + ./configure --host=arm-apple-darwin23 --prefix="$MACOS_ARM64_PREFIX" \ ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 make -j${PROCESSORS} install || exit 1 fi @@ -132,7 +134,7 @@ build_ios_simulator() { export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 - ./configure --host=arm-apple-darwin20 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \ + ./configure --host=arm-apple-darwin23 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \ ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 make -j${PROCESSORS} install || exit 1 fi @@ -200,7 +202,7 @@ build_watchos_simulator() { export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 - ./configure --host=arm-apple-darwin20 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \ + ./configure --host=arm-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \ ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 make -j${PROCESSORS} install || exit 1 fi @@ -234,7 +236,7 @@ build_tvos() { export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}" make distclean >/dev/null 2>&1 - ./configure --host=arm-apple-darwin10 --prefix="$TVOS64_PREFIX" \ + ./configure --host=arm-apple-darwin10 --prefix="$TVOS_PREFIX" \ ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 make -j${PROCESSORS} install || exit 1 } @@ -250,7 +252,7 @@ build_tvos_simulator() { export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 - ./configure --host=arm-apple-darwin20 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \ + ./configure --host=arm-apple-darwin23 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \ ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 make -j${PROCESSORS} install || exit 1 fi @@ -265,6 +267,36 @@ build_tvos_simulator() { make -j${PROCESSORS} install || exit 1 } +build_visionos() { + export BASEDIR="${XCODEDIR}/Platforms/XROS.platform/Developer" + export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" + export SDK="${BASEDIR}/SDKs/XROS.sdk" + + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}" + export LDFLAGS="-arch arm64 -isysroot ${SDK}" + + make distclean >/dev/null 2>&1 + ./configure --host=arm-apple-darwin10 --prefix="$VISIONOS_PREFIX" \ + ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 + make -j${PROCESSORS} install || exit 1 +} + +build_visionos_simulator() { + export BASEDIR="${XCODEDIR}/Platforms/XRSimulator.platform/Developer" + export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" + export SDK="${BASEDIR}/SDKs/XRSimulator.sdk" + + if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}" + export LDFLAGS="-arch arm64 -isysroot ${SDK}" + + make distclean >/dev/null 2>&1 + ./configure --host=arm-apple-darwin23 --prefix="$VISIONOS_SIMULATOR_PREFIX" \ + ${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1 + make -j${PROCESSORS} install || exit 1 + fi +} + build_catalyst() { export BASEDIR="${XCODEDIR}/Platforms/MacOSX.platform/Developer" export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" @@ -301,6 +333,8 @@ echo "Building for watchOS..." build_watchos >"$LOG_FILE" 2>&1 || exit 1 echo "Building for tvOS..." build_tvos >"$LOG_FILE" 2>&1 || exit 1 +echo "Building for visionOS..." +build_visionos >"$LOG_FILE" 2>&1 || exit 1 echo "Building for Catalyst..." build_catalyst >"$LOG_FILE" 2>&1 || exit 1 @@ -311,7 +345,9 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then build_watchos_simulator >"$LOG_FILE" 2>&1 || exit 1 echo "Building for the tvOS simulator..." build_tvos_simulator >"$LOG_FILE" 2>&1 || exit 1 - else + echo "Building for the visionOS simulator..." + build_visionos_simulator >"$LOG_FILE" 2>&1 || exit 1 +else echo "[Skipping the simulators]" fi @@ -365,13 +401,23 @@ done echo "Bundling tvOS targets..." mkdir -p "${PREFIX}/tvos/lib" -cp -a "${TVOS64_PREFIX}/include" "${PREFIX}/tvos/" +cp -a "${TVOS_PREFIX}/include" "${PREFIX}/tvos/" for ext in a dylib; do lipo -create \ - "$TVOS64_PREFIX/lib/libsodium.${ext}" \ + "$TVOS_PREFIX/lib/libsodium.${ext}" \ -output "$PREFIX/tvos/lib/libsodium.${ext}" done +echo "Bundling visionOS targets..." + +mkdir -p "${PREFIX}/visionos/lib" +cp -a "${VISIONOS_PREFIX}/include" "${PREFIX}/visionos/" +for ext in a dylib; do + lipo -create \ + "$VISIONOS_PREFIX/lib/libsodium.${ext}" \ + -output "$PREFIX/visionos/lib/libsodium.${ext}" +done + echo "Bundling Catalyst targets..." mkdir -p "${PREFIX}/catalyst/lib" @@ -447,6 +493,18 @@ if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then -output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1 fi done + + echo "Bundling visionOS simulators..." + + mkdir -p "${PREFIX}/visionos-simulators/lib" + cp -a "${VISIONOS_SIMULATOR_PREFIX}/include" "${PREFIX}/visionos-simulators/" + for ext in a dylib; do + if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then + lipo -create \ + "${VISIONOS_SIMULATOR_PREFIX}/lib/libsodium.${ext}" \ + -output "${PREFIX}/visionos-simulators/lib/libsodium.${ext}" || exit 1 + fi + done fi echo "Creating Clibsodium.xcframework..." @@ -454,12 +512,12 @@ echo "Creating Clibsodium.xcframework..." rm -rf "${PREFIX}/Clibsodium.xcframework" XCFRAMEWORK_ARGS="" -for f in macos ios watchos tvos catalyst; do +for f in macos ios watchos tvos visionos catalyst; do XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a" XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include" done if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then - for f in ios-simulators watchos-simulators tvos-simulators; do + for f in ios-simulators watchos-simulators tvos-simulators visionos-simulators; do XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a" XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include" done From 1bafad7899823eea8159f52410398277b0765b93 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 12:50:51 +0200 Subject: [PATCH 33/73] Sync wasi-test-wrapper.sh and wintest.bat --- test/default/wasi-test-wrapper.sh | 8 +------- test/default/wintest.bat | 17 +++++++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index 1adb3385..5c3cea76 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -9,7 +9,7 @@ fi if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmedge" ]; then if command -v wasmedgec >/dev/null && command -v wasmedge >/dev/null; then - wasmedgec "$1" "${1}.so" && + wasmedgec "$1" "${1}.so" >/dev/null && wasmedge --dir=.:. "${1}.so" && rm -f "${1}.so" && exit 0 @@ -28,12 +28,6 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmtime" ]; then fi fi -if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wavm" ]; then - if command -v wavm >/dev/null; then - wavm run --abi=wasi "$1" && exit 0 - fi -fi - if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "bun" ]; then if echo | bun help >/dev/null 2>&1; then { diff --git a/test/default/wintest.bat b/test/default/wintest.bat index e50fb494..4a22edad 100755 --- a/test/default/wintest.bat +++ b/test/default/wintest.bat @@ -1,7 +1,7 @@ @ECHO OFF if "%1" == "" ( - echo "Usage: wintest.bat [ ]" goto :END ) @@ -13,7 +13,8 @@ if not exist sodium_version.c ( ) ) -if "%2" == "x64" (SET ARCH=x64) else (SET ARCH=Win32) +if "%2" == "x64" (SET ARCH=x64) else if "%2" == "ARM64" (SET ARCH=ARM64) else (SET ARCH=ARM64) +if "%2" == "ARM64" (SET CROSSCOMPILE=1) else (SET CROSSCOMPILE=0) SET CFLAGS=/nologo /DTEST_SRCDIR=\".\" /I..\..\src\libsodium\include\sodium /I..\..\src\libsodium\include /I..\quirks SET LDFLAGS=/link /LTCG advapi32.lib ..\..\Build\%1\%ARCH%\libsodium.lib if "%1" == "ReleaseDLL" ( goto :ReleaseDLL ) @@ -44,11 +45,15 @@ FOR %%f in (*.c) DO ( echo %%f compile failed goto :END ) - %%f.exe - if errorlevel 1 ( - echo %%f failed + if %CROSSCOMPILE% == 1 ( + echo %%f skipped ) else ( - echo %%f ok + %%f.exe + if errorlevel 1 ( + echo %%f failed + ) else ( + echo %%f ok + ) ) ) REM Remove temporary files From 21223ba7a19a89f21bbf3117a74007fdd95509ff Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 13:25:09 +0200 Subject: [PATCH 34/73] Add ge25519_clear_cofactor() --- .../crypto_core/ed25519/ref10/ed25519_ref10.c | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c index 627dae13..cedd87cf 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c @@ -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) { @@ -2565,14 +2580,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); } From 7793ba6bc441c55acdf52bb1267cc5dbc0a24b5d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 17:07:41 +0200 Subject: [PATCH 35/73] Move sodium implementations out of their dedicated directory --- .../msvc/vs2010/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- .../msvc/vs2012/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- .../msvc/vs2013/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- .../msvc/vs2015/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- .../msvc/vs2017/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- .../msvc/vs2019/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- .../msvc/vs2022/libsodium/libsodium.vcxproj | 9 +- .../libsodium/libsodium.vcxproj.filters | 33 ++-- libsodium.vcxproj | 9 +- libsodium.vcxproj.filters | 15 +- src/libsodium/Makefile.am | 6 +- src/libsodium/Makefile.in | 155 +++++++++--------- .../{sodium => }/aead_chacha20poly1305.c | 0 .../{sodium => }/aead_xchacha20poly1305.c | 0 .../crypto_verify/{sodium => }/verify.c | 0 21 files changed, 234 insertions(+), 245 deletions(-) rename src/libsodium/crypto_aead/chacha20poly1305/{sodium => }/aead_chacha20poly1305.c (100%) rename src/libsodium/crypto_aead/xchacha20poly1305/{sodium => }/aead_xchacha20poly1305.c (100%) rename src/libsodium/crypto_verify/{sodium => }/verify.c (100%) diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj b/builds/msvc/vs2010/libsodium/libsodium.vcxproj index f3a583d5..315ec434 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj b/builds/msvc/vs2012/libsodium/libsodium.vcxproj index 1dd1edda..be58192d 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj b/builds/msvc/vs2013/libsodium/libsodium.vcxproj index 65df6a06..59bd9d7e 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj b/builds/msvc/vs2015/libsodium/libsodium.vcxproj index dcf7d14b..a7c11dfb 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj b/builds/msvc/vs2017/libsodium/libsodium.vcxproj index e2274cda..d6421632 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj b/builds/msvc/vs2019/libsodium/libsodium.vcxproj index 61e8fe29..4aa625c5 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index 57c5f660..657fbec3 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -113,7 +113,7 @@ - + @@ -172,9 +172,11 @@ - + + - + + @@ -200,7 +202,6 @@ - diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters index 6425d6ea..7a57951f 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters @@ -132,8 +132,8 @@ crypto_pwhash\scryptsalsa208sha256\sse - - crypto_verify\sodium + + crypto_verify crypto_auth @@ -309,14 +309,20 @@ crypto_hash\sha256\cp - - crypto_aead\xchacha20poly1305\sodium + + crypto_aead\xchacha20poly1305 + + + crypto_aead\aes256gcm crypto_aead\aes256gcm\aesni - - crypto_aead\chacha20poly1305\sodium + + crypto_aead\aes256gcm\armcrypto + + + crypto_aead\chacha20poly1305 crypto_secretstream\xchacha20poly1305 @@ -389,9 +395,6 @@ include\sodium - - include\sodium - include\sodium @@ -745,18 +748,15 @@ {7eb51140-a50f-3f50-b379-83677a82496c} + + {507bb9aa-b65c-3034-946b-bcd375b7deaa} + {1f4d6dd1-517f-3eeb-b974-2304ada5e67a} - - {b145288f-68ad-3e79-93cb-e36537b20e26} - {3122f223-e6c2-3ab1-ad85-ca289b47419e} - - {2720c2c8-c517-356e-83ed-c2997ab782c3} - {0a3af0f3-56f7-3551-a64e-6284feccc423} @@ -970,9 +970,6 @@ {49fb9272-ffe2-3993-b562-b19d5f2c9b40} - - {80669cf5-3c9c-3c60-b409-9d8fb305bc77} - {96da72eb-3aa0-3850-83eb-32788f91e5bd} diff --git a/libsodium.vcxproj b/libsodium.vcxproj index a37ce3ea..1429a1e7 100644 --- a/libsodium.vcxproj +++ b/libsodium.vcxproj @@ -351,7 +351,7 @@ - + @@ -410,9 +410,11 @@ - + + - + + @@ -438,7 +440,6 @@ - diff --git a/libsodium.vcxproj.filters b/libsodium.vcxproj.filters index ac201d69..64c097f5 100644 --- a/libsodium.vcxproj.filters +++ b/libsodium.vcxproj.filters @@ -123,7 +123,7 @@ Source Files - + Source Files @@ -300,13 +300,19 @@ Source Files - + + Source Files + + Source Files Source Files - + + Source Files + + Source Files @@ -380,9 +386,6 @@ Header Files - - Header Files - Header Files diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 312f4f3d..03d62d47 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -3,8 +3,8 @@ lib_LTLIBRARIES = \ libsodium_la_SOURCES = \ crypto_aead/aes256gcm/aead_aes256gcm.c \ - crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ - crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.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 \ @@ -82,7 +82,7 @@ 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 \ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index cf31cd12..53bc64a5 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -262,8 +262,8 @@ libsodium_la_DEPENDENCIES = libaesni.la libarmcrypto.la libsse2.la \ $(am__append_8) am__libsodium_la_SOURCES_DIST = \ crypto_aead/aes256gcm/aead_aes256gcm.c \ - crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ - crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.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 \ @@ -335,7 +335,7 @@ 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 include/sodium/private/asm_cet.h \ + 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 \ @@ -423,8 +423,8 @@ am__objects_1 = @EMSCRIPTEN_FALSE@am__objects_6 = randombytes/sysrandom/libsodium_la-randombytes_sysrandom.lo am_libsodium_la_OBJECTS = \ crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo \ - crypto_aead/chacha20poly1305/sodium/libsodium_la-aead_chacha20poly1305.lo \ - crypto_aead/xchacha20poly1305/sodium/libsodium_la-aead_xchacha20poly1305.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 \ @@ -482,7 +482,7 @@ am_libsodium_la_OBJECTS = \ 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 \ @@ -544,8 +544,8 @@ am__maybe_remake_depfiles = depfiles am__depfiles_remade = 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/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo \ - crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.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 \ @@ -642,7 +642,7 @@ am__depfiles_remade = crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gc 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 \ @@ -936,8 +936,8 @@ lib_LTLIBRARIES = \ libsodium.la libsodium_la_SOURCES = crypto_aead/aes256gcm/aead_aes256gcm.c \ - crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \ - crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.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 \ @@ -1009,7 +1009,7 @@ libsodium_la_SOURCES = crypto_aead/aes256gcm/aead_aes256gcm.c \ crypto_stream/salsa20/stream_salsa20.c \ crypto_stream/salsa20/stream_salsa20.h \ crypto_stream/xsalsa20/stream_xsalsa20.c \ - crypto_verify/sodium/verify.c include/sodium/private/asm_cet.h \ + 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 \ @@ -1294,24 +1294,24 @@ 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/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/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) @@ -1729,15 +1729,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) @@ -1996,10 +1995,10 @@ mostlyclean-compile: -rm -f crypto_aead/aes256gcm/aesni/*.lo -rm -f crypto_aead/aes256gcm/armcrypto/*.$(OBJEXT) -rm -f crypto_aead/aes256gcm/armcrypto/*.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/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) @@ -2126,8 +2125,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) @@ -2143,8 +2142,8 @@ distclean-compile: @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/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.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/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 @@ -2241,7 +2240,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 @@ -2382,19 +2381,19 @@ crypto_aead/aes256gcm/libsodium_la-aead_aes256gcm.lo: crypto_aead/aes256gcm/aead @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/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/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/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/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/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/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/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/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 @@ -2795,12 +2794,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 @@ -3083,8 +3082,8 @@ clean-libtool: -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/aes256gcm/armcrypto/.libs crypto_aead/aes256gcm/armcrypto/_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/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 @@ -3148,7 +3147,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 @@ -3377,10 +3376,10 @@ distclean-generic: -rm -f crypto_aead/aes256gcm/aesni/$(am__dirstamp) -rm -f crypto_aead/aes256gcm/armcrypto/$(DEPDIR)/$(am__dirstamp) -rm -f crypto_aead/aes256gcm/armcrypto/$(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/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) @@ -3507,8 +3506,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) @@ -3550,8 +3549,8 @@ distclean: distclean-recursive -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/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo - -rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.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 @@ -3648,7 +3647,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 @@ -3705,8 +3704,8 @@ maintainer-clean: maintainer-clean-recursive -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/sodium/$(DEPDIR)/libsodium_la-aead_chacha20poly1305.Plo - -rm -f crypto_aead/xchacha20poly1305/sodium/$(DEPDIR)/libsodium_la-aead_xchacha20poly1305.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 @@ -3803,7 +3802,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 diff --git a/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c b/src/libsodium/crypto_aead/chacha20poly1305/aead_chacha20poly1305.c similarity index 100% rename from src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c rename to src/libsodium/crypto_aead/chacha20poly1305/aead_chacha20poly1305.c diff --git a/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c b/src/libsodium/crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c similarity index 100% rename from src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c rename to src/libsodium/crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c diff --git a/src/libsodium/crypto_verify/sodium/verify.c b/src/libsodium/crypto_verify/verify.c similarity index 100% rename from src/libsodium/crypto_verify/sodium/verify.c rename to src/libsodium/crypto_verify/verify.c From e56aef8c841b3178898aa86216e73f32014f0d66 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 17:41:21 +0200 Subject: [PATCH 36/73] Update msys2 --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f6c72951..4925daf7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -48,7 +48,7 @@ jobs: vmImage: "windows-2019" steps: - powershell: | - (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2022-12-16/msys2-base-x86_64-20221216.sfx.exe", "sfx.exe") + (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2023-07-18/msys2-base-x86_64-20230718.sfx.exe", "sfx.exe") .\sfx.exe -y -o\ del sfx.exe displayName: Install MSYS2 @@ -87,7 +87,7 @@ jobs: vmImage: "windows-2019" steps: - powershell: | - (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2021-07-25/msys2-base-x86_64-20210725.sfx.exe", "sfx.exe") + (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2023-07-18/msys2-base-x86_64-20230718.sfx.exe", "sfx.exe") .\sfx.exe -y -o\ del sfx.exe displayName: Install MSYS2 From bb607f453eabfb9bbb92ca8ca242231dc87d3e06 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 20:38:53 +0200 Subject: [PATCH 37/73] Enable more SIMD optimizations when using Zig --- build.zig | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index 9b993c47..6e4fd329 100644 --- a/build.zig +++ b/build.zig @@ -171,10 +171,26 @@ pub fn build(b: *std.build.Builder) !void { lib.defineCMacro("HAVE_CPUID", "1"); lib.defineCMacro("HAVE_MMINTRIN_H", "1"); lib.defineCMacro("HAVE_EMMINTRIN_H", "1"); - lib.defineCMacro("HAVE_PMMINTRIN_H", "1"); - lib.defineCMacro("HAVE_SMMINTRIN_H", "1"); - lib.defineCMacro("HAVE_TMMINTRIN_H", "1"); - lib.defineCMacro("HAVE_WMMINTRIN_H", "1"); + + const cpu_features = target.getCpuFeatures(); + const has_sse3 = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.sse3)); + const has_ssse3 = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.ssse3)); + const has_sse4_1 = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.sse4_1)); + const has_avx = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.avx)); + const has_avx2 = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.avx2)); + const has_avx512f = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.avx512f)); + const has_aes = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.aes)); + const has_pclmul = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.pclmul)); + const has_rdrnd = cpu_features.isEnabled(@intFromEnum(Target.x86.Feature.rdrnd)); + + if (has_sse3) lib.defineCMacro("HAVE_PMMINTRIN_H", "1"); + if (has_ssse3) lib.defineCMacro("HAVE_TMMINTRIN_H", "1"); + if (has_sse4_1) lib.defineCMacro("HAVE_SMMINTRIN_H", "1"); + if (has_avx) lib.defineCMacro("HAVE_AVXINTRIN_H", "1"); + if (has_avx2) lib.defineCMacro("HAVE_AVX2INTRIN_H", "1"); + if (has_avx512f) lib.defineCMacro("HAVE_AVX512FINTRIN_H", "1"); + if (has_aes and has_pclmul) lib.defineCMacro("HAVE_WMMINTRIN_H", "1"); + if (has_rdrnd) lib.defineCMacro("HAVE_RDRAND", "1"); }, .aarch64, .aarch64_be => { const cpu_features = target.getCpuFeatures(); From 0aef86d2d3e7fa0195e2a977f1748be8bcac7f30 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 20:41:19 +0200 Subject: [PATCH 38/73] .NET: target baseline CPU --- .github/workflows/dotnet-core.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 306c6a9d..868ab3a7 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 + zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 -Dcpu=baseline - name: tests run: cd zig-out/bin && ./run.sh - uses: actions/upload-artifact@v3 @@ -61,7 +61,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-gnueabihf.2.23 + zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-gnueabihf.2.23 -Dcpu=baseline - name: tests run: | cd zig-out/bin && env LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib ./run.sh @@ -89,7 +89,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-gnu.2.23 + zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-gnu.2.23 -Dcpu=baseline - name: tests run: | cd zig-out/bin && env LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib ./run.sh @@ -114,7 +114,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl + zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl -Dcpu=baseline - name: tests run: | cd zig-out/bin && ./run.sh @@ -133,7 +133,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-musleabihf + zig build -Doptimize=ReleaseFast -Dtarget=arm-linux-musleabihf -Dcpu=baseline - uses: actions/upload-artifact@v3 with: name: build-linux-musl-arm @@ -149,7 +149,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-musl + zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-musl -Dcpu=baseline - uses: actions/upload-artifact@v3 with: name: build-linux-musl-arm64 From 6c35bcaabf949a210f64754985d75e4773c60930 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 10 Sep 2023 22:24:46 +0200 Subject: [PATCH 39/73] Downgrade ax_valgrind_check --- Makefile.in | 36 +-------------------- aclocal.m4 | 17 ---------- builds/Makefile.in | 36 +-------------------- configure | 29 ++++++++++------- contrib/Makefile.in | 36 +-------------------- dist-build/Makefile.in | 36 +-------------------- m4/ax_valgrind_check.m4 | 48 ++++++++++++++-------------- msvc-scripts/Makefile.in | 36 +-------------------- src/Makefile.in | 42 +++---------------------- src/libsodium/Makefile.in | 36 +-------------------- src/libsodium/include/Makefile.in | 49 +++++------------------------ test/Makefile.in | 42 +++---------------------- test/default/Makefile.in | 52 ++++++------------------------- 13 files changed, 73 insertions(+), 422 deletions(-) diff --git a/Makefile.in b/Makefile.in index 795fcc71..853ecde4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -177,10 +177,6 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -551,11 +547,6 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -863,26 +854,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-recursive - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-recursive - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-recursive - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-recursive - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-recursive - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -956,12 +927,7 @@ uninstall-am: uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--refresh check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-cscope clean-generic \ + am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ diff --git a/aclocal.m4 b/aclocal.m4 index d85192c0..4b734d58 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -418,23 +418,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) -# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- - -# Copyright (C) 2012-2021 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_EXTRA_RECURSIVE_TARGETS -# -------------------------- -# Define the list of user recursive targets. This macro exists only to -# be traced by Automake, which will ensure that a proper definition of -# user-defined recursive targets (and associated rules) is propagated -# into all the generated Makefiles. -# TODO: We should really reject non-literal arguments here... -AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) - # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. diff --git a/builds/Makefile.in b/builds/Makefile.in index 627dc776..b710e5ed 100644 --- a/builds/Makefile.in +++ b/builds/Makefile.in @@ -127,10 +127,6 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -414,11 +410,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -492,26 +483,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-am - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-am - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-am - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-am - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-am - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -580,12 +551,7 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/configure b/configure index 7ddc794d..95294f8a 100755 --- a/configure +++ b/configure @@ -1551,6 +1551,7 @@ Optional Features: --enable-opt Optimize for the native CPU - The resulting library will be faster but not portable --enable-valgrind Whether to enable Valgrind on the unit tests + (requires GNU make) --disable-valgrind-memcheck Whether to skip memcheck during the Valgrind tests --disable-valgrind-helgrind @@ -7282,15 +7283,12 @@ fi - - - # Check whether --enable-valgrind was given. if test ${enable_valgrind+y} then : enableval=$enable_valgrind; enable_valgrind=$enableval else $as_nop - enable_valgrind= + enable_valgrind=no fi @@ -7669,7 +7667,7 @@ valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) -valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-local,%,$''@):; +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) @@ -7679,12 +7677,12 @@ valgrind_lt = endif # Use recursive makes in order to ignore errors during check -check-valgrind-local: +check-valgrind: ifeq ($(VALGRIND_ENABLED),yes) $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \ $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool)) else - @echo "Need to reconfigure with --enable-valgrind" + @echo "Need to use GNU make and reconfigure with --enable-valgrind" endif # Valgrind running @@ -7698,16 +7696,14 @@ VALGRIND_LOG_COMPILER = \ $(valgrind_lt) \ $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) -define valgrind_tool_rule -check-valgrind-$(1)-local: +define valgrind_tool_rule = +check-valgrind-$(1): ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) -ifneq ($$(TESTS),) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log -endif else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @@ -7723,9 +7719,18 @@ A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind MOSTLYCLEANFILES ?= MOSTLYCLEANFILES += $(valgrind_log_files) -.PHONY: check-valgrind $(addprefix check-valgrind-,$(valgrind_tools)) +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) ' + if test "$enable_valgrind" != "yes" +then : + + VALGRIND_CHECK_RULES=' +check-valgrind: + @echo "Need to use GNU make and reconfigure with --enable-valgrind"' + +fi + diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 31969e1c..fa2ebdfa 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -127,10 +127,6 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -344,11 +340,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -422,26 +413,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-am - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-am - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-am - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-am - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-am - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -510,12 +481,7 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/dist-build/Makefile.in b/dist-build/Makefile.in index 4ecd77d7..2d6dd57a 100644 --- a/dist-build/Makefile.in +++ b/dist-build/Makefile.in @@ -127,10 +127,6 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -358,11 +354,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -436,26 +427,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-am - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-am - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-am - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-am - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-am - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -524,12 +495,7 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/m4/ax_valgrind_check.m4 b/m4/ax_valgrind_check.m4 index e0d8a2f3..876f8876 100644 --- a/m4/ax_valgrind_check.m4 +++ b/m4/ax_valgrind_check.m4 @@ -36,19 +36,21 @@ # AX_VALGRIND_DFLT([sgcheck], [off]) # AX_VALGRIND_CHECK # -# in each Makefile.am with tests: +# Makefile.am: # # @VALGRIND_CHECK_RULES@ # VALGRIND_SUPPRESSIONS_FILES = my-project.supp # EXTRA_DIST = my-project.supp # -# This results in a "check-valgrind" rule being added. Running `make -# check-valgrind` in that directory will recursively run the module's test -# suite (`make check`) once for each of the available Valgrind tools (out -# of memcheck, helgrind and drd) while the sgcheck will be skipped unless -# enabled again on the commandline with --enable-valgrind-sgcheck. The -# results for each check will be output to test-suite-$toolname.log. The -# target will succeed if there are zero errors and fail otherwise. +# This results in a "check-valgrind" rule being added to any Makefile.am +# which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been +# configured with --enable-valgrind). Running `make check-valgrind` in +# that directory will run the module's test suite (`make check`) once for +# each of the available Valgrind tools (out of memcheck, helgrind and drd) +# while the sgcheck will be skipped unless enabled again on the +# commandline with --enable-valgrind-sgcheck. The results for each check +# will be output to test-suite-$toolname.log. The target will succeed if +# there are zero errors and fail otherwise. # # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in # memcheck, helgrind, drd and sgcheck. These are useful because often only @@ -65,7 +67,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 23 +#serial 15 dnl Configured tools m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]]) @@ -78,14 +80,10 @@ AC_DEFUN([AX_VALGRIND_DFLT],[ ])dnl AC_DEFUN([AX_VALGRIND_CHECK],[ - AM_EXTRA_RECURSIVE_TARGETS([check-valgrind]) - m4_foreach([vgtool], [valgrind_tool_list], - [AM_EXTRA_RECURSIVE_TARGETS([check-valgrind-]vgtool)]) - dnl Check for --enable-valgrind AC_ARG_ENABLE([valgrind], - [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])], - [enable_valgrind=$enableval],[enable_valgrind=]) + [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU make)])], + [enable_valgrind=$enableval],[enable_valgrind=no]) AS_IF([test "$enable_valgrind" != "no"],[ # Check for Valgrind. @@ -177,7 +175,7 @@ valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) -valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-local,%,$''@):; +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) @@ -187,12 +185,12 @@ valgrind_lt = endif # Use recursive makes in order to ignore errors during check -check-valgrind-local: +check-valgrind: ifeq ($(VALGRIND_ENABLED),yes) $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \ $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool)) else - @echo "Need to reconfigure with --enable-valgrind" + @echo "Need to use GNU make and reconfigure with --enable-valgrind" endif # Valgrind running @@ -206,16 +204,14 @@ VALGRIND_LOG_COMPILER = \ $(valgrind_lt) \ $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) -define valgrind_tool_rule -check-valgrind-$(1)-local: +define valgrind_tool_rule = +check-valgrind-$(1): ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) -ifneq ($$(TESTS),) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log -endif else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @@ -231,9 +227,15 @@ A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind MOSTLYCLEANFILES ?= MOSTLYCLEANFILES += $(valgrind_log_files) -.PHONY: check-valgrind $(addprefix check-valgrind-,$(valgrind_tools)) +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) '] + AS_IF([test "$enable_valgrind" != "yes"], [ + VALGRIND_CHECK_RULES=' +check-valgrind: + @echo "Need to use GNU make and reconfigure with --enable-valgrind"' + ]) + AC_SUBST([VALGRIND_CHECK_RULES]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) ]) diff --git a/msvc-scripts/Makefile.in b/msvc-scripts/Makefile.in index 39e4b60e..c46a94be 100644 --- a/msvc-scripts/Makefile.in +++ b/msvc-scripts/Makefile.in @@ -127,10 +127,6 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -346,11 +342,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: tags TAGS: ctags CTAGS: @@ -424,26 +415,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-am - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-am - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-am - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-am - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-am - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -512,12 +483,7 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-generic clean-libtool \ +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/src/Makefile.in b/src/Makefile.in index de664f13..517c46d8 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -143,10 +143,6 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -436,11 +432,6 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -599,26 +590,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-recursive - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-recursive - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-recursive - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-recursive - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-recursive - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -688,15 +659,10 @@ uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am check-valgrind-am check-valgrind-drd-am \ - check-valgrind-drd-local check-valgrind-helgrind-am \ - check-valgrind-helgrind-local check-valgrind-local \ - check-valgrind-memcheck-am check-valgrind-memcheck-local \ - check-valgrind-sgcheck-am check-valgrind-sgcheck-local clean \ - clean-generic clean-libtool cscopelist-am ctags ctags-am \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index 53bc64a5..bcd940aa 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -713,10 +713,6 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -3207,11 +3203,6 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -3520,26 +3511,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-recursive - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-recursive - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-recursive - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-recursive - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-recursive - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ @@ -3832,12 +3803,7 @@ uninstall-am: uninstall-defexecDATA uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ - am--depfiles check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-generic \ + am--depfiles check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ diff --git a/src/libsodium/include/Makefile.in b/src/libsodium/include/Makefile.in index 3104fbba..67aaf2bb 100644 --- a/src/libsodium/include/Makefile.in +++ b/src/libsodium/include/Makefile.in @@ -158,10 +158,6 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) $(nobase_nodist_include_HEADERS) -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -507,11 +503,6 @@ uninstall-nobase_nodist_includeHEADERS: @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -634,26 +625,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-am - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-am - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-am - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-am - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-am - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -724,18 +695,14 @@ uninstall-am: uninstall-nobase_includeHEADERS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-valgrind-am \ - check-valgrind-drd-am check-valgrind-drd-local \ - check-valgrind-helgrind-am check-valgrind-helgrind-local \ - check-valgrind-local check-valgrind-memcheck-am \ - check-valgrind-memcheck-local check-valgrind-sgcheck-am \ - check-valgrind-sgcheck-local clean clean-generic clean-libtool \ - cscopelist-am ctags ctags-am distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-nobase_includeHEADERS \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man \ + install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ diff --git a/test/Makefile.in b/test/Makefile.in index 1f2b43d1..a03365f8 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -143,10 +143,6 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -439,11 +435,6 @@ $(am__recursive_targets): if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -602,26 +593,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-recursive - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-recursive - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-recursive - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-recursive - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-recursive - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -691,15 +662,10 @@ uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am check-valgrind-am check-valgrind-drd-am \ - check-valgrind-drd-local check-valgrind-helgrind-am \ - check-valgrind-helgrind-local check-valgrind-local \ - check-valgrind-memcheck-am check-valgrind-memcheck-local \ - check-valgrind-sgcheck-am check-valgrind-sgcheck-local clean \ - clean-generic clean-libtool cscopelist-am ctags ctags-am \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ diff --git a/test/default/Makefile.in b/test/default/Makefile.in index 259edeb4..78bb139c 100644 --- a/test/default/Makefile.in +++ b/test/default/Makefile.in @@ -506,10 +506,6 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__extra_recursive_targets = check-valgrind-recursive \ - check-valgrind-memcheck-recursive \ - check-valgrind-helgrind-recursive check-valgrind-drd-recursive \ - check-valgrind-sgcheck-recursive am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -1719,11 +1715,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -check-valgrind-local: -check-valgrind-memcheck-local: -check-valgrind-helgrind-local: -check-valgrind-drd-local: -check-valgrind-sgcheck-local: ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -2544,26 +2535,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -check-valgrind: check-valgrind-am - -check-valgrind-am: check-valgrind-local - -check-valgrind-drd: check-valgrind-drd-am - -check-valgrind-drd-am: check-valgrind-drd-local - -check-valgrind-helgrind: check-valgrind-helgrind-am - -check-valgrind-helgrind-am: check-valgrind-helgrind-local - -check-valgrind-memcheck: check-valgrind-memcheck-am - -check-valgrind-memcheck-am: check-valgrind-memcheck-local - -check-valgrind-sgcheck: check-valgrind-sgcheck-am - -check-valgrind-sgcheck-am: check-valgrind-sgcheck-local - clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ @@ -2790,20 +2761,15 @@ uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ - check-am check-valgrind-am check-valgrind-drd-am \ - check-valgrind-drd-local check-valgrind-helgrind-am \ - check-valgrind-helgrind-local check-valgrind-local \ - check-valgrind-memcheck-am check-valgrind-memcheck-local \ - check-valgrind-sgcheck-am check-valgrind-sgcheck-local clean \ - clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am From 79e44b494ecfffa972df5bc8ddf4ad0b126c4424 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 10 Sep 2023 23:37:39 +0200 Subject: [PATCH 40/73] Add Visual Studio 2022 build files to the dist tarballs --- builds/Makefile.am | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builds/Makefile.am b/builds/Makefile.am index 23dfe9d2..2729301e 100644 --- a/builds/Makefile.am +++ b/builds/Makefile.am @@ -69,4 +69,11 @@ EXTRA_DIST = \ msvc/vs2019/libsodium/libsodium.xml \ msvc/vs2019/libsodium.import.props \ msvc/vs2019/libsodium.import.xml \ - msvc/vs2019/libsodium.sln + msvc/vs2022/libsodium.sln \ + msvc/vs2022/libsodium/libsodium.props \ + msvc/vs2022/libsodium/libsodium.vcxproj \ + msvc/vs2022/libsodium/libsodium.vcxproj.filters \ + msvc/vs2022/libsodium/libsodium.xml \ + msvc/vs2022/libsodium.import.props \ + msvc/vs2022/libsodium.import.xml \ + msvc/vs2022/libsodium.sln From d84fbc23046b24edd8851caa832bbc8abc2b8986 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 00:07:38 +0200 Subject: [PATCH 41/73] build.zig: predefine some CPU features Eventually, we should compile files depending on specific CPU extensions separately, like what regular Makefiles are doing. --- build.zig | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 6e4fd329..3e8fc2b7 100644 --- a/build.zig +++ b/build.zig @@ -14,7 +14,7 @@ pub fn build(b: *std.build.Builder) !void { const src_path = "src/libsodium"; const src_dir = try fs.Dir.openIterableDir(cwd, src_path, .{ .no_follow = true }); - const target = b.standardTargetOptions(.{}); + var target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const enable_benchmarks = b.option(bool, "enable_benchmarks", "Whether tests should be benchmarks.") orelse false; @@ -27,6 +27,25 @@ pub fn build(b: *std.build.Builder) !void { if (build_tests) { build_static = true; } + + switch (target.getCpuArch()) { + // Features we assume are always available because they won't affect + // code generation in files that don't use them. + .x86_64 => { + target.cpu_features_add.addFeature(@intFromEnum(Target.x86.Feature.aes)); + target.cpu_features_add.addFeature(@intFromEnum(Target.x86.Feature.pclmul)); + target.cpu_features_add.addFeature(@intFromEnum(Target.x86.Feature.rdrnd)); + }, + .aarch64, .aarch64_be => { + target.cpu_features_add.addFeature(@intFromEnum(Target.aarch64.Feature.crypto)); + // ARM CPUs supported by Windows also support NEON. + if (target.isWindows()) { + target.cpu_features_add.addFeature(@intFromEnum(Target.aarch64.Feature.neon)); + } + }, + else => {}, + } + const static_lib = b.addStaticLibrary(.{ .name = "sodium", .target = target, From f60f6e9af464d6e87d76a51cf5358b42c4ade532 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 00:15:20 +0200 Subject: [PATCH 42/73] .NET: assume at least a Sandybridge CPU for x86_64 .NET packages --- .github/workflows/dotnet-core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 868ab3a7..82ec1efd 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 -Dcpu=baseline + zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.17 -Dcpu=sandybridge - name: tests run: cd zig-out/bin && ./run.sh - uses: actions/upload-artifact@v3 @@ -114,7 +114,7 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl -Dcpu=baseline + zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-musl -Dcpu=sandybridge - name: tests run: | cd zig-out/bin && ./run.sh From 9a55460523bd1a05d055921cf8158dee3025e920 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 00:52:12 +0200 Subject: [PATCH 43/73] Define additional capabilities when using Visual Studio --- src/libsodium/include/sodium/private/common.h | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/libsodium/include/sodium/private/common.h b/src/libsodium/include/sodium/private/common.h index e1417c59..bb588daf 100644 --- a/src/libsodium/include/sodium/private/common.h +++ b/src/libsodium/include/sodium/private/common.h @@ -226,24 +226,36 @@ 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 +# if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86) +# include + +# 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) + +# ifdef __ARM_NEON +# define HAVE_ARMCRYPTO 1 +# endif + +# 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 #endif From 709fb29e79e1f1c12947189c141553a8c8ea8f85 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 00:58:53 +0200 Subject: [PATCH 44/73] Visual Studio: define __ARM_NEON on Windows/ARM --- src/libsodium/include/sodium/private/common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/private/common.h b/src/libsodium/include/sodium/private/common.h index bb588daf..74529bb9 100644 --- a/src/libsodium/include/sodium/private/common.h +++ b/src/libsodium/include/sodium/private/common.h @@ -250,9 +250,10 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n) # elif defined(_M_ARM64) -# ifdef __ARM_NEON -# define HAVE_ARMCRYPTO 1 +# ifndef __ARM_NEON +# define __ARM_NEON 1 # endif +# define HAVE_ARMCRYPTO 1 # endif /* _MSC_VER */ From 4f61e088f710815bd51cecd5c690922c89d916ca Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 12:48:58 +0200 Subject: [PATCH 45/73] Update ChangeLog --- ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9388fd10..4b20a287 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,44 @@ +* Version 1.0.18-stable + - Visual Studio: support for Windows/ARM64 builds has been added. + - Visual Studio: AVX512 implementations are enabled on supported CPUs. + - Visual Studio: an MSVC 2022 solution was added. + - Apple XCFramework: support for VisionOS was added. + - Apple XCFranework: support for Catalyst was added. + - Apple XCFramework: building the simulators is now optional. + - iOS: bitcode is not generated any more, as it was deprecated by Apple. + - watchOS: support for arm64 was added. + - The Zig toolchain can now be used as a modern build system to replace +autoconf/automake/libtool/make/ccache and the compiler. This allows faster +compilation times, easy cross compilation, and static libraries optimized +for any CPU. + - The Zig toolchain is now the only supported way to compile `libsodium` +to WebAssembly/WASI. + - `libsodium` can now be added as a dependency to Zig projects. + - Memory fences were added to remove some gadgets that could be used +alongside speculative loads. + - The AES-GCM implementation was completely rewritten. It is now faster, +and also available on aarch64, including Windows/ARM64. + - Compatibility with CET instrumentation / IBT / Shadow Stack was added. + - Emscripten: the `crypto_pwhash_*()` functions have been removed from Sumo +builds, as they reserve a substantial amount of JavaScript memory, even when +not used. + - Benchmarks now use `CLOCK_MONOTONIC` if possible. + - WebAssembly: tests can now run using Bun, WasmEdge, Wazero, wasm3 and +wasmer-js. Support for WAVM and Lucet have been removed, as these projects +have reached EOL. + - .NET: the minimum supported macOS version is now 1.0.15; this matches +Microsoft guidelines. + - .NET: all the packages are now built using Zig, on all platforms. This +allows us to easily match Microsoft's requirements, including supported glibc +versions. However, on x86_64, targets are expected to support at least the +AVX instruction set. + - .NET: packages for ARM64 are now available. + - C23 `memset_explicit()` is now used, when available. + - Compilation now uses `-Ofast` or `-O3` instead of `-O2` by default. + - Portability improvements to help compile libsodium to modern game consoles. + - JavaScript: a default `unhandledRejection` handler is not set any more. + - Slightly faster 25519 operations. + - OpenBSD: leverage `MAP_CONCEAL`. * Version 1.0.18 - Enterprise versions of Visual Studio are now supported. @@ -29,6 +70,12 @@ to be `NULL`. - The `-ftree-vectorize` and `-ftree-slp-vectorize` compiler switches are now used, if available, for optimized builds. +* Version 1.0.17-stable + - AVX512 detection has been improved. + - A compilation option was added to enable retpoline support. + - `-ftls-model=global-dynamic` is now set, if available. + - Portability and documentation improvements. + * Version 1.0.17 - Bug fix: `sodium_pad()` didn't properly support block sizes >= 256 bytes. - JS/WebAssembly: some old iOS versions can't instantiate the WebAssembly From 6e0c80f169f0e5c2bd07d6d0fc2d15f4ca47d702 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 15:05:43 +0200 Subject: [PATCH 46/73] Remove unused variables --- src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c index cedd87cf..8129d8be 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c +++ b/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c @@ -2535,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); From 0bf1e8db59eec3246fed0c2f8df0e6d66646845b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 20:23:30 +0200 Subject: [PATCH 47/73] Upgrade Android NDK --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f28e9732..44777c92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,7 @@ jobs: - name: Install Android NDK run: | mkdir /tmp/android && cd /tmp/android - curl -o ndk.zip -L https://dl.google.com/android/repository/android-ndk-r25b-linux.zip + curl -o ndk.zip -L https://dl.google.com/android/repository/android-ndk-r25c-linux.zip unzip ndk.zip && rm -f *.zip && mv android-ndk* ndk - name: Android compilation From 2800307b05b13b501c0d950bc6f946a4305828a0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 2 May 2020 17:54:02 +0200 Subject: [PATCH 48/73] Nits --- .../crypto_core/ed25519/ref10/fe_25_5/fe.h | 2 +- .../crypto_core/ed25519/ref10/fe_51/fe.h | 2 +- .../sodium/private/ed25519_ref10_fe_25_5.h | 22 +------------------ .../sodium/private/ed25519_ref10_fe_51.h | 12 +--------- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h b/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h index f216669e..9e11afd1 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h +++ b/src/libsodium/crypto_core/ed25519/ref10/fe_25_5/fe.h @@ -1,5 +1,5 @@ /* - Ignores top bit of h. + Ignores top bit of s. */ void diff --git a/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h b/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h index de876264..be7d1812 100644 --- a/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h +++ b/src/libsodium/crypto_core/ed25519/ref10/fe_51/fe.h @@ -1,5 +1,5 @@ /* - Ignores top bit of h. + Ignores top bit of s. */ void diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h index f2782d9d..9d773262 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h @@ -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 * 4); } /* diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h index 6c0d775b..67a86152 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h @@ -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 * 8); } /* From 18727ac58f032fe3bda37a6fc9c7c7ba647ac1fd Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 21 Aug 2020 07:07:17 +0200 Subject: [PATCH 49/73] Nits --- .../crypto_onetimeauth/poly1305/donna/poly1305_donna32.h | 2 +- .../crypto_onetimeauth/poly1305/donna/poly1305_donna64.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h index cef64480..ed525008 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h @@ -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; diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h index 2475bfa1..046ab09a 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h @@ -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; From ed9e3e18f1135d9a767eb9fad504602c88a3c4eb Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 5 May 2020 01:09:22 +0200 Subject: [PATCH 50/73] Indent --- .../poly1305/sse2/poly1305_sse2.c | 16 ++++++++-------- .../sysrandom/randombytes_sysrandom.c | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c index aa81777e..24859284 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c @@ -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 */ /* diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index 38f04f0a..ed1ebee0 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -1,4 +1,3 @@ - #include #include #include From b335abd946bfc1746f9f8134db54129db2e43354 Mon Sep 17 00:00:00 2001 From: martingd <728722+martingd@users.noreply.github.com> Date: Fri, 12 Mar 2021 18:01:08 +0100 Subject: [PATCH 51/73] Error from argon2_hash() during verify propagated. (#1039) --- src/libsodium/crypto_pwhash/argon2/argon2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/crypto_pwhash/argon2/argon2.c b/src/libsodium/crypto_pwhash/argon2/argon2.c index 5912f7fc..4d69f117 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2.c @@ -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); From 6d5cf12fca3173bea5b2cf48021268750d4e9f75 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 12:21:36 +0200 Subject: [PATCH 52/73] define randombytes_set_implementation argument to be const (#1068) --- src/libsodium/include/sodium/randombytes.h | 2 +- src/libsodium/randombytes/randombytes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/randombytes.h b/src/libsodium/include/sodium/randombytes.h index a03cc657..c83a4df5 100644 --- a/src/libsodium/include/sodium/randombytes.h +++ b/src/libsodium/include/sodium/randombytes.h @@ -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 diff --git a/src/libsodium/randombytes/randombytes.c b/src/libsodium/randombytes/randombytes.c index 8ac085fc..2aa2762a 100644 --- a/src/libsodium/randombytes/randombytes.c +++ b/src/libsodium/randombytes/randombytes.c @@ -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; From dcf78d77be9069c175cfacfb4513cc1d8728f90e Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 2 May 2020 17:42:25 +0200 Subject: [PATCH 53/73] Inline --- src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h | 2 +- src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h index 9d773262..3cd221a5 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h @@ -958,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; diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h index 67a86152..dd94d0b8 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h @@ -479,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; From 652c0815357a8c30fb9c228624413ec3746ec5d0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 12:51:13 +0200 Subject: [PATCH 54/73] Don't hardcode type sizes --- src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h | 2 +- src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h index 3cd221a5..4652f0db 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_25_5.h @@ -273,7 +273,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b) static inline void fe25519_copy(fe25519 h, const fe25519 f) { - memcpy(h, f, 10 * 4); + memcpy(h, f, 10 * sizeof h[0]); } /* diff --git a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h index dd94d0b8..ac4321be 100644 --- a/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h +++ b/src/libsodium/include/sodium/private/ed25519_ref10_fe_51.h @@ -191,7 +191,7 @@ fe25519_cswap(fe25519 f, fe25519 g, unsigned int b) static inline void fe25519_copy(fe25519 h, const fe25519 f) { - memcpy(h, f, 5 * 8); + memcpy(h, f, 5 * sizeof h[0]); } /* From 17ea717fd77574e67250acf5e73f6d3bd635bb17 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 14:04:59 +0200 Subject: [PATCH 55/73] Support ARM Morello --- build-aux/config.sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/config.sub b/build-aux/config.sub index 6ae25027..4a8c458f 100644 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1181,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64c | aarch64_be \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ From e2935b6943f47ad5608602a57ecd6361fd7660c7 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 14:33:29 +0200 Subject: [PATCH 56/73] aarch64: try harder when checking for the crypto extensions --- configure.ac | 46 +++++++++++++++++-- .../armcrypto/aead_aes256gcm_armcrypto.c | 9 ++++ src/libsodium/sodium/runtime.c | 2 +- 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 9cf4e548..b0b80923 100644 --- a/configure.ac +++ b/configure.ac @@ -397,7 +397,28 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ AS_IF([test "x$target_cpu_aarch64" = "xyes"], [ have_armcrypto=no AC_MSG_CHECKING(for ARM crypto instructions set) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) ]])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #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 + ]], [[ + vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(0)); + + #ifdef __clang__ + # pragma clang attribute pop + #endif + (void) 0 + ]])], [ AC_MSG_RESULT(yes) have_armcrypto=yes @@ -408,7 +429,26 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto+aes], [ CFLAGS="$CFLAGS -march=armv8-a+crypto+aes" AC_MSG_CHECKING(for ARM crypto instructions set with -march=armv8-a+crypto+aes) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) ]])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #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 + ]], [[ + vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(0)); + + #ifdef __clang__ + # pragma clang attribute pop + #endif + (void) 0 + ]])], [ AC_MSG_RESULT(yes - with addition of -march=armv8-a+crypto+aes) have_armcrypto=yes @@ -904,7 +944,7 @@ if (&getentropy != NULL) { AS_IF([test "x$WASI" = "x"],[ AC_CHECK_FUNCS([getpid]) - AC_CHECK_FUNCS([getauxva elf_aux_info]) + AC_CHECK_FUNCS([getauxval elf_aux_info]) ]) AC_CHECK_FUNCS([posix_memalign nanosleep clock_gettime]) diff --git a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c index b6330642..2c37526d 100644 --- a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c +++ b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c @@ -19,6 +19,15 @@ #define __vectorcall #endif +#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 diff --git a/src/libsodium/sodium/runtime.c b/src/libsodium/sodium/runtime.c index 7f0997d4..48339955 100644 --- a/src/libsodium/sodium/runtime.c +++ b/src/libsodium/sodium/runtime.c @@ -97,7 +97,7 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features) return 0; } -#if __ARM_FEATURE_CRYPTO +#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 */ From dddd55df72968ebf770454d466e9e5a485cc8ddc Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 15:59:44 +0200 Subject: [PATCH 57/73] Regen --- build-aux/config.sub | 2 +- builds/Makefile.in | 9 +++++++- configure | 54 ++++++++++++++++++++++++++++++++++++++------ 3 files changed, 56 insertions(+), 9 deletions(-) diff --git a/build-aux/config.sub b/build-aux/config.sub index 4a8c458f..6ae25027 100644 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1181,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64c | aarch64_be \ + | aarch64 | aarch64_be \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ diff --git a/builds/Makefile.in b/builds/Makefile.in index b710e5ed..20b1f2e7 100644 --- a/builds/Makefile.in +++ b/builds/Makefile.in @@ -370,7 +370,14 @@ EXTRA_DIST = \ msvc/vs2019/libsodium/libsodium.xml \ msvc/vs2019/libsodium.import.props \ msvc/vs2019/libsodium.import.xml \ - msvc/vs2019/libsodium.sln + msvc/vs2022/libsodium.sln \ + msvc/vs2022/libsodium/libsodium.props \ + msvc/vs2022/libsodium/libsodium.vcxproj \ + msvc/vs2022/libsodium/libsodium.vcxproj.filters \ + msvc/vs2022/libsodium/libsodium.xml \ + msvc/vs2022/libsodium.import.props \ + msvc/vs2022/libsodium.import.xml \ + msvc/vs2022/libsodium.sln all: all-am diff --git a/configure b/configure index 95294f8a..e738300f 100755 --- a/configure +++ b/configure @@ -18558,11 +18558,32 @@ then : printf %s "checking for ARM crypto instructions set... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #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 + int main (void) { - vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) + + vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(0)); + + #ifdef __clang__ + # pragma clang attribute pop + #endif + (void) 0 + ; return 0; } @@ -18620,11 +18641,30 @@ then : printf %s "checking for ARM crypto instructions set with -march=armv8-a+crypto+aes... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #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 + int main (void) { - vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(__ARM_FEATURE_CRYPTO)) + + vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(0)); + + #ifdef __clang__ + # pragma clang attribute pop + #endif + (void) 0 + ; return 0; } @@ -21164,10 +21204,10 @@ then : fi - ac_fn_c_check_func "$LINENO" "getauxva" "ac_cv_func_getauxva" -if test "x$ac_cv_func_getauxva" = xyes + ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval" +if test "x$ac_cv_func_getauxval" = xyes then : - printf "%s\n" "#define HAVE_GETAUXVA 1" >>confdefs.h + printf "%s\n" "#define HAVE_GETAUXVAL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "elf_aux_info" "ac_cv_func_elf_aux_info" From 8a87181b6b4e88e491fc461c65c6513f1ec146d5 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 16:00:21 +0200 Subject: [PATCH 58/73] Regen --- build-aux/config.sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/config.sub b/build-aux/config.sub index 6ae25027..4a8c458f 100644 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1181,7 +1181,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ | a29k \ - | aarch64 | aarch64_be \ + | aarch64 | aarch64c | aarch64_be \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ From b6bcb3dc22e87c19345b4d51d50a4f2b4c9df544 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 16:02:49 +0200 Subject: [PATCH 59/73] Forgotten attribute pop --- .../aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c index 2c37526d..0a5a1281 100644 --- a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c +++ b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c @@ -1025,4 +1025,8 @@ crypto_aead_aes256gcm_is_available(void) return sodium_runtime_has_armcrypto(); } +#ifdef __clang__ +#pragma clang attribute pop +#endif + #endif From a589d64b42c20b65803441c7f5240c1a04c43976 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 12 Sep 2023 19:07:25 +0200 Subject: [PATCH 60/73] Handle SIGPROT, CHERI's in-address space security exception --- build-aux/config.guess | 1243 +++++++++++++++++---------------- configure | 3 + m4/ax_check_catchable_segv.m4 | 3 + src/libsodium/sodium/utils.c | 5 +- test/default/sodium_utils2.c | 6 + test/default/sodium_utils3.c | 6 + 6 files changed, 670 insertions(+), 596 deletions(-) diff --git a/build-aux/config.guess b/build-aux/config.guess index f7727026..7f76b622 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2021-01-01' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -32,7 +34,15 @@ timestamp='2021-01-01' # Please send patches to . -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] @@ -50,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,6 +94,9 @@ if test $# != 0; then exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -102,8 +115,8 @@ set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 - { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } @@ -112,7 +125,7 @@ set_cc_for_build() { ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -131,12 +144,12 @@ if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown -UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown -UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown -UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown @@ -157,7 +170,8 @@ Linux|GNU|GNU/*) #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && @@ -176,7 +190,7 @@ esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -188,12 +202,11 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)) - case "$UNAME_MACHINE_ARCH" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; @@ -201,15 +214,15 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') - endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') - machine="${arch}${endian}"-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -230,10 +243,10 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -241,76 +254,82 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; *) - release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) - case "$ALPHA_CPU_TYPE" in + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -347,68 +366,69 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "$( (/bin/universe) 2>/dev/null)" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case $(/usr/bin/uname -p) in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 @@ -417,47 +437,50 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "$(/usr/bin/arch -k)" in + case `/usr/bin/arch -k` in Series*|S4*) - UNAME_RELEASE=$(uname -v) + UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "$(/bin/arch)" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -467,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -526,78 +549,79 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && - SYSTEM_NAME=$("$dummy" "$dummyarg") && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=$(/usr/bin/uname -p) + UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=$(/usr/bin/oslevel) + IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -612,68 +636,68 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) - IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) - sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) - case "$sc_cpu_version" in + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 @@ -715,7 +739,7 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac @@ -740,12 +764,12 @@ EOF HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -773,38 +797,38 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -812,17 +836,18 @@ EOF fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -830,114 +855,129 @@ EOF -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=$(/usr/bin/uname -p) - case "$UNAME_PROCESSOR" in + UNAME_PROCESSOR=`/usr/bin/uname -p` + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -948,63 +988,63 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 @@ -1049,65 +1089,66 @@ EOF #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC @@ -1116,71 +1157,71 @@ EOF (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then - LIBCABI="$LIBC"x32 + LIBCABI=${LIBC}x32 fi fi - echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) - UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case $(/bin/uname -X | grep "^Machine") in + case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1188,11 +1229,11 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1200,37 +1241,37 @@ EOF # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1241,7 +1282,7 @@ EOF NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1249,118 +1290,118 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=$( (uname -p) 2>/dev/null) - echo "$UNAME_MACHINE"-sni-sysv4 + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then - echo mips-nec-sysv"$UNAME_RELEASE" + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; arm64:Darwin:*:*) - echo aarch64-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac @@ -1394,109 +1435,119 @@ EOF # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) - UNAME_MACHINE=$( (uname -p) 2>/dev/null) - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </dev/null); + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1628,7 +1679,7 @@ main () } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1636,7 +1687,7 @@ test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown) -uname -r = $( (uname -r) 2>/dev/null || echo unknown) -uname -s = $( (uname -s) 2>/dev/null || echo unknown) -uname -v = $( (uname -v) 2>/dev/null || echo unknown) +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) -/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` -hostinfo = $( (hostinfo) 2>/dev/null) -/bin/universe = $( (/bin/universe) 2>/dev/null) -/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) -/bin/arch = $( (/bin/arch) 2>/dev/null) -/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) -/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" diff --git a/configure b/configure index e738300f..c8fda2be 100755 --- a/configure +++ b/configure @@ -10271,6 +10271,9 @@ main (void) volatile unsigned char * volatile x = (volatile unsigned char *) malloc(8); size_t i; +#ifdef SIGPROT +signal(SIGPROT, sig); +#endif signal(SIGSEGV, sig); signal(SIGBUS, sig); #if !defined(__SANITIZE_ADDRESS__) && !defined(__EMSCRIPTEN__) diff --git a/m4/ax_check_catchable_segv.m4 b/m4/ax_check_catchable_segv.m4 index d1f36d9e..fb0579e0 100644 --- a/m4/ax_check_catchable_segv.m4 +++ b/m4/ax_check_catchable_segv.m4 @@ -21,6 +21,9 @@ static void sig(int _) { exit(0); } volatile unsigned char * volatile x = (volatile unsigned char *) malloc(8); size_t i; +#ifdef SIGPROT +signal(SIGPROT, sig); +#endif signal(SIGSEGV, sig); signal(SIGBUS, sig); #if !defined(__SANITIZE_ADDRESS__) && !defined(__EMSCRIPTEN__) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index 0fe77007..994b835d 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -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); diff --git a/test/default/sodium_utils2.c b/test/default/sodium_utils2.c index 22648da9..6ecc067a 100644 --- a/test/default/sodium_utils2.c +++ b/test/default/sodium_utils2.c @@ -29,6 +29,9 @@ segv_handler(int sig) printf("Intentional segfault / bus error caught\n"); printf("OK\n"); #ifdef SIG_DFL +# ifdef SIGPROT + signal(SIGPROT, SIG_DFL); +# endif # ifdef SIGSEGV signal(SIGSEGV, SIG_DFL); # endif @@ -82,6 +85,9 @@ main(void) } printf("OK\n"); #ifdef SIG_DFL +# ifdef SIGPROT + signal(SIGPROT, segv_handler); +# endif # ifdef SIGSEGV signal(SIGSEGV, segv_handler); # endif diff --git a/test/default/sodium_utils3.c b/test/default/sodium_utils3.c index 1a110e2e..4593069b 100644 --- a/test/default/sodium_utils3.c +++ b/test/default/sodium_utils3.c @@ -25,6 +25,9 @@ segv_handler(int sig) printf("Intentional segfault / bus error caught\n"); printf("OK\n"); #ifdef SIG_DFL +# ifdef SIGPROT + signal(SIGPROT, SIG_DFL); +# endif # ifdef SIGSEGV signal(SIGSEGV, SIG_DFL); # endif @@ -49,6 +52,9 @@ main(void) #endif #ifdef SIG_DFL +# ifdef SIGPROT + signal(SIGPROT, segv_handler); +# endif # ifdef SIGSEGV signal(SIGSEGV, segv_handler); # endif From 61674c6c871957f673622f9f9a824e7b7e027c7a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 13 Sep 2023 08:51:13 +0200 Subject: [PATCH 61/73] Use ANDROID_CPU_ARM64_FEATURE_AES for AES detection on Android/aarch64 --- src/libsodium/sodium/runtime.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsodium/sodium/runtime.c b/src/libsodium/sodium/runtime.c index 48339955..c3fc2e03 100644 --- a/src/libsodium/sodium/runtime.c +++ b/src/libsodium/sodium/runtime.c @@ -66,9 +66,9 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features) #if defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64) cpu_features->has_neon = 1; -#elif defined(HAVE_ANDROID_GETCPUFEATURES) && defined(ANDROID_CPU_ARM_FEATURE_NEON) +#elif defined(HAVE_ANDROID_GETCPUFEATURES) cpu_features->has_neon = - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0x0; + (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; @@ -117,9 +117,9 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features) cpu_features->has_armcrypto = 1; } } -#elif defined(HAVE_ANDROID_GETCPUFEATURES) && defined(ANDROID_CPU_ARM_FEATURE_AES) +#elif defined(HAVE_ANDROID_GETCPUFEATURES) cpu_features->has_armcrypto = - (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES) != 0x0; + (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; From ad0e68cff728361d533e22cd0bf4705c3bcef91c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 8 Sep 2023 21:32:48 +0200 Subject: [PATCH 62/73] Bump --- appveyor.yml | 2 +- builds/msvc/resource.rc | 4 ++-- builds/msvc/version.h | 7 +++--- configure | 28 +++++++++++------------ configure.ac | 10 ++++---- dist-build/android-aar.sh | 2 +- dist-build/generate-emscripten-symbols.sh | 2 +- msvc-scripts/process.bat | 4 ++-- packaging/dotnet-core/libsodium.pkgproj | 2 +- packaging/nuget/package.config | 2 +- 10 files changed, 32 insertions(+), 31 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5fdcdc8a..a70d581c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 1.0.18.{build} +version: 1.0.19.{build} os: Visual Studio 2017 diff --git a/builds/msvc/resource.rc b/builds/msvc/resource.rc index 11baa2e8..0df9779d 100644 --- a/builds/msvc/resource.rc +++ b/builds/msvc/resource.rc @@ -4,8 +4,8 @@ #include "windows.h" //specify the version numbers for the dll's -#define LIBSODIUM_VERSION_STRING "1.0.18.0" -#define LIBSODIUM_VERSION_BIN 1,0,18,0 +#define LIBSODIUM_VERSION_STRING "1.0.19.0" +#define LIBSODIUM_VERSION_BIN 1,0,19,0 //specify the product name for the dlls based on the platform we are compiling for #if defined(x64) diff --git a/builds/msvc/version.h b/builds/msvc/version.h index 174d9921..c4d5e19b 100644 --- a/builds/msvc/version.h +++ b/builds/msvc/version.h @@ -4,10 +4,11 @@ #include "export.h" -#define SODIUM_VERSION_STRING "1.0.18" +#define SODIUM_VERSION_STRING "1.0.19" + +#define SODIUM_LIBRARY_VERSION_MAJOR 26 +#define SODIUM_LIBRARY_VERSION_MINOR 1 -#define SODIUM_LIBRARY_VERSION_MAJOR 10 -#define SODIUM_LIBRARY_VERSION_MINOR 3 #ifdef __cplusplus extern "C" { diff --git a/configure b/configure index c8fda2be..fc7871f3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libsodium 1.0.18. +# Generated by GNU Autoconf 2.71 for libsodium 1.0.19. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libsodium' PACKAGE_TARNAME='libsodium' -PACKAGE_VERSION='1.0.18' -PACKAGE_STRING='libsodium 1.0.18' +PACKAGE_VERSION='1.0.19' +PACKAGE_STRING='libsodium 1.0.19' PACKAGE_BUGREPORT='https://github.com/jedisct1/libsodium/issues' PACKAGE_URL='https://libsodium.org' @@ -1446,7 +1446,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libsodium 1.0.18 to adapt to many kinds of systems. +\`configure' configures libsodium 1.0.19 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1518,7 +1518,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libsodium 1.0.18:";; + short | recursive ) echo "Configuration of libsodium 1.0.19:";; esac cat <<\_ACEOF @@ -1670,7 +1670,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libsodium configure 1.0.18 +libsodium configure 1.0.19 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2026,7 +2026,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libsodium $as_me 1.0.18, which was +It was created by libsodium $as_me 1.0.19, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3415,7 +3415,7 @@ fi # Define the identity of the package. PACKAGE='libsodium' - VERSION='1.0.18' + VERSION='1.0.19' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3723,10 +3723,10 @@ fi -SODIUM_LIBRARY_VERSION_MAJOR=10 -SODIUM_LIBRARY_VERSION_MINOR=3 -DLL_VERSION=24 -SODIUM_LIBRARY_VERSION=26:0:3 +SODIUM_LIBRARY_VERSION_MAJOR=26 +SODIUM_LIBRARY_VERSION_MINOR=1 +DLL_VERSION=26 +SODIUM_LIBRARY_VERSION=27:0:1 # | | | # +------+ | +---+ # | | | @@ -21966,7 +21966,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libsodium $as_me 1.0.18, which was +This file was extended by libsodium $as_me 1.0.19, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22026,7 +22026,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libsodium config.status 1.0.18 +libsodium config.status 1.0.19 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index b0b80923..8e0b3193 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([libsodium],[1.0.18],[https://github.com/jedisct1/libsodium/issues],[libsodium],[https://libsodium.org]) +AC_INIT([libsodium],[1.0.19],[https://github.com/jedisct1/libsodium/issues],[libsodium],[https://libsodium.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/libsodium/sodium/version.c]) @@ -12,10 +12,10 @@ AM_DEP_TRACK AC_SUBST(VERSION) -SODIUM_LIBRARY_VERSION_MAJOR=10 -SODIUM_LIBRARY_VERSION_MINOR=3 -DLL_VERSION=24 -SODIUM_LIBRARY_VERSION=26:0:3 +SODIUM_LIBRARY_VERSION_MAJOR=26 +SODIUM_LIBRARY_VERSION_MINOR=1 +DLL_VERSION=26 +SODIUM_LIBRARY_VERSION=27:0:1 # | | | # +------+ | +---+ # | | | diff --git a/dist-build/android-aar.sh b/dist-build/android-aar.sh index af223993..9eeeab15 100755 --- a/dist-build/android-aar.sh +++ b/dist-build/android-aar.sh @@ -5,7 +5,7 @@ # The x86 static library will not work due to text relocation rules, so static x86 versions are limited to shared libraries. # To simplify linking, library variants have distinct names: sodium, sodium-static, sodium-minimal and sodium-minimal-static. -SODIUM_VERSION="1.0.18.0" +SODIUM_VERSION="1.0.19.0" NDK_VERSION=$(grep "Pkg.Revision = " <"${ANDROID_NDK_HOME}/source.properties" | cut -f 2 -d '=' | cut -f 2 -d' ' | cut -f 1 -d'.') DEST_PATH=$(mktemp -d) diff --git a/dist-build/generate-emscripten-symbols.sh b/dist-build/generate-emscripten-symbols.sh index ec23d2e0..c4143706 100755 --- a/dist-build/generate-emscripten-symbols.sh +++ b/dist-build/generate-emscripten-symbols.sh @@ -2,7 +2,7 @@ set -e -LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.23.dylib} +LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.26.dylib} symbols() { { diff --git a/msvc-scripts/process.bat b/msvc-scripts/process.bat index 291679e4..bf58298d 100755 --- a/msvc-scripts/process.bat +++ b/msvc-scripts/process.bat @@ -1,5 +1,5 @@ -cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.18/ < src\libsodium\include\sodium\version.h.in > tmp +cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.19/ < src\libsodium\include\sodium\version.h.in > tmp cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/10/ < tmp > tmp2 -cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/3/ < tmp2 > tmp3 +cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/4/ < tmp2 > tmp3 cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h del tmp tmp2 tmp3 diff --git a/packaging/dotnet-core/libsodium.pkgproj b/packaging/dotnet-core/libsodium.pkgproj index ecf00f11..e50bba80 100644 --- a/packaging/dotnet-core/libsodium.pkgproj +++ b/packaging/dotnet-core/libsodium.pkgproj @@ -9,7 +9,7 @@ libsodium - 1.0.18.4 + 1.0.19.0 Frank Denis Internal implementation package not meant for direct consumption. Please do not reference directly. © $([System.DateTime]::UtcNow.ToString(yyyy)) Frank Denis diff --git a/packaging/nuget/package.config b/packaging/nuget/package.config index 24bb152c..aab38111 100644 --- a/packaging/nuget/package.config +++ b/packaging/nuget/package.config @@ -1,4 +1,4 @@ - + From c7fc4c5e921c15988d8986881605fd91f7963a21 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 11:25:27 +0200 Subject: [PATCH 63/73] osx.sh -> macos.sh --- dist-build/{osx.sh => macos.sh} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename dist-build/{osx.sh => macos.sh} (91%) diff --git a/dist-build/osx.sh b/dist-build/macos.sh similarity index 91% rename from dist-build/osx.sh rename to dist-build/macos.sh index b7ff1bd5..fed7f394 100755 --- a/dist-build/osx.sh +++ b/dist-build/macos.sh @@ -14,7 +14,7 @@ PROCESSORS=${NPROCESSORS:-3} mkdir -p $PREFIX || exit 1 -export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -O2 -g" +export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -Ofast" export LDFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN}" make distclean >/dev/null From b8a6fecdb6aa40a3ea2089bb60f08406ed8a3f8d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 17:37:16 +0200 Subject: [PATCH 64/73] Add support for HKDF --- .gitignore | 3 +- .../msvc/vs2010/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ .../msvc/vs2012/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ .../msvc/vs2013/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ .../msvc/vs2015/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ .../msvc/vs2017/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ .../msvc/vs2019/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ .../msvc/vs2022/libsodium/libsodium.vcxproj | 4 + .../libsodium/libsodium.vcxproj.filters | 15 ++ libsodium.vcxproj | 4 + libsodium.vcxproj.filters | 12 + src/libsodium/Makefile.am | 2 + src/libsodium/Makefile.in | 45 ++++ .../crypto_kdf/hkdf/kdf_hkdf_sha256.c | 123 +++++++++++ .../crypto_kdf/hkdf/kdf_hkdf_sha512.c | 118 ++++++++++ src/libsodium/include/sodium.h | 2 + .../include/sodium/crypto_kdf_hkdf_sha256.h | 74 +++++++ .../include/sodium/crypto_kdf_hkdf_sha512.h | 75 +++++++ test/default/Makefile.am | 16 +- test/default/Makefile.in | 146 ++++++++----- test/default/aead_aes256gcm.c | 37 +++- test/default/core_ed25519.c | 20 +- test/default/core_ed25519.exp | 15 ++ test/default/kdf.c | 2 +- test/default/kdf_hkdf.c | 100 +++++++++ test/default/kdf_hkdf.exp | 205 ++++++++++++++++++ ...eam.c => secretstream_xchacha20poly1305.c} | 2 +- ...exp => secretstream_xchacha20poly1305.exp} | 0 test/default/sodium_core.c | 1 + test/default/sodium_utils2.c | 6 +- 36 files changed, 1057 insertions(+), 84 deletions(-) create mode 100644 src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c create mode 100644 src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c create mode 100644 src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h create mode 100644 src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h create mode 100644 test/default/kdf_hkdf.c create mode 100644 test/default/kdf_hkdf.exp rename test/default/{secretstream.c => secretstream_xchacha20poly1305.c} (99%) rename test/default/{secretstream.exp => secretstream_xchacha20poly1305.exp} (100%) diff --git a/.gitignore b/.gitignore index 00d84d79..5ae14510 100644 --- a/.gitignore +++ b/.gitignore @@ -117,6 +117,7 @@ test/default/generichash3 test/default/hash test/default/hash3 test/default/kdf +test/default/kdf_hkdf test/default/keygen test/default/kx test/default/metamorphic @@ -143,7 +144,7 @@ test/default/secretbox7 test/default/secretbox8 test/default/secretbox_easy test/default/secretbox_easy2 -test/default/secretstream +test/default/secretstream_xchacha20poly1305 test/default/shorthash test/default/sign test/default/siphashx24 diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj b/builds/msvc/vs2010/libsodium/libsodium.vcxproj index 315ec434..6384115d 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj b/builds/msvc/vs2012/libsodium/libsodium.vcxproj index be58192d..30a017ee 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj b/builds/msvc/vs2013/libsodium/libsodium.vcxproj index 59bd9d7e..ceea669a 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj b/builds/msvc/vs2015/libsodium/libsodium.vcxproj index a7c11dfb..6763d793 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj b/builds/msvc/vs2017/libsodium/libsodium.vcxproj index d6421632..a562ed5b 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj b/builds/msvc/vs2019/libsodium/libsodium.vcxproj index 4aa625c5..da1965a6 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index 657fbec3..6be75de6 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -120,6 +120,8 @@ + + @@ -240,6 +242,7 @@ + @@ -248,6 +251,7 @@ + diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters index 7a57951f..fd6e84ef 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters @@ -153,6 +153,12 @@ crypto_kdf\blake2b + + crypto_kdf\hkdf + + + crypto_kdf\hkdf + crypto_shorthash @@ -509,6 +515,9 @@ include\sodium + + include\sodium + include\sodium @@ -533,6 +542,9 @@ include\sodium + + include\sodium + include\sodium @@ -838,6 +850,9 @@ {3d42d2a2-b192-33dd-9162-508916414707} + + {baf7d894-9298-391d-8dc2-e4c3010f5ddc} + {898b6bd5-1360-3a34-adcd-0fade7561685} diff --git a/libsodium.vcxproj b/libsodium.vcxproj index 1429a1e7..04bd3f09 100644 --- a/libsodium.vcxproj +++ b/libsodium.vcxproj @@ -358,6 +358,8 @@ + + @@ -478,6 +480,7 @@ + @@ -486,6 +489,7 @@ + diff --git a/libsodium.vcxproj.filters b/libsodium.vcxproj.filters index 64c097f5..ccbe9757 100644 --- a/libsodium.vcxproj.filters +++ b/libsodium.vcxproj.filters @@ -144,6 +144,12 @@ Source Files + + Source Files + + + Source Files + Source Files @@ -500,6 +506,9 @@ Header Files + + Header Files + Header Files @@ -524,6 +533,9 @@ Header Files + + Header Files + Header Files diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index 03d62d47..fa2b77c3 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -152,6 +152,8 @@ libsodium_la_SOURCES += \ crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ crypto_core/ed25519/core_ed25519.c \ crypto_core/ed25519/core_ristretto255.c \ + crypto_kdf/hkdf/kdf_hkdf_sha256.c \ + crypto_kdf/hkdf/kdf_hkdf_sha512.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index bcd940aa..05f4d01d 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -132,6 +132,8 @@ target_triplet = @target@ @MINIMAL_FALSE@ crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ @MINIMAL_FALSE@ crypto_core/ed25519/core_ed25519.c \ @MINIMAL_FALSE@ crypto_core/ed25519/core_ristretto255.c \ +@MINIMAL_FALSE@ crypto_kdf/hkdf/kdf_hkdf_sha256.c \ +@MINIMAL_FALSE@ crypto_kdf/hkdf/kdf_hkdf_sha512.c \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ @@ -373,6 +375,8 @@ am__libsodium_la_SOURCES_DIST = \ crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ crypto_core/ed25519/core_ed25519.c \ crypto_core/ed25519/core_ristretto255.c \ + crypto_kdf/hkdf/kdf_hkdf_sha256.c \ + crypto_kdf/hkdf/kdf_hkdf_sha512.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ @@ -404,6 +408,8 @@ am__objects_1 = @MINIMAL_FALSE@ crypto_box/curve25519xchacha20poly1305/libsodium_la-box_seal_curve25519xchacha20poly1305.lo \ @MINIMAL_FALSE@ crypto_core/ed25519/libsodium_la-core_ed25519.lo \ @MINIMAL_FALSE@ crypto_core/ed25519/libsodium_la-core_ristretto255.lo \ +@MINIMAL_FALSE@ crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo \ +@MINIMAL_FALSE@ crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/libsodium_la-scrypt_platform.lo \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/libsodium_la-pbkdf2-sha256.lo \ @@ -578,6 +584,8 @@ am__depfiles_remade = crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gc 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 \ @@ -1820,6 +1828,18 @@ crypto_core/ed25519/libsodium_la-core_ed25519.lo: \ crypto_core/ed25519/libsodium_la-core_ristretto255.lo: \ crypto_core/ed25519/$(am__dirstamp) \ crypto_core/ed25519/$(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_pwhash/scryptsalsa208sha256/$(am__dirstamp): @$(MKDIR_P) crypto_pwhash/scryptsalsa208sha256 @: > crypto_pwhash/scryptsalsa208sha256/$(am__dirstamp) @@ -2041,6 +2061,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) @@ -2172,6 +2194,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 @@ -2902,6 +2926,20 @@ crypto_core/ed25519/libsodium_la-core_ristretto255.lo: crypto_core/ed25519/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/ed25519/libsodium_la-core_ristretto255.lo `test -f 'crypto_core/ed25519/core_ristretto255.c' || echo '$(srcdir)/'`crypto_core/ed25519/core_ristretto255.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_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo: crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.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_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo -MD -MP -MF crypto_pwhash/scryptsalsa208sha256/$(DEPDIR)/libsodium_la-crypto_scrypt-common.Tpo -c -o crypto_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo `test -f 'crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c' || echo '$(srcdir)/'`crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_pwhash/scryptsalsa208sha256/$(DEPDIR)/libsodium_la-crypto_scrypt-common.Tpo crypto_pwhash/scryptsalsa208sha256/$(DEPDIR)/libsodium_la-crypto_scrypt-common.Plo @@ -3103,6 +3141,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 @@ -3417,6 +3456,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) @@ -3554,6 +3595,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 @@ -3709,6 +3752,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 diff --git a/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c b/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c new file mode 100644 index 00000000..8eb7c878 --- /dev/null +++ b/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha256.c @@ -0,0 +1,123 @@ +#include +#include + +#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); +} diff --git a/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c b/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c new file mode 100644 index 00000000..51d91619 --- /dev/null +++ b/src/libsodium/crypto_kdf/hkdf/kdf_hkdf_sha512.c @@ -0,0 +1,118 @@ +#include +#include + +#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; +} diff --git a/src/libsodium/include/sodium.h b/src/libsodium/include/sodium.h index 295f911c..18659e1b 100644 --- a/src/libsodium/include/sodium.h +++ b/src/libsodium/include/sodium.h @@ -26,6 +26,8 @@ #include "sodium/crypto_hash_sha512.h" #include "sodium/crypto_kdf.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" diff --git a/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h b/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h new file mode 100644 index 00000000..e7e7f4db --- /dev/null +++ b/src/libsodium/include/sodium/crypto_kdf_hkdf_sha256.h @@ -0,0 +1,74 @@ +#ifndef crypto_kdf_hkdf_sha256_H +#define crypto_kdf_hkdf_sha256_H + +#include +#include +#include + +#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 diff --git a/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h b/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h new file mode 100644 index 00000000..0ed205df --- /dev/null +++ b/src/libsodium/include/sodium/crypto_kdf_hkdf_sha512.h @@ -0,0 +1,75 @@ +#ifndef crypto_kdf_hkdf_sha512_H +#define crypto_kdf_hkdf_sha512_H + +#include +#include +#include + +#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 diff --git a/test/default/Makefile.am b/test/default/Makefile.am index d319160d..ed852c91 100644 --- a/test/default/Makefile.am +++ b/test/default/Makefile.am @@ -41,6 +41,7 @@ EXTRA_DIST = \ hash.exp \ hash3.exp \ kdf.exp \ + kdf_hkdf.exp \ keygen.exp \ kx.exp \ metamorphic.exp \ @@ -67,7 +68,7 @@ EXTRA_DIST = \ secretbox8.exp \ secretbox_easy.exp \ secretbox_easy2.exp \ - secretstream.exp \ + secretstream_xchacha20poly1305.exp \ shorthash.exp \ sign.exp \ siphashx24.exp \ @@ -121,6 +122,7 @@ DISTCLEANFILES = \ hash2.res \ hash3.res \ kdf.res \ + kdf_hkdf.res \ keygen.res \ kx.res \ metamorphic.res \ @@ -147,7 +149,7 @@ DISTCLEANFILES = \ secretbox8.res \ secretbox_easy.res \ secretbox_easy2.res \ - secretstream.res \ + secretstream_xchacha20poly1305.res \ shorthash.res \ sign.res \ siphashx24.res \ @@ -230,7 +232,7 @@ TESTS_TARGETS = \ secretbox8 \ secretbox_easy \ secretbox_easy2 \ - secretstream \ + secretstream_xchacha20poly1305 \ shorthash \ sign \ sodium_core \ @@ -363,6 +365,9 @@ hash3_LDADD = $(TESTS_LDADD) kdf_SOURCE = cmptest.h kdf.c kdf_LDADD = $(TESTS_LDADD) +kdf_hkdf_SOURCE = cmptest.h kdf_hkdf.c +kdf_hkdf_LDADD = $(TESTS_LDADD) + keygen_SOURCE = cmptest.h keygen.c keygen_LDADD = $(TESTS_LDADD) @@ -441,8 +446,8 @@ secretbox_easy_LDADD = $(TESTS_LDADD) secretbox_easy2_SOURCE = cmptest.h secretbox_easy2.c secretbox_easy2_LDADD = $(TESTS_LDADD) -secretstream_SOURCE = cmptest.h secretstream.c -secretstream_LDADD = $(TESTS_LDADD) +secretstream_xchacha20poly1305_SOURCE = cmptest.h secretstream_xchacha20poly1305.c +secretstream_xchacha20poly1305_LDADD = $(TESTS_LDADD) shorthash_SOURCE = cmptest.h shorthash.c shorthash_LDADD = $(TESTS_LDADD) @@ -490,6 +495,7 @@ if !MINIMAL TESTS_TARGETS += \ core_ed25519 \ core_ristretto255 \ + kdf_hkdf \ pwhash_scrypt \ pwhash_scrypt_ll \ scalarmult_ed25519 \ diff --git a/test/default/Makefile.in b/test/default/Makefile.in index 78bb139c..8c81d3dc 100644 --- a/test/default/Makefile.in +++ b/test/default/Makefile.in @@ -97,6 +97,7 @@ TESTS = $(am__EXEEXT_3) @MINIMAL_FALSE@am__append_2 = \ @MINIMAL_FALSE@ core_ed25519 \ @MINIMAL_FALSE@ core_ristretto255 \ +@MINIMAL_FALSE@ kdf_hkdf \ @MINIMAL_FALSE@ pwhash_scrypt \ @MINIMAL_FALSE@ pwhash_scrypt_ll \ @MINIMAL_FALSE@ scalarmult_ed25519 \ @@ -127,7 +128,7 @@ CONFIG_CLEAN_VPATH_FILES = @EMSCRIPTEN_FALSE@am__EXEEXT_1 = sodium_utils2$(EXEEXT) \ @EMSCRIPTEN_FALSE@ sodium_utils3$(EXEEXT) @MINIMAL_FALSE@am__EXEEXT_2 = core_ed25519$(EXEEXT) \ -@MINIMAL_FALSE@ core_ristretto255$(EXEEXT) \ +@MINIMAL_FALSE@ core_ristretto255$(EXEEXT) kdf_hkdf$(EXEEXT) \ @MINIMAL_FALSE@ pwhash_scrypt$(EXEEXT) \ @MINIMAL_FALSE@ pwhash_scrypt_ll$(EXEEXT) \ @MINIMAL_FALSE@ scalarmult_ed25519$(EXEEXT) \ @@ -152,11 +153,12 @@ am__EXEEXT_3 = aead_aes256gcm$(EXEEXT) aead_aes256gcm2$(EXEEXT) \ scalarmult6$(EXEEXT) scalarmult7$(EXEEXT) scalarmult8$(EXEEXT) \ secretbox$(EXEEXT) secretbox2$(EXEEXT) secretbox7$(EXEEXT) \ secretbox8$(EXEEXT) secretbox_easy$(EXEEXT) \ - secretbox_easy2$(EXEEXT) secretstream$(EXEEXT) \ - shorthash$(EXEEXT) sign$(EXEEXT) sodium_core$(EXEEXT) \ - sodium_utils$(EXEEXT) sodium_version$(EXEEXT) stream$(EXEEXT) \ - stream2$(EXEEXT) stream3$(EXEEXT) stream4$(EXEEXT) \ - verify1$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) + secretbox_easy2$(EXEEXT) \ + secretstream_xchacha20poly1305$(EXEEXT) shorthash$(EXEEXT) \ + sign$(EXEEXT) sodium_core$(EXEEXT) sodium_utils$(EXEEXT) \ + sodium_version$(EXEEXT) stream$(EXEEXT) stream2$(EXEEXT) \ + stream3$(EXEEXT) stream4$(EXEEXT) verify1$(EXEEXT) \ + $(am__EXEEXT_1) $(am__EXEEXT_2) aead_aes256gcm_SOURCES = aead_aes256gcm.c aead_aes256gcm_OBJECTS = aead_aes256gcm.$(OBJEXT) aead_aes256gcm_DEPENDENCIES = $(TESTS_LDADD) @@ -269,6 +271,9 @@ hash3_DEPENDENCIES = $(TESTS_LDADD) kdf_SOURCES = kdf.c kdf_OBJECTS = kdf.$(OBJEXT) kdf_DEPENDENCIES = $(TESTS_LDADD) +kdf_hkdf_SOURCES = kdf_hkdf.c +kdf_hkdf_OBJECTS = kdf_hkdf.$(OBJEXT) +kdf_hkdf_DEPENDENCIES = $(TESTS_LDADD) keygen_SOURCES = keygen.c keygen_OBJECTS = keygen.$(OBJEXT) keygen_DEPENDENCIES = $(TESTS_LDADD) @@ -347,9 +352,11 @@ secretbox_easy_DEPENDENCIES = $(TESTS_LDADD) secretbox_easy2_SOURCES = secretbox_easy2.c secretbox_easy2_OBJECTS = secretbox_easy2.$(OBJEXT) secretbox_easy2_DEPENDENCIES = $(TESTS_LDADD) -secretstream_SOURCES = secretstream.c -secretstream_OBJECTS = secretstream.$(OBJEXT) -secretstream_DEPENDENCIES = $(TESTS_LDADD) +secretstream_xchacha20poly1305_SOURCES = \ + secretstream_xchacha20poly1305.c +secretstream_xchacha20poly1305_OBJECTS = \ + secretstream_xchacha20poly1305.$(OBJEXT) +secretstream_xchacha20poly1305_DEPENDENCIES = $(TESTS_LDADD) shorthash_SOURCES = shorthash.c shorthash_OBJECTS = shorthash.$(OBJEXT) shorthash_DEPENDENCIES = $(TESTS_LDADD) @@ -424,28 +431,28 @@ am__depfiles_remade = ./$(DEPDIR)/aead_aes256gcm.Po \ ./$(DEPDIR)/ed25519_convert.Po ./$(DEPDIR)/generichash.Po \ ./$(DEPDIR)/generichash2.Po ./$(DEPDIR)/generichash3.Po \ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/hash3.Po ./$(DEPDIR)/kdf.Po \ - ./$(DEPDIR)/keygen.Po ./$(DEPDIR)/kx.Po \ - ./$(DEPDIR)/metamorphic.Po ./$(DEPDIR)/misuse.Po \ - ./$(DEPDIR)/onetimeauth.Po ./$(DEPDIR)/onetimeauth2.Po \ - ./$(DEPDIR)/onetimeauth7.Po ./$(DEPDIR)/pwhash_argon2i.Po \ - ./$(DEPDIR)/pwhash_argon2id.Po ./$(DEPDIR)/pwhash_scrypt.Po \ - ./$(DEPDIR)/pwhash_scrypt_ll.Po ./$(DEPDIR)/randombytes.Po \ - ./$(DEPDIR)/scalarmult.Po ./$(DEPDIR)/scalarmult2.Po \ - ./$(DEPDIR)/scalarmult5.Po ./$(DEPDIR)/scalarmult6.Po \ - ./$(DEPDIR)/scalarmult7.Po ./$(DEPDIR)/scalarmult8.Po \ - ./$(DEPDIR)/scalarmult_ed25519.Po \ + ./$(DEPDIR)/kdf_hkdf.Po ./$(DEPDIR)/keygen.Po \ + ./$(DEPDIR)/kx.Po ./$(DEPDIR)/metamorphic.Po \ + ./$(DEPDIR)/misuse.Po ./$(DEPDIR)/onetimeauth.Po \ + ./$(DEPDIR)/onetimeauth2.Po ./$(DEPDIR)/onetimeauth7.Po \ + ./$(DEPDIR)/pwhash_argon2i.Po ./$(DEPDIR)/pwhash_argon2id.Po \ + ./$(DEPDIR)/pwhash_scrypt.Po ./$(DEPDIR)/pwhash_scrypt_ll.Po \ + ./$(DEPDIR)/randombytes.Po ./$(DEPDIR)/scalarmult.Po \ + ./$(DEPDIR)/scalarmult2.Po ./$(DEPDIR)/scalarmult5.Po \ + ./$(DEPDIR)/scalarmult6.Po ./$(DEPDIR)/scalarmult7.Po \ + ./$(DEPDIR)/scalarmult8.Po ./$(DEPDIR)/scalarmult_ed25519.Po \ ./$(DEPDIR)/scalarmult_ristretto255.Po \ ./$(DEPDIR)/secretbox.Po ./$(DEPDIR)/secretbox2.Po \ ./$(DEPDIR)/secretbox7.Po ./$(DEPDIR)/secretbox8.Po \ ./$(DEPDIR)/secretbox_easy.Po ./$(DEPDIR)/secretbox_easy2.Po \ - ./$(DEPDIR)/secretstream.Po ./$(DEPDIR)/shorthash.Po \ - ./$(DEPDIR)/sign.Po ./$(DEPDIR)/siphashx24.Po \ - ./$(DEPDIR)/sodium_core.Po ./$(DEPDIR)/sodium_utils.Po \ - ./$(DEPDIR)/sodium_utils2.Po ./$(DEPDIR)/sodium_utils3.Po \ - ./$(DEPDIR)/sodium_version.Po ./$(DEPDIR)/stream.Po \ - ./$(DEPDIR)/stream2.Po ./$(DEPDIR)/stream3.Po \ - ./$(DEPDIR)/stream4.Po ./$(DEPDIR)/verify1.Po \ - ./$(DEPDIR)/xchacha20.Po + ./$(DEPDIR)/secretstream_xchacha20poly1305.Po \ + ./$(DEPDIR)/shorthash.Po ./$(DEPDIR)/sign.Po \ + ./$(DEPDIR)/siphashx24.Po ./$(DEPDIR)/sodium_core.Po \ + ./$(DEPDIR)/sodium_utils.Po ./$(DEPDIR)/sodium_utils2.Po \ + ./$(DEPDIR)/sodium_utils3.Po ./$(DEPDIR)/sodium_version.Po \ + ./$(DEPDIR)/stream.Po ./$(DEPDIR)/stream2.Po \ + ./$(DEPDIR)/stream3.Po ./$(DEPDIR)/stream4.Po \ + ./$(DEPDIR)/verify1.Po ./$(DEPDIR)/xchacha20.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -472,17 +479,17 @@ SOURCES = aead_aes256gcm.c aead_aes256gcm2.c aead_chacha20poly1305.c \ codecs.c core1.c core2.c core3.c core4.c core5.c core6.c \ core_ed25519.c core_ristretto255.c ed25519_convert.c \ generichash.c generichash2.c generichash3.c hash.c hash3.c \ - kdf.c keygen.c kx.c metamorphic.c misuse.c onetimeauth.c \ - onetimeauth2.c onetimeauth7.c pwhash_argon2i.c \ + kdf.c kdf_hkdf.c keygen.c kx.c metamorphic.c misuse.c \ + onetimeauth.c onetimeauth2.c onetimeauth7.c pwhash_argon2i.c \ pwhash_argon2id.c pwhash_scrypt.c pwhash_scrypt_ll.c \ randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \ scalarmult6.c scalarmult7.c scalarmult8.c scalarmult_ed25519.c \ scalarmult_ristretto255.c secretbox.c secretbox2.c \ secretbox7.c secretbox8.c secretbox_easy.c secretbox_easy2.c \ - secretstream.c shorthash.c sign.c siphashx24.c sodium_core.c \ - sodium_utils.c sodium_utils2.c sodium_utils3.c \ - sodium_version.c stream.c stream2.c stream3.c stream4.c \ - verify1.c xchacha20.c + secretstream_xchacha20poly1305.c shorthash.c sign.c \ + siphashx24.c sodium_core.c sodium_utils.c sodium_utils2.c \ + sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \ + stream4.c verify1.c xchacha20.c DIST_SOURCES = aead_aes256gcm.c aead_aes256gcm2.c \ aead_chacha20poly1305.c aead_chacha20poly13052.c \ aead_xchacha20poly1305.c auth.c auth2.c auth3.c auth5.c \ @@ -490,17 +497,18 @@ DIST_SOURCES = aead_aes256gcm.c aead_aes256gcm2.c \ box_easy2.c box_seal.c box_seed.c chacha20.c codecs.c core1.c \ core2.c core3.c core4.c core5.c core6.c core_ed25519.c \ core_ristretto255.c ed25519_convert.c generichash.c \ - generichash2.c generichash3.c hash.c hash3.c kdf.c keygen.c \ - kx.c metamorphic.c misuse.c onetimeauth.c onetimeauth2.c \ - onetimeauth7.c pwhash_argon2i.c pwhash_argon2id.c \ - pwhash_scrypt.c pwhash_scrypt_ll.c randombytes.c scalarmult.c \ - scalarmult2.c scalarmult5.c scalarmult6.c scalarmult7.c \ - scalarmult8.c scalarmult_ed25519.c scalarmult_ristretto255.c \ - secretbox.c secretbox2.c secretbox7.c secretbox8.c \ - secretbox_easy.c secretbox_easy2.c secretstream.c shorthash.c \ - sign.c siphashx24.c sodium_core.c sodium_utils.c \ - sodium_utils2.c sodium_utils3.c sodium_version.c stream.c \ - stream2.c stream3.c stream4.c verify1.c xchacha20.c + generichash2.c generichash3.c hash.c hash3.c kdf.c kdf_hkdf.c \ + keygen.c kx.c metamorphic.c misuse.c onetimeauth.c \ + onetimeauth2.c onetimeauth7.c pwhash_argon2i.c \ + pwhash_argon2id.c pwhash_scrypt.c pwhash_scrypt_ll.c \ + randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \ + scalarmult6.c scalarmult7.c scalarmult8.c scalarmult_ed25519.c \ + scalarmult_ristretto255.c secretbox.c secretbox2.c \ + secretbox7.c secretbox8.c secretbox_easy.c secretbox_easy2.c \ + secretstream_xchacha20poly1305.c shorthash.c sign.c \ + siphashx24.c sodium_core.c sodium_utils.c sodium_utils2.c \ + sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \ + stream4.c verify1.c xchacha20.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -943,6 +951,7 @@ EXTRA_DIST = \ hash.exp \ hash3.exp \ kdf.exp \ + kdf_hkdf.exp \ keygen.exp \ kx.exp \ metamorphic.exp \ @@ -969,7 +978,7 @@ EXTRA_DIST = \ secretbox8.exp \ secretbox_easy.exp \ secretbox_easy2.exp \ - secretstream.exp \ + secretstream_xchacha20poly1305.exp \ shorthash.exp \ sign.exp \ siphashx24.exp \ @@ -1023,6 +1032,7 @@ DISTCLEANFILES = \ hash2.res \ hash3.res \ kdf.res \ + kdf_hkdf.res \ keygen.res \ kx.res \ metamorphic.res \ @@ -1049,7 +1059,7 @@ DISTCLEANFILES = \ secretbox8.res \ secretbox_easy.res \ secretbox_easy2.res \ - secretstream.res \ + secretstream_xchacha20poly1305.res \ shorthash.res \ sign.res \ siphashx24.res \ @@ -1084,9 +1094,9 @@ TESTS_TARGETS = aead_aes256gcm aead_aes256gcm2 aead_chacha20poly1305 \ pwhash_argon2id randombytes scalarmult scalarmult2 scalarmult5 \ scalarmult6 scalarmult7 scalarmult8 secretbox secretbox2 \ secretbox7 secretbox8 secretbox_easy secretbox_easy2 \ - secretstream shorthash sign sodium_core sodium_utils \ - sodium_version stream stream2 stream3 stream4 verify1 \ - $(am__append_1) $(am__append_2) + secretstream_xchacha20poly1305 shorthash sign sodium_core \ + sodium_utils sodium_version stream stream2 stream3 stream4 \ + verify1 $(am__append_1) $(am__append_2) TESTS_LDADD = \ ${top_builddir}/src/libsodium/libsodium.la @@ -1162,6 +1172,8 @@ hash3_SOURCE = cmptest.h hash3.c hash3_LDADD = $(TESTS_LDADD) kdf_SOURCE = cmptest.h kdf.c kdf_LDADD = $(TESTS_LDADD) +kdf_hkdf_SOURCE = cmptest.h kdf_hkdf.c +kdf_hkdf_LDADD = $(TESTS_LDADD) keygen_SOURCE = cmptest.h keygen.c keygen_LDADD = $(TESTS_LDADD) kx_SOURCE = cmptest.h kx.c @@ -1214,8 +1226,8 @@ secretbox_easy_SOURCE = cmptest.h secretbox_easy.c secretbox_easy_LDADD = $(TESTS_LDADD) secretbox_easy2_SOURCE = cmptest.h secretbox_easy2.c secretbox_easy2_LDADD = $(TESTS_LDADD) -secretstream_SOURCE = cmptest.h secretstream.c -secretstream_LDADD = $(TESTS_LDADD) +secretstream_xchacha20poly1305_SOURCE = cmptest.h secretstream_xchacha20poly1305.c +secretstream_xchacha20poly1305_LDADD = $(TESTS_LDADD) shorthash_SOURCE = cmptest.h shorthash.c shorthash_LDADD = $(TESTS_LDADD) sign_SOURCE = cmptest.h sign.c @@ -1432,6 +1444,10 @@ kdf$(EXEEXT): $(kdf_OBJECTS) $(kdf_DEPENDENCIES) $(EXTRA_kdf_DEPENDENCIES) @rm -f kdf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(kdf_OBJECTS) $(kdf_LDADD) $(LIBS) +kdf_hkdf$(EXEEXT): $(kdf_hkdf_OBJECTS) $(kdf_hkdf_DEPENDENCIES) $(EXTRA_kdf_hkdf_DEPENDENCIES) + @rm -f kdf_hkdf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kdf_hkdf_OBJECTS) $(kdf_hkdf_LDADD) $(LIBS) + keygen$(EXEEXT): $(keygen_OBJECTS) $(keygen_DEPENDENCIES) $(EXTRA_keygen_DEPENDENCIES) @rm -f keygen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(keygen_OBJECTS) $(keygen_LDADD) $(LIBS) @@ -1536,9 +1552,9 @@ secretbox_easy2$(EXEEXT): $(secretbox_easy2_OBJECTS) $(secretbox_easy2_DEPENDENC @rm -f secretbox_easy2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(secretbox_easy2_OBJECTS) $(secretbox_easy2_LDADD) $(LIBS) -secretstream$(EXEEXT): $(secretstream_OBJECTS) $(secretstream_DEPENDENCIES) $(EXTRA_secretstream_DEPENDENCIES) - @rm -f secretstream$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(secretstream_OBJECTS) $(secretstream_LDADD) $(LIBS) +secretstream_xchacha20poly1305$(EXEEXT): $(secretstream_xchacha20poly1305_OBJECTS) $(secretstream_xchacha20poly1305_DEPENDENCIES) $(EXTRA_secretstream_xchacha20poly1305_DEPENDENCIES) + @rm -f secretstream_xchacha20poly1305$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(secretstream_xchacha20poly1305_OBJECTS) $(secretstream_xchacha20poly1305_LDADD) $(LIBS) shorthash$(EXEEXT): $(shorthash_OBJECTS) $(shorthash_DEPENDENCIES) $(EXTRA_shorthash_DEPENDENCIES) @rm -f shorthash$(EXEEXT) @@ -1638,6 +1654,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash3.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdf_hkdf.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keygen.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metamorphic.Po@am__quote@ # am--include-marker @@ -1664,7 +1681,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secretbox8.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secretbox_easy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secretbox_easy2.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secretstream.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secretstream_xchacha20poly1305.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shorthash.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sign.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siphashx24.Po@am__quote@ # am--include-marker @@ -2301,9 +2318,9 @@ secretbox_easy2.log: secretbox_easy2$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -secretstream.log: secretstream$(EXEEXT) - @p='secretstream$(EXEEXT)'; \ - b='secretstream'; \ +secretstream_xchacha20poly1305.log: secretstream_xchacha20poly1305$(EXEEXT) + @p='secretstream_xchacha20poly1305$(EXEEXT)'; \ + b='secretstream_xchacha20poly1305'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -2406,6 +2423,13 @@ core_ristretto255.log: core_ristretto255$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +kdf_hkdf.log: kdf_hkdf$(EXEEXT) + @p='kdf_hkdf$(EXEEXT)'; \ + b='kdf_hkdf'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) pwhash_scrypt.log: pwhash_scrypt$(EXEEXT) @p='pwhash_scrypt$(EXEEXT)'; \ b='pwhash_scrypt'; \ @@ -2577,6 +2601,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/hash.Po -rm -f ./$(DEPDIR)/hash3.Po -rm -f ./$(DEPDIR)/kdf.Po + -rm -f ./$(DEPDIR)/kdf_hkdf.Po -rm -f ./$(DEPDIR)/keygen.Po -rm -f ./$(DEPDIR)/kx.Po -rm -f ./$(DEPDIR)/metamorphic.Po @@ -2603,7 +2628,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/secretbox8.Po -rm -f ./$(DEPDIR)/secretbox_easy.Po -rm -f ./$(DEPDIR)/secretbox_easy2.Po - -rm -f ./$(DEPDIR)/secretstream.Po + -rm -f ./$(DEPDIR)/secretstream_xchacha20poly1305.Po -rm -f ./$(DEPDIR)/shorthash.Po -rm -f ./$(DEPDIR)/sign.Po -rm -f ./$(DEPDIR)/siphashx24.Po @@ -2699,6 +2724,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/hash.Po -rm -f ./$(DEPDIR)/hash3.Po -rm -f ./$(DEPDIR)/kdf.Po + -rm -f ./$(DEPDIR)/kdf_hkdf.Po -rm -f ./$(DEPDIR)/keygen.Po -rm -f ./$(DEPDIR)/kx.Po -rm -f ./$(DEPDIR)/metamorphic.Po @@ -2725,7 +2751,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/secretbox8.Po -rm -f ./$(DEPDIR)/secretbox_easy.Po -rm -f ./$(DEPDIR)/secretbox_easy2.Po - -rm -f ./$(DEPDIR)/secretstream.Po + -rm -f ./$(DEPDIR)/secretstream_xchacha20poly1305.Po -rm -f ./$(DEPDIR)/shorthash.Po -rm -f ./$(DEPDIR)/sign.Po -rm -f ./$(DEPDIR)/siphashx24.Po diff --git a/test/default/aead_aes256gcm.c b/test/default/aead_aes256gcm.c index 8165d531..9c1e43d6 100644 --- a/test/default/aead_aes256gcm.c +++ b/test/default/aead_aes256gcm.c @@ -3098,6 +3098,7 @@ tv(void) size_t detached_ciphertext_len; size_t i = 0U; size_t message_len; + int res; key = (unsigned char *) sodium_malloc(crypto_aead_aes256gcm_KEYBYTES); nonce = (unsigned char *) sodium_malloc(crypto_aead_aes256gcm_NPUBBYTES); @@ -3136,34 +3137,48 @@ tv(void) ciphertext = (unsigned char *) sodium_malloc(ciphertext_len); detached_ciphertext = (unsigned char *) sodium_malloc(detached_ciphertext_len); - crypto_aead_aes256gcm_encrypt_detached(detached_ciphertext, mac, - &found_mac_len, - message, message_len, - ad, ad_len, NULL, nonce, key); + res = crypto_aead_aes256gcm_encrypt_detached(detached_ciphertext, mac, + &found_mac_len, + message, message_len, + ad, ad_len, NULL, nonce, key); assert(found_mac_len == crypto_aead_aes256gcm_ABYTES); if (memcmp(detached_ciphertext, expected_ciphertext, detached_ciphertext_len) != 0 || memcmp(mac, expected_ciphertext + message_len, crypto_aead_aes256gcm_ABYTES) != 0) { - printf("Detached encryption of test vector #%u failed\n", (unsigned int) i); + printf("Detached encryption of test vector #%u failed (res=%d)\n", + (unsigned int) i, res); hex = (char *) sodium_malloc((size_t) ciphertext_len * 2 + 1); - sodium_bin2hex(hex, (size_t) ciphertext_len * 2 + 1, - ciphertext, ciphertext_len); + sodium_bin2hex(hex, (size_t) detached_ciphertext_len * 2 + 1, + detached_ciphertext, detached_ciphertext_len); printf("Computed: [%s]\n", hex); + sodium_bin2hex(hex, (size_t) detached_ciphertext_len * 2 + 1, + expected_ciphertext, detached_ciphertext_len); + printf("Expected: [%s]\n", hex); + sodium_bin2hex(hex, (size_t) found_mac_len * 2 + 1, + mac, found_mac_len); + printf("Computed mac: [%s]\n", hex); + sodium_bin2hex(hex, (size_t) found_mac_len * 2 + 1, + expected_ciphertext + message_len, found_mac_len); + printf("Expected mac: [%s]\n", hex); sodium_free(hex); } - crypto_aead_aes256gcm_encrypt(ciphertext, &found_ciphertext_len, - message, message_len, - ad, ad_len, NULL, nonce, key); + res = crypto_aead_aes256gcm_encrypt(ciphertext, &found_ciphertext_len, + message, message_len, + ad, ad_len, NULL, nonce, key); assert((size_t) found_ciphertext_len == ciphertext_len); if (memcmp(ciphertext, expected_ciphertext, ciphertext_len) != 0) { - printf("Encryption of test vector #%u failed\n", (unsigned int) i); + printf("Encryption of test vector #%u failed (res=%d)\n", + (unsigned int) i, res); hex = (char *) sodium_malloc((size_t) found_ciphertext_len * 2 + 1); sodium_bin2hex(hex, (size_t) found_ciphertext_len * 2 + 1, ciphertext, ciphertext_len); printf("Computed: [%s]\n", hex); + sodium_bin2hex(hex, (size_t) ciphertext_len * 2 + 1, + expected_ciphertext, ciphertext_len); + printf("Expected: [%s]\n", hex); sodium_free(hex); } diff --git a/test/default/core_ed25519.c b/test/default/core_ed25519.c index 5340f9e8..b2461260 100644 --- a/test/default/core_ed25519.c +++ b/test/default/core_ed25519.c @@ -64,13 +64,15 @@ add_l64(unsigned char * const S) int main(void) { - unsigned char *r; + unsigned char *h, *r; unsigned char *p, *p2, *p3; unsigned char *sc, *sc2, *sc3; unsigned char *sc64; + unsigned char *seed; char *hex; unsigned int i, j; + h = (unsigned char *) sodium_malloc(crypto_core_ed25519_HASHBYTES); r = (unsigned char *) sodium_malloc(crypto_core_ed25519_UNIFORMBYTES); p = (unsigned char *) sodium_malloc(crypto_core_ed25519_BYTES); for (i = 0; i < 500; i++) { @@ -81,7 +83,6 @@ main(void) if (crypto_core_ed25519_is_valid_point(p) == 0) { printf("crypto_core_ed25519_from_uniform() returned an invalid point\n"); } - crypto_core_ed25519_random(p); if (crypto_core_ed25519_is_valid_point(p) == 0) { printf("crypto_core_ed25519_random() returned an invalid point\n"); @@ -399,6 +400,17 @@ main(void) assert(memcmp(sc3, sc, crypto_core_ed25519_SCALARBYTES) != 0); } + seed = (unsigned char *) sodium_malloc(randombytes_SEEDBYTES); + for (i = 0; i < 15; i++) { + randombytes_buf_deterministic(r, crypto_core_ed25519_UNIFORMBYTES, seed); + if (crypto_core_ed25519_from_uniform(p, r) != 0) { + printf("crypto_core_ed25519_from_uniform() failed\n"); + } + sodium_bin2hex(hex, crypto_core_ed25519_SCALARBYTES * 2 + 1, + p, crypto_core_ed25519_BYTES); + printf("from_uniform_deterministic (%u): %s\n", i, hex); + sodium_increment(seed, randombytes_SEEDBYTES); + } crypto_core_ed25519_scalar_mul(sc, L_1, sc_8); sodium_bin2hex(hex, crypto_core_ed25519_SCALARBYTES * 2 + 1, sc, crypto_core_ed25519_SCALARBYTES); @@ -506,6 +518,7 @@ main(void) sc, crypto_core_ed25519_SCALARBYTES); printf("h*2: %s\n", hex); + sodium_free(seed); sodium_free(hex); sodium_free(sc64); sodium_free(sc3); @@ -515,6 +528,7 @@ main(void) sodium_free(p2); sodium_free(p); sodium_free(r); + sodium_free(h); assert(crypto_core_ed25519_BYTES == crypto_core_ed25519_bytes()); assert(crypto_core_ed25519_SCALARBYTES == crypto_core_ed25519_scalarbytes()); @@ -522,6 +536,8 @@ main(void) assert(crypto_core_ed25519_NONREDUCEDSCALARBYTES >= crypto_core_ed25519_SCALARBYTES); assert(crypto_core_ed25519_UNIFORMBYTES == crypto_core_ed25519_uniformbytes()); assert(crypto_core_ed25519_UNIFORMBYTES >= crypto_core_ed25519_BYTES); + assert(crypto_core_ed25519_HASHBYTES == crypto_core_ed25519_hashbytes()); + assert(crypto_core_ed25519_HASHBYTES >= 2 * crypto_core_ed25519_BYTES); printf("OK\n"); diff --git a/test/default/core_ed25519.exp b/test/default/core_ed25519.exp index 0fea1020..2865979b 100644 --- a/test/default/core_ed25519.exp +++ b/test/default/core_ed25519.exp @@ -15,6 +15,21 @@ sub1: f67c79849de0253ba142949e1db6224b13121212121212121212121212121202 add2: b02e8581ce62f69922427c23f970f7e951525252525252525252525252525202 sub2: 3da570db4b001cbeb35a7b7fe588e72aaeadadadadadadadadadadadadadad0d mul: 4453ef38408c06677c1b810e4bf8b1991f01c88716fbfa2f075a518b77da400b +from_uniform_deterministic (0): b18e62cf804b022fec392b0e2d6539d0f059732616c11913f510f73ae2544ebc +from_uniform_deterministic (1): b9d23004e78c58e22da72e109550133e3d3bb9e46afcc066b82326319653d62c +from_uniform_deterministic (2): 14063782c8b8a677dce09c4e51719b1cf942bf71bc765c1ec9832a8b4446983c +from_uniform_deterministic (3): 02d6dbac70f6a14de72f4e17386016b08d6506336a086f10e719fbad8831d550 +from_uniform_deterministic (4): 11c851408e7892c2eae37584423a8f9c797e3649d45946b53e64319318a750b0 +from_uniform_deterministic (5): d4b9eaf70ffdc238c88725e294bdd02a6ce85577c5e7add7ca07041873019842 +from_uniform_deterministic (6): 740a6141079285c1b9e84ed463dcce5d3d40a167fa13129463eaf97d2a7bf654 +from_uniform_deterministic (7): e504a3e00bbf506cbe388784d85e85b10c428c37eba04ebd19a60948b71ad2cf +from_uniform_deterministic (8): 67cd50902c40c943f22c479c587fb3e5da2f8f1ad402049ac49ddc45ec20884c +from_uniform_deterministic (9): 658bffa23b425a91268ee17559073c4b1548209054ed7cf00ffe582696dda8dc +from_uniform_deterministic (10): b55b93e7a0fe554f86f1f4c991871a27756fee359a8c6bb7554ec91d5d552c49 +from_uniform_deterministic (11): fbc2bb45df1d806489a5a6415898c719c45c932d3467b6ce948ee80c0e8122c9 +from_uniform_deterministic (12): 93164e57b5e3ae6826ac9e0c31ddecf94e21a39a29ba9d1d24e9e588fe065d95 +from_uniform_deterministic (13): 16824d74c9482890dc57b0ec843a0a5231b581d2ce3909934d7658389f169093 +from_uniform_deterministic (14): 2f5b0336c7f0af520badeae99450f92835c27224ab4cd117f55b176afb6f0001 (L-1)*8: e5d3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010 8(L-1): e5d3f55c1a631258d69cf7a2def9de1400000000000000000000000000000010 (L-1)^2: 0100000000000000000000000000000000000000000000000000000000000000 diff --git a/test/default/kdf.c b/test/default/kdf.c index f10f034e..dc9a2475 100644 --- a/test/default/kdf.c +++ b/test/default/kdf.c @@ -15,7 +15,7 @@ tv_kdf(void) context = (char *) sodium_malloc(crypto_kdf_CONTEXTBYTES); master_key = (unsigned char *) sodium_malloc(crypto_kdf_KEYBYTES); - memcpy(context, "KDF test", sizeof "KDF test" -1U); + memcpy(context, "KDF test", sizeof "KDF test" - 1U); for (i = 0; i < crypto_kdf_KEYBYTES; i++) { master_key[i] = i; } diff --git a/test/default/kdf_hkdf.c b/test/default/kdf_hkdf.c new file mode 100644 index 00000000..8fb07fe5 --- /dev/null +++ b/test/default/kdf_hkdf.c @@ -0,0 +1,100 @@ + +#define TEST_NAME "kdf_hkdf" +#include "cmptest.h" + +static void +tv_kdf_hkdf(void) +{ + unsigned char *master_key; + size_t master_key_len = 66; + unsigned char *prk256; + size_t prk256_len = crypto_kdf_hkdf_sha256_KEYBYTES; + unsigned char *prk512; + size_t prk512_len = crypto_kdf_hkdf_sha512_KEYBYTES; + unsigned char *salt; + size_t salt_len = 77; + char *context; + size_t context_len = 88; + unsigned char *out; + size_t out_len = 99; + char hex[99 * 2 + 1]; + size_t i; + int ret; + + master_key = (unsigned char *) sodium_malloc(master_key_len); + prk256 = (unsigned char *) sodium_malloc(prk256_len); + prk512 = (unsigned char *) sodium_malloc(prk512_len); + salt = (unsigned char *) sodium_malloc(salt_len); + context = (char *) sodium_malloc(context_len); + out = (unsigned char *) sodium_malloc(out_len); + for (i = 0; i < master_key_len; i++) { + master_key[i] = i; + } + for (i = 0; i < salt_len; i++) { + salt[i] = (unsigned char) ~i; + } + for (i = 0; i < context_len; i++) { + context[i] = (unsigned char) (i + 111); + } + + printf("\nHKDF/SHA-256:\n"); + crypto_kdf_hkdf_sha256_keygen(prk256); + if (crypto_kdf_hkdf_sha256_extract(prk256, salt, salt_len, + master_key, master_key_len) != 0) { + printf("hkdf_sha256_extract() failed\n"); + } + printf("PRK: %s\n", sodium_bin2hex(hex, sizeof hex, prk256, prk256_len)); + + for (i = 0; i < out_len; i++) { + context[0] = i; + if (crypto_kdf_hkdf_sha256_expand(out, i, + context, context_len, prk256) != 0) { + printf("hkdf_sha256_expand() failed\n"); + } + printf("%s\n", sodium_bin2hex(hex, sizeof hex, out, i)); + } + + printf("\nHKDF/SHA-512:\n"); + crypto_kdf_hkdf_sha256_keygen(prk512); + if (crypto_kdf_hkdf_sha512_extract(prk512, salt, salt_len, + master_key, master_key_len) != 0) { + printf("hkdf_sha512_extract() failed\n"); + } + printf("PRK: %s\n", sodium_bin2hex(hex, sizeof hex, prk512, prk512_len)); + + for (i = 0; i < out_len; i++) { + context[0] = i; + if (crypto_kdf_hkdf_sha512_expand(out, i, + context, context_len, prk512) != 0) { + printf("hkdf_sha512_expand() failed\n"); + } + printf("%s\n", sodium_bin2hex(hex, sizeof hex, out, i)); + } + + sodium_free(out); + sodium_free(context); + sodium_free(salt); + sodium_free(master_key); + sodium_free(prk512); + sodium_free(prk256); + + assert(crypto_kdf_hkdf_sha512_bytes_min() == crypto_kdf_hkdf_sha512_BYTES_MIN); + assert(crypto_kdf_hkdf_sha512_bytes_max() == crypto_kdf_hkdf_sha512_BYTES_MAX); + assert(crypto_kdf_hkdf_sha512_keybytes() == crypto_kdf_hkdf_sha512_KEYBYTES); + + assert(crypto_kdf_hkdf_sha256_bytes_min() == crypto_kdf_hkdf_sha256_BYTES_MIN); + assert(crypto_kdf_hkdf_sha256_bytes_max() == crypto_kdf_hkdf_sha256_BYTES_MAX); + assert(crypto_kdf_hkdf_sha256_keybytes() == crypto_kdf_hkdf_sha256_KEYBYTES); + + assert(crypto_kdf_hkdf_sha256_KEYBYTES < crypto_kdf_hkdf_sha512_KEYBYTES); + + printf("tv_kdf_hkdf: ok\n"); +} + +int +main(void) +{ + tv_kdf_hkdf(); + + return 0; +} diff --git a/test/default/kdf_hkdf.exp b/test/default/kdf_hkdf.exp new file mode 100644 index 00000000..57bd5713 --- /dev/null +++ b/test/default/kdf_hkdf.exp @@ -0,0 +1,205 @@ + +HKDF/SHA-256: +PRK: 8c3725c0ea8e14106d8c342887ccd1218cc205acecd8095ae1efc099ec195e7e + +92 +2ebf +e29531 +8e563a1b +1fa58d77ee +50f1a4e15ba2 +4fb3724b7d4174 +d10853ceb46b11db +0fdf31228221242833 +98acb29e0993ec45f8cc +f4481a5e6d263d7bdc59ed +e620eb399337a9aace16765c +dbe8924351577475584731979f +371a112305dfd4264feb29c28a2f +d0a4b022f748c96141ec6b4aac6dcb +d2b38fe15e0f95bcff87822ff4df3d90 +e4bf8fde7d77899a5f85d68b039ee7119b +6766b092971ec2e616286925708c7ed6c9e9 +c4f9d36cddfe89b3194282a084881e6c429099 +49be5bc10c278f39b5be391a55e765560deca0ad +6e7d3031d08c5658a19a7d647dad0250418435febc +07cb6356aa7f978cbab87e7814fa90af9ce729aa2b3f +2ea1c08eb04c75806f80ccf0fca683a8998bb663e99993 +bb111699f6c32263474dc5569a6950c767e3b8201f838345 +e81e9086d3e035cc1a288fa521ce8b43b7f93d3d9bbac5085b +29c398bfafa672bc315e192110575691607118759f9e7669f3c5 +60840e8bc6d86733752787232a0321257c82d691722bfba07af839 +b0ec22e547dae3f04fc6ef146203604f0d604a8ce8a20fce229a688f +81ae6add3344b25d14115a38bc10553a75ce0a4be3aa8f3579299227f7 +242c65f95ee0bce1c5e1b01b1ff68e8634fac096edb18997dfd3baf3817d +14b5afe2cc0d8fe10e5359667b2b310365fba93d62f7fd3df2dddfc34c1de5 +24a79d4c0c69e0a524ca91f356e64ab40345973ba82ce68992dbdd16bf161cbe +3edbfc22f9a1e3a5c774cfec8fff3cc4febdfc61d98aecedf6a16eca0546316b56 +b8bad2b04b9b382f9ad2559afc33b8dece4a7fe9b8ac9d74557dfc51ed8949b78ee8 +1d01316d7767f068171f08a8c2f05d2cd571f623fd5fc9916b3476115aac9d7f635cb4 +a7c5763a3b678ee2fa05a57dab377b67e448a38f94531ce83bab9eff8035e105e8889b91 +ab6721825aefb2cb9f9d0ce5123882573abebe94404e0e3a923a7aac84efc084f84ee5b2ed +4815da740c872a9816850c8757be64cb3096dca7994f3af7bd8c10e83a2d3bbb14b40da93d40 +abb141fbb64faec34c09e9c784b1e8aba15b6e916f70996ad803b963d2de676669ebff3ed4b711 +231a7a47a81c21dd6a0969c67b6ff446a73a145fb1d4f0a2d268af8fd56ac6d67b6ef55d13194440 +74e40130ca102c22acc109cc6b8b66d840b984fe729c156edd05eb4f44d1869e6ae6260b41931179ff +3817d2cf7b7c7c7bfe4ab51e9178343f31fa8eea20899ec96d21eebdbf55f44327e7dc23cf669e215c02 +d5ab755f5631d08b70718d2ba3e2775fbc3cdfe69b7ac74afcc73ffbd7b91b9d3a7fef364cda9816c8c367 +93c15afc2cf1baec84b8e3c89f50a3e4cc3a2c1b72aeaa894a45bf09f22aac0711994f0873ac69b099e47d02 +7b359dd2abb995a8bb0d1a01a986bfcf28d47b9215f000b240f5080dc78a84cc65e34ff098074ae237a0238b6f +182ec78776f5ba3818c2ccc7b84aa7bb1a54386134b3215e8f8f709757f3c8e4f9bef3800e3a9eda8b9794e95f8a +0cf1874215b38ab1900ce7137d9b8817fbe99d3196eab5b845971a46a38c479d81fc8033a641533e2c39dd550e672a +3f5a283ca862e6a5f79c5ab39f8d4984b54a86e132d40adcca249f6419caf5b61fbbf61d54d80e78af3e613adfea5f9e +ce6bceffd4ae50e8465c3d5179c661da2f18dcb37f95f9cc66808d2f848b55dd0c1d2201bb37a2e339e9385233e687a711 +7ce3f4575d3edab2f989b0a975b279ac21af117184130911dba4e7c70e19f96b5595ec8910e737c019f3392390f8b9af6439 +9c1b37296ed2ad9b556938d30814c47f822807be8cf9bfb26a05651061015493d4ed551f8a6f1a5cef7df88dd7426f03681935 +0d1f6f49c38c4d6fbc57103193b544ec1a73f40ed8aaac53da2b1a28a4a35838036ec9d50d719af22f3f89ebb7f340f50ce8c180 +fe6786d7d7728a1ed057c329f68cf698b163ae1e6c1b48290e6ba2c325740155f0f90f216111f3bc16d61b8338d910d429241899c4 +c729c63757fa5a421704ba88f8c13f23606e59cb1e7d2396a130742c31b98dc9461cc1fa9d8d24f79f7303dd416bf66adbb08562f832 +44cf07d63adc85de7c0aa524962c29dfad1b37b253fc9559fd1f5b8237d8bd6e6449e5f3997d6b0571ae50da1e164be845523c8630b1df +c1040513a53f652e0ba7bc30f84deaaec13a15919855dd76148ae1fc86cd147ba686ff0ee025f9a00cbf7b6e190c7b87ea458974cf147ae3 +0a67afc69f00ddbdd6794ed7b06285c00d70fd86fb8b959bd8c686e96c72032f2726c4f0fb607a7f4d4f66b410eff17354b6db803c9c910a72 +faad9414932446902309147f8f2c1d2d48c95a7ddb8856219aa36ed30f971e160542ed8272ef9bdf72551cd059ca6c81ea76b5a3b49cbfb07738 +14ee2fc3899650164beb828a557afc7253e4b89cba8a1908d3641d47eb23d50ef34a0dafaa1388328fc33b1db37f2f74db6934d398bacbec785f03 +2333128e004f61ba45c524dbf72a9973fdcc288d76236402f63b0f4a39867b18e73135f35945f1791ae537b215c69941194258103419558c0a477fa9 +70f1a4c027d950573c5ea8f9b34069d1b85ac0b6daabc9de5c4cd1844d6781c0b15ca7b01c2a33dd06272e7c8729b74ea71a0f35486252461a3d83bc62 +8b9199ebc5ae61365d6cc78c9d1b1a466565639c50c317cddcdc13db96b4f6ec612bbc1c6e5d2479147040f313a168e4471b9093f47548899265d8472aab +5f420864258d597766beb7c55ef0dc9c85aab5e296677e1fd9201a8c8a0c7b74b573276b0ce11f797a5816e5ed7ea3a02ca5c338f78c0c6a41322e0cdbb5d6 +13029325fb0fbbe2221caaa6c3797a967335c4a857fafe23b4fb221433afc84da6876cbd74ac631d18f2478aae8def5a85a227b3bb496a81e9d29171a5b501fc +44ef825de340dbcb1b2ce9325eb78650d574d1c9fc13ed3b4517ee3f2f95bd97c8ab62988455a1639d0e4b2e404d661c3881dbdb52d86b7bd5593713b10e8d1086 +2c67d0e2fbdb55cf649c97e1053c717636c526ee4f58f86e9671a1086e5ef6ef7ae109eca2cd482affb1add956aad7225debca3420c4cae6cf590e8e8c1a0398a9cd +6900b97c5783d5856e4eda7816e27326cb71f8c9cda3bfdc88c4a5aa49b580aa4341cd100fd3084b447a24c9d521c8ddb7a55af52c998c4a9b53bae6c86caa02424df6 +c63f43dd3d29e0e92fc2adf18a50e33f11dbe9746f16bfc518397e0df3bd4eff491963cd2a0d25022c535a425fe3cfcea4ffd7dfbe98e2ae9fb40a007012acc31460ef25 +dd61268207f4452ce4a1f212aa4f4ffff1d0cd4df9ac1730b0f4acc07f75e86afb02c0d99aeb512bf3bb138183364a4b800af446b403add2b30d73eca024fb5e3eeebf10dc +4eb2c6dc6159bb82eba32aa839bc4b3d46be87cd358f47aeb7b488d91230414a40fe35a2c0bcde81de243b6974c49ac0af113904a8995928931e867f5b7d131c2c9caf4adde5 +22cef8bbb9f6874c1be53adc6687e3b28d0b9b8574d22212e4d60074585d17751fdcb80a1ed6143a7471fd3b1a0dddbce5b8b1ae859441413d99b069252f39c3a0b7eafc65ab34 +6f0a07f43c6d00649b516cc986fce770aed949875a17164beed5305ceaf74131574eb2cf489dc13fad53e2b10cb757b69eecb481a76a8d99a7cfb2e0aee40dde6f7d44c2be5a5e63 +bf701b835481d47ee85d390caa8f63bd3e7dfa48f4307d51989b4660e465de31329589bd5e3293f75b63d320b8f53211cf1209e426869c3c3b506dde3f819cae07672af9ef74f36de6 +92cc25c67b65fc9c57381457e7752441782dc4d2d62828c13992a7c2eda57811fe7c2de66b725e08f361fee4d8370d3dff2cdba6c603cd03ae54d813e44793387ded1add2c006b320058 +e3ec7f8ccf313fac832d3ef5c3b8b10f1faf5ae8ec32bce0f5f98b9f4464624a58b0f74ffdb827d52d94fa77a8456ca550017f3c31d8e8e6827b6a9ac9664355bc57e9b46cc66b6e396a50 +636ffbeb1cb2e834ae37213247ca8e615fc52f00e79c13f37874edc549f4b629901312b685f3e1ae3394a6beebc5e0c1364c562b3579f34cbbe9ed80c5cc045b9ab7a749950d005e785832e0 +3ae686a5e1abf936d472963d6272226f920c8df4eed5c4b26d9afc910f509c205ffb56a0289fb62d38790dca4f85028f76b4339e9eee32c1c2690abd02c74ef9a7cc822f901ae596ef1b2f2f42 +e542066a18aed627ea3feea7a962b9c69a9a2f00bc0f22c7186c389701283807801d2cd79d678010d91379cfc6d72cf30830a34fd9983a0c011e775be61eb0d093a1432493abb703c8b5bf99ad63 +1392b4676365c1ee01f75811cabe0fa989faa6a222b65e72bf4016f7767c0e9f822de2ad0034098dd9867a787abe9b97adb1a345e96b345aea898682d71fc3febc0e2ef579874da073285d0ba4edc4 +2ddd472dd4090528036d7bf01cacfca7c71ce3d89bab2299b3d6f1b987c51e5f884cfed55ca25008811fa4f44d9bb8563d83cfeccc580865978972cec981f431e4b74857e2a565e5d6e0bc9f0a3c45ec +d2a855d0e2a912ce3ff5ffa99c464c215d9ae1195e92b022d4518dde9fa5ecbdbac4f1877c1a94df35421a122a04073dbe7fce959c87497cb30774bac3441140089b4b714e025509fa3cd41d683ab46edf +00bcf365897640b9268fad068977a11b7eb3006482b51c97543ba4359db31adcd18497d174844c9ec47a0f6132b16d14aa5a02c42583aabd033e520a8a9c5c430cc6708e8b9cdd4fd56c1023a744af67fd14 +0e20beb1a84e9c252b54c4db895324e85436f29e4855cdfa5bf4bbe7868bdbc51b7f0ac428ce54750e2cd16829051e95cd97f2f40c5a1a3db17f90b68570a05ac55a9eaa7c8bf377c7a752666de779ef46764f +20ddf3ccd89c8bf4c084324858c0f0c7d4dcfd4a76a7526183a5bf4344f62320f29e7c0650d3c55ad587128e667d5d4e69689850fa741b49d3ceef45b134327ac89186248d1157aa4b16263731138777811e508b +2a8fadda7001128cf59e3fcc93dc5c98e75ac92d66d536330eb90a558920e4416c210658b3bf44a451db23c62caac1a79fad1437a81d66ab98e4423d8a1ce9ed9a0586a160c4819a019a93781775c6510c6ed09cb9 +9049524d223052ee507450e65112e1f4331c4d7fd71e8237b8f79feb2fa30504c856d6907cc4eb814694e9a7b8a8b10d85f956df72062c5f4752dc42d37f164eae1a3155a11ecb413f92a0e49e0a89d398c21d76e100 +86a92236b4e0dc16e0a17e92825e31b66a417784b7f6c0a53c274ca5100847a929c0a30430ff67e6c8913a41c3437d8313fd11b2c0eebc75e5bdffeb95a4d100c7eb36216494f3c7a8f19403080941e3d1c9e319ede000 +4b15b094db5789ff78fafabdd0f0aa06d3f4ded903c89e8ae22982d152017295de63ad0b43d3d303243de1bbf2637e8e0c042024e307739ab3b02a5b7d299167909edd51f82229c0093a68768d56c2e774285ed95bdc24d9 +9bbca463a5142ea7dad0522f073eabc7eed63e4baea13efec9d7c198b75a9c4db88623c406edc5bf61ec61e047357358541aa66e44a364b779b6a8842c1b1e8131c594ac8298755ba532937b5bdbcbbd1f2c2152d03af55120 +edc5fe50b3f3a7de5ddc14b467e41ec0ce68a44f734c4cd46b5ee1d98337d8a917cf1dd13e09946d22918eaf31f83de1e035209a6f2de32bb7caf119d0db73e4075cb9a714adb84b4d0a6163aac56bb4299a71e8979a97e363f4 +e2770541945a0395fbf597fb58cc4e6f6a2883b707aa79df9c2da5a7165a8838b1e7f4736b5418bd2f99d3eb8020f9b4cb7ff3a620f8bef276f22f3e98ffe20adeac2f62a9e5758136d222a9c562f81f151d3980bdad54f52dbf55 +248474ddc86ce5e07be50fdd3a6a113ab7f2319e3fb86f1d2d361372fa1d89926ef501c5a62b9d2efeb409d0be8fb67f12c1624d04bcf9d555dad09dffdba76948b0eecba430110ab9e738db70e51c4e2f27350a49aecf1282410ab8 +37d75ee27cc14c95c9d930bb1324d8aa6cc77ba833504253d91002fb622d9e578a3f3b1439dad7d9d7af8ea17cebee86fe13c59f316434d46208c019c2e673168b5aaa397525cbce3a0b2f1c59c853600711e719218311e15d1ab9a0cf +981461afd5756cc5d6a953c188b0a537fbcd18b41034cc4f40870cc2c97bcc48e3e4d563c2ee1d60d8c9f714996fc32e2977aaf7c3544e437f40f61d7281548efc22d7c298853304444c4184605b7b55148c24e88f362e41a8c919bf0288 +d65ac485824f9490c5f70fe674fe1da39b4583b25f3580b636a06135761eb0fb5e36a59dcb070dd9bfd5b2d69503a5c3ef295eb9cb3a9346578556d56fdd0c81cbdd960d292f8410681643af154b2550e2d586119b82cb17a79c1447cb26f6 +cdd5bd495ed8c2c41dc511577051ffa30ee02eddb95b3650337e8aeae161d2b81a9ebc1514524c52dbe2c4d0739706dbdcea1a7ba21d9cab36ca10f753fc82b218c01094e288bbcd96d6678e06e1a03f55c3bc6aea67b9637e87a4ce8e2aa0e8 +1d07389dad745981eb7ae03162bf249996cb836316872a4de4241d1fea49044541b9ababc2a10f7d5455ad3c0519997698a52039fd5517c53f7963aea8917e1b8ce3c63c5a2b23331cc473c1ff0986b08e8dd1257847256ded17e6d0409855f8e5 +a1245e0117a0e7c3cfbcd3d3eeb21a5aa7f2a73aea4465f4d83c8d0c6237c5c093ada99ada6ad75dcf18d1eb58982c7316d5c366ce5128a832d433c960e6bf7be42e4dce2747e3cc78101ed44aebcdbbf6bcd42f5160ca40784ea3ee3dd6be537475 + +HKDF/SHA-512: +PRK: 2502bc897dc1b23f9f2d8c35d519c5280ea960bf9154ebb07d377a12a81a4794ea8bdc0cb6ec59ab3303f5cbd713027825715f8af2ac0203e560fd2e55f4ff2b + +4c +abec +6d7647 +a3397e73 +15b3f69cec +fb5c266f8785 +7147d8a6bff246 +1dd7f9b2ab2583ab +725aee4e2d8d7f1f90 +046f63a1e2d606d7893e +fc2026603b032dc6c862de +03127d298ea441e3ae1d3781 +a8f163b5b9476eb50dcb304bc2 +9430c3aa31857951320feaa65e4e +14e4918f7b7eaa9c6d39dc08e9abc1 +3480c9854b8f0bb4a97920338dce7573 +42714ad1af787467b0388cb6663864ba89 +700cd7f28075fc3a28d98672207b45df5b20 +528c93053c63c5fa5ff1f0a6e7cde8d4aec5a8 +d225940fcd325eecf827666ebcb9ea3881dbfc3f +0341475a114b87cdae767a4a68432889145748b0aa +bbbf499a74a2c22dc4a2295bc904fdcd7d4e91b32060 +deb06fe0b094b65da9febfed81f990ae77fd3f458a1bf3 +f64b7ac1473232a727ff461af2f650cc8a8419d7c97b7298 +3ca9c302e1096302185e2288beb6d91124c6abc9f9f97d5a4f +81dfa7213143feb429dae2c641d25bf913aca03feead6ab7df10 +5d428190aad0539c0c2e6037e7745218dbf4e5c5aa0102996ceead +7e76c9dcd614d730eaab145be60584c7bbe925bddc64d9dccde16142 +4b2be1c3dd5cd41d53ead2ce0aa220823ec4f3cf8656b14449e50cb48b +4ceb80935422dba37af63ba59a460204dcd6639741d478185fd1a1e48de6 +633e555556c5288d808b2483d7e99bcc9876b42b61cbcc4d3e9ed42bcaee33 +0d28411da5a660b2eb063af0ed7e031c463a64eddd6c48882add6fad4cc9da92 +30b734f5768d26c4f8d641037b3e425c3d75c5c0c97cf8a3e684d1d2f1ba4f37b6 +970db4152321c2bac15898927aa25db90246c494017765b01ff21ae9a6aef7b89b88 +f168959f62696ea32a46ee67cdd3375684533f799e346fd1d26ad29aecd51de7c2c473 +76a81fa4b90ee1d1b05986c837f10f098cf1ac8f7d6be8097caec980b125185e8f9ee56d +ed95ff4a9919f45c08151fb7f610f5155dac10c92e84bebf2a6bf0fc653585158c19ef59fe +16ff87fb87760dfbaa53a2820c9ef365ee3b539b4a7fd1a4e626d313f24db495319f98c247d3 +f514b605b74bb3a35b86f8c96fb08e751d916b3ecd8b5e84b364e57f1fb6e5928a3a46f4cf7b1a +ecef871f30ca56fbd6b242b9d095a33b9d60472da4914af80dbb8672a84d8ba4640ff1b459cb9b1d +9220ed520c628b7e7e249c334573ff2402d573e34b27c25c4ba22e2b472ccdd2ef4d060eeef5387dc6 +b431fd9eaba69bc20967d1d02014913637df29c855faa6e93a8571ea3c27ad2c542700c77f9f3d19e5bb +7ebd91db579ec5879f81a922c58ee82a91b8cb648294f63b97f728a53411438f54157cb6459ae762b5ef3f +c28a1322e46a89f7a2b6b3dd6d39cbcaa84368bca33a53c04bb7bc90c3f51065143d8e93a279a403aea8ca8a +089ca5fb6e4de86c77cac49f92c8d3356697a1fa51c8e4a207ec44428c4da0b82aadad5f196510d0ae7abc25ab +31b08873dafc0d8c11afacb5efd3fcabbb7cc5ff7aab6e1d40a7451ec715de4a4a6e7e15f9d1f9f832a0e1bc39d7 +984f57235036e6d44777a7bf41fa4333f3077d3f2d92b46bc36c29b123de8580d81e22b2969d9a5abf3bb5fb7b422d +2730edbf85f4e35152af0f22fbc4f23f7968cb430fde9685cf4e1bb64611ba6459acedad777fe1a6d70c88733d83661f +0eb2a97a6d6a5901535399caa5ccb7192e1f1488f9a06d3150ccafe1eeaa8d6e50e039a9344f68d1783973fcb34719c2fa +24d7e154d4b7382daa4d1fb47a8badf0d1020e97f75efe74f302b983584e26bc1865d44c3761b65c4d745766da0bfce5682a +cb7503ad874932bfc2c7b18176d3e03f3e66666613e3e8e2ac83a29965b56afb0aa74d1080ac2ffeb1c43ee160c9f120cc4c61 +0ad5086f6cf363dfbf14c13e82faf14dde185b7142bd0ae44da8692339ed31f47f10773578af23cd7a632352087d07a7f4133474 +72873f68ad5874e1146a70e96c98360ccf0e5e9a5e31e4e38c7829241a531b0712eee8f22729e244da3d94d92703d975e54d84c36c +b05200d914edd05309a7aaafcde50cfbc201d988387d2b7fb7b7315b56d58ecaebc2f7c7b5d2607d041dfd3486e849cf2535c8ef76f4 +6324ea52a00274312457f451953302d02e3e9107aed0a4007c04d26f4b5ce37f31fbc5a2606575a464f64b507691646e2d773c62aac387 +e0c68ed5571a90bc8db36c948b5ffd9179cd80218ae47b86cc7bf4aa4adccc438ddf670ea817d324ca709b612522d510913eb64012462acb +61d3ec6537c084df5981a79545847cbf204c3a267080e2cba06a29b4fa591bc43668f701cc0d9e33e123b774b066e212fd1989d253120bfdf6 +7b74db37484227d237eb7d4039ddade342827d0075322c14de32985d616ffe38c4786e2e0df89de856051796e1f922b6b47578c3428fade6b372 +feea8d891c65fb37dc20095946b9f5db5aa936a2331fc9609ea45ee146107bf561710edceef2cea29e7c25032cb6764bc361eac0c148553e62ca5d +a95341f8f7536d95f14181e4aa01c540a345bd172b67279f5b6dfebe2c8fb7b366edb8ad7e4545eed29903eeb6f486fa9f9d825185a0333eeddd2b45 +5b7fd7b9d6623c25d508712d585fd541089c8b4721b9dc219baa9cfe14022b5ffb0ded9a546ddf183c543d1f26f9c4183f4c7ff012d61de8cb822bccb4 +fa0fc08f49144cf85dcefd25717f37de8469a943fdeaa8c764bbf483af7a37b0dcf1f50451b20e693635e94976c44ead0ef83ac632eec781e9d50efb2f9d +6ec1e621af3a878ad836aeb322e67752de29a310d7e6fbe6d164bb79e8f939d7a8f9f77a72733482d323c50ae7dc2170b90a48c59da782865eb7a9e254aba3 +10d13645bc853dcac6b71dadf4327ea0c7497822a6e0691d93a5e9d32cbafb883f9ff0c245126e391666fed31747e92c81ab886d5e75bb057faac5b3b0f1afa8 +dfb3872da01656cddd9abcb389e75a4a01d89d0d49f571e77655ad1ae0c14c87d4146accaf59f3e402767e6666228ef8e52aa32cd18306f69666769159423d8141 +d3a86236f119fa35c480d5b4b71d3aec93e226db5d2173c04e5d1d88c696594f51ec36470487fb72044a039cc081607be2a99e5d8f1c653848176f97cd2e9d50a742 +0d1f5a47c4917f6158b039e68fdeda5fa3889bbac6dff571f6353f83ada55c26bb99dac4416b2dea7d0fec2b585877aed2709f2b25516551004fee20b68e21efded761 +79a910c7f74b303d5844b609148a5a723e31c6b00d16a773547fb6d97fd35bf4a452eefd7ac3466ea520d61be4b75493156c9ae39ce6698e7120e92ebb366adeafb21d09 +a893878e100dc628ec674c4b48556c067419a3c317be94ed37cfd8ed8cae2ff035985579238f4dc13576677d527f21cde829a54466a911ab81888016c2094fda50e6dab622 +6faefe6e6bad59fab2a801aefd26d05ea3ac3ce546b0abfff524ec2ea80f3cc5c8c7015d18ae766cc84a2de75bc4c8a44cafb3743c6147e934d5de803d74ff8ca507d505065b +ef32b102fb18681c02cee796ba8bb602d927d3428c4387150a5c342532380d3234d69e58a607396af5802cfeece1554de5722931f4e09fe51ae4b74dcd7e851e9a95cf4218f96e +efe653c021ff38cabba1a76f8df2b0737ccffe6dba0506074143c88f6547afb06bcf1a36ba8e48bad9e7ee76c70717e089e1c31f052ee8859f65d6cc0d4bdccf845c8a8955d316bb +8bf54ff6ef8b0f73a569d908ef432227d7fff0e1300503c1d41f3b2618b089ba76873cc5abd22039f3bffd2bb88b4a169e1f55b8280ba8b474aee9a19a93710cdc05a51062ea5970a2 +126a003e4194b577fbf4070e8ecd47f3807afc7d9e733760a23b350649e924ebe702eaefedb70490b77fc8dbccd068baab02bcd64517aee6005d37a496f8dd92093ec34f5ec6af703836 +3b025057a1a889389b105956cffae970b21e3a1179382bb626856c793727ba9ca14706741b94b4704ce0089a378c1efadb7961fbbfd146d657b6ee605231d9ffc60eadcc6af32c43ec7e75 +0c2eadac7883bb59c278aa115b10b8d1459066b9e0061b7e4e2e1ec4caca02c6fc443e5f78c80779360f260507bc2d49beae6bf7470da5c8dca5ee51d251ed1db892db23a43c62fe088d07fc +2f40a09aea1a9b7c32e7b68845de40452c9b753c31c46118d14d3b34c8c7f3eae0f3c0018300ce4d583715debeb9bac31de392080fe2630225a0f0e0d4c5b6e19ff1fa5bf5a0cb8840fed794fc +155e5eef1e32ec06bd7a51741fbeafcbd82bddbb18fc34a984e9018f4b62d1b7ed4fc0b0d7843d4e8983ccdba6bb30d28f964994650e692a5b0b746171563be70a0c622f6a022ac4c655f216bb68 +142e1d62a31895b3a916453a0c01ca2a096d9b0747b3a2c9584822819cbffdab6c6461d4e4374e4d9363f8cc52861e2be1f4ad4edbdf4a72f1fc3667903df83a32a8810398e156ea8dd3385d416e9a +08a01d87455bfb057d64a6374f8da7ae52f4575af5085e7aa3c390de0fe528c14767525b9af87e7e5ef053bf03b2390c98f7eef36161ae1c0d9eba83c4a78d9ae5d4322cbd0b3f7aaed183f18616e49d +1c8ccae6d387f360c2fca138f1c65410918ca0cb47c15cbdee931ed03cbcec6e871f11f2692a9b9136f82b274a338805e863f87c5c0f99604c03484b1a2020732e5473bec84ced8ba05cd9490e75563628 +ac3916dc874442f05ca2409bd5c63957bca4c5363dda23846a5901010818c57874aff1787bd7c554c95aae8e354ec55beb1b79966bae64197d4383c894485c8a509064957abe7f3fa4154dc0f0e958121fcc +f0b7a82a962c7faa238acb98ebe4b904e8d5998e1856dbf68aea0933dfb3d80a44f0eaad678dacf31ee5c985fe6f9844f9490319745e89bf790d3e0cf2a788a177de8401119ebc9f7e48f58c279ef723fda7cc +6d87c3942bc4ebbc224fac383f1b22af13a4ccdfae5ee66ab8f954ebbb874f583ef07152872ce03de5c3584574b91d91d2f6fc4b14625e3e2bdfd04fc7b9441d73f9c09411f08938429c9f12e31caea17e094d9d +2e0d7c7f1c03ce9d4479fa800645abda4aade87bca0bbe547e889f8d32af7530d212171baae32831ecbd84cc27bb3da8496982a183e2785a0731220677341bcf75ae345ddb8bcdb7dccd2c4e1094d33ca53b0768cf +9bec3f01c35ba5436e44b01a96077f41aa61516dff5cef6185818e7f57d2dd0b9d9ebfeb35a0cff1ae8d98975a0cdcf2b626dd7b1f8fa2534ffc058abc1b81e1c68aaeaf8e9b255c3eabe1d675399220d4b6d967fc5f +b0d54ba8f86b01d511acb7ddb567198dabe835512d0033991a221b2bdf815d8063d073d1bbf5704f954df8f73a4ecec48417c2fec643f9e15d1d41b51f955f2422a69a2a8f73b6154881e6f6721f8e73a80efa5bfb1717 +cd41ad000e15e9b261e52b459bf79c7f7ffeb281629fba3c986c08b90a058abf76799dc72e430a1df8b64641cc2e03339ebb37fe7eabced490f77b58b3dcf492f981687036dcb94328cd9ad9f4e489de5d06bbd3671a9bf1 +21233d332c3fa9b056520c06fe55aa388773ee12ae893395df1d75c4932b54a5d679637d33930f2f8afa22be2fb4b1fd36a6c83b51057611c8119bd8cdb1efd8ee7063d5f13c09d2f8e5f8888eda3ece738e34f667aee451b9 +86418350d07d8f9d8b7e1190eb13634dc0a59f267730afe9409cecab0ac4f57feacaee8dec7321b8512991d51d4fe3b7cc2cbb5e6728ba115f022087606d15b39810032b3945e052574c7464c2b2434b2a54a801991d093f9390 +5501bfd8c7b1784515a192c0db6516b1fda893702ed45db7a5c07b32b3d9d41f396f9ed61cc4f9a143d4b4ab16c9f6975ee0a8851c62f80ddd4fdfef6c9f6f27c130a13109cd20779e4bab78200129900ecedae564c790153d2227 +7d45d142bdeff8e1b941537dab8685697988e60cd0ca0926dacc9a227de9f33e0dca5c7c17bcb3f3d3a1f39c4999313786933cb931c725b6359a1b10e31b77cd30f28e3bd4ebe898ef0ae1ee5e3a28a911fdc3759d04929c74321a9d +36f11d276af5958a737c5f457ae997455025cde0503ecf1431ea68b6567530cf3abeee2391c1c549fd3bb274120b0613828839ae74b6a071ee9d29b6247ca6a8a1cd2195d24c6215f58be04e197b541828b99e3a71d0991be8245303ad +efe64e5b4341239a2e60d342b89a302c2b8cbd45a33a5301936a051f69dd1644164bf7e24d269d341285a2c22aaa93517b1e9ae6a3d6b18961d4b1f58b357a113a12e9c6519ce7533f602b026dbd885c0584f21e099e74516d5db197dec0 +e5d90cf622738f73973fc448b7be40b044fac3dfc65d36db47f3fa9d01d41fb9808ad83e51729c0c2c35cc08226fbcd20a988ea24bb8373991e702c911d1764b309eda4d1500592ce0fee42fe111e9f9e346734b9e2758194ff9f0713613d1 +1444dfb0694d36937eb77a0b1f04c2e29e9904d1dcf03cf8d420315c5cb38463f8f3327df5cd34485b0e6db3eefedcd9015f4953a99c125f3ee803c4727c10e0ca943408d82a0c6c1b797a7a3a9e6446df53b8de29894309e81d09a321564b40 +171e9fb9e3867ac3ae4cbe09884cccb7561c2c0773ea8200c492ac338512f2017bc843b1ae5fb998c7d1f155b01b707f70dcbf68dab56d74a561b5fe7759788b5651a9ab0fe7006d0c096cacbc9ba93736bda0b967b7f1ebfb4c7a032e73f40392 +db14a6d9c6311aadd73d9fb5b38b654bf306e0ea3880d22a12032971115d22dc38f9bf03ac83a177a0e36be7f710d4a903934601d15911942f11364692d77958be02be75eb6c697e3d963f6ca2c26449272bd05cd3ec41b884a6a97381f57f19d70c +tv_kdf_hkdf: ok diff --git a/test/default/secretstream.c b/test/default/secretstream_xchacha20poly1305.c similarity index 99% rename from test/default/secretstream.c rename to test/default/secretstream_xchacha20poly1305.c index 63c64438..6955f82f 100644 --- a/test/default/secretstream.c +++ b/test/default/secretstream_xchacha20poly1305.c @@ -1,5 +1,5 @@ -#define TEST_NAME "secretstream" +#define TEST_NAME "secretstream_xchacha20poly1305" #include "cmptest.h" int diff --git a/test/default/secretstream.exp b/test/default/secretstream_xchacha20poly1305.exp similarity index 100% rename from test/default/secretstream.exp rename to test/default/secretstream_xchacha20poly1305.exp diff --git a/test/default/sodium_core.c b/test/default/sodium_core.c index c8eeb2ba..4bcdb33e 100644 --- a/test/default/sodium_core.c +++ b/test/default/sodium_core.c @@ -19,6 +19,7 @@ main(void) assert(sodium_init() == 1); (void) sodium_runtime_has_neon(); + (void) sodium_runtime_has_armcrypto(); (void) sodium_runtime_has_sse2(); (void) sodium_runtime_has_sse3(); (void) sodium_runtime_has_ssse3(); diff --git a/test/default/sodium_utils2.c b/test/default/sodium_utils2.c index 6ecc067a..36a6de87 100644 --- a/test/default/sodium_utils2.c +++ b/test/default/sodium_utils2.c @@ -48,9 +48,9 @@ segv_handler(int sig) int main(void) { - void * buf; - size_t size; - unsigned int i; + void *buf; + size_t size; + unsigned int i; #ifdef BENCHMARKS return 0; From 854947a4ce01c4c76441aff0cd41a371a773b406 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 10 Sep 2023 21:34:14 +0200 Subject: [PATCH 65/73] Add AEGIS AEADs --- .gitignore | 2 + .../msvc/vs2010/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ .../msvc/vs2012/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ .../msvc/vs2013/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ .../msvc/vs2015/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ .../msvc/vs2017/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ .../msvc/vs2019/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ .../msvc/vs2022/libsodium/libsodium.vcxproj | 22 + .../libsodium/libsodium.vcxproj.filters | 75 ++ dist-build/emscripten-symbols.def | 45 +- dist-build/emscripten.sh | 4 +- libsodium.vcxproj | 22 + libsodium.vcxproj.filters | 66 ++ src/libsodium/Makefile.am | 20 + src/libsodium/Makefile.in | 218 +++++- .../crypto_aead/aegis128l/aead_aegis128l.c | 159 ++++ .../crypto_aead/aegis128l/aegis128l_aesni.c | 70 ++ .../crypto_aead/aegis128l/aegis128l_aesni.h | 8 + .../aegis128l/aegis128l_armcrypto.c | 69 ++ .../aegis128l/aegis128l_armcrypto.h | 8 + .../crypto_aead/aegis128l/aegis128l_common.h | 229 ++++++ .../crypto_aead/aegis128l/aegis128l_soft.c | 59 ++ .../crypto_aead/aegis128l/aegis128l_soft.h | 8 + .../crypto_aead/aegis128l/implementations.h | 17 + .../crypto_aead/aegis256/aead_aegis256.c | 158 ++++ .../crypto_aead/aegis256/aegis256_aesni.c | 65 ++ .../crypto_aead/aegis256/aegis256_aesni.h | 8 + .../crypto_aead/aegis256/aegis256_armcrypto.c | 67 ++ .../crypto_aead/aegis256/aegis256_armcrypto.h | 8 + .../crypto_aead/aegis256/aegis256_common.h | 214 ++++++ .../crypto_aead/aegis256/aegis256_soft.c | 54 ++ .../crypto_aead/aegis256/aegis256_soft.h | 8 + .../crypto_aead/aegis256/implementations.h | 17 + src/libsodium/crypto_core/softaes/softaes.c | 143 ++++ src/libsodium/include/Makefile.am | 4 + src/libsodium/include/Makefile.in | 4 + src/libsodium/include/sodium.h | 24 +- .../include/sodium/crypto_aead_aegis128l.h | 92 +++ .../include/sodium/crypto_aead_aegis256.h | 92 +++ .../include/sodium/private/implementations.h | 2 + .../include/sodium/private/softaes.h | 56 ++ src/libsodium/sodium/core.c | 2 + test/default/Makefile.am | 12 + test/default/Makefile.in | 107 ++- test/default/aead_aegis128l.c | 642 ++++++++++++++++ test/default/aead_aegis128l.exp | 1 + test/default/aead_aegis256.c | 723 ++++++++++++++++++ test/default/aead_aegis256.exp | 1 + 54 files changed, 4134 insertions(+), 53 deletions(-) create mode 100644 src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_common.h create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c create mode 100644 src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h create mode 100644 src/libsodium/crypto_aead/aegis128l/implementations.h create mode 100644 src/libsodium/crypto_aead/aegis256/aead_aegis256.c create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_aesni.c create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_aesni.h create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_common.h create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_soft.c create mode 100644 src/libsodium/crypto_aead/aegis256/aegis256_soft.h create mode 100644 src/libsodium/crypto_aead/aegis256/implementations.h create mode 100644 src/libsodium/crypto_core/softaes/softaes.c create mode 100644 src/libsodium/include/sodium/crypto_aead_aegis128l.h create mode 100644 src/libsodium/include/sodium/crypto_aead_aegis256.h create mode 100644 src/libsodium/include/sodium/private/softaes.h create mode 100644 test/default/aead_aegis128l.c create mode 100644 test/default/aead_aegis128l.exp create mode 100644 test/default/aead_aegis256.c create mode 100644 test/default/aead_aegis256.exp diff --git a/.gitignore b/.gitignore index 5ae14510..be1e7d3c 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,8 @@ test-driver test/default/*.asm.js test/default/*.res test/default/*.trs +test/default/aead_aegis128l +test/default/aead_aegis256 test/default/aead_aes256gcm test/default/aead_aes256gcm2 test/default/aead_chacha20poly1305 diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj b/builds/msvc/vs2010/libsodium/libsodium.vcxproj index 6384115d..5d1bcf46 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj b/builds/msvc/vs2012/libsodium/libsodium.vcxproj index 30a017ee..0f13fa25 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj b/builds/msvc/vs2013/libsodium/libsodium.vcxproj index ceea669a..d66a33e2 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj b/builds/msvc/vs2015/libsodium/libsodium.vcxproj index 6763d793..a1ff0447 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj b/builds/msvc/vs2017/libsodium/libsodium.vcxproj index a562ed5b..8ef2c996 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj b/builds/msvc/vs2019/libsodium/libsodium.vcxproj index da1965a6..d7090a7e 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index 6be75de6..272984f5 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -175,6 +175,14 @@ + + + + + + + + @@ -184,6 +192,7 @@ + @@ -202,6 +211,7 @@ + @@ -226,6 +236,7 @@ + @@ -262,6 +273,7 @@ + @@ -312,6 +324,16 @@ + + + + + + + + + + diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters index fd6e84ef..2b88f772 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj.filters @@ -318,6 +318,30 @@ crypto_aead\xchacha20poly1305 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_aead\aes256gcm @@ -345,6 +369,9 @@ crypto_core\hsalsa20\ref2 + + crypto_core\softaes + crypto_core\ed25519 @@ -395,6 +422,9 @@ include\sodium + + include\sodium + include\sodium @@ -467,6 +497,9 @@ include\sodium + + include\sodium + include\sodium @@ -575,6 +608,9 @@ include\sodium\private + + include\sodium\private + include\sodium\private @@ -725,6 +761,36 @@ crypto_stream\salsa20\xmm6 + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis128l + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + + + crypto_aead\aegis256 + crypto_core\ed25519\ref10\fe_25_5 @@ -754,6 +820,12 @@ {a6837e41-3751-38c9-bb90-dd59d5f4af7b} + + {9e2a023d-fef1-3231-90ba-9a0ffc9bc9ab} + + + {6897a4cc-0091-3970-b712-c0ac75c16b67} + {3e53394c-b59c-30cc-ae69-a4f46f9edfa3} @@ -820,6 +892,9 @@ {eb259fd9-56f0-32db-a903-6bc1549a7326} + + {05997596-e3d7-3bf1-ad4d-39e4c5fd56f6} + {e53b6258-fcdd-34c8-96c5-44510a34a390} diff --git a/dist-build/emscripten-symbols.def b/dist-build/emscripten-symbols.def index 116ecc68..40d8699e 100644 --- a/dist-build/emscripten-symbols.def +++ b/dist-build/emscripten-symbols.def @@ -1,3 +1,23 @@ +_crypto_aead_aegis128l_abytes 0 1 +_crypto_aead_aegis128l_decrypt 0 1 +_crypto_aead_aegis128l_decrypt_detached 0 1 +_crypto_aead_aegis128l_encrypt 0 1 +_crypto_aead_aegis128l_encrypt_detached 0 1 +_crypto_aead_aegis128l_keybytes 0 1 +_crypto_aead_aegis128l_keygen 0 1 +_crypto_aead_aegis128l_messagebytes_max 0 1 +_crypto_aead_aegis128l_npubbytes 0 1 +_crypto_aead_aegis128l_nsecbytes 0 1 +_crypto_aead_aegis256_abytes 0 1 +_crypto_aead_aegis256_decrypt 0 1 +_crypto_aead_aegis256_decrypt_detached 0 1 +_crypto_aead_aegis256_encrypt 0 1 +_crypto_aead_aegis256_encrypt_detached 0 1 +_crypto_aead_aegis256_keybytes 0 1 +_crypto_aead_aegis256_keygen 0 1 +_crypto_aead_aegis256_messagebytes_max 0 1 +_crypto_aead_aegis256_npubbytes 0 1 +_crypto_aead_aegis256_nsecbytes 0 1 _crypto_aead_aes256gcm_abytes 0 0 _crypto_aead_aes256gcm_beforenm 0 0 _crypto_aead_aes256gcm_decrypt 0 0 @@ -145,7 +165,7 @@ _crypto_box_seedbytes 1 1 _crypto_box_zerobytes 0 1 _crypto_core_ed25519_add 0 1 _crypto_core_ed25519_bytes 0 1 -_crypto_core_ed25519_from_hash 0 1 +_crypto_core_ed25519_from_hash 0 0 _crypto_core_ed25519_from_uniform 0 1 _crypto_core_ed25519_hashbytes 0 1 _crypto_core_ed25519_is_valid_point 0 1 @@ -154,6 +174,7 @@ _crypto_core_ed25519_random 0 1 _crypto_core_ed25519_scalar_add 0 1 _crypto_core_ed25519_scalar_complement 0 1 _crypto_core_ed25519_scalar_invert 0 1 +_crypto_core_ed25519_scalar_is_canonical 0 1 _crypto_core_ed25519_scalar_mul 0 1 _crypto_core_ed25519_scalar_negate 0 1 _crypto_core_ed25519_scalar_random 0 1 @@ -182,6 +203,7 @@ _crypto_core_ristretto255_random 0 1 _crypto_core_ristretto255_scalar_add 0 1 _crypto_core_ristretto255_scalar_complement 0 1 _crypto_core_ristretto255_scalar_invert 0 1 +_crypto_core_ristretto255_scalar_is_canonical 0 1 _crypto_core_ristretto255_scalar_mul 0 1 _crypto_core_ristretto255_scalar_negate 0 1 _crypto_core_ristretto255_scalar_random 0 1 @@ -258,6 +280,26 @@ _crypto_kdf_bytes_max 1 1 _crypto_kdf_bytes_min 1 1 _crypto_kdf_contextbytes 1 1 _crypto_kdf_derive_from_key 1 1 +_crypto_kdf_hkdf_sha256_bytes_max 1 1 +_crypto_kdf_hkdf_sha256_bytes_min 1 1 +_crypto_kdf_hkdf_sha256_expand 1 1 +_crypto_kdf_hkdf_sha256_extract 1 1 +_crypto_kdf_hkdf_sha256_extract_final 1 1 +_crypto_kdf_hkdf_sha256_extract_init 1 1 +_crypto_kdf_hkdf_sha256_statebytes 1 1 +_crypto_kdf_hkdf_sha256_extract_update 1 1 +_crypto_kdf_hkdf_sha256_keybytes 1 1 +_crypto_kdf_hkdf_sha256_keygen 1 1 +_crypto_kdf_hkdf_sha512_bytes_max 1 1 +_crypto_kdf_hkdf_sha512_bytes_min 1 1 +_crypto_kdf_hkdf_sha512_expand 1 1 +_crypto_kdf_hkdf_sha512_extract 1 1 +_crypto_kdf_hkdf_sha512_extract_final 1 1 +_crypto_kdf_hkdf_sha512_extract_init 1 1 +_crypto_kdf_hkdf_sha512_statebytes 1 1 +_crypto_kdf_hkdf_sha512_extract_update 1 1 +_crypto_kdf_hkdf_sha512_keybytes 1 1 +_crypto_kdf_hkdf_sha512_keygen 1 1 _crypto_kdf_keybytes 1 1 _crypto_kdf_keygen 1 1 _crypto_kdf_primitive 0 1 @@ -591,6 +633,7 @@ _sodium_mprotect_readwrite 0 0 _sodium_munlock 0 0 _sodium_pad 1 1 _sodium_runtime_has_aesni 0 0 +_sodium_runtime_has_armcrypto 0 0 _sodium_runtime_has_avx 0 0 _sodium_runtime_has_avx2 0 0 _sodium_runtime_has_avx512f 0 0 diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 569bb4de..000ea819 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -1,8 +1,8 @@ #! /bin/sh export MAKE_FLAGS='-j4' -export EXPORTED_FUNCTIONS_STANDARD='["_malloc","_free","_crypto_aead_chacha20poly1305_abytes","_crypto_aead_chacha20poly1305_decrypt","_crypto_aead_chacha20poly1305_decrypt_detached","_crypto_aead_chacha20poly1305_encrypt","_crypto_aead_chacha20poly1305_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_abytes","_crypto_aead_chacha20poly1305_ietf_decrypt","_crypto_aead_chacha20poly1305_ietf_decrypt_detached","_crypto_aead_chacha20poly1305_ietf_encrypt","_crypto_aead_chacha20poly1305_ietf_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_keybytes","_crypto_aead_chacha20poly1305_ietf_keygen","_crypto_aead_chacha20poly1305_ietf_messagebytes_max","_crypto_aead_chacha20poly1305_ietf_npubbytes","_crypto_aead_chacha20poly1305_ietf_nsecbytes","_crypto_aead_chacha20poly1305_keybytes","_crypto_aead_chacha20poly1305_keygen","_crypto_aead_chacha20poly1305_messagebytes_max","_crypto_aead_chacha20poly1305_npubbytes","_crypto_aead_chacha20poly1305_nsecbytes","_crypto_aead_xchacha20poly1305_ietf_abytes","_crypto_aead_xchacha20poly1305_ietf_decrypt","_crypto_aead_xchacha20poly1305_ietf_decrypt_detached","_crypto_aead_xchacha20poly1305_ietf_encrypt","_crypto_aead_xchacha20poly1305_ietf_encrypt_detached","_crypto_aead_xchacha20poly1305_ietf_keybytes","_crypto_aead_xchacha20poly1305_ietf_keygen","_crypto_aead_xchacha20poly1305_ietf_messagebytes_max","_crypto_aead_xchacha20poly1305_ietf_npubbytes","_crypto_aead_xchacha20poly1305_ietf_nsecbytes","_crypto_auth","_crypto_auth_bytes","_crypto_auth_keybytes","_crypto_auth_keygen","_crypto_auth_verify","_crypto_box_beforenm","_crypto_box_beforenmbytes","_crypto_box_detached","_crypto_box_detached_afternm","_crypto_box_easy","_crypto_box_easy_afternm","_crypto_box_keypair","_crypto_box_macbytes","_crypto_box_messagebytes_max","_crypto_box_noncebytes","_crypto_box_open_detached","_crypto_box_open_detached_afternm","_crypto_box_open_easy","_crypto_box_open_easy_afternm","_crypto_box_publickeybytes","_crypto_box_seal","_crypto_box_seal_open","_crypto_box_sealbytes","_crypto_box_secretkeybytes","_crypto_box_seed_keypair","_crypto_box_seedbytes","_crypto_generichash","_crypto_generichash_bytes","_crypto_generichash_bytes_max","_crypto_generichash_bytes_min","_crypto_generichash_final","_crypto_generichash_init","_crypto_generichash_keybytes","_crypto_generichash_keybytes_max","_crypto_generichash_keybytes_min","_crypto_generichash_keygen","_crypto_generichash_statebytes","_crypto_generichash_update","_crypto_hash","_crypto_hash_bytes","_crypto_kdf_bytes_max","_crypto_kdf_bytes_min","_crypto_kdf_contextbytes","_crypto_kdf_derive_from_key","_crypto_kdf_keybytes","_crypto_kdf_keygen","_crypto_kx_client_session_keys","_crypto_kx_keypair","_crypto_kx_publickeybytes","_crypto_kx_secretkeybytes","_crypto_kx_seed_keypair","_crypto_kx_seedbytes","_crypto_kx_server_session_keys","_crypto_kx_sessionkeybytes","_crypto_scalarmult","_crypto_scalarmult_base","_crypto_scalarmult_bytes","_crypto_scalarmult_scalarbytes","_crypto_secretbox_detached","_crypto_secretbox_easy","_crypto_secretbox_keybytes","_crypto_secretbox_keygen","_crypto_secretbox_macbytes","_crypto_secretbox_messagebytes_max","_crypto_secretbox_noncebytes","_crypto_secretbox_open_detached","_crypto_secretbox_open_easy","_crypto_secretstream_xchacha20poly1305_abytes","_crypto_secretstream_xchacha20poly1305_headerbytes","_crypto_secretstream_xchacha20poly1305_init_pull","_crypto_secretstream_xchacha20poly1305_init_push","_crypto_secretstream_xchacha20poly1305_keybytes","_crypto_secretstream_xchacha20poly1305_keygen","_crypto_secretstream_xchacha20poly1305_messagebytes_max","_crypto_secretstream_xchacha20poly1305_pull","_crypto_secretstream_xchacha20poly1305_push","_crypto_secretstream_xchacha20poly1305_rekey","_crypto_secretstream_xchacha20poly1305_statebytes","_crypto_secretstream_xchacha20poly1305_tag_final","_crypto_secretstream_xchacha20poly1305_tag_message","_crypto_secretstream_xchacha20poly1305_tag_push","_crypto_secretstream_xchacha20poly1305_tag_rekey","_crypto_shorthash","_crypto_shorthash_bytes","_crypto_shorthash_keybytes","_crypto_shorthash_keygen","_crypto_sign","_crypto_sign_bytes","_crypto_sign_detached","_crypto_sign_ed25519_pk_to_curve25519","_crypto_sign_ed25519_sk_to_curve25519","_crypto_sign_final_create","_crypto_sign_final_verify","_crypto_sign_init","_crypto_sign_keypair","_crypto_sign_messagebytes_max","_crypto_sign_open","_crypto_sign_publickeybytes","_crypto_sign_secretkeybytes","_crypto_sign_seed_keypair","_crypto_sign_seedbytes","_crypto_sign_statebytes","_crypto_sign_update","_crypto_sign_verify_detached","_randombytes","_randombytes_buf","_randombytes_buf_deterministic","_randombytes_close","_randombytes_random","_randombytes_seedbytes","_randombytes_stir","_randombytes_uniform","_sodium_base642bin","_sodium_base64_encoded_len","_sodium_bin2base64","_sodium_bin2hex","_sodium_hex2bin","_sodium_init","_sodium_library_minimal","_sodium_library_version_major","_sodium_library_version_minor","_sodium_pad","_sodium_unpad","_sodium_version_string"]' -export EXPORTED_FUNCTIONS_SUMO='["_malloc","_free","_crypto_aead_chacha20poly1305_abytes","_crypto_aead_chacha20poly1305_decrypt","_crypto_aead_chacha20poly1305_decrypt_detached","_crypto_aead_chacha20poly1305_encrypt","_crypto_aead_chacha20poly1305_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_abytes","_crypto_aead_chacha20poly1305_ietf_decrypt","_crypto_aead_chacha20poly1305_ietf_decrypt_detached","_crypto_aead_chacha20poly1305_ietf_encrypt","_crypto_aead_chacha20poly1305_ietf_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_keybytes","_crypto_aead_chacha20poly1305_ietf_keygen","_crypto_aead_chacha20poly1305_ietf_messagebytes_max","_crypto_aead_chacha20poly1305_ietf_npubbytes","_crypto_aead_chacha20poly1305_ietf_nsecbytes","_crypto_aead_chacha20poly1305_keybytes","_crypto_aead_chacha20poly1305_keygen","_crypto_aead_chacha20poly1305_messagebytes_max","_crypto_aead_chacha20poly1305_npubbytes","_crypto_aead_chacha20poly1305_nsecbytes","_crypto_aead_xchacha20poly1305_ietf_abytes","_crypto_aead_xchacha20poly1305_ietf_decrypt","_crypto_aead_xchacha20poly1305_ietf_decrypt_detached","_crypto_aead_xchacha20poly1305_ietf_encrypt","_crypto_aead_xchacha20poly1305_ietf_encrypt_detached","_crypto_aead_xchacha20poly1305_ietf_keybytes","_crypto_aead_xchacha20poly1305_ietf_keygen","_crypto_aead_xchacha20poly1305_ietf_messagebytes_max","_crypto_aead_xchacha20poly1305_ietf_npubbytes","_crypto_aead_xchacha20poly1305_ietf_nsecbytes","_crypto_auth","_crypto_auth_bytes","_crypto_auth_hmacsha256","_crypto_auth_hmacsha256_bytes","_crypto_auth_hmacsha256_final","_crypto_auth_hmacsha256_init","_crypto_auth_hmacsha256_keybytes","_crypto_auth_hmacsha256_keygen","_crypto_auth_hmacsha256_statebytes","_crypto_auth_hmacsha256_update","_crypto_auth_hmacsha256_verify","_crypto_auth_hmacsha512","_crypto_auth_hmacsha512256","_crypto_auth_hmacsha512256_bytes","_crypto_auth_hmacsha512256_final","_crypto_auth_hmacsha512256_init","_crypto_auth_hmacsha512256_keybytes","_crypto_auth_hmacsha512256_keygen","_crypto_auth_hmacsha512256_statebytes","_crypto_auth_hmacsha512256_update","_crypto_auth_hmacsha512256_verify","_crypto_auth_hmacsha512_bytes","_crypto_auth_hmacsha512_final","_crypto_auth_hmacsha512_init","_crypto_auth_hmacsha512_keybytes","_crypto_auth_hmacsha512_keygen","_crypto_auth_hmacsha512_statebytes","_crypto_auth_hmacsha512_update","_crypto_auth_hmacsha512_verify","_crypto_auth_keybytes","_crypto_auth_keygen","_crypto_auth_primitive","_crypto_auth_verify","_crypto_box","_crypto_box_afternm","_crypto_box_beforenm","_crypto_box_beforenmbytes","_crypto_box_boxzerobytes","_crypto_box_curve25519xchacha20poly1305_beforenm","_crypto_box_curve25519xchacha20poly1305_beforenmbytes","_crypto_box_curve25519xchacha20poly1305_detached","_crypto_box_curve25519xchacha20poly1305_detached_afternm","_crypto_box_curve25519xchacha20poly1305_easy","_crypto_box_curve25519xchacha20poly1305_easy_afternm","_crypto_box_curve25519xchacha20poly1305_keypair","_crypto_box_curve25519xchacha20poly1305_macbytes","_crypto_box_curve25519xchacha20poly1305_messagebytes_max","_crypto_box_curve25519xchacha20poly1305_noncebytes","_crypto_box_curve25519xchacha20poly1305_open_detached","_crypto_box_curve25519xchacha20poly1305_open_detached_afternm","_crypto_box_curve25519xchacha20poly1305_open_easy","_crypto_box_curve25519xchacha20poly1305_open_easy_afternm","_crypto_box_curve25519xchacha20poly1305_publickeybytes","_crypto_box_curve25519xchacha20poly1305_seal","_crypto_box_curve25519xchacha20poly1305_seal_open","_crypto_box_curve25519xchacha20poly1305_sealbytes","_crypto_box_curve25519xchacha20poly1305_secretkeybytes","_crypto_box_curve25519xchacha20poly1305_seed_keypair","_crypto_box_curve25519xchacha20poly1305_seedbytes","_crypto_box_curve25519xsalsa20poly1305","_crypto_box_curve25519xsalsa20poly1305_afternm","_crypto_box_curve25519xsalsa20poly1305_beforenm","_crypto_box_curve25519xsalsa20poly1305_beforenmbytes","_crypto_box_curve25519xsalsa20poly1305_boxzerobytes","_crypto_box_curve25519xsalsa20poly1305_keypair","_crypto_box_curve25519xsalsa20poly1305_macbytes","_crypto_box_curve25519xsalsa20poly1305_messagebytes_max","_crypto_box_curve25519xsalsa20poly1305_noncebytes","_crypto_box_curve25519xsalsa20poly1305_open","_crypto_box_curve25519xsalsa20poly1305_open_afternm","_crypto_box_curve25519xsalsa20poly1305_publickeybytes","_crypto_box_curve25519xsalsa20poly1305_secretkeybytes","_crypto_box_curve25519xsalsa20poly1305_seed_keypair","_crypto_box_curve25519xsalsa20poly1305_seedbytes","_crypto_box_curve25519xsalsa20poly1305_zerobytes","_crypto_box_detached","_crypto_box_detached_afternm","_crypto_box_easy","_crypto_box_easy_afternm","_crypto_box_keypair","_crypto_box_macbytes","_crypto_box_messagebytes_max","_crypto_box_noncebytes","_crypto_box_open","_crypto_box_open_afternm","_crypto_box_open_detached","_crypto_box_open_detached_afternm","_crypto_box_open_easy","_crypto_box_open_easy_afternm","_crypto_box_primitive","_crypto_box_publickeybytes","_crypto_box_seal","_crypto_box_seal_open","_crypto_box_sealbytes","_crypto_box_secretkeybytes","_crypto_box_seed_keypair","_crypto_box_seedbytes","_crypto_box_zerobytes","_crypto_core_ed25519_add","_crypto_core_ed25519_bytes","_crypto_core_ed25519_from_hash","_crypto_core_ed25519_from_uniform","_crypto_core_ed25519_hashbytes","_crypto_core_ed25519_is_valid_point","_crypto_core_ed25519_nonreducedscalarbytes","_crypto_core_ed25519_random","_crypto_core_ed25519_scalar_add","_crypto_core_ed25519_scalar_complement","_crypto_core_ed25519_scalar_invert","_crypto_core_ed25519_scalar_mul","_crypto_core_ed25519_scalar_negate","_crypto_core_ed25519_scalar_random","_crypto_core_ed25519_scalar_reduce","_crypto_core_ed25519_scalar_sub","_crypto_core_ed25519_scalarbytes","_crypto_core_ed25519_sub","_crypto_core_ed25519_uniformbytes","_crypto_core_hchacha20","_crypto_core_hchacha20_constbytes","_crypto_core_hchacha20_inputbytes","_crypto_core_hchacha20_keybytes","_crypto_core_hchacha20_outputbytes","_crypto_core_hsalsa20","_crypto_core_hsalsa20_constbytes","_crypto_core_hsalsa20_inputbytes","_crypto_core_hsalsa20_keybytes","_crypto_core_hsalsa20_outputbytes","_crypto_core_ristretto255_add","_crypto_core_ristretto255_bytes","_crypto_core_ristretto255_from_hash","_crypto_core_ristretto255_hashbytes","_crypto_core_ristretto255_is_valid_point","_crypto_core_ristretto255_nonreducedscalarbytes","_crypto_core_ristretto255_random","_crypto_core_ristretto255_scalar_add","_crypto_core_ristretto255_scalar_complement","_crypto_core_ristretto255_scalar_invert","_crypto_core_ristretto255_scalar_mul","_crypto_core_ristretto255_scalar_negate","_crypto_core_ristretto255_scalar_random","_crypto_core_ristretto255_scalar_reduce","_crypto_core_ristretto255_scalar_sub","_crypto_core_ristretto255_scalarbytes","_crypto_core_ristretto255_sub","_crypto_core_salsa20","_crypto_core_salsa2012","_crypto_core_salsa2012_constbytes","_crypto_core_salsa2012_inputbytes","_crypto_core_salsa2012_keybytes","_crypto_core_salsa2012_outputbytes","_crypto_core_salsa208","_crypto_core_salsa208_constbytes","_crypto_core_salsa208_inputbytes","_crypto_core_salsa208_keybytes","_crypto_core_salsa208_outputbytes","_crypto_core_salsa20_constbytes","_crypto_core_salsa20_inputbytes","_crypto_core_salsa20_keybytes","_crypto_core_salsa20_outputbytes","_crypto_generichash","_crypto_generichash_blake2b","_crypto_generichash_blake2b_bytes","_crypto_generichash_blake2b_bytes_max","_crypto_generichash_blake2b_bytes_min","_crypto_generichash_blake2b_final","_crypto_generichash_blake2b_init","_crypto_generichash_blake2b_init_salt_personal","_crypto_generichash_blake2b_keybytes","_crypto_generichash_blake2b_keybytes_max","_crypto_generichash_blake2b_keybytes_min","_crypto_generichash_blake2b_keygen","_crypto_generichash_blake2b_personalbytes","_crypto_generichash_blake2b_salt_personal","_crypto_generichash_blake2b_saltbytes","_crypto_generichash_blake2b_statebytes","_crypto_generichash_blake2b_update","_crypto_generichash_bytes","_crypto_generichash_bytes_max","_crypto_generichash_bytes_min","_crypto_generichash_final","_crypto_generichash_init","_crypto_generichash_keybytes","_crypto_generichash_keybytes_max","_crypto_generichash_keybytes_min","_crypto_generichash_keygen","_crypto_generichash_primitive","_crypto_generichash_statebytes","_crypto_generichash_update","_crypto_hash","_crypto_hash_bytes","_crypto_hash_primitive","_crypto_hash_sha256","_crypto_hash_sha256_bytes","_crypto_hash_sha256_final","_crypto_hash_sha256_init","_crypto_hash_sha256_statebytes","_crypto_hash_sha256_update","_crypto_hash_sha512","_crypto_hash_sha512_bytes","_crypto_hash_sha512_final","_crypto_hash_sha512_init","_crypto_hash_sha512_statebytes","_crypto_hash_sha512_update","_crypto_kdf_blake2b_bytes_max","_crypto_kdf_blake2b_bytes_min","_crypto_kdf_blake2b_contextbytes","_crypto_kdf_blake2b_derive_from_key","_crypto_kdf_blake2b_keybytes","_crypto_kdf_bytes_max","_crypto_kdf_bytes_min","_crypto_kdf_contextbytes","_crypto_kdf_derive_from_key","_crypto_kdf_keybytes","_crypto_kdf_keygen","_crypto_kdf_primitive","_crypto_kx_client_session_keys","_crypto_kx_keypair","_crypto_kx_primitive","_crypto_kx_publickeybytes","_crypto_kx_secretkeybytes","_crypto_kx_seed_keypair","_crypto_kx_seedbytes","_crypto_kx_server_session_keys","_crypto_kx_sessionkeybytes","_crypto_onetimeauth","_crypto_onetimeauth_bytes","_crypto_onetimeauth_final","_crypto_onetimeauth_init","_crypto_onetimeauth_keybytes","_crypto_onetimeauth_keygen","_crypto_onetimeauth_poly1305","_crypto_onetimeauth_poly1305_bytes","_crypto_onetimeauth_poly1305_final","_crypto_onetimeauth_poly1305_init","_crypto_onetimeauth_poly1305_keybytes","_crypto_onetimeauth_poly1305_keygen","_crypto_onetimeauth_poly1305_statebytes","_crypto_onetimeauth_poly1305_update","_crypto_onetimeauth_poly1305_verify","_crypto_onetimeauth_primitive","_crypto_onetimeauth_statebytes","_crypto_onetimeauth_update","_crypto_onetimeauth_verify","_crypto_pwhash","_crypto_pwhash_alg_argon2i13","_crypto_pwhash_alg_argon2id13","_crypto_pwhash_alg_default","_crypto_pwhash_argon2i","_crypto_pwhash_argon2i_alg_argon2i13","_crypto_pwhash_argon2i_bytes_max","_crypto_pwhash_argon2i_bytes_min","_crypto_pwhash_argon2i_memlimit_interactive","_crypto_pwhash_argon2i_memlimit_max","_crypto_pwhash_argon2i_memlimit_min","_crypto_pwhash_argon2i_memlimit_moderate","_crypto_pwhash_argon2i_memlimit_sensitive","_crypto_pwhash_argon2i_opslimit_interactive","_crypto_pwhash_argon2i_opslimit_max","_crypto_pwhash_argon2i_opslimit_min","_crypto_pwhash_argon2i_opslimit_moderate","_crypto_pwhash_argon2i_opslimit_sensitive","_crypto_pwhash_argon2i_passwd_max","_crypto_pwhash_argon2i_passwd_min","_crypto_pwhash_argon2i_saltbytes","_crypto_pwhash_argon2i_str","_crypto_pwhash_argon2i_str_needs_rehash","_crypto_pwhash_argon2i_str_verify","_crypto_pwhash_argon2i_strbytes","_crypto_pwhash_argon2i_strprefix","_crypto_pwhash_argon2id","_crypto_pwhash_argon2id_alg_argon2id13","_crypto_pwhash_argon2id_bytes_max","_crypto_pwhash_argon2id_bytes_min","_crypto_pwhash_argon2id_memlimit_interactive","_crypto_pwhash_argon2id_memlimit_max","_crypto_pwhash_argon2id_memlimit_min","_crypto_pwhash_argon2id_memlimit_moderate","_crypto_pwhash_argon2id_memlimit_sensitive","_crypto_pwhash_argon2id_opslimit_interactive","_crypto_pwhash_argon2id_opslimit_max","_crypto_pwhash_argon2id_opslimit_min","_crypto_pwhash_argon2id_opslimit_moderate","_crypto_pwhash_argon2id_opslimit_sensitive","_crypto_pwhash_argon2id_passwd_max","_crypto_pwhash_argon2id_passwd_min","_crypto_pwhash_argon2id_saltbytes","_crypto_pwhash_argon2id_str","_crypto_pwhash_argon2id_str_needs_rehash","_crypto_pwhash_argon2id_str_verify","_crypto_pwhash_argon2id_strbytes","_crypto_pwhash_argon2id_strprefix","_crypto_pwhash_bytes_max","_crypto_pwhash_bytes_min","_crypto_pwhash_memlimit_interactive","_crypto_pwhash_memlimit_max","_crypto_pwhash_memlimit_min","_crypto_pwhash_memlimit_moderate","_crypto_pwhash_memlimit_sensitive","_crypto_pwhash_opslimit_interactive","_crypto_pwhash_opslimit_max","_crypto_pwhash_opslimit_min","_crypto_pwhash_opslimit_moderate","_crypto_pwhash_opslimit_sensitive","_crypto_pwhash_passwd_max","_crypto_pwhash_passwd_min","_crypto_pwhash_primitive","_crypto_pwhash_saltbytes","_crypto_pwhash_scryptsalsa208sha256","_crypto_pwhash_scryptsalsa208sha256_bytes_max","_crypto_pwhash_scryptsalsa208sha256_bytes_min","_crypto_pwhash_scryptsalsa208sha256_ll","_crypto_pwhash_scryptsalsa208sha256_memlimit_interactive","_crypto_pwhash_scryptsalsa208sha256_memlimit_max","_crypto_pwhash_scryptsalsa208sha256_memlimit_min","_crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive","_crypto_pwhash_scryptsalsa208sha256_opslimit_interactive","_crypto_pwhash_scryptsalsa208sha256_opslimit_max","_crypto_pwhash_scryptsalsa208sha256_opslimit_min","_crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive","_crypto_pwhash_scryptsalsa208sha256_passwd_max","_crypto_pwhash_scryptsalsa208sha256_passwd_min","_crypto_pwhash_scryptsalsa208sha256_saltbytes","_crypto_pwhash_scryptsalsa208sha256_str","_crypto_pwhash_scryptsalsa208sha256_str_needs_rehash","_crypto_pwhash_scryptsalsa208sha256_str_verify","_crypto_pwhash_scryptsalsa208sha256_strbytes","_crypto_pwhash_scryptsalsa208sha256_strprefix","_crypto_pwhash_str","_crypto_pwhash_str_alg","_crypto_pwhash_str_needs_rehash","_crypto_pwhash_str_verify","_crypto_pwhash_strbytes","_crypto_pwhash_strprefix","_crypto_scalarmult","_crypto_scalarmult_base","_crypto_scalarmult_bytes","_crypto_scalarmult_curve25519","_crypto_scalarmult_curve25519_base","_crypto_scalarmult_curve25519_bytes","_crypto_scalarmult_curve25519_scalarbytes","_crypto_scalarmult_ed25519","_crypto_scalarmult_ed25519_base","_crypto_scalarmult_ed25519_base_noclamp","_crypto_scalarmult_ed25519_bytes","_crypto_scalarmult_ed25519_noclamp","_crypto_scalarmult_ed25519_scalarbytes","_crypto_scalarmult_primitive","_crypto_scalarmult_ristretto255","_crypto_scalarmult_ristretto255_base","_crypto_scalarmult_ristretto255_bytes","_crypto_scalarmult_ristretto255_scalarbytes","_crypto_scalarmult_scalarbytes","_crypto_secretbox","_crypto_secretbox_boxzerobytes","_crypto_secretbox_detached","_crypto_secretbox_easy","_crypto_secretbox_keybytes","_crypto_secretbox_keygen","_crypto_secretbox_macbytes","_crypto_secretbox_messagebytes_max","_crypto_secretbox_noncebytes","_crypto_secretbox_open","_crypto_secretbox_open_detached","_crypto_secretbox_open_easy","_crypto_secretbox_primitive","_crypto_secretbox_xchacha20poly1305_detached","_crypto_secretbox_xchacha20poly1305_easy","_crypto_secretbox_xchacha20poly1305_keybytes","_crypto_secretbox_xchacha20poly1305_macbytes","_crypto_secretbox_xchacha20poly1305_messagebytes_max","_crypto_secretbox_xchacha20poly1305_noncebytes","_crypto_secretbox_xchacha20poly1305_open_detached","_crypto_secretbox_xchacha20poly1305_open_easy","_crypto_secretbox_xsalsa20poly1305","_crypto_secretbox_xsalsa20poly1305_boxzerobytes","_crypto_secretbox_xsalsa20poly1305_keybytes","_crypto_secretbox_xsalsa20poly1305_keygen","_crypto_secretbox_xsalsa20poly1305_macbytes","_crypto_secretbox_xsalsa20poly1305_messagebytes_max","_crypto_secretbox_xsalsa20poly1305_noncebytes","_crypto_secretbox_xsalsa20poly1305_open","_crypto_secretbox_xsalsa20poly1305_zerobytes","_crypto_secretbox_zerobytes","_crypto_secretstream_xchacha20poly1305_abytes","_crypto_secretstream_xchacha20poly1305_headerbytes","_crypto_secretstream_xchacha20poly1305_init_pull","_crypto_secretstream_xchacha20poly1305_init_push","_crypto_secretstream_xchacha20poly1305_keybytes","_crypto_secretstream_xchacha20poly1305_keygen","_crypto_secretstream_xchacha20poly1305_messagebytes_max","_crypto_secretstream_xchacha20poly1305_pull","_crypto_secretstream_xchacha20poly1305_push","_crypto_secretstream_xchacha20poly1305_rekey","_crypto_secretstream_xchacha20poly1305_statebytes","_crypto_secretstream_xchacha20poly1305_tag_final","_crypto_secretstream_xchacha20poly1305_tag_message","_crypto_secretstream_xchacha20poly1305_tag_push","_crypto_secretstream_xchacha20poly1305_tag_rekey","_crypto_shorthash","_crypto_shorthash_bytes","_crypto_shorthash_keybytes","_crypto_shorthash_keygen","_crypto_shorthash_primitive","_crypto_shorthash_siphash24","_crypto_shorthash_siphash24_bytes","_crypto_shorthash_siphash24_keybytes","_crypto_shorthash_siphashx24","_crypto_shorthash_siphashx24_bytes","_crypto_shorthash_siphashx24_keybytes","_crypto_sign","_crypto_sign_bytes","_crypto_sign_detached","_crypto_sign_ed25519","_crypto_sign_ed25519_bytes","_crypto_sign_ed25519_detached","_crypto_sign_ed25519_keypair","_crypto_sign_ed25519_messagebytes_max","_crypto_sign_ed25519_open","_crypto_sign_ed25519_pk_to_curve25519","_crypto_sign_ed25519_publickeybytes","_crypto_sign_ed25519_secretkeybytes","_crypto_sign_ed25519_seed_keypair","_crypto_sign_ed25519_seedbytes","_crypto_sign_ed25519_sk_to_curve25519","_crypto_sign_ed25519_sk_to_pk","_crypto_sign_ed25519_sk_to_seed","_crypto_sign_ed25519_verify_detached","_crypto_sign_ed25519ph_final_create","_crypto_sign_ed25519ph_final_verify","_crypto_sign_ed25519ph_init","_crypto_sign_ed25519ph_statebytes","_crypto_sign_ed25519ph_update","_crypto_sign_final_create","_crypto_sign_final_verify","_crypto_sign_init","_crypto_sign_keypair","_crypto_sign_messagebytes_max","_crypto_sign_open","_crypto_sign_primitive","_crypto_sign_publickeybytes","_crypto_sign_secretkeybytes","_crypto_sign_seed_keypair","_crypto_sign_seedbytes","_crypto_sign_statebytes","_crypto_sign_update","_crypto_sign_verify_detached","_crypto_stream","_crypto_stream_chacha20","_crypto_stream_chacha20_ietf","_crypto_stream_chacha20_ietf_keybytes","_crypto_stream_chacha20_ietf_keygen","_crypto_stream_chacha20_ietf_messagebytes_max","_crypto_stream_chacha20_ietf_noncebytes","_crypto_stream_chacha20_ietf_xor","_crypto_stream_chacha20_ietf_xor_ic","_crypto_stream_chacha20_keybytes","_crypto_stream_chacha20_keygen","_crypto_stream_chacha20_messagebytes_max","_crypto_stream_chacha20_noncebytes","_crypto_stream_chacha20_xor","_crypto_stream_chacha20_xor_ic","_crypto_stream_keybytes","_crypto_stream_keygen","_crypto_stream_messagebytes_max","_crypto_stream_noncebytes","_crypto_stream_primitive","_crypto_stream_salsa20","_crypto_stream_salsa2012","_crypto_stream_salsa2012_keybytes","_crypto_stream_salsa2012_keygen","_crypto_stream_salsa2012_messagebytes_max","_crypto_stream_salsa2012_noncebytes","_crypto_stream_salsa2012_xor","_crypto_stream_salsa208","_crypto_stream_salsa208_keybytes","_crypto_stream_salsa208_keygen","_crypto_stream_salsa208_messagebytes_max","_crypto_stream_salsa208_noncebytes","_crypto_stream_salsa208_xor","_crypto_stream_salsa20_keybytes","_crypto_stream_salsa20_keygen","_crypto_stream_salsa20_messagebytes_max","_crypto_stream_salsa20_noncebytes","_crypto_stream_salsa20_xor","_crypto_stream_salsa20_xor_ic","_crypto_stream_xchacha20","_crypto_stream_xchacha20_keybytes","_crypto_stream_xchacha20_keygen","_crypto_stream_xchacha20_messagebytes_max","_crypto_stream_xchacha20_noncebytes","_crypto_stream_xchacha20_xor","_crypto_stream_xchacha20_xor_ic","_crypto_stream_xor","_crypto_stream_xsalsa20","_crypto_stream_xsalsa20_keybytes","_crypto_stream_xsalsa20_keygen","_crypto_stream_xsalsa20_messagebytes_max","_crypto_stream_xsalsa20_noncebytes","_crypto_stream_xsalsa20_xor","_crypto_stream_xsalsa20_xor_ic","_crypto_verify_16","_crypto_verify_16_bytes","_crypto_verify_32","_crypto_verify_32_bytes","_crypto_verify_64","_crypto_verify_64_bytes","_randombytes","_randombytes_buf","_randombytes_buf_deterministic","_randombytes_close","_randombytes_implementation_name","_randombytes_random","_randombytes_seedbytes","_randombytes_stir","_randombytes_uniform","_sodium_base642bin","_sodium_base64_encoded_len","_sodium_bin2base64","_sodium_bin2hex","_sodium_hex2bin","_sodium_init","_sodium_library_minimal","_sodium_library_version_major","_sodium_library_version_minor","_sodium_pad","_sodium_unpad","_sodium_version_string"]' +export EXPORTED_FUNCTIONS_STANDARD='["_malloc","_free","_crypto_aead_chacha20poly1305_abytes","_crypto_aead_chacha20poly1305_decrypt","_crypto_aead_chacha20poly1305_decrypt_detached","_crypto_aead_chacha20poly1305_encrypt","_crypto_aead_chacha20poly1305_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_abytes","_crypto_aead_chacha20poly1305_ietf_decrypt","_crypto_aead_chacha20poly1305_ietf_decrypt_detached","_crypto_aead_chacha20poly1305_ietf_encrypt","_crypto_aead_chacha20poly1305_ietf_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_keybytes","_crypto_aead_chacha20poly1305_ietf_keygen","_crypto_aead_chacha20poly1305_ietf_messagebytes_max","_crypto_aead_chacha20poly1305_ietf_npubbytes","_crypto_aead_chacha20poly1305_ietf_nsecbytes","_crypto_aead_chacha20poly1305_keybytes","_crypto_aead_chacha20poly1305_keygen","_crypto_aead_chacha20poly1305_messagebytes_max","_crypto_aead_chacha20poly1305_npubbytes","_crypto_aead_chacha20poly1305_nsecbytes","_crypto_aead_xchacha20poly1305_ietf_abytes","_crypto_aead_xchacha20poly1305_ietf_decrypt","_crypto_aead_xchacha20poly1305_ietf_decrypt_detached","_crypto_aead_xchacha20poly1305_ietf_encrypt","_crypto_aead_xchacha20poly1305_ietf_encrypt_detached","_crypto_aead_xchacha20poly1305_ietf_keybytes","_crypto_aead_xchacha20poly1305_ietf_keygen","_crypto_aead_xchacha20poly1305_ietf_messagebytes_max","_crypto_aead_xchacha20poly1305_ietf_npubbytes","_crypto_aead_xchacha20poly1305_ietf_nsecbytes","_crypto_auth","_crypto_auth_bytes","_crypto_auth_keybytes","_crypto_auth_keygen","_crypto_auth_verify","_crypto_box_beforenm","_crypto_box_beforenmbytes","_crypto_box_detached","_crypto_box_detached_afternm","_crypto_box_easy","_crypto_box_easy_afternm","_crypto_box_keypair","_crypto_box_macbytes","_crypto_box_messagebytes_max","_crypto_box_noncebytes","_crypto_box_open_detached","_crypto_box_open_detached_afternm","_crypto_box_open_easy","_crypto_box_open_easy_afternm","_crypto_box_publickeybytes","_crypto_box_seal","_crypto_box_seal_open","_crypto_box_sealbytes","_crypto_box_secretkeybytes","_crypto_box_seed_keypair","_crypto_box_seedbytes","_crypto_generichash","_crypto_generichash_bytes","_crypto_generichash_bytes_max","_crypto_generichash_bytes_min","_crypto_generichash_final","_crypto_generichash_init","_crypto_generichash_keybytes","_crypto_generichash_keybytes_max","_crypto_generichash_keybytes_min","_crypto_generichash_keygen","_crypto_generichash_statebytes","_crypto_generichash_update","_crypto_hash","_crypto_hash_bytes","_crypto_kdf_bytes_max","_crypto_kdf_bytes_min","_crypto_kdf_contextbytes","_crypto_kdf_derive_from_key","_crypto_kdf_hkdf_sha256_bytes_max","_crypto_kdf_hkdf_sha256_bytes_min","_crypto_kdf_hkdf_sha256_expand","_crypto_kdf_hkdf_sha256_extract","_crypto_kdf_hkdf_sha256_extract_final","_crypto_kdf_hkdf_sha256_extract_init","_crypto_kdf_hkdf_sha256_extract_update","_crypto_kdf_hkdf_sha256_keybytes","_crypto_kdf_hkdf_sha256_keygen","_crypto_kdf_hkdf_sha256_statebytes","_crypto_kdf_hkdf_sha512_bytes_max","_crypto_kdf_hkdf_sha512_bytes_min","_crypto_kdf_hkdf_sha512_expand","_crypto_kdf_hkdf_sha512_extract","_crypto_kdf_hkdf_sha512_extract_final","_crypto_kdf_hkdf_sha512_extract_init","_crypto_kdf_hkdf_sha512_extract_update","_crypto_kdf_hkdf_sha512_keybytes","_crypto_kdf_hkdf_sha512_keygen","_crypto_kdf_keybytes","_crypto_kdf_keygen","_crypto_kx_client_session_keys","_crypto_kx_keypair","_crypto_kx_publickeybytes","_crypto_kx_secretkeybytes","_crypto_kx_seed_keypair","_crypto_kx_seedbytes","_crypto_kx_server_session_keys","_crypto_kx_sessionkeybytes","_crypto_scalarmult","_crypto_scalarmult_base","_crypto_scalarmult_bytes","_crypto_scalarmult_scalarbytes","_crypto_secretbox_detached","_crypto_secretbox_easy","_crypto_secretbox_keybytes","_crypto_secretbox_keygen","_crypto_secretbox_macbytes","_crypto_secretbox_messagebytes_max","_crypto_secretbox_noncebytes","_crypto_secretbox_open_detached","_crypto_secretbox_open_easy","_crypto_secretstream_xchacha20poly1305_abytes","_crypto_secretstream_xchacha20poly1305_headerbytes","_crypto_secretstream_xchacha20poly1305_init_pull","_crypto_secretstream_xchacha20poly1305_init_push","_crypto_secretstream_xchacha20poly1305_keybytes","_crypto_secretstream_xchacha20poly1305_keygen","_crypto_secretstream_xchacha20poly1305_messagebytes_max","_crypto_secretstream_xchacha20poly1305_pull","_crypto_secretstream_xchacha20poly1305_push","_crypto_secretstream_xchacha20poly1305_rekey","_crypto_secretstream_xchacha20poly1305_statebytes","_crypto_secretstream_xchacha20poly1305_tag_final","_crypto_secretstream_xchacha20poly1305_tag_message","_crypto_secretstream_xchacha20poly1305_tag_push","_crypto_secretstream_xchacha20poly1305_tag_rekey","_crypto_shorthash","_crypto_shorthash_bytes","_crypto_shorthash_keybytes","_crypto_shorthash_keygen","_crypto_sign","_crypto_sign_bytes","_crypto_sign_detached","_crypto_sign_ed25519_pk_to_curve25519","_crypto_sign_ed25519_sk_to_curve25519","_crypto_sign_final_create","_crypto_sign_final_verify","_crypto_sign_init","_crypto_sign_keypair","_crypto_sign_messagebytes_max","_crypto_sign_open","_crypto_sign_publickeybytes","_crypto_sign_secretkeybytes","_crypto_sign_seed_keypair","_crypto_sign_seedbytes","_crypto_sign_statebytes","_crypto_sign_update","_crypto_sign_verify_detached","_randombytes","_randombytes_buf","_randombytes_buf_deterministic","_randombytes_close","_randombytes_random","_randombytes_seedbytes","_randombytes_stir","_randombytes_uniform","_sodium_base642bin","_sodium_base64_encoded_len","_sodium_bin2base64","_sodium_bin2hex","_sodium_hex2bin","_sodium_init","_sodium_library_minimal","_sodium_library_version_major","_sodium_library_version_minor","_sodium_pad","_sodium_unpad","_sodium_version_string"]' +export EXPORTED_FUNCTIONS_SUMO='["_malloc","_free","_crypto_aead_aegis128l_abytes","_crypto_aead_aegis128l_decrypt","_crypto_aead_aegis128l_decrypt_detached","_crypto_aead_aegis128l_encrypt","_crypto_aead_aegis128l_encrypt_detached","_crypto_aead_aegis128l_keybytes","_crypto_aead_aegis128l_keygen","_crypto_aead_aegis128l_messagebytes_max","_crypto_aead_aegis128l_npubbytes","_crypto_aead_aegis128l_nsecbytes","_crypto_aead_aegis256_abytes","_crypto_aead_aegis256_decrypt","_crypto_aead_aegis256_decrypt_detached","_crypto_aead_aegis256_encrypt","_crypto_aead_aegis256_encrypt_detached","_crypto_aead_aegis256_keybytes","_crypto_aead_aegis256_keygen","_crypto_aead_aegis256_messagebytes_max","_crypto_aead_aegis256_npubbytes","_crypto_aead_aegis256_nsecbytes","_crypto_aead_chacha20poly1305_abytes","_crypto_aead_chacha20poly1305_decrypt","_crypto_aead_chacha20poly1305_decrypt_detached","_crypto_aead_chacha20poly1305_encrypt","_crypto_aead_chacha20poly1305_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_abytes","_crypto_aead_chacha20poly1305_ietf_decrypt","_crypto_aead_chacha20poly1305_ietf_decrypt_detached","_crypto_aead_chacha20poly1305_ietf_encrypt","_crypto_aead_chacha20poly1305_ietf_encrypt_detached","_crypto_aead_chacha20poly1305_ietf_keybytes","_crypto_aead_chacha20poly1305_ietf_keygen","_crypto_aead_chacha20poly1305_ietf_messagebytes_max","_crypto_aead_chacha20poly1305_ietf_npubbytes","_crypto_aead_chacha20poly1305_ietf_nsecbytes","_crypto_aead_chacha20poly1305_keybytes","_crypto_aead_chacha20poly1305_keygen","_crypto_aead_chacha20poly1305_messagebytes_max","_crypto_aead_chacha20poly1305_npubbytes","_crypto_aead_chacha20poly1305_nsecbytes","_crypto_aead_xchacha20poly1305_ietf_abytes","_crypto_aead_xchacha20poly1305_ietf_decrypt","_crypto_aead_xchacha20poly1305_ietf_decrypt_detached","_crypto_aead_xchacha20poly1305_ietf_encrypt","_crypto_aead_xchacha20poly1305_ietf_encrypt_detached","_crypto_aead_xchacha20poly1305_ietf_keybytes","_crypto_aead_xchacha20poly1305_ietf_keygen","_crypto_aead_xchacha20poly1305_ietf_messagebytes_max","_crypto_aead_xchacha20poly1305_ietf_npubbytes","_crypto_aead_xchacha20poly1305_ietf_nsecbytes","_crypto_auth","_crypto_auth_bytes","_crypto_auth_hmacsha256","_crypto_auth_hmacsha256_bytes","_crypto_auth_hmacsha256_final","_crypto_auth_hmacsha256_init","_crypto_auth_hmacsha256_keybytes","_crypto_auth_hmacsha256_keygen","_crypto_auth_hmacsha256_statebytes","_crypto_auth_hmacsha256_update","_crypto_auth_hmacsha256_verify","_crypto_auth_hmacsha512","_crypto_auth_hmacsha512256","_crypto_auth_hmacsha512256_bytes","_crypto_auth_hmacsha512256_final","_crypto_auth_hmacsha512256_init","_crypto_auth_hmacsha512256_keybytes","_crypto_auth_hmacsha512256_keygen","_crypto_auth_hmacsha512256_statebytes","_crypto_auth_hmacsha512256_update","_crypto_auth_hmacsha512256_verify","_crypto_auth_hmacsha512_bytes","_crypto_auth_hmacsha512_final","_crypto_auth_hmacsha512_init","_crypto_auth_hmacsha512_keybytes","_crypto_auth_hmacsha512_keygen","_crypto_auth_hmacsha512_statebytes","_crypto_auth_hmacsha512_update","_crypto_auth_hmacsha512_verify","_crypto_auth_keybytes","_crypto_auth_keygen","_crypto_auth_primitive","_crypto_auth_verify","_crypto_box","_crypto_box_afternm","_crypto_box_beforenm","_crypto_box_beforenmbytes","_crypto_box_boxzerobytes","_crypto_box_curve25519xchacha20poly1305_beforenm","_crypto_box_curve25519xchacha20poly1305_beforenmbytes","_crypto_box_curve25519xchacha20poly1305_detached","_crypto_box_curve25519xchacha20poly1305_detached_afternm","_crypto_box_curve25519xchacha20poly1305_easy","_crypto_box_curve25519xchacha20poly1305_easy_afternm","_crypto_box_curve25519xchacha20poly1305_keypair","_crypto_box_curve25519xchacha20poly1305_macbytes","_crypto_box_curve25519xchacha20poly1305_messagebytes_max","_crypto_box_curve25519xchacha20poly1305_noncebytes","_crypto_box_curve25519xchacha20poly1305_open_detached","_crypto_box_curve25519xchacha20poly1305_open_detached_afternm","_crypto_box_curve25519xchacha20poly1305_open_easy","_crypto_box_curve25519xchacha20poly1305_open_easy_afternm","_crypto_box_curve25519xchacha20poly1305_publickeybytes","_crypto_box_curve25519xchacha20poly1305_seal","_crypto_box_curve25519xchacha20poly1305_seal_open","_crypto_box_curve25519xchacha20poly1305_sealbytes","_crypto_box_curve25519xchacha20poly1305_secretkeybytes","_crypto_box_curve25519xchacha20poly1305_seed_keypair","_crypto_box_curve25519xchacha20poly1305_seedbytes","_crypto_box_curve25519xsalsa20poly1305","_crypto_box_curve25519xsalsa20poly1305_afternm","_crypto_box_curve25519xsalsa20poly1305_beforenm","_crypto_box_curve25519xsalsa20poly1305_beforenmbytes","_crypto_box_curve25519xsalsa20poly1305_boxzerobytes","_crypto_box_curve25519xsalsa20poly1305_keypair","_crypto_box_curve25519xsalsa20poly1305_macbytes","_crypto_box_curve25519xsalsa20poly1305_messagebytes_max","_crypto_box_curve25519xsalsa20poly1305_noncebytes","_crypto_box_curve25519xsalsa20poly1305_open","_crypto_box_curve25519xsalsa20poly1305_open_afternm","_crypto_box_curve25519xsalsa20poly1305_publickeybytes","_crypto_box_curve25519xsalsa20poly1305_secretkeybytes","_crypto_box_curve25519xsalsa20poly1305_seed_keypair","_crypto_box_curve25519xsalsa20poly1305_seedbytes","_crypto_box_curve25519xsalsa20poly1305_zerobytes","_crypto_box_detached","_crypto_box_detached_afternm","_crypto_box_easy","_crypto_box_easy_afternm","_crypto_box_keypair","_crypto_box_macbytes","_crypto_box_messagebytes_max","_crypto_box_noncebytes","_crypto_box_open","_crypto_box_open_afternm","_crypto_box_open_detached","_crypto_box_open_detached_afternm","_crypto_box_open_easy","_crypto_box_open_easy_afternm","_crypto_box_primitive","_crypto_box_publickeybytes","_crypto_box_seal","_crypto_box_seal_open","_crypto_box_sealbytes","_crypto_box_secretkeybytes","_crypto_box_seed_keypair","_crypto_box_seedbytes","_crypto_box_zerobytes","_crypto_core_ed25519_add","_crypto_core_ed25519_bytes","_crypto_core_ed25519_from_uniform","_crypto_core_ed25519_hashbytes","_crypto_core_ed25519_is_valid_point","_crypto_core_ed25519_nonreducedscalarbytes","_crypto_core_ed25519_random","_crypto_core_ed25519_scalar_add","_crypto_core_ed25519_scalar_complement","_crypto_core_ed25519_scalar_invert","_crypto_core_ed25519_scalar_mul","_crypto_core_ed25519_scalar_negate","_crypto_core_ed25519_scalar_random","_crypto_core_ed25519_scalar_reduce","_crypto_core_ed25519_scalar_sub","_crypto_core_ed25519_scalarbytes","_crypto_core_ed25519_sub","_crypto_core_ed25519_uniformbytes","_crypto_core_hchacha20","_crypto_core_hchacha20_constbytes","_crypto_core_hchacha20_inputbytes","_crypto_core_hchacha20_keybytes","_crypto_core_hchacha20_outputbytes","_crypto_core_hsalsa20","_crypto_core_hsalsa20_constbytes","_crypto_core_hsalsa20_inputbytes","_crypto_core_hsalsa20_keybytes","_crypto_core_hsalsa20_outputbytes","_crypto_core_ristretto255_add","_crypto_core_ristretto255_bytes","_crypto_core_ristretto255_from_hash","_crypto_core_ristretto255_hashbytes","_crypto_core_ristretto255_is_valid_point","_crypto_core_ristretto255_nonreducedscalarbytes","_crypto_core_ristretto255_random","_crypto_core_ristretto255_scalar_add","_crypto_core_ristretto255_scalar_complement","_crypto_core_ristretto255_scalar_invert","_crypto_core_ristretto255_scalar_mul","_crypto_core_ristretto255_scalar_negate","_crypto_core_ristretto255_scalar_random","_crypto_core_ristretto255_scalar_reduce","_crypto_core_ristretto255_scalar_sub","_crypto_core_ristretto255_scalarbytes","_crypto_core_ristretto255_sub","_crypto_core_salsa20","_crypto_core_salsa2012","_crypto_core_salsa2012_constbytes","_crypto_core_salsa2012_inputbytes","_crypto_core_salsa2012_keybytes","_crypto_core_salsa2012_outputbytes","_crypto_core_salsa208","_crypto_core_salsa208_constbytes","_crypto_core_salsa208_inputbytes","_crypto_core_salsa208_keybytes","_crypto_core_salsa208_outputbytes","_crypto_core_salsa20_constbytes","_crypto_core_salsa20_inputbytes","_crypto_core_salsa20_keybytes","_crypto_core_salsa20_outputbytes","_crypto_generichash","_crypto_generichash_blake2b","_crypto_generichash_blake2b_bytes","_crypto_generichash_blake2b_bytes_max","_crypto_generichash_blake2b_bytes_min","_crypto_generichash_blake2b_final","_crypto_generichash_blake2b_init","_crypto_generichash_blake2b_init_salt_personal","_crypto_generichash_blake2b_keybytes","_crypto_generichash_blake2b_keybytes_max","_crypto_generichash_blake2b_keybytes_min","_crypto_generichash_blake2b_keygen","_crypto_generichash_blake2b_personalbytes","_crypto_generichash_blake2b_salt_personal","_crypto_generichash_blake2b_saltbytes","_crypto_generichash_blake2b_statebytes","_crypto_generichash_blake2b_update","_crypto_generichash_bytes","_crypto_generichash_bytes_max","_crypto_generichash_bytes_min","_crypto_generichash_final","_crypto_generichash_init","_crypto_generichash_keybytes","_crypto_generichash_keybytes_max","_crypto_generichash_keybytes_min","_crypto_generichash_keygen","_crypto_generichash_primitive","_crypto_generichash_statebytes","_crypto_generichash_update","_crypto_hash","_crypto_hash_bytes","_crypto_hash_primitive","_crypto_hash_sha256","_crypto_hash_sha256_bytes","_crypto_hash_sha256_final","_crypto_hash_sha256_init","_crypto_hash_sha256_statebytes","_crypto_hash_sha256_update","_crypto_hash_sha512","_crypto_hash_sha512_bytes","_crypto_hash_sha512_final","_crypto_hash_sha512_init","_crypto_hash_sha512_statebytes","_crypto_hash_sha512_update","_crypto_kdf_blake2b_bytes_max","_crypto_kdf_blake2b_bytes_min","_crypto_kdf_blake2b_contextbytes","_crypto_kdf_blake2b_derive_from_key","_crypto_kdf_blake2b_keybytes","_crypto_kdf_bytes_max","_crypto_kdf_bytes_min","_crypto_kdf_contextbytes","_crypto_kdf_derive_from_key","_crypto_kdf_hkdf_sha256_bytes_max","_crypto_kdf_hkdf_sha256_bytes_min","_crypto_kdf_hkdf_sha256_expand","_crypto_kdf_hkdf_sha256_extract","_crypto_kdf_hkdf_sha256_extract_final","_crypto_kdf_hkdf_sha256_extract_init","_crypto_kdf_hkdf_sha256_extract_update","_crypto_kdf_hkdf_sha256_keybytes","_crypto_kdf_hkdf_sha256_keygen","_crypto_kdf_hkdf_sha256_statebytes","_crypto_kdf_hkdf_sha512_bytes_max","_crypto_kdf_hkdf_sha512_bytes_min","_crypto_kdf_hkdf_sha512_expand","_crypto_kdf_hkdf_sha512_extract","_crypto_kdf_hkdf_sha512_extract_final","_crypto_kdf_hkdf_sha512_extract_init","_crypto_kdf_hkdf_sha512_extract_update","_crypto_kdf_hkdf_sha512_keybytes","_crypto_kdf_hkdf_sha512_keygen","_crypto_kdf_keybytes","_crypto_kdf_keygen","_crypto_kdf_primitive","_crypto_kx_client_session_keys","_crypto_kx_keypair","_crypto_kx_primitive","_crypto_kx_publickeybytes","_crypto_kx_secretkeybytes","_crypto_kx_seed_keypair","_crypto_kx_seedbytes","_crypto_kx_server_session_keys","_crypto_kx_sessionkeybytes","_crypto_onetimeauth","_crypto_onetimeauth_bytes","_crypto_onetimeauth_final","_crypto_onetimeauth_init","_crypto_onetimeauth_keybytes","_crypto_onetimeauth_keygen","_crypto_onetimeauth_poly1305","_crypto_onetimeauth_poly1305_bytes","_crypto_onetimeauth_poly1305_final","_crypto_onetimeauth_poly1305_init","_crypto_onetimeauth_poly1305_keybytes","_crypto_onetimeauth_poly1305_keygen","_crypto_onetimeauth_poly1305_statebytes","_crypto_onetimeauth_poly1305_update","_crypto_onetimeauth_poly1305_verify","_crypto_onetimeauth_primitive","_crypto_onetimeauth_statebytes","_crypto_onetimeauth_update","_crypto_onetimeauth_verify","_crypto_pwhash","_crypto_pwhash_alg_argon2i13","_crypto_pwhash_alg_argon2id13","_crypto_pwhash_alg_default","_crypto_pwhash_argon2i","_crypto_pwhash_argon2i_alg_argon2i13","_crypto_pwhash_argon2i_bytes_max","_crypto_pwhash_argon2i_bytes_min","_crypto_pwhash_argon2i_memlimit_interactive","_crypto_pwhash_argon2i_memlimit_max","_crypto_pwhash_argon2i_memlimit_min","_crypto_pwhash_argon2i_memlimit_moderate","_crypto_pwhash_argon2i_memlimit_sensitive","_crypto_pwhash_argon2i_opslimit_interactive","_crypto_pwhash_argon2i_opslimit_max","_crypto_pwhash_argon2i_opslimit_min","_crypto_pwhash_argon2i_opslimit_moderate","_crypto_pwhash_argon2i_opslimit_sensitive","_crypto_pwhash_argon2i_passwd_max","_crypto_pwhash_argon2i_passwd_min","_crypto_pwhash_argon2i_saltbytes","_crypto_pwhash_argon2i_str","_crypto_pwhash_argon2i_str_needs_rehash","_crypto_pwhash_argon2i_str_verify","_crypto_pwhash_argon2i_strbytes","_crypto_pwhash_argon2i_strprefix","_crypto_pwhash_argon2id","_crypto_pwhash_argon2id_alg_argon2id13","_crypto_pwhash_argon2id_bytes_max","_crypto_pwhash_argon2id_bytes_min","_crypto_pwhash_argon2id_memlimit_interactive","_crypto_pwhash_argon2id_memlimit_max","_crypto_pwhash_argon2id_memlimit_min","_crypto_pwhash_argon2id_memlimit_moderate","_crypto_pwhash_argon2id_memlimit_sensitive","_crypto_pwhash_argon2id_opslimit_interactive","_crypto_pwhash_argon2id_opslimit_max","_crypto_pwhash_argon2id_opslimit_min","_crypto_pwhash_argon2id_opslimit_moderate","_crypto_pwhash_argon2id_opslimit_sensitive","_crypto_pwhash_argon2id_passwd_max","_crypto_pwhash_argon2id_passwd_min","_crypto_pwhash_argon2id_saltbytes","_crypto_pwhash_argon2id_str","_crypto_pwhash_argon2id_str_needs_rehash","_crypto_pwhash_argon2id_str_verify","_crypto_pwhash_argon2id_strbytes","_crypto_pwhash_argon2id_strprefix","_crypto_pwhash_bytes_max","_crypto_pwhash_bytes_min","_crypto_pwhash_memlimit_interactive","_crypto_pwhash_memlimit_max","_crypto_pwhash_memlimit_min","_crypto_pwhash_memlimit_moderate","_crypto_pwhash_memlimit_sensitive","_crypto_pwhash_opslimit_interactive","_crypto_pwhash_opslimit_max","_crypto_pwhash_opslimit_min","_crypto_pwhash_opslimit_moderate","_crypto_pwhash_opslimit_sensitive","_crypto_pwhash_passwd_max","_crypto_pwhash_passwd_min","_crypto_pwhash_primitive","_crypto_pwhash_saltbytes","_crypto_pwhash_scryptsalsa208sha256","_crypto_pwhash_scryptsalsa208sha256_bytes_max","_crypto_pwhash_scryptsalsa208sha256_bytes_min","_crypto_pwhash_scryptsalsa208sha256_ll","_crypto_pwhash_scryptsalsa208sha256_memlimit_interactive","_crypto_pwhash_scryptsalsa208sha256_memlimit_max","_crypto_pwhash_scryptsalsa208sha256_memlimit_min","_crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive","_crypto_pwhash_scryptsalsa208sha256_opslimit_interactive","_crypto_pwhash_scryptsalsa208sha256_opslimit_max","_crypto_pwhash_scryptsalsa208sha256_opslimit_min","_crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive","_crypto_pwhash_scryptsalsa208sha256_passwd_max","_crypto_pwhash_scryptsalsa208sha256_passwd_min","_crypto_pwhash_scryptsalsa208sha256_saltbytes","_crypto_pwhash_scryptsalsa208sha256_str","_crypto_pwhash_scryptsalsa208sha256_str_needs_rehash","_crypto_pwhash_scryptsalsa208sha256_str_verify","_crypto_pwhash_scryptsalsa208sha256_strbytes","_crypto_pwhash_scryptsalsa208sha256_strprefix","_crypto_pwhash_str","_crypto_pwhash_str_alg","_crypto_pwhash_str_needs_rehash","_crypto_pwhash_str_verify","_crypto_pwhash_strbytes","_crypto_pwhash_strprefix","_crypto_scalarmult","_crypto_scalarmult_base","_crypto_scalarmult_bytes","_crypto_scalarmult_curve25519","_crypto_scalarmult_curve25519_base","_crypto_scalarmult_curve25519_bytes","_crypto_scalarmult_curve25519_scalarbytes","_crypto_scalarmult_ed25519","_crypto_scalarmult_ed25519_base","_crypto_scalarmult_ed25519_base_noclamp","_crypto_scalarmult_ed25519_bytes","_crypto_scalarmult_ed25519_noclamp","_crypto_scalarmult_ed25519_scalarbytes","_crypto_scalarmult_primitive","_crypto_scalarmult_ristretto255","_crypto_scalarmult_ristretto255_base","_crypto_scalarmult_ristretto255_bytes","_crypto_scalarmult_ristretto255_scalarbytes","_crypto_scalarmult_scalarbytes","_crypto_secretbox","_crypto_secretbox_boxzerobytes","_crypto_secretbox_detached","_crypto_secretbox_easy","_crypto_secretbox_keybytes","_crypto_secretbox_keygen","_crypto_secretbox_macbytes","_crypto_secretbox_messagebytes_max","_crypto_secretbox_noncebytes","_crypto_secretbox_open","_crypto_secretbox_open_detached","_crypto_secretbox_open_easy","_crypto_secretbox_primitive","_crypto_secretbox_xchacha20poly1305_detached","_crypto_secretbox_xchacha20poly1305_easy","_crypto_secretbox_xchacha20poly1305_keybytes","_crypto_secretbox_xchacha20poly1305_macbytes","_crypto_secretbox_xchacha20poly1305_messagebytes_max","_crypto_secretbox_xchacha20poly1305_noncebytes","_crypto_secretbox_xchacha20poly1305_open_detached","_crypto_secretbox_xchacha20poly1305_open_easy","_crypto_secretbox_xsalsa20poly1305","_crypto_secretbox_xsalsa20poly1305_boxzerobytes","_crypto_secretbox_xsalsa20poly1305_keybytes","_crypto_secretbox_xsalsa20poly1305_keygen","_crypto_secretbox_xsalsa20poly1305_macbytes","_crypto_secretbox_xsalsa20poly1305_messagebytes_max","_crypto_secretbox_xsalsa20poly1305_noncebytes","_crypto_secretbox_xsalsa20poly1305_open","_crypto_secretbox_xsalsa20poly1305_zerobytes","_crypto_secretbox_zerobytes","_crypto_secretstream_xchacha20poly1305_abytes","_crypto_secretstream_xchacha20poly1305_headerbytes","_crypto_secretstream_xchacha20poly1305_init_pull","_crypto_secretstream_xchacha20poly1305_init_push","_crypto_secretstream_xchacha20poly1305_keybytes","_crypto_secretstream_xchacha20poly1305_keygen","_crypto_secretstream_xchacha20poly1305_messagebytes_max","_crypto_secretstream_xchacha20poly1305_pull","_crypto_secretstream_xchacha20poly1305_push","_crypto_secretstream_xchacha20poly1305_rekey","_crypto_secretstream_xchacha20poly1305_statebytes","_crypto_secretstream_xchacha20poly1305_tag_final","_crypto_secretstream_xchacha20poly1305_tag_message","_crypto_secretstream_xchacha20poly1305_tag_push","_crypto_secretstream_xchacha20poly1305_tag_rekey","_crypto_shorthash","_crypto_shorthash_bytes","_crypto_shorthash_keybytes","_crypto_shorthash_keygen","_crypto_shorthash_primitive","_crypto_shorthash_siphash24","_crypto_shorthash_siphash24_bytes","_crypto_shorthash_siphash24_keybytes","_crypto_shorthash_siphashx24","_crypto_shorthash_siphashx24_bytes","_crypto_shorthash_siphashx24_keybytes","_crypto_sign","_crypto_sign_bytes","_crypto_sign_detached","_crypto_sign_ed25519","_crypto_sign_ed25519_bytes","_crypto_sign_ed25519_detached","_crypto_sign_ed25519_keypair","_crypto_sign_ed25519_messagebytes_max","_crypto_sign_ed25519_open","_crypto_sign_ed25519_pk_to_curve25519","_crypto_sign_ed25519_publickeybytes","_crypto_sign_ed25519_secretkeybytes","_crypto_sign_ed25519_seed_keypair","_crypto_sign_ed25519_seedbytes","_crypto_sign_ed25519_sk_to_curve25519","_crypto_sign_ed25519_sk_to_pk","_crypto_sign_ed25519_sk_to_seed","_crypto_sign_ed25519_verify_detached","_crypto_sign_ed25519ph_final_create","_crypto_sign_ed25519ph_final_verify","_crypto_sign_ed25519ph_init","_crypto_sign_ed25519ph_statebytes","_crypto_sign_ed25519ph_update","_crypto_sign_final_create","_crypto_sign_final_verify","_crypto_sign_init","_crypto_sign_keypair","_crypto_sign_messagebytes_max","_crypto_sign_open","_crypto_sign_primitive","_crypto_sign_publickeybytes","_crypto_sign_secretkeybytes","_crypto_sign_seed_keypair","_crypto_sign_seedbytes","_crypto_sign_statebytes","_crypto_sign_update","_crypto_sign_verify_detached","_crypto_stream","_crypto_stream_chacha20","_crypto_stream_chacha20_ietf","_crypto_stream_chacha20_ietf_keybytes","_crypto_stream_chacha20_ietf_keygen","_crypto_stream_chacha20_ietf_messagebytes_max","_crypto_stream_chacha20_ietf_noncebytes","_crypto_stream_chacha20_ietf_xor","_crypto_stream_chacha20_ietf_xor_ic","_crypto_stream_chacha20_keybytes","_crypto_stream_chacha20_keygen","_crypto_stream_chacha20_messagebytes_max","_crypto_stream_chacha20_noncebytes","_crypto_stream_chacha20_xor","_crypto_stream_chacha20_xor_ic","_crypto_stream_keybytes","_crypto_stream_keygen","_crypto_stream_messagebytes_max","_crypto_stream_noncebytes","_crypto_stream_primitive","_crypto_stream_salsa20","_crypto_stream_salsa2012","_crypto_stream_salsa2012_keybytes","_crypto_stream_salsa2012_keygen","_crypto_stream_salsa2012_messagebytes_max","_crypto_stream_salsa2012_noncebytes","_crypto_stream_salsa2012_xor","_crypto_stream_salsa208","_crypto_stream_salsa208_keybytes","_crypto_stream_salsa208_keygen","_crypto_stream_salsa208_messagebytes_max","_crypto_stream_salsa208_noncebytes","_crypto_stream_salsa208_xor","_crypto_stream_salsa20_keybytes","_crypto_stream_salsa20_keygen","_crypto_stream_salsa20_messagebytes_max","_crypto_stream_salsa20_noncebytes","_crypto_stream_salsa20_xor","_crypto_stream_salsa20_xor_ic","_crypto_stream_xchacha20","_crypto_stream_xchacha20_keybytes","_crypto_stream_xchacha20_keygen","_crypto_stream_xchacha20_messagebytes_max","_crypto_stream_xchacha20_noncebytes","_crypto_stream_xchacha20_xor","_crypto_stream_xchacha20_xor_ic","_crypto_stream_xor","_crypto_stream_xsalsa20","_crypto_stream_xsalsa20_keybytes","_crypto_stream_xsalsa20_keygen","_crypto_stream_xsalsa20_messagebytes_max","_crypto_stream_xsalsa20_noncebytes","_crypto_stream_xsalsa20_xor","_crypto_stream_xsalsa20_xor_ic","_crypto_verify_16","_crypto_verify_16_bytes","_crypto_verify_32","_crypto_verify_32_bytes","_crypto_verify_64","_crypto_verify_64_bytes","_randombytes","_randombytes_buf","_randombytes_buf_deterministic","_randombytes_close","_randombytes_implementation_name","_randombytes_random","_randombytes_seedbytes","_randombytes_stir","_randombytes_uniform","_sodium_base642bin","_sodium_base64_encoded_len","_sodium_bin2base64","_sodium_bin2hex","_sodium_hex2bin","_sodium_init","_sodium_library_minimal","_sodium_library_version_major","_sodium_library_version_minor","_sodium_pad","_sodium_unpad","_sodium_version_string"]' export EXPORTED_RUNTIME_METHODS='["UTF8ToString","getValue","setValue"]' export JS_RESERVED_MEMORY_STANDARD=16MB export JS_RESERVED_MEMORY_SUMO=48MB diff --git a/libsodium.vcxproj b/libsodium.vcxproj index 04bd3f09..3217a25d 100644 --- a/libsodium.vcxproj +++ b/libsodium.vcxproj @@ -413,6 +413,14 @@ + + + + + + + + @@ -422,6 +430,7 @@ + @@ -440,6 +449,7 @@ + @@ -464,6 +474,7 @@ + @@ -500,6 +511,7 @@ + @@ -550,6 +562,16 @@ + + + + + + + + + + diff --git a/libsodium.vcxproj.filters b/libsodium.vcxproj.filters index ccbe9757..c9ef1c31 100644 --- a/libsodium.vcxproj.filters +++ b/libsodium.vcxproj.filters @@ -309,6 +309,30 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + Source Files @@ -336,6 +360,9 @@ Source Files + + Source Files + Source Files @@ -386,6 +413,9 @@ Header Files + + Header Files + Header Files @@ -458,6 +488,9 @@ Header Files + + Header Files + Header Files @@ -566,6 +599,9 @@ Header Files + + Header Files + Header Files @@ -716,6 +752,36 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + Header Files diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index fa2b77c3..c7eb3190 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -2,6 +2,16 @@ lib_LTLIBRARIES = \ libsodium.la 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 \ @@ -18,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 \ @@ -90,6 +101,7 @@ libsodium_la_SOURCES = \ 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 \ @@ -219,12 +231,20 @@ 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_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) diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index 05f4d01d..8f4649b4 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -221,7 +221,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@) @@ -231,7 +234,10 @@ 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/aes256gcm/armcrypto/libarmcrypto_la-aead_aes256gcm_armcrypto.lo +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) \ @@ -263,6 +269,16 @@ 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/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 \ @@ -278,6 +294,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 \ @@ -343,7 +360,8 @@ am__libsodium_la_SOURCES_DIST = \ 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 \ @@ -428,6 +446,10 @@ am__objects_1 = @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/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 \ @@ -444,6 +466,7 @@ am_libsodium_la_OBJECTS = \ 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 \ @@ -547,7 +570,15 @@ 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/$(DEPDIR)/libsodium_la-aead_aes256gcm.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 \ @@ -569,6 +600,7 @@ am__depfiles_remade = crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gc 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 \ @@ -939,7 +971,17 @@ valgrind_tools = @valgrind_tools@ lib_LTLIBRARIES = \ libsodium.la -libsodium_la_SOURCES = crypto_aead/aes256gcm/aead_aes256gcm.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 \ @@ -954,6 +996,7 @@ libsodium_la_SOURCES = crypto_aead/aes256gcm/aead_aes256gcm.c \ 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 \ @@ -1019,7 +1062,8 @@ libsodium_la_SOURCES = crypto_aead/aes256gcm/aead_aes256gcm.c \ 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) \ @@ -1063,6 +1107,10 @@ 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) @@ -1070,6 +1118,10 @@ libaesni_la_CPPFLAGS = $(libsodium_la_CPPFLAGS) \ @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) @@ -1208,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) @@ -1220,6 +1290,12 @@ 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) @@ -1289,6 +1365,18 @@ 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/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) @@ -1419,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) @@ -2005,6 +2102,10 @@ 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) @@ -2041,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) @@ -2157,6 +2260,14 @@ 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/aes256gcm/armcrypto/$(DEPDIR)/libarmcrypto_la-aead_aes256gcm_armcrypto.Plo@am__quote@ # am--include-marker @@ -2179,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 @@ -2338,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 @@ -2345,6 +2471,20 @@ 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 @@ -2394,6 +2534,34 @@ 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/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/aegis128l/libsodium_la-aead_aegis128l.lo `test -f 'crypto_aead/aegis128l/aead_aegis128l.c' || echo '$(srcdir)/'`crypto_aead/aegis128l/aead_aegis128l.c + +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/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 @@ -2506,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 @@ -3113,6 +3288,8 @@ 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/aes256gcm/armcrypto/.libs crypto_aead/aes256gcm/armcrypto/_libs @@ -3131,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 @@ -3400,6 +3578,10 @@ 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) @@ -3436,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) @@ -3558,7 +3742,15 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive - -rm -f crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.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 @@ -3580,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 @@ -3715,7 +3908,15 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -f crypto_aead/aes256gcm/$(DEPDIR)/libsodium_la-aead_aes256gcm.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 @@ -3737,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 diff --git a/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c b/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c new file mode 100644 index 00000000..ab2596e6 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aead_aegis128l.c @@ -0,0 +1,159 @@ + +#include +#include + +#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 */ +} diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c b/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c new file mode 100644 index 00000000..93782ce2 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include + +#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 +#include + +#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 diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h b/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h new file mode 100644 index 00000000..65e52dab --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_aesni.h @@ -0,0 +1,8 @@ +#ifndef aegis128l_aesni_H +#define aegis128l_aesni_H + +#include "implementations.h" + +extern struct aegis128l_implementation aegis128l_aesni_implementation; + +#endif \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c new file mode 100644 index 00000000..8f2adf8c --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c @@ -0,0 +1,69 @@ +#include +#include +#include +#include +#include + +#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("neon,crypto,aes") +#endif + +#ifndef __ARM_FEATURE_AES +#define __ARM_FEATURE_AES 1 +#endif + +#include + +#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 diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h new file mode 100644 index 00000000..41ad43cb --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.h @@ -0,0 +1,8 @@ +#ifndef aegis128l_armcrypto_H +#define aegis128l_armcrypto_H + +#include "implementations.h" + +extern struct aegis128l_implementation aegis128l_armcrypto_implementation; + +#endif \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h b/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h new file mode 100644 index 00000000..7a130b0c --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_common.h @@ -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; +} diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c b/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c new file mode 100644 index 00000000..e1d60ecb --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.c @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include + +#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 diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h b/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h new file mode 100644 index 00000000..df8ddece --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_soft.h @@ -0,0 +1,8 @@ +#ifndef aegis128l_soft_H +#define aegis128l_soft_H + +#include "implementations.h" + +extern struct aegis128l_implementation aegis128l_soft_implementation; + +#endif \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis128l/implementations.h b/src/libsodium/crypto_aead/aegis128l/implementations.h new file mode 100644 index 00000000..29e7b1cb --- /dev/null +++ b/src/libsodium/crypto_aead/aegis128l/implementations.h @@ -0,0 +1,17 @@ +#ifndef aegis128l_implementations_H +#define aegis128l_implementations_H + +#include +#include + +#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 diff --git a/src/libsodium/crypto_aead/aegis256/aead_aegis256.c b/src/libsodium/crypto_aead/aegis256/aead_aegis256.c new file mode 100644 index 00000000..0fd8f966 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aead_aegis256.c @@ -0,0 +1,158 @@ + +#include +#include + +#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 */ +} diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c b/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c new file mode 100644 index 00000000..96aa0036 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_aesni.c @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include + +#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 +#include + +#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 diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h b/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h new file mode 100644 index 00000000..21f4d819 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_aesni.h @@ -0,0 +1,8 @@ +#ifndef aegis256_aesni_H +#define aegis256_aesni_H + +#include "implementations.h" + +extern struct aegis256_implementation aegis256_aesni_implementation; + +#endif \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c new file mode 100644 index 00000000..62974ae2 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c @@ -0,0 +1,67 @@ +#include +#include +#include +#include +#include + +#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("neon,crypto,aes") +#endif + +#ifndef __ARM_FEATURE_AES +#define __ARM_FEATURE_AES 1 +#endif + +#include + +#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 diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h new file mode 100644 index 00000000..a9bd4ad3 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.h @@ -0,0 +1,8 @@ +#ifndef aegis256_armcrypto_H +#define aegis256_armcrypto_H + +#include "implementations.h" + +extern struct aegis256_implementation aegis256_armcrypto_implementation; + +#endif \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_common.h b/src/libsodium/crypto_aead/aegis256/aegis256_common.h new file mode 100644 index 00000000..5a486f2c --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_common.h @@ -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; +} diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_soft.c b/src/libsodium/crypto_aead/aegis256/aegis256_soft.c new file mode 100644 index 00000000..38024d17 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_soft.c @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include + +#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 \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_soft.h b/src/libsodium/crypto_aead/aegis256/aegis256_soft.h new file mode 100644 index 00000000..c20198de --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/aegis256_soft.h @@ -0,0 +1,8 @@ +#ifndef aegis256_soft_H +#define aegis256_soft_H + +#include "implementations.h" + +extern struct aegis256_implementation aegis256_soft_implementation; + +#endif \ No newline at end of file diff --git a/src/libsodium/crypto_aead/aegis256/implementations.h b/src/libsodium/crypto_aead/aegis256/implementations.h new file mode 100644 index 00000000..9efbf387 --- /dev/null +++ b/src/libsodium/crypto_aead/aegis256/implementations.h @@ -0,0 +1,17 @@ +#ifndef aegis256_implementations_H +#define aegis256_implementations_H + +#include +#include + +#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 diff --git a/src/libsodium/crypto_core/softaes/softaes.c b/src/libsodium/crypto_core/softaes/softaes.c new file mode 100644 index 00000000..ae469c8a --- /dev/null +++ b/src/libsodium/crypto_core/softaes/softaes.c @@ -0,0 +1,143 @@ +#include +#include +#include +#include + +#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; +} diff --git a/src/libsodium/include/Makefile.am b/src/libsodium/include/Makefile.am index 7476bd97..3146ec8e 100644 --- a/src/libsodium/include/Makefile.am +++ b/src/libsodium/include/Makefile.am @@ -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 \ diff --git a/src/libsodium/include/Makefile.in b/src/libsodium/include/Makefile.in index 67aaf2bb..118bcdd5 100644 --- a/src/libsodium/include/Makefile.in +++ b/src/libsodium/include/Makefile.in @@ -350,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 \ @@ -372,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 \ diff --git a/src/libsodium/include/sodium.h b/src/libsodium/include/sodium.h index 18659e1b..f667e063 100644 --- a/src/libsodium/include/sodium.h +++ b/src/libsodium/include/sodium.h @@ -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" @@ -56,16 +58,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 diff --git a/src/libsodium/include/sodium/crypto_aead_aegis128l.h b/src/libsodium/include/sodium/crypto_aead_aegis128l.h new file mode 100644 index 00000000..0ad019fc --- /dev/null +++ b/src/libsodium/include/sodium/crypto_aead_aegis128l.h @@ -0,0 +1,92 @@ +#ifndef crypto_aead_aegis128l_H +#define crypto_aead_aegis128l_H + +#include + +#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 diff --git a/src/libsodium/include/sodium/crypto_aead_aegis256.h b/src/libsodium/include/sodium/crypto_aead_aegis256.h new file mode 100644 index 00000000..26bd18ac --- /dev/null +++ b/src/libsodium/include/sodium/crypto_aead_aegis256.h @@ -0,0 +1,92 @@ +#ifndef crypto_aead_aegis256_H +#define crypto_aead_aegis256_H + +#include + +#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 diff --git a/src/libsodium/include/sodium/private/implementations.h b/src/libsodium/include/sodium/private/implementations.h index c7237f85..edbb2b8b 100644 --- a/src/libsodium/include/sodium/private/implementations.h +++ b/src/libsodium/include/sodium/private/implementations.h @@ -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 diff --git a/src/libsodium/include/sodium/private/softaes.h b/src/libsodium/include/sodium/private/softaes.h new file mode 100644 index 00000000..f7a2bd24 --- /dev/null +++ b/src/libsodium/include/sodium/private/softaes.h @@ -0,0 +1,56 @@ +#ifndef softaes_H +#define softaes_H 1 + +#include + +#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 diff --git a/src/libsodium/sodium/core.c b/src/libsodium/sodium/core.c index bad32174..214ef5f8 100644 --- a/src/libsodium/sodium/core.c +++ b/src/libsodium/sodium/core.c @@ -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 */ diff --git a/test/default/Makefile.am b/test/default/Makefile.am index ed852c91..ad9da78b 100644 --- a/test/default/Makefile.am +++ b/test/default/Makefile.am @@ -5,6 +5,8 @@ EXTRA_DIST = \ wasi-test-wrapper.sh \ wintest.bat \ pre.js.inc \ + aead_aegis128l.exp \ + aead_aegis256.exp \ aead_aes256gcm.exp \ aead_aes256gcm2.exp \ aead_chacha20poly1305.exp \ @@ -85,6 +87,8 @@ EXTRA_DIST = \ xchacha20.exp DISTCLEANFILES = \ + aead_aegis128l.res \ + aead_aegis256.res \ aead_aes256gcm.res \ aead_aes256gcm2.res \ aead_chacha20poly1305.res \ @@ -176,6 +180,8 @@ AM_CPPFLAGS = \ AM_LDFLAGS = @TEST_LDFLAGS@ TESTS_TARGETS = \ + aead_aegis128l \ + aead_aegis256 \ aead_aes256gcm \ aead_aes256gcm2 \ aead_chacha20poly1305 \ @@ -257,6 +263,12 @@ TESTS = $(TESTS_TARGETS) TESTS_LDADD = \ ${top_builddir}/src/libsodium/libsodium.la +aead_aegis128l_SOURCE = cmptest.h aead_aegis128l.c +aead_aegis128l_LDADD = $(TESTS_LDADD) + +aead_aegis256_SOURCE = cmptest.h aead_aegis256.c +aead_aegis256_LDADD = $(TESTS_LDADD) + aead_aes256gcm_SOURCE = cmptest.h aead_aes256gcm.c aead_aes256gcm_LDADD = $(TESTS_LDADD) diff --git a/test/default/Makefile.in b/test/default/Makefile.in index 8c81d3dc..cc98c05b 100644 --- a/test/default/Makefile.in +++ b/test/default/Makefile.in @@ -134,7 +134,8 @@ CONFIG_CLEAN_VPATH_FILES = @MINIMAL_FALSE@ scalarmult_ed25519$(EXEEXT) \ @MINIMAL_FALSE@ scalarmult_ristretto255$(EXEEXT) \ @MINIMAL_FALSE@ siphashx24$(EXEEXT) xchacha20$(EXEEXT) -am__EXEEXT_3 = aead_aes256gcm$(EXEEXT) aead_aes256gcm2$(EXEEXT) \ +am__EXEEXT_3 = aead_aegis128l$(EXEEXT) aead_aegis256$(EXEEXT) \ + aead_aes256gcm$(EXEEXT) aead_aes256gcm2$(EXEEXT) \ aead_chacha20poly1305$(EXEEXT) aead_chacha20poly13052$(EXEEXT) \ aead_xchacha20poly1305$(EXEEXT) auth$(EXEEXT) auth2$(EXEEXT) \ auth3$(EXEEXT) auth5$(EXEEXT) auth6$(EXEEXT) auth7$(EXEEXT) \ @@ -159,13 +160,19 @@ am__EXEEXT_3 = aead_aes256gcm$(EXEEXT) aead_aes256gcm2$(EXEEXT) \ sodium_version$(EXEEXT) stream$(EXEEXT) stream2$(EXEEXT) \ stream3$(EXEEXT) stream4$(EXEEXT) verify1$(EXEEXT) \ $(am__EXEEXT_1) $(am__EXEEXT_2) -aead_aes256gcm_SOURCES = aead_aes256gcm.c -aead_aes256gcm_OBJECTS = aead_aes256gcm.$(OBJEXT) -aead_aes256gcm_DEPENDENCIES = $(TESTS_LDADD) +aead_aegis128l_SOURCES = aead_aegis128l.c +aead_aegis128l_OBJECTS = aead_aegis128l.$(OBJEXT) +aead_aegis128l_DEPENDENCIES = $(TESTS_LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +aead_aegis256_SOURCES = aead_aegis256.c +aead_aegis256_OBJECTS = aead_aegis256.$(OBJEXT) +aead_aegis256_DEPENDENCIES = $(TESTS_LDADD) +aead_aes256gcm_SOURCES = aead_aes256gcm.c +aead_aes256gcm_OBJECTS = aead_aes256gcm.$(OBJEXT) +aead_aes256gcm_DEPENDENCIES = $(TESTS_LDADD) aead_aes256gcm2_SOURCES = aead_aes256gcm2.c aead_aes256gcm2_OBJECTS = aead_aes256gcm2.$(OBJEXT) aead_aes256gcm2_DEPENDENCIES = $(TESTS_LDADD) @@ -414,7 +421,8 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/aead_aes256gcm.Po \ +am__depfiles_remade = ./$(DEPDIR)/aead_aegis128l.Po \ + ./$(DEPDIR)/aead_aegis256.Po ./$(DEPDIR)/aead_aes256gcm.Po \ ./$(DEPDIR)/aead_aes256gcm2.Po \ ./$(DEPDIR)/aead_chacha20poly1305.Po \ ./$(DEPDIR)/aead_chacha20poly13052.Po \ @@ -472,7 +480,8 @@ 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 = aead_aes256gcm.c aead_aes256gcm2.c aead_chacha20poly1305.c \ +SOURCES = aead_aegis128l.c aead_aegis256.c aead_aes256gcm.c \ + aead_aes256gcm2.c aead_chacha20poly1305.c \ aead_chacha20poly13052.c aead_xchacha20poly1305.c auth.c \ auth2.c auth3.c auth5.c auth6.c auth7.c box.c box2.c box7.c \ box8.c box_easy.c box_easy2.c box_seal.c box_seed.c chacha20.c \ @@ -490,16 +499,16 @@ SOURCES = aead_aes256gcm.c aead_aes256gcm2.c aead_chacha20poly1305.c \ siphashx24.c sodium_core.c sodium_utils.c sodium_utils2.c \ sodium_utils3.c sodium_version.c stream.c stream2.c stream3.c \ stream4.c verify1.c xchacha20.c -DIST_SOURCES = aead_aes256gcm.c aead_aes256gcm2.c \ - aead_chacha20poly1305.c aead_chacha20poly13052.c \ - aead_xchacha20poly1305.c auth.c auth2.c auth3.c auth5.c \ - auth6.c auth7.c box.c box2.c box7.c box8.c box_easy.c \ - box_easy2.c box_seal.c box_seed.c chacha20.c codecs.c core1.c \ - core2.c core3.c core4.c core5.c core6.c core_ed25519.c \ - core_ristretto255.c ed25519_convert.c generichash.c \ - generichash2.c generichash3.c hash.c hash3.c kdf.c kdf_hkdf.c \ - keygen.c kx.c metamorphic.c misuse.c onetimeauth.c \ - onetimeauth2.c onetimeauth7.c pwhash_argon2i.c \ +DIST_SOURCES = aead_aegis128l.c aead_aegis256.c aead_aes256gcm.c \ + aead_aes256gcm2.c aead_chacha20poly1305.c \ + aead_chacha20poly13052.c aead_xchacha20poly1305.c auth.c \ + auth2.c auth3.c auth5.c auth6.c auth7.c box.c box2.c box7.c \ + box8.c box_easy.c box_easy2.c box_seal.c box_seed.c chacha20.c \ + codecs.c core1.c core2.c core3.c core4.c core5.c core6.c \ + core_ed25519.c core_ristretto255.c ed25519_convert.c \ + generichash.c generichash2.c generichash3.c hash.c hash3.c \ + kdf.c kdf_hkdf.c keygen.c kx.c metamorphic.c misuse.c \ + onetimeauth.c onetimeauth2.c onetimeauth7.c pwhash_argon2i.c \ pwhash_argon2id.c pwhash_scrypt.c pwhash_scrypt_ll.c \ randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \ scalarmult6.c scalarmult7.c scalarmult8.c scalarmult_ed25519.c \ @@ -915,6 +924,8 @@ EXTRA_DIST = \ wasi-test-wrapper.sh \ wintest.bat \ pre.js.inc \ + aead_aegis128l.exp \ + aead_aegis256.exp \ aead_aes256gcm.exp \ aead_aes256gcm2.exp \ aead_chacha20poly1305.exp \ @@ -995,6 +1006,8 @@ EXTRA_DIST = \ xchacha20.exp DISTCLEANFILES = \ + aead_aegis128l.res \ + aead_aegis256.res \ aead_aes256gcm.res \ aead_aes256gcm2.res \ aead_chacha20poly1305.res \ @@ -1084,22 +1097,26 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/test/quirks AM_LDFLAGS = @TEST_LDFLAGS@ -TESTS_TARGETS = aead_aes256gcm aead_aes256gcm2 aead_chacha20poly1305 \ - aead_chacha20poly13052 aead_xchacha20poly1305 auth auth2 auth3 \ - auth5 auth6 auth7 box box2 box7 box8 box_easy box_easy2 \ - box_seal box_seed chacha20 codecs core1 core2 core3 core4 \ - core5 core6 ed25519_convert generichash generichash2 \ - generichash3 hash hash3 kdf keygen kx metamorphic misuse \ - onetimeauth onetimeauth2 onetimeauth7 pwhash_argon2i \ - pwhash_argon2id randombytes scalarmult scalarmult2 scalarmult5 \ - scalarmult6 scalarmult7 scalarmult8 secretbox secretbox2 \ - secretbox7 secretbox8 secretbox_easy secretbox_easy2 \ - secretstream_xchacha20poly1305 shorthash sign sodium_core \ - sodium_utils sodium_version stream stream2 stream3 stream4 \ - verify1 $(am__append_1) $(am__append_2) +TESTS_TARGETS = aead_aegis128l aead_aegis256 aead_aes256gcm \ + aead_aes256gcm2 aead_chacha20poly1305 aead_chacha20poly13052 \ + aead_xchacha20poly1305 auth auth2 auth3 auth5 auth6 auth7 box \ + box2 box7 box8 box_easy box_easy2 box_seal box_seed chacha20 \ + codecs core1 core2 core3 core4 core5 core6 ed25519_convert \ + generichash generichash2 generichash3 hash hash3 kdf keygen kx \ + metamorphic misuse onetimeauth onetimeauth2 onetimeauth7 \ + pwhash_argon2i pwhash_argon2id randombytes scalarmult \ + scalarmult2 scalarmult5 scalarmult6 scalarmult7 scalarmult8 \ + secretbox secretbox2 secretbox7 secretbox8 secretbox_easy \ + secretbox_easy2 secretstream_xchacha20poly1305 shorthash sign \ + sodium_core sodium_utils sodium_version stream stream2 stream3 \ + stream4 verify1 $(am__append_1) $(am__append_2) TESTS_LDADD = \ ${top_builddir}/src/libsodium/libsodium.la +aead_aegis128l_SOURCE = cmptest.h aead_aegis128l.c +aead_aegis128l_LDADD = $(TESTS_LDADD) +aead_aegis256_SOURCE = cmptest.h aead_aegis256.c +aead_aegis256_LDADD = $(TESTS_LDADD) aead_aes256gcm_SOURCE = cmptest.h aead_aes256gcm.c aead_aes256gcm_LDADD = $(TESTS_LDADD) aead_aes256gcm2_SOURCE = cmptest.h aead_aes256gcm2.c @@ -1300,6 +1317,14 @@ clean-checkPROGRAMS: echo " rm -f" $$list; \ rm -f $$list +aead_aegis128l$(EXEEXT): $(aead_aegis128l_OBJECTS) $(aead_aegis128l_DEPENDENCIES) $(EXTRA_aead_aegis128l_DEPENDENCIES) + @rm -f aead_aegis128l$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aead_aegis128l_OBJECTS) $(aead_aegis128l_LDADD) $(LIBS) + +aead_aegis256$(EXEEXT): $(aead_aegis256_OBJECTS) $(aead_aegis256_DEPENDENCIES) $(EXTRA_aead_aegis256_DEPENDENCIES) + @rm -f aead_aegis256$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aead_aegis256_OBJECTS) $(aead_aegis256_LDADD) $(LIBS) + aead_aes256gcm$(EXEEXT): $(aead_aes256gcm_OBJECTS) $(aead_aes256gcm_DEPENDENCIES) $(EXTRA_aead_aes256gcm_DEPENDENCIES) @rm -f aead_aes256gcm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(aead_aes256gcm_OBJECTS) $(aead_aes256gcm_LDADD) $(LIBS) @@ -1618,6 +1643,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aead_aegis128l.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aead_aegis256.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aead_aes256gcm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aead_aes256gcm2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aead_chacha20poly1305.Po@am__quote@ # am--include-marker @@ -1926,6 +1953,20 @@ recheck: all $(check_PROGRAMS) am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? +aead_aegis128l.log: aead_aegis128l$(EXEEXT) + @p='aead_aegis128l$(EXEEXT)'; \ + b='aead_aegis128l'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +aead_aegis256.log: aead_aegis256$(EXEEXT) + @p='aead_aegis256$(EXEEXT)'; \ + b='aead_aegis256'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) aead_aes256gcm.log: aead_aes256gcm$(EXEEXT) @p='aead_aes256gcm$(EXEEXT)'; \ b='aead_aes256gcm'; \ @@ -2565,7 +2606,9 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/aead_aes256gcm.Po + -rm -f ./$(DEPDIR)/aead_aegis128l.Po + -rm -f ./$(DEPDIR)/aead_aegis256.Po + -rm -f ./$(DEPDIR)/aead_aes256gcm.Po -rm -f ./$(DEPDIR)/aead_aes256gcm2.Po -rm -f ./$(DEPDIR)/aead_chacha20poly1305.Po -rm -f ./$(DEPDIR)/aead_chacha20poly13052.Po @@ -2688,7 +2731,9 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/aead_aes256gcm.Po + -rm -f ./$(DEPDIR)/aead_aegis128l.Po + -rm -f ./$(DEPDIR)/aead_aegis256.Po + -rm -f ./$(DEPDIR)/aead_aes256gcm.Po -rm -f ./$(DEPDIR)/aead_aes256gcm2.Po -rm -f ./$(DEPDIR)/aead_chacha20poly1305.Po -rm -f ./$(DEPDIR)/aead_chacha20poly13052.Po diff --git a/test/default/aead_aegis128l.c b/test/default/aead_aegis128l.c new file mode 100644 index 00000000..b8d85aa3 --- /dev/null +++ b/test/default/aead_aegis128l.c @@ -0,0 +1,642 @@ +#define TEST_NAME "aead_aegis128l" +#include "cmptest.h" + +static struct { + const char *key_hex; + const char *nonce_hex; + const char *message_hex; + const char *ad_hex; + const char *ciphertext_hex; + const char *mac_hex; +} tests[] = { + { "54662e55bb4771f9711fe5301d7412fe", "e51d417ab10a2931d8d22a9fffb98e3a", + "04f672f8cdb3e71d032d52c064bc33ecf8aad3d40c41d5806cc306766c057c50b500af5c550d076d34cc3a74a2b4" + "bed195ffa3e8eddf953aefe9aed2bc14349c700ab7e4cb974fb31615a9ff70fb44307055523ab378b133fefc8830" + "13ce23bb01b23aeda15f85e65cdf02a291a0454900cb261872d5205737fd7410", + "3b762e3ab5d06cb2896b852ea70303f289f2775401b7808e30272f", + "d6736371f35eb067244dd7963ad2e0cd3949452cbd4c220be55082498ed3b230f579d78844311652a9958e82f172" + "bb8072c4b1114ec531a6ccb340ddd86caf32a0d4c9c45738e9ec9c0d9154612f7d90465f3a277bebd667c0af0edb" + "6935d8dffbdee96c1a96e4c4318f5d3bc90c1c8d5729e1a402f765bdc9b26b08", + "ee9595bb3f1b32000578ffb751b508655b3cae8fecaf44f40d740fa0347e283a" }, + { "46a5c72e03d900b48f829df00ecb88b9", "b25187e4b77b6770c35c7a962584597d", + "fc8083311b38a80c04e57d069661b273264310906781eb7e4e44c6416f7336267674a44a7c54ed6361b43ef95005" + "14e5d9e71f8b5c33aece756b64f3ed011922facbec7c3ffd27d01a853435bde551372806bd0c", + "b73c81239e01cd81b0de13247ca4e3528b87f3078e2b674a667430b1dbdc3e93657131e654a4182b4c4ab01a33b3" + "6e946f1fcc55aab06fc6f56d", + "51189448af53ae3630c06a167ceefe6b9b5eba746fb9b53f4b3104d2b15b6020fa8998e182eb9c9d6b6463939e50" + "723780f983733206ae6f11b986d95abe83555e64f8d3242d7e8055fcb8e2df8e41d318f06728", + "caf8957f9ebc9a88469c04089962487a3c77040b82661616c5d5c83e974eae1e" }, + { "e343d75de99e6d73543968437d3dcf6a", "317a5808ed5debf6f527a780e0896b2d", + "247045cb40dea9c514a885444c526ac867b1b80e4728a23b63f596", "323094c01e", + "18cb5d2fc5e27bdda5ba16f1320da42049759368548e5bd96f2dbc", + "5d3e88816daf20f11018456b58b2614050b93b222f03be079b39a9bb2de49f47" }, + { "7db9c2721a03931c880f9e714bbf2211", "27f642398299ada7fdda1895ee4589f0", + "dc5180954df0c3391a60b44cbf70aee72b7dbb2addc90a0bf2ceac6113287eb501fe1ea9f4c51822664b82fe0279" + "b039f4", + "6dd5e43033fa6f021059a353edaf1f870387693054d0a2360fd1f6941a68f48ba972a1bc0816a446a6186e4a9a2f" + "9df556bf709470137b8e60d9daa2", + "c8a7d9131cebfa5388003cc30deac523aa9b09d148affff06ba40400e09ca900db770e07cedf5cd0647f6723c810" + "ffcb59", + "2c17a7022f6500450e86c8afdd60d3da535c2322fdf84f3dc67429e6ad92673f" }, + { "bef8a47bbf0ffc4ab56ad5d9899f42b6", "3a2195a5196a0d785e04b38dd62f056d", + "5aa0dc37e4db1de35789398b25dc656d05cdc6737de4e30ce944b304ec752bbd10ebfa51feff99dfcfe26b8526cc" + "9b0cf1ba3d1685fb26cfc0c8888fd3cdf55577a516328b289eebda2e14f15eeb1d0f4207efebe3803618d43d9968" + "8e6c", + "a4a290a0d719b1aaf58f24152402b2f36957f44ea8a2d76b045390f5e0a3559a8ec5b2f871fc6095152183b7be75" + "65d4953b593f854b8477e29ce0cdddce5cf8739ab56288c26c81921f1fbae38b90b287b4622ca8b5b6c0b4b02196" + "e73ee56af6ae427ca7ae3ca0", + "0ead975179d64f2b927440bf9ef666ab921e7a3b0832949f31315c2931451c5ddf810c17ad0330073922c07a18eb" + "665aca01c05de58f7d159a74884f9d90cc10dc8c017ab61b820fc3dd32be52f3f7265e3a7a912a230b2a7ed19992" + "e693", + "f61ace25382fc3f88ec63eab23a6f9f6d1be65d149428bbb778a77428f909863" }, + { "01f1cea5b7e20db64a67502bb4715033", "7336701bbc2d766167b57c452d010f02", + "b3669d31ef8040dd6f462624977d69cfd1869fb19946595759b7265eb98b51f579fddce4bd38452fe3", + "d007e9ce654ec9a8b44e3655dcac889176fbf8012b133c4effe70b716eff43264d67d84a3d8504858c01002957ca" + "c6eb75d94635fb708343a18e20615e4ecb963bd98a8e7bee66520fba5c2991541c1e7863c1c97ae7ba6c3c34f116" + "1518097b6e75dcfb3aa3e93995eb39", + "4e643f7a1b8c0d595c8ff2b00c0145deb5bfa13d8a1b75d7a731f2258b690e1a3b2ce2cbacc6d05c42", + "8f33c6494f971462bcf82a508f341905b8febf9a9d25363ce853d59230d5e60b" }, + { "76d53860e1c45cf60d76d8336948e337", "579c0f0993f13470fa301cd4c6fbe99a", + "d0f5d2b3b824fe01ca36d00d47434519b2112195093a06d9d07d7f4f9c5b8f2a4c68668265c40d6edd6e12b5a350" + "e4af11f1ee6226bf307a1a6c25318c0d3aa0421edf565ad42d524f69d0fef06c236c1f0d0e50261e205f381c3e11" + "96dd8827b9990d674288f8250596", + "a7a77cc847afdfb9dc8ceccc621462302f31233a830b3827ca68618e604c95ba8615f6ebb5ff1c2c66727e70c038" + "554619f96f79d08902fc70111f853766a2db04e51d", + "def4fcb75110820298f08a8a4941434deccb952dec01215f5e7f5a2509fcb9e2a994a77d5eaa617da9cf2f03483f" + "aff5831506e5617707b88e08195b6a993219898c3ead769ebaa002934d3c80023833d7ce4a7a989596de6fe78eb0" + "237e8caab0a9fcd2625af80caad6", + "a4a60bf81cb2ce55df3c5864eac4c93d7748010a1adb6e5110d389e0501d7004" }, + { "cd05e08e14686623fd334780439c4ae3", "d05ba5a655bf7b1be7500f205c9c80b9", + "021c20518825c167a746a728578a0f470b2035c7b39c75f3e492bcc2e6e96035c4fff65dfbfa93cbc7a37828a0cd" + "62bf1b20b3bb89425ae647e021cde586f652eb98c98b1ac1018c6fe3e046f41545bbfdbf94dca48e465aaed8efb7" + "eab5ea143e5b95b72a078f8fb58d8ecfdd9a3a968e2468b6", + "be9255f750498ce672c877285e649318bd5bf07cdc5902b7de61a8415b6fbf20b1e432ebc9f8f9c8e3094ff6dffd" + "1b1e0c3cc5", + "faa851ddfe54b01cf1a3caf34815c6db0145ddebd1f34ca9edd479bd4a3bb4bac21c2b5d365ff4d389a764bcc143" + "6e51267ed3e4f225b7cda1fbf25d221d91b59aed0b4d20f71859f41e85e15a02e2bcd59913d8ae019d1f01ede317" + "b4ff94ed2b05650259a705c3b2be2c2a9c82a4809dab7b03", + "83b60061bc457578effce5462091e0a2b1f8ee35dbdb6a6b17e4e6179df6eb18" }, + { "6870a5652199e2f17407185bd7cf18eb", "942988922482351c317244b26587c560", + "49b2f6765f7f552f8704671271d703b3b02157f71ed84e64481be8bbd4f3493bfd3f313ac62ba4e9a7d86288533a" + "7bc7a4257cad5db04bb80d6574e473519eccd15cd2", + "6cc34a81ee984b436947b31574473e0a849a341db0ebc67f64efb39c9e118f65cfb25d1d898b4ee8052f700cb43c" + "be744d70b71d2086a89ad12dd67feceacb092a861ba80e41808c625fbdce017d51916e1fb5b38b0beebb27478d83" + "90ec79b3f3902a4ac22d79", + "82d3ae3aea3870e40fa48da698adcb596eb43fb063866f6231bb744b687e32e72117a03da08a635e4ed0f255f28f" + "3db6f0b8a7238d0244994a507fe75ddd17138b0605", + "a3feae07a737428751dc2c92301bc012b0d5c9c41a7543d248d6213a90343565" }, + { "15a87aee858f5723beb477b2cc039d14", "6ce71c763784e59fba852ae39b25de3a", + "25d1d38a8e9e8c34564abbfcba69035ce2f78df8626543e7639f2f23d742853e34880e7bc6d684ed3075abdfb91e" + "36076242dc53d60513333f59d139e680aa246b0e7e6092e8d4e6ab471459068c2a83b07e8b7969c911e3bff7558c" + "af02b3f3e6de7ae9122d533558868d993b8242b2328834a88cd656a941", + "26fde5885fd22bdcba8b5c1b5f66d09c7da7bfef2790e6dd2a98a351056044495fe4", + "2e241f3f96e8bde7d2b5cfad94461d6c7282405c77918a2a8731711175211814e20e72ce01139643f58a2336c05c" + "c27458f042ff063bc73fbee2ca8c099ff1f3fbe8517fce6cd3d54567220218cc67b4ef52767f75fe514e8ec49013" + "d9fa787685a5a81efe550248f342eaade9cd61fb5037634f2bf621c944", + "694a5b5ae2081becf4d38b2958d3557438b9f04dbefbe649baa91924e17e4d88" }, + { "23e2250df6b870b6eebbce928cd1a80f", "279f73beda18846d7170c29414590029", + "9cdd4e34495b4a03ca2c5bef9074c1", + "f306eb122b1907b4b6bccc77984ea7be4a28f9ca3615135d4c84ad74d7469efefbbff997bb495806a3d9ab274b42" + "28cb894fceeb24c4905e121efbd3ce8be668dfee4f9e38584ba6c3374337d3c884cdaddcd96f63df225ddc879e0b" + "a4bce0125dd0", + "8821c6d2c36ae97bef1b9d78c1afba", + "155b5b0c92176ed1a2248bc86b04570620e97a2a601a3d730d53236f43696c28" }, + { "82f02cd289d07f40acf9a1d2b1cf7f06", "09162f09c3893bd2c5e4f2c8f6ec9930", + "29f1d0e8aef96c9936eb5bcb32b0f751b25a7a46d4cc5a33d5f96dcaea757b2b", + "4ccb0ba7f1b2eecbe3dc3ba47f797201ca656ab04e5b38df9b95ef24ba02a5ef04a9a8122f954048581d275e", + "6b8f329fa3e905b7c0df490f18a13ab3b6be6701cba59a1ee7c12d054c500e58", + "8c97a1010a25a9e9047d4dded0235450f488d3c18b460316e5ef5517edc82e3b" }, + { "a28c7a79d3d7d7b372c5cb4eb66201ba", "3c27d1ca6e8fd19cbf2dbd81c87d2ac0", + "0ff33640432edcf34a2df2527ca13a0340d5adcae1d10589edbc89701f5093efeaf6d7d3f97a778052a76a6efe7b" + "37021a4fbc8205f26f17dbd0c68b60c6403c4160985255aeac23c3bc88b1d8c11fd4197ba366962c", + "96bec6c8014708e9142a8ea0fd496f89f5a2414f4296ae0a185b13f362f2", + "f20be34587afaa4300683655ea16a292bfc7f2779cb771e520c6b0952e41a2b89e45f6c4b571779d573f1383b5e3" + "11f71ca89379b8a3eb9d9cde72b16e0f782058e9bb4df4731cbd7c67af1c459061ccff149da3bcdc", + "d9dd91cdfc19da4a95fca7229f296a74aafc0d78b2b398e7dc089cfc6309d281" }, + { "24d66092958836e491cf974f34ee7ca9", "1c04e8166ef37a2a5d34b4462a7ca8bd", + "01a77fb558d8d94c16eccc82b49f53823597272de8e6df070fefd202042665ef5788bab86c70dc3e571e3b372654" + "494e552ef00462bf0f7fdeca8efbaa51f3da63e6f18fd13a4668b7fb1a89464a09a17d9ce709b0b8f079d6bf93ed" + "4871c0", + "3c082dae68ee1cd6b8d1ef79593132e68e373eec746d13583f28d42730bfa18ed77ee83ad6c3db24bcda6d5e2925" + "970dc01d1968b744cf3753e597ef831dcab728ce66ef3da0ab872cb0dedf77922a57abfb", + "47ec41abfe34c4ece7ff8f3ba179238f38f3e527d97d7f3f6ada79a9609e715cd0acec31f0a0df25c7ac0bb894fe" + "791cc467a098710e92af75a14e68d9241c160d4587f7da279deaa9cc9d9c5a6e97b231021ab2ba9c63473cf269ef" + "294d1b", + "807d350484ead90c1470efc0c6e334999b204444034151c3b80961faa4b821d3" }, + { "78f67aada609c94a7c79f2fe9bf9c82e", "9ad46b00946c799b17b683ed3d920896", + "3fc884334f762cede042a56b4a89ad9eaf474459371f2daf7c157a352cd5ae6d45662593bd3eaba7bf59ed569429" + "c52153599f02e3263b2784be00e52e30d0347553fe8aa70a071c3f2e34593d1e78692f9a194800571eaaeedcf297" + "0784426959e0", + "80bb105971fd223f89efae15ae1b5e252c7e1c761b6abd5509d8354adbbb5007928763e715aad67b2109ac60afc7" + "3e386a75084c77a5af1021ddb4bc636c32a70ee95c6ef5eea9cba0d1c944754f328208ff78f7b0718899bacdf5d6" + "e603e1b098acbffc83a86a0e122078338e0bd5", + "325ce1b0bb065488f9f74f779bdc433da58412b3834005b4661491e7d9d6c2a371560ca7d649093a7ab2475548ed" + "b37b425c23f75eb1bf79b972714469174fc85665dbe2af774719d803c2426f067ae68da1ae0783ae376970055cc2" + "8d484ecae2e3", + "5f755de0d9a033967a9d23e3357332ad9640983fc121cc9104c8e79b37a9ea6d" }, + { "ba4c7e6a36e4684631fa5ede07b678cf", "ed722d3769b33d82626ce89bb4d212d9", + "ae106ad8029d73ff984de16db70772ca9adec5f2bffb1d92e12412b6f76f855463f47f1739d6e9a1fab5a9b7ff3e" + "ad419efd7fd7b31a0c5b9b992aa8d0ad754cb5ba371adfc60a5cdbcae37c4653b9cf5f46b015d31a03e10e288256" + "7d2c44255c30f1", + "1955a221ff4b3f271876a4bc04cfb41449881f6ff3a7e9aacaa1e992a5218af3294027709c1ec594bf863000ddb7" + "d561ca4c3f42340ee932e71eb8efd1b7dbd19f6ef0de28d437355b2b4cd1527cee849a315fc9a35ecb6e458e4af4" + "df07a9e108a0", + "aa24653b20af5925a19e486d0b28e3bafdb240aa984c8b365792443a5411c8385c8197d0a13f1a8a7686c02cc0f7" + "adbe1230736362afeb3c0ada988dec6d35fd298768866f64aac8dd560250e27bb1007a3fd4c312a8ce3af4af9ed2" + "7d5859ae56a3ac", + "b06f562123bfc9c4e36e2299da0d6987c2c191c2486ac2ff9e2baa156ce6cb81" }, + { "639668e0b0fbb192b83f870048d29c1c", "48ed7de6da13ba38a1e748eb9ea57529", "1ceca7", + "604b7b904ba56e1f2d17556236150e5bd19ba125f92e9adef0f75b38356fc9a1851ba34105805cae7e99dc7bdcf8" + "744c44f06e709c345cadcffde348d2d55c5c36cf5ee1f288509e7a878dc00daa3d9593afafd7a0d94fa78960b3ca" + "9fdb2b7d5746d1f4702080fadaf0cd6785373a16ceed056641aa4afe725e", + "0f5286", "b6b24c01ae14d452da68d75693fe772340ee1310d329281370c6c54231372be2" }, + { "94b94725497880ff10d89572b62d1029", "bbdb56d8112d298fd5686b93787e0011", + "f062bbe085b5f49ae4064f9ffd", "de189cbb1821775cb97888f25d4781ddb82d4664634f41", + "d317f2a31eaa3f23e84fc3eaa9", + "5098967201169e8ab8242b8e09322165127ef2155795f62fc1e55e6a72363fac" }, + { "8e6f1217eaf84aee8e5897f5860f184c", "a4e099068ad0b67f28b6902a40921dca", + "53c939f8d167e49980f8fd3ccc4a2ae3", + "4bb7fccecf15f0b32be37860507fc53812713194e2844855894ef916abbf9b5d", + "92e47292a4f02cc22d3392d1b6a089ce", + "a3eb3e03808499409b00f0bb635c6fbf12062469edb45f5bb252c08748e131ed" }, + { "6968acc00e83184e6024167672c5df8a", "2d5b193c93e8aa5302fb5bb20cd59504", "bd6b6830", + "7f4e725f4b0f84454e823b8193f1d8b39d78a8b12f1a2250beb0def895dd0aef8960652c071a82d9ad89910d9728" + "7e72848fba1623f441d4955a019f5c1a955b054db858722b1f15210c3a752fdbd2bd631620cc56c2c30d78ccb162" + "72eeeea1", + "c01c9b02", "9910104c7d6d91e99c167d027c4190701a21c2fcadc9874b1744cfda7b75b8c6" }, + { "1e7e0ef737799bb1e00ccd4e31da5ff9", "9d1111da7d3d329ab5d824404e4bdd60", + "76cbec797c2364c6ed70901db527c6a3471a84f8d297c64c9dbffd7c3204503ca6e51c8c88757500ed503ba86d73" + "67baf6b9f3f5f2b69308bef97232e67698ae10896ed70a66a7c40115770f3192b9168f66a359270c753bfffc5496" + "58fc7aba3d3943221e125a6f88e025cc024b753693", + "7e6c97d0fee9f249c7510c2a0abf9530ac49cecfffe2ae37c9d38ba60cd012d3e00b696ee54591", + "b04070df9cc5d032d1914eb69f9afeda61559ed98c7e5fbeb81930b242cd30cf097e4130b0cc45b3e3178ba5ff25" + "98493e1d1fe22fd14f3cc2de08fd8cbb3539d4c71c606adb7826c2a9e05ac36a6795293cdfab6d07fcfdedac099f" + "1ab9bfec63a32f7633e424e684ca8744b4ad2288ed", + "a0b933e1a706046c38967971e50c0ce9ececaabd188092313c654e9f297cf18a" }, + { "6dbf15415dae57093e6774f4a1b7e4d8", "bba38b490d740d7b3df0c9283d4a530c", + "fafe1562e69a0f5149e0ee65d14b42098a8a53a58d2cf07fd86f6c64cc4e67d9b5cf3655b5ed7f722d2073a3e9cc" + "8372efd9620a32d6443a328436dd5ae394700ddc171bef8cb0674b1fab87b3e93aa426aee92c7ff733c33f9e4e49" + "f614043a7fb42cf657e4e3c2", + "c742a929d2a766dde0fb0ce2d0faf790bd6c5feb63cb3126402aac7ef7c9ddfd408cd22bc6928a9b67426e20c3d9" + "b340cd7231f87ffbc29a8e6c23602b9dc434f5ab06bb8c049803b45cf088b919e8584091ecfca7259e0d130ddf4c" + "a45d44291024446f58f1271f", + "d8dda53eeb8b375930698379836e64014c22bd885b5b5cafb4dc65ed00aa947acb2792c46dfed8ecd155b21cfc98" + "ff163b403e3a9961805436678fd34942354094bc47663165341ed0b949c0ecb4da5499c1c8c87eab99ddfd0fc2d8" + "0a9a520461e3dc402c3d4b4f", + "f8e4c1f827d4c5dbe00e7794effc567089b8128a5b11e3c6c2e5e36414b4618a" }, + { "a6d38f5cebee041a0afe035caad48443", "cb7e7813c7018b25782f77e0ae7c84c7", + "6ef6c5d92f3acf78b3e2c8334038f364a51193e4e559b1458dd74c44269e69a7a6af22f531680c63270b22ee7154" + "7d72abc9b87bc5639a1b3a13f8613ad4d1742e8209ab", + "d536bed277bbb5a9", + "457fff7d0e1b61def59fbe99e81c08bc370bcac0240c9cec6d6a0de2c37f9950f5b2d12b8b21126af18d757c743a" + "2a9bf451ebcba235f9f48c31a63674f0e8a1c5af5094", + "269ee12821b981d794399bb759d233db2d60c1dcbc3a9a87dbb068551b032f1d" }, + { "753eb1d49c102d1e3a9bcfbcb1cfa369", "0e0cc4395844d363ceccc8a07a92a2d8", + "5166ac0bdba2b660af164fc847e4ad300675cda9f0acda47567f7952eea7084832f6dbfa0aae9f403a5bbbe307ad" + "40845cb08347588063ad3f1df766790c023f160ce21bdf372fb48e0f7e2ced50cb3f86c2fb257ad7863fadc5fe69" + "92bf1c4508308b259480007a628aacee94c258c91cd847f3d05251dadb96", + "5f590a65034eba433e57a9d089b2924f5f8482db6a467ea435478afc", + "f2fa7ed4fccf0388b7bb291977d2214d03dd30c4f81bab2df8f2c1cfaa46ff2fd14733cd7b8fefb6dd020ecab3eb" + "478d1fe0b849e057512fe7b897b171771a2b68d7fe6d9b70dcfbb6307dacba5409b7fdafc49752e4392111474388" + "afb6d79ed21a60c59234bafad676f88f7653765b4dc758c9fd930b2632a0", + "352c935b482696f9a4f40de117ac4efe5c38952c8a45e23242a86c66e79f7f4d" }, + { "711a437629429db2e14058e2a826dcbf", "eb036d6e483a212ff6ee25d970fe1ac3", + "29937c0efb36ed27fe7709d7179b4f38a2fc191b5e8d9616b58f6dc9ba2ab74e13bbdcd233e8726d90f7ded06c38" + "61582f27158732f997df9091446befe75855ab05b348d68f96e45445f44c31e9ba3e4d7be96d9c8e806535e79079" + "139c71fcc599fea8701e0c2edf606986eff1535afdfa51d1be2dfdee", + "", + "4a61f5d6b8e746bf6fb49ca2b16c22f4e9ffcdc89a3137b39bf5445fb6b989d5200f0c8d5538891a5e8979b5cd8c" + "734128b4e4ad98b0cd598c40ec9be74725dbca84c65a52f17ac983330b0b74e4193540f6357c3bcde4e8d8fc6942" + "314ba68115bf2a682756e3c42008803a81532708a0e7b5e3b8436145", + "4af113e2b6165247c2760ab445c6985306c81fb9ccebb8df0e57b0b044c52736" }, + { "a26d6028473bf7de23851d00d514455b", "05b87c16ebee8bb62365d265ac6818a2", + "baeef99e6d4d15be9ff68a5d94aee7afa3d898cf42f94ad572b089659708658534d198dd3fba47a48611e8d78da" + "d", + "5d77dd8066d3cea3b0762602ba6ae3d1ae1c27d1ebe70bfcdc068912def545362a5bd2", + "e4365eac2e7b5d02e7fc6c110895bcf193a0ebe28e81d0f6128a95e3e9183582ebb964d666972bd7fff8cd3870c" + "a", + "515045f7ad90ab569a6c8b90808d64346334e71d03db18d07d19f40b2b94fc7d" }, + { "9bb0e363275374f1771ababb7b96851c", "08cf3a6355ffbe621ea874e917729d4e", + "b380355f794d31e6e85fc81a49fdc2af2104471609692f94c994a710be5cabdc9c9a61b94fc3f76927c1cd5c9a53" + "55a0e8ec55a69ef114b3963ec95137b9ff84240c2a71d3b3459056d1a183eae21cc5a7c109e937faf8f61b6232fa" + "30951f030047d7555b60f85a318833afcea80ee4d88a98", + "a7fc199cb07b6e5e498dbe590af4a4d95d35b043a97d52e11cc1092c70250112e070e49fcb8a3e7bbfca3d0c4467" + "ba332c0dad277a997f2a603fd2d016979c24b3870a", + "f8ec2722a9aa97d0cab77f7833e6bddc9570bb79a159feec2dac9d2366e7eabeb9d74ab53a846fd8ad052a740dba" + "39801b681e4da903939387ac3578eec4547dc97c43a8824db11cdae4e7ca8330c9a2d4249853a7285c54498e59d6" + "45546a5bb5858b8ddfe37a14242d9750b02ccb41b92bbf", + "1f6822430a2fea84595ad870c833951814a0792cce0cd414bf9f744bfa7c9f72" }, + { "7458fcb1fa1a886924a044eccab9c5b2", "30565643aa9bae844b87bd459628d093", + "4227dc17d3e0ec8363c84b989f72d235d3991e57ebe8a6fcbcab1053edf3b323cbf5f5f45aa142494ab0afe78c", + "d07afef73f3cabbed475b69fa30aac8af674b74448cfd4d6ecb0c5c1b5b58d0c7173eaee440be65715d780d61d34" + "6dede7c52724bd76207ada9a3707c1326dffefd04fb29321db617d12b4a607452a5b197460bc524a40672628e5b9" + "d45f821a5b", + "50c568868de4b49df40d33e6b25abd6b2dfd2f22bdc12a18ee2407dfe82cd3bfa2fc344c91ba6544e079446073", + "5d9f885ee5dafd1ef4a2d0a951941f1d03acf8adc3652ec34e5b6ca4bf7ed18b" }, + { "68df4e697e83c55c822bb3637bb52d54", "1b0df23e69aa907856ccb9ca4d6c51b5", + "59242d6e2d7e612d2aee7e8c08f53f172e0f93d57b0c08e7cffda90da5b2703eed8192511f6f1bd59e9ae781b4f1" + "156ae06ec38b5bc1f5dddefee49f561d692f832030f7a1b506c0ebe26447b3eab68172e7e7810b13d425f6c78e1d" + "6591cb4a24a61c5f9554a083283485175c18cf5df4ecf2f87c98615de9ccb3", + "fe9643236be4e7aa3998f44b4336a4c1f8fec28e17", + "46e15eda413037249e584ea1e3007166d70bf9c998ca2a8386bdb8efde70f3bd35a9b0877e333451f7789f4d8b4e" + "797170445eef5f818bd321574e66b7881cdb546eb5528dce75cdd1683e715b2ac7ad259954bca62d8f0f0066fa6a" + "df50f9e13dbe3ca1e503957cb5f8a2dfce0ca7377ca51989e3d8e5275893ab", + "6afa564c9f5a650cdd7284589134c6c1379fb798af9330bec354ab1221539e86" }, + { "a4b06bbf87393d2b921dcba697274f07", "5c14d51c52d95ac040e1060a0ffa21eb", + "8c85ddd8d3f446608e656052062f0cd58e6d58", + "847d3b95895426225d08865cc9a329f6f14e63bc5a66fb6f2a05bf8eb9bc8166e6fef29e1d573acdb4c3bc699dae" + "adff7df5d6e8dbe2ef713008afcf9b6e97ce6cab4d90594fa4430ecba5bb62a7938f03d57869", + "cf6c47fec422ee29226b6cbc5092bf670b5434", + "0d57758c68a9524557fd6f6742d24a00467846456a5bbb1271e2a5e8c3ccbea3" }, + { "50034800a878a3e570364540fc862b77", "bc92f50c2630f7fe354399fa9a6fc48f", + "23a93e636d1924a60f3461de1020b73ba18fc3854c9dc9f166d7d4d1912503bdf1", + "23d5009057b76a00d92db6b280a3a30ba08ba3afec6312197f06ee01dc4a22d73ea010e02b65af7968d8977f9762" + "ff5a6dde278d8b351d3b8efb32cf7cc8a70a7a8b3d79", + "2cf9f00b66c63518354ea59510c178d75499866218eb5a031a0dc4d743ac8c05c9", + "7681550d340ca003acb18bde30e7a26b23022f9e71dc0d7801ea6e9e569784f3" }, + { "d68448b73ae9bd161c9f1f36dbf6163d", "3345d820331958c63dd7a129d3ea0de1", + "ffa236070dc5b464eb034a9332041a014cd7852b498be2dc498dcdab4151d71f47c7a6b17a176c5999a7574fab5f" + "f469cd02226492a38693eb2296a4a7cc2857b28b5b61", + "c790bb04036883e6e4a6912a9b0afc36607e12b0d457d4b5f6c120cf0c009caa087fc2710439", + "1474d60067d082706bb0cd823b22582ddc0fd68412ea0e399b03988e616ac5ca0a7a8da6e6fe29292b57046c289a" + "d8a52360ecd19655bb801c6eaa2ccd66ccb14c4c3748", + "a1d80340487279787a1dcfd1082fe04d557c072f9b558cc78c956c1b06a0683b" }, + { "519fee7049473c7c41f3bcf7b2f63a69", "be227d2bb97f2eef62d5fd9203cb63a9", + "0c121fbcfb4f4f8f150281140e49d71dc5ed82ac4a30263a6b2d92c55ac6fe4f43f64c0f526d3df642c04a5c51e5" + "8703c381701b1f4618cf66e27c60dd5e6558b48028d5fb11339c4f2547a3aefd8100", + "9ebb3c33eda54164b54bf95d4fbe113333edb0fdd62c24532fbd4cb91b11e08b1e74487dbb0f3daaa08c566e759d" + "53ea3974cc3685ec460e608f7d01fd2dc23d9bc283c73ab492bc9fa2ff458d268667504cd47e585826", + "c0e22cc3aa610bda350a2ebe8f530c05cafa19e7060b064c276a06f0bb430b79839c51e6b22aabf429616480382c" + "86f8c04ea397c976bb08caf8f35c38208e476787ce229a7a300c5411471548b15d9a", + "7891d41aa7d6f935761dc0454a7919d511f629fdc3f38f4932eb0148d870a24f" }, + { "58bd2c73aedb31baca592e42d614c68a", "bbf76585731b6334fd314e771d9e404f", + "d238c5f0677c86c001e66691ea9eb8aee429fc490d38abccfed3a546b5f05398288e7232880fa3d485fe3862c546" + "9f980d9ff4caced1cbbe7f97adc15b6919876b8cbdd35320a20eda8a1ad6e853164b0e0ffb2f702e1d6a0eae8b27" + "577bdd4e5a17e6d8", + "86147d2debc30111b82c1ccc41a13dab1aff144bf2810695a40d02bdeaf519669a1b81864edf", + "94fccab0dce48d5aaf42ef59764cba95b42410e2d6b2c87c95d8dbc15421c45d7a556e25296df9167cd46def7d10" + "602aeebd0e7e909c52ab7a22f833e976fb76b9b39b1c2889587582d44ad8f484f0382804d7481f1a8d6c903b1319" + "0c213102ae273378", + "67a012ae5452dc293645179c0fbe23d2f79ecf435e4fa09208ddf8bbd8bf8b37" }, + { "a27d07b0976574c43edba5619b3c1f27", "879f4114bf61f1d7b487bcdff6c90778", + "302994dba80c2268f5b1c77bfad0b780a9be6437a07dcf1fee61e8e72f7fd3ceac24a01be486a2eddc901a19a0f1" + "0eaa94cf46b604f98a90c0f62fa6476d27a338bd046fffc26570", + "b97a43027c5dcb8a95", + "633c76783dcb88ff677a6f567685ada02d787eb9aa3a527a45fd415180f1fc19cfddcb90583621c2609558703c7c" + "5ed548650c98e591fac7a692b1f921284ebd8b86d3a1f26f1ad2", + "1f54a298784b2ad47bdbe5c982b51b2eb5f8c96bc4b46a57dd703dbd7e1b199a" }, + { "d55658dd1f27af02885d0f431fb2ebb2", "0aba0b9dfc9831aef0203bc61a601176", + "05805491b667d9ff38147d96493db29441e188243f72668c7ba61b", + "df403489e3bb67eeae8440569f6fbc1ae072305f5047c5105a7e4e5349d3732d75572298253f60e3821c721941c0" + "2dd761edfb081d09b3c7528a0e786a6fcbab709727e7d614ecc604def19c78fe061040bd636d842b16e96158db07" + "d6c2521ad54778acc78f12b450db0474ef700dfd547f9c5b", + "2e8adbea0e9ef5068fc3abb39ccef59616420d4fa038e2f35b560c", + "d1f27edf1046f8ad30e9900c43a317744dadc934e6ceeb63184e0663ba80df77" }, + { "adff46e4d7d78b3db5c74c712534db37", "c54185637dd281ebf672393cf9bad28f", + "b3850ad942e221753e4bf30140eb5569cfd9972246b9a6a35f7a8512db333aec59d380973d6a6505d99cb004dd47" + "b33e32f4f238b1342e6756d3619414c31bde45", + "59bc7a834189b930c8cbff769ef63b5e1a08c352ed779853b36bcd3d0ca7b4e35bd6cdaf2538ebf0e3a0d7cbcf3b" + "cd2b66b910967c226a1da42f84c4a8f81e19161c6593e2c0a0fdddd3c6ab3a864037fbf976e8aebd33d4450be989" + "3da2e37e728916b663944e3fa6ba543d1010", + "5cc93a30fd8f71befd87fc50112c156b53abfc97466f36e3315915a7d4147f0b3641177b9d08ec13e7315957d078" + "ec73eb0a93a3b7a51e3db63a396e6ea2adfba7", + "9c14e5bcf26a00fa0bb04256cc32736d0f2300ea93a51f8e4ba69d15ff11121a" }, + { "4a5d7c201ddae018edc9783413dd0329", "eb7e038948d3bf61d2cd29d2fe722603", + "3e6a17d47db58690b895619128645a2782d17e9a3735c1450a7c8e13a9f212208fcf256f", + "65b8cebd83d3197118fe81dddce22b3947653e04a48d05b4a2dbc42a89e62b0d6b61d5f31487af", + "a1a858d13540281e1d0a9a82e3caef64ff742e51b1f7476d318729508a68840b371fd300", + "62b25795c2cfc4d7f8c1058256ed2d0e73374f8e33a106319a67778387150217" }, + { "83190fd90c68cf63648dbc5daa442e3e", "3c3683fb5d3f1446f8c0d0127fc59d5f", + "a5136deb0a795dccc18889c23e9bb21640864981a4ecd903e8fb62", + "13066ef4f97501fe1854da6e2d57ed43e4c074ad45b7218536e7dd8368a4ee8c6f2b63199fc0a9a679e2b198bd3a" + "43e6e8bbd6", + "0c8cc3bde1f4933729293718686301b1ce50f5e7521655016f8432", + "cbfa761976091ca1ffaadb4278f141f83bd6b5270f78cbcdf61018a744ae2fe4" }, + { "05bed4c00afcb8ecacda8daba02585a1", "ed014d4e9eb504c70d5d3153473dc146", + "6fab5ff04c5a74a0a96948501de9167597a42fde4c50ab27719dd1e2b0e0fc0fe6e48e97c79d2a71fcb5e7ef60c6" + "7a32bf865decb39bf5ac17969177b2fac849a38e08bbaa3be0d6dcee9ff685ba97e9b54514624d51c270065508c0" + "3e96f28667e3c79f6a68859a85048301779da7e2254b1bd1662ae3ea15e0332c", + "ebb614315ba4b7d69632656d5a4d2810112862ea3e443148100bf2e89d059bc9e2d9563bf34b823c57108ca9a88e" + "4b07441f0ceca4713e2af56f40f35d6f2223d37e9eeb61739a65933712763104a67488d2022a5e033e240969a4d3" + "3966b4527035eef0970c69660ab3ee5c00ac815a9ee52d767b0a937b", + "6edcebf7ac2cd10be8a9a595a00e68e2d3127f5de640323791229141caded658e99fa59539077027ed7b7a433a79" + "4bd523ec59f504978964d3e17eb388956e43395ec89b252a93b317c64580426d1ab0b633a972524084be5d488645" + "8718ed42f47967eddabdf7b2f440818e0aab9d932c10a4c7283d05b84ef74a6b", + "7be2b003c341d5a7d1a7fbbefd6170d8be25e785230bb6adb70785416eabb281" }, + { "53e1b8de6176c05e04f5a4787e733b3e", "574de8c0f914115c9267f7852280fbe8", + "0ef099d6995b41d4e9227c3aa59da313160afaa32e1753422c1eb45bf102e806aa996a54606c78320e85da74deb3" + "9e8b0059bffe32780ec784abf6bd540d3c01e9f13c4209bec2", + "3d9ca3718f31b4f37f988ec676fc3b5492a44792d1a4f8fd7cc4726fae899f102841e7f5c04b2ae2c5f9eb204c5b" + "74222d89c2bd36b1500b2dd81e9643142becec1b88aa7a0d7ea4c81fb7e8fb37ec1a58e0383e", + "5cf9292077dbcc9557a1cef51de815facf02a89c9e29ac62098c8e4d0cb49c4f55ed55dd9dc9c36a634ceb8f4dd4" + "75837582b9be1c17030c0546b335be95fded1c416e4599851e", + "782baaaec2b50b6bcb07d00c6eacb7fa8ac084113bad5a1d6dbe8c80340443e8" }, + { "81118e9376e515a93dbdda15e58ff387", "75a0f02a8e78a0d2d0097cee863aa576", + "f30c353db4dcb2320ba5fba118e50526800fda7ebabef05bdf15aee5d9b70f2ab697937d77a01bb4bb460fcc4233" + "acc3b970f4f434e9ea85f30aed7d247115fc5db1c333ac6a008dfe65ee02b930ea097d046f2923bf84785d47f382" + "b19651948d69a6e4b861a7112c4e1804f6435f70", + "6f75857a795e6aff71994dacae41c2b2d9d6d7e67fbaed6d2e20bf89da461f509ef3d284341a8a2059ef1b97e9e6" + "820f1a72ad703e71999be36fd7156d3e3f35663eb4db44a858e08bceb154af51360feadf3bca8f20", + "0376339c7324168426dbc1f36ee91603f844352817b575ffb25ca6a75e2d0f0d77d853230b7e5a4823195c406298" + "bc3781b40df001d9cfdff16de970df4ffd0aa652fc7732c6311e2665daad93bb2576d43e1a58837513c62a8b74cd" + "e75901f9520a29a10e4dad9e4aa981c5e72d6cc0", + "d5db09ad858cbf4f860e527aac44bafedcfb01653818baeabfc8efeec0e3a9e5" }, + { "2d60824c89bbeb4e2b72434aa0356587", "20ad2c51679a7246ca6d0a47ba7292e8", + "17aa9ed83ff674f959085ecde2a6c5026325265a143d2c772337056a3c66abb5d742f33be39697194fb1", + "283fa29dc399d07116e43c85eec0adc8a76221669a9bba6554f8e828b680", + "40fddfe3b15925fe189b25aeb6616538958d43f0c64806f6286a5efc8a4faee98d02314eace7619bd2a3", + "4d9f99a5248b8c7ed7ecac6397969bb92799a3e206239bcfbca54ca2b2325f9a" }, + { "e2e2a29db958c6a3f68a52825b844c2a", "3210fe0cede911318435fefee1d921d9", "45f5fc3a", + "91209d1202574e", "2067b789", + "8869621138c4b08670fd8b6ede57933e4036e9c2a635e367f12a4dd7b19e1d73" }, + { "24affb4e364dfcb9be823bda04cdf045", "d7db8f0fd20b87ea4ad5e85e026b4b42", + "296e2b8040a3907fbd8789f660f85f3b49c6050092029a2b", + "42f31798f0016547fc9126a6919c14fdee91bc68f839dabb24d2249ff5e001b6a2308b57bfa6baa84e635123e8c2" + "110c", + "3af391d72e60751b10d3f009814673d64cb86a0dc998cbf5", + "388f9d6b3b3765f7361cf130f3418f1d81f3c4220b37046d82ba47ba252424d6" }, + { "e8d14e976fed8be59625b034419fde86", "1d3a06b7b80217caa5a4e237c2b94549", + "fa2d4f764e7399bd346f60f1cee797a9624809373daa3803cdb12717fb48503263b21ab1d99dfde20d588458993d" + "8c33384e897973a9dd74bb7e308c8fdd6a46a9", + "8c0c2e14cf2ed5c7147d8c50b4c28b232a80247344f21a61dfe4065fdc559200b7a0046e58606e3a3615ff54bb60" + "5e7a5f001d215de255ba75366f6be3dd1fd4858aa9e8904ca99647387b1a17c7ff", + "9427f3a18a22e801a3d7d863cccf4fc8dfc23a51bffab61235e2bdbae311ecc321db38128730818cec04f51ba5f0" + "c3e6b7327402a2a63c95c184f7946756f2c94e", + "70a800b87eeed41887887449465656d777659f183f9cb335d2a253fe09816cfe" }, + { "73e9b0ca8fb59181dac10130454e3a7c", "81c9a08c95fb942c42003aff680b11ea", + "971adb65be3d885bc115724cc33a0f53aa47606e7bd5", + "03cc2f305af325f4fa14de7ae8e89a03d040e812f0f4a7f82d72441d83b85a424f3ebc34ad", + "18ff36eaf9e6f49530db6f886fd85a77d55289d85fcd", + "0bde31d7323ac029d9900c897aca4b0d42f33d46bab1974affe35a4095139184" }, + { "59f15a1479f5dbd9c1b879475de9d2e7", "060ac95c956235bcc003dfdc92da5d89", + "a17b5ffce4cc08b23a8b8cd7735e11822f9672691b4dac380835729694f39da377e4d3fd23ef7b8b40a355e271bb" + "fbb8cd632481c7cdb67d99d314609174b10cf370fd9b9ab872346c631127f873573ef61776bb8e154b55bab6d845" + "44cd8fe5f7611840a057", + "9faf2f97e14d2be029", + "3a4986b25ac4ebbdf8c62e74790e79f860c5c131f68b540a7a9f0504cbbc36b7484fe76713a53f354f4970613a97" + "6a4cc55ed7480d5c5acf876977b74e622926c8309b65a5edd3ea2ad7c2805f2859ce1e2805577d409760b2cf8e84" + "cda7097478491bab3fd9", + "81ab6e4c949f5f8552f8a5f067073a0563a4ea6a9ae83810d76937e1a370cda1" }, + { "5dc5206e6145ce81ffbce717cb425955", "a7a6fda319439a67cb679b3cc6076dd7", + "4244fc95829a69089920", + "92f48b403ce97f87118605d24314981ec34b958ca0036f0b6acef5e20bfddee370e13bb2cc676dd8d4547668aacc" + "7dfde6af12727789f6ef811e63b391cfa9c4a68ca89e6bd978f38f9228dd9c24e968c4e59e3d34963d6ee942f788" + "e0b5625ad95bd3eb6ae67ffcaf2e4ee9a9cbbd15c40385ae", + "adc2915b7813f367bd80", "30cff01d2431cc61bacb6445d7e3e604de19ea532a2db3adcc1a978d9cdf3dcf" }, + { "8d88268afada2ee19bdc754147d6b04f", "119588763bcbdec984a226e9dff179ce", + "04deb10354489349a273c5cd5d02ee1d71cbda2a20743bdc2cbc48788b9da779ad2f3f1dec4cceb3132b2e4a1c43" + "02c8f9ecd1d37fef", + "0f32a44fb0edff2f0d2334029e59715f5fe2b8e896068b8488f43b567c0d6fa3de5bfa99c6c8f055e3889309e088" + "22eea3a683d6907675b6f0072438be", + "bda6c7381492f48849c00a86ba72c8162c09981f593547682b88b7bc6e051a9ab9fa1602e879b8f1e5145bb61925" + "30e7faa76be34dc2", + "dac7ad31ca2f77427665d8255bb24e7604403434770869ee202598e649950dae" }, + { "0049493db4ab12f83fe50f0fb2a88961", "fd0dd2556a03ebe50b41446250d56e52", + "1d3139deaf1046e234189942c2249a7aee9d644f934e6a203a8a69e7683557551dfade301cef8abb29d7308c5a28" + "93a52ce6b1493bf2232606e79c0ae51b0a55cfc0434f2e669cbc56fe7176fd04a1278918c14791e00f88de41d563" + "d3", + "4c92be6ed0634323014b9ae5c9401f751c5b710c12df357a694c1c25d906ab3beb5bbaa002208e787f448dd0cef8" + "4d3d", + "dc3bb7e4baadeb7c32f70cef3144d04ad199ec429ca6b695f87f997c6e5db58e9d60b34d89ccfe49d5e62c267a87" + "1ab7818137f523cde68036ad1d8f7db0b80286ceda9734b32ad73f7f0eaf8d19c80fe74866c1cf785f44513b918a" + "24", + "51a9d0fb861eca8a334632ade9f37e319a283d7b33cf0894b2e4e545d01afe75" }, + { "b6279f439261d1dfa4b85151caa60e75", "d0b003ce641633d48413bf3bbcde6b5c", + "39ee6f13a66b4ee74cda034a3bfed3fcf36f101f1e5b646d1c93e019174e4bd850417fcd5755264476124a5ee8e6" + "8cf2fcb9fba50f872fb1d33a025f8c572b4b5ff034d9ad77ecd33981bdfe3e9554253522", + "c635cbbf8eace8f911d093544536f38fcfa14b78b1e1eb069c42a351cbc70b7d1f5e93bceacadaf0c9198d3b2ffe" + "54db45cfac70c05d4aecb0c801194642cc070ed223a9e3b65b735af796373db7fb6e3285ee3fd3579dd74be0cd29" + "37f6f825dc3bd77ff7674b06a9ac", + "9787ff29777e12f86c7281c57c5a345278fa96d8fc6ed949be284bb79f97b34da9f256a6be673ab93829492159e7" + "ba1a19dc727e16ec57e388447c6616626c6af3412cc70432c3dbeafa35b044e7e53456c1", + "9fb598560f6e1085c32baaeb48e643f0ae1b5a2c3a8ffbc0a9d88821c893330f" }, + { "81d8c7bf41cb0e54fa51899660637877", "044d29eb40264aa36b976a766108ac88", + "4712680db09039894cd72e86db111d63c4bcb62058f84f83ef419cc21e36f2169ca340375ff69f9280fa60c99d86" + "a03dec4673901a7029784be2cdae3f63590da312a448d24eef063304545e553fd01ce6ee088e43c8b02c51b155ba" + "da983ea1aca4bad804406aad3c92ac75ce4c", + "897f0ea8d69b962913a9a59ca36b65aa7aefe39d3a", + "1d5cff8679946302451dc9aed1c601ce46a6f31ef17a53af6ab130605cc2a41da08c932a13b72983ba8cc5837604" + "0cc17e3182993dd593f4fc8f2965825173656325942e97db98c584ff0bc913633888a0812ea7675d130d690f9fe8" + "d6eb7f1655de1938fa0163b02c50c8a122df", + "96887b58e80e7c7716cfc5ef37c2b5a6bffb401733b82a0bd31510613f033a05" }, + { "8d35dc035a1039af8f3dc653857cef8c", "a0df1b717a186cfe86a0ac8343e80217", + "572bf5295915e7b2f817bd137a6608e09fcb7bad29887b9209eb29e944f2d3231717f9a112e68756948c1fc71dcf" + "6245a0130bbffeef74ccf3ff3860ca5a23753f7539b7a268fb08434b73ba9adc385e6f9ccbfd213f812d7b64d8d6" + "d7bfce1e236c5fd857", + "94714396e2dc4bc13a6d628563b0db14e189695810a4925a90826de63327942db0508e7453", + "6f2364c357e257e9b412018a1c702f0d0c1170751393b1f73999f77927d4ec1454e78eda131af56b1b46e348f877" + "5e6a022a746b31ee135651bb2a14e21cbc3f333c13df02a3de6d5128ff1145514605d98e984c28dfa89cbfd2f0d8" + "bc41af3e4c73e7ddc0", + "8df601cc113253733da78d2f06eaba71d45d2026e77c30918ff8c176b54f75a5" }, + { "4666ffed66ee2dc3ed18e6345384e828", "8c5c38610ee79b818c18e95ed2baf026", + "dd2baf24c168f99d1868712a43dfda4717650c26c36378127800d8cf", + "196a5357a0d6c588acc29f85cf38b78b61e0810feefb965d", + "a58828aa09a6f25e7d4775ba7a2b303085bd5fb43cd61bcd19c8bb8a", + "3f54d97c03f05417d44d62925d9a0e2c457fcc8befd1c388499c3e38bf89e163" }, + { "2d5464646342ceb3039a9d2fa406b90a", "8f045fec196343f938902e1bf706e34b", + "260ab30c42d3356dc39837b28f6f387accc2527aa853dd58f54426d52cdb9ffc0a5ca5a5c00761a7299e72d48874" + "b46ffe18dfaf38f19cfad76d7c9cb4a4cd7784cfb125a58673972b4bb8c894da2a8969f68cb27fab746f8d62fef6" + "0664900833dfca7e0be03eb5908f12e74bacda9d35b06e", + "d4aa5263a31fcc8ccc9e1127f7ba6ea2d3ccc72cd7e98e442890ad3f8763856d90e362", + "51ede001d1e4ca8a3de43186651a011cd14f4bf93e9375e910a8974ea411343b68e8f6ce80cfc945ae7d9c5adf76" + "e1c0f93de8f5dc48f36b82b65886776f1298b36a2f012140da048da77e09e4d57426abe2b894c425aeb2050b0eea" + "2d8f8255b733bb814abf3ef3d530d87dd7e1504bd683f4", + "890d5d33a9dfa3807e5e20e4824d13fdce5f7ccaeee1f3448a4b21a085277370" }, + { "723efa25ce1bf1748d86d9da611be9b1", "aff260690905ed2e8618c20963e4b7c9", + "f7e3eb593d3966c015d63ea0e9211beceb8fa6d9a202bb4fd4128c3177c5", + "3950b62147fc16429392d41cc4188d5c82537204e93edc7abfe7ce3404f9aa1474ebc4acd8e18aa652a87ee99c24" + "15f9214963becd44720684f67aa814903cde", + "9d7ee643a2cec28c467d2cc88aa539341dfbc82f72b5d940feecd11d4a7d", + "eadd8931af484ec1f3c3e18f7acc0dacec73dd80836e03957b595b2022c8ac21" }, + { "784197d89800aad00105ff7487b6e5df", "fdded94dfbb72c77ad81b2ccaaa2de2e", + "b14ad4fc08d08cb0601289a7ff9127f26c4036606a50bdd2921baadffbc75749b8ca33ddf7b6ac", + "b82cbea4eaf532d52046bf0bfaf22ec2", + "a625b4da553686296d5c6f5ce526c4f84c4af779c67cd328c16a7985c9a28737130da855b1f3aa", + "1807d55856630efb2794c74810522703b71bed188d5d918b8d265fb12a8bdc9b" }, + { "4dda1ff559520020513e0a8e554da28e", "8b183c7e23130aade134ff8e539d8053", + "e56d6364a87fb7f40af02b672fd337705ab8a02a5fbf2c2a639a872da16895774d90658269437160cd22d7370ab0" + "fd3e81d746", + "675b6d9e6c4c479798038b06561f1ac0dba2ce54988efa3393cb6265d901df1f815937a6e42db8c64c76dae0c8ab" + "a0ee20", + "0b2f31b8b15ec535c7e8c732e91f4e119bca192b1fe2eaabdac037dd1568e4a8d786c7048c16ebd4c513324b18ac" + "9ee0281fac", + "4809fc5e0e21e6344364f0dd59d380740c36c1b1d22e22de5c1190c0044a98fa" }, + { "66dbe969ec0adfbe1b99874de53417d8", "13ee71e9dc02d592700c04ca0bcc6344", + "fb420a6751909185796656a952759b4b794bd4eb98c82456af4f596093f5615962e62a9ce3fd9c4e0cb31a649cb5" + "c17d30f66ad3d52e16589b174102cb5ad9973ce03f44cd3776e0d9c538d255ffe81ddff81e06cff8e4d8adef4f08" + "cca416d52ee3aade52341e5cfb5de80c71", + "db499d6cf13840accc40e3d14733662885768f7541b2615138c498b087e51b20f1c0c373a589b510de546d372a40" + "cad0f92ac3f6f7bc1b85290c4553c83b", + "7a7786b03d18c1f2edb2d9015da13a327f364895751c32b8ab840079b08e47870b4ecb49474d2da2bc0a53977aeb" + "4d63f3b4e56f6a3d22ccd64fbe098fb9b27eb5e5b1f179ac69eb3d57175bf9ee37345e6f48161adcaa27bfb53638" + "89e38cf7297b3fb9b41a0d61e751ca5184", + "18d7dd7f471d491883ad31f046ff3451d02dbc85fe59f43c5b67c53c21cd9f19" }, + { "3a00ee1e8877248065cd26e3b9a857de", "950529b19697df5b0ce43a3f429e9509", + "d6fdd1746e8e7c7b84adef010951f60fd19b5aa74b1a8ab1ef2dbd5487318fdf7844b436dd1063f10e609bc58604" + "ada5c41ae2ea1b5303f84c", + "30a5f3a4e4543dca2b4d53a59a6a11b97a7d", + "06ffcb4a0da10ae1a5a1c5b6205ccf4882a9c796370e7793d9b3ff3a857c156b3285e3dcc2181d8c0df26167ab4f" + "8709db6870c9e10e75b90f", + "6127c870f1aad279a83c79ce8226147782f709fe81f8c8740eb47bea34c2a558" }, + { "b611b23912f0c44c8f0a452e181016a3", "aa0321dae967b75f958a3949fa08fda2", + "16320a4eabdcbbb1e600058d308cd8aa650ec35985906489d1ed3210ad402589b33de4a68088cec878461e54ce60" + "ebac399457d4f4ffaea77fef304f9363817fd797afac854d0ca313321fbaca4b0f", + "d0b0ea43a3fcbcf70e5d4b21ad115e503ada6f43a74a0585481b249db3c00645f06005b1b3da91600a14a40ae5c0" + "45127cf8cb6bcb", + "39f3258b852471d9b9a289027f26c3a7e49fa8cb61983c429b3b306edb1f0d34d9718774005d71ef2e89212c6c53" + "8f647335d85a2d0b4c72b97a7eee96d5b6976a602d82a294bc2a4887b16aa327f6", + "411aac7435b623d80d284a1a6533dba99d7a44e4de22bbb22b09a4812c6f27e5" }, + { "2ed2ab0c5548c1e97879a6c3ec7ebadc", "3e15d94c7dd22593caa8be653b6d59d2", + "76b1d92662d472c87ba9b27e2756cf62513ec190f709996e", + "f1e64c14a92e952036305ceef2535f65295b2803f7396a5e88f2ac993e201782e2f1edba92011a1530278b6d3d1c" + "9a", + "8c9fe2da6b58f0a9d40609bfd9ac6855badaef814588ebc8", + "b212a9d7ef27a5228e1c02ba78cc92068c2251c162348e1d87da2afc53616571" }, + { "37263267c4f24129d9db09a2a96d7c14", "39e5c4f2b36c9ed5077765b89cea1bed", "3581b4424c", + "6ea6a9f99350a38601162f2e24928ee2", "9ace0569f7", + "746536436bc496acc8bab10e6ae17d5d1d6113b3fad96df462107c3b4b6bf96e" } +}; + +static int +tv(void) +{ + unsigned char *ad; + unsigned char *ciphertext; + unsigned char *decrypted; + unsigned char *detached_ciphertext; + unsigned char *expected_ciphertext; + unsigned char *key; + unsigned char *message; + unsigned char *mac; + unsigned char *nonce; + char *hex; + unsigned long long found_ciphertext_len; + unsigned long long found_mac_len; + unsigned long long found_message_len; + size_t ad_len; + size_t ciphertext_len; + size_t detached_ciphertext_len; + size_t i = 0U; + size_t message_len; + + key = (unsigned char *) sodium_malloc(crypto_aead_aegis128l_KEYBYTES); + nonce = (unsigned char *) sodium_malloc(crypto_aead_aegis128l_NPUBBYTES); + mac = (unsigned char *) sodium_malloc(crypto_aead_aegis128l_ABYTES); + + do { + assert(strlen(tests[i].key_hex) == 2 * crypto_aead_aegis128l_KEYBYTES); + sodium_hex2bin(key, crypto_aead_aegis128l_KEYBYTES, tests[i].key_hex, + strlen(tests[i].key_hex), NULL, NULL, NULL); + assert(strlen(tests[i].nonce_hex) == 2 * crypto_aead_aegis128l_NPUBBYTES); + sodium_hex2bin(nonce, crypto_aead_aegis128l_NPUBBYTES, tests[i].nonce_hex, + strlen(tests[i].nonce_hex), NULL, NULL, NULL); + message_len = strlen(tests[i].message_hex) / 2; + message = (unsigned char *) sodium_malloc(message_len); + sodium_hex2bin(message, message_len, tests[i].message_hex, strlen(tests[i].message_hex), + NULL, NULL, NULL); + ad_len = strlen(tests[i].ad_hex) / 2; + ad = (unsigned char *) sodium_malloc(ad_len); + sodium_hex2bin(ad, ad_len, tests[i].ad_hex, strlen(tests[i].ad_hex), NULL, NULL, NULL); + ciphertext_len = message_len + crypto_aead_aegis128l_ABYTES; + detached_ciphertext_len = message_len; + expected_ciphertext = (unsigned char *) sodium_malloc(ciphertext_len); + assert(strlen(tests[i].ciphertext_hex) == 2 * message_len); + sodium_hex2bin(expected_ciphertext, message_len, tests[i].ciphertext_hex, + strlen(tests[i].ciphertext_hex), NULL, NULL, NULL); + assert(strlen(tests[i].mac_hex) == 2 * crypto_aead_aegis128l_ABYTES); + sodium_hex2bin(expected_ciphertext + message_len, crypto_aead_aegis128l_ABYTES, + tests[i].mac_hex, strlen(tests[i].mac_hex), NULL, NULL, NULL); + ciphertext = (unsigned char *) sodium_malloc(ciphertext_len); + detached_ciphertext = (unsigned char *) sodium_malloc(detached_ciphertext_len); + + crypto_aead_aegis128l_encrypt_detached(detached_ciphertext, mac, &found_mac_len, message, + message_len, ad, ad_len, NULL, nonce, key); + assert(found_mac_len == crypto_aead_aegis128l_ABYTES); + if (memcmp(detached_ciphertext, expected_ciphertext, detached_ciphertext_len) != 0 || + memcmp(mac, expected_ciphertext + message_len, crypto_aead_aegis128l_ABYTES) != 0) { + printf("Detached encryption of test vector #%u failed\n", (unsigned int) i); + hex = (char *) sodium_malloc((size_t) ciphertext_len * 2 + 1); + sodium_bin2hex(hex, (size_t) ciphertext_len * 2 + 1, ciphertext, ciphertext_len); + printf("Computed: [%s]\n", hex); + sodium_free(hex); + } + + crypto_aead_aegis128l_encrypt(ciphertext, &found_ciphertext_len, message, message_len, ad, + ad_len, NULL, nonce, key); + + assert((size_t) found_ciphertext_len == ciphertext_len); + if (memcmp(ciphertext, expected_ciphertext, ciphertext_len) != 0) { + printf("Encryption of test vector #%u failed\n", (unsigned int) i); + hex = (char *) sodium_malloc((size_t) found_ciphertext_len * 2 + 1); + sodium_bin2hex(hex, (size_t) found_ciphertext_len * 2 + 1, ciphertext, ciphertext_len); + printf("Computed: [%s]\n", hex); + sodium_free(hex); + } + + decrypted = (unsigned char *) sodium_malloc(message_len); + found_message_len = 1; + if (crypto_aead_aegis128l_decrypt(decrypted, &found_message_len, NULL, ciphertext, + randombytes_uniform((uint32_t) ciphertext_len), ad, + ad_len, nonce, key) != -1) { + printf("Verification of test vector #%u after truncation succeeded\n", + (unsigned int) i); + } + if (found_message_len != 0) { + printf("Message length should have been set to zero after a failure\n"); + } + if (crypto_aead_aegis128l_decrypt(decrypted, &found_message_len, NULL, guard_page, + randombytes_uniform(crypto_aead_aegis128l_ABYTES), ad, + ad_len, nonce, key) != -1) { + printf("Verification of test vector #%u with a truncated tag failed\n", + (unsigned int) i); + } + if (i == 0 && crypto_aead_aegis128l_decrypt(NULL, NULL, NULL, ciphertext, ciphertext_len, + ad, ad_len, nonce, key) != 0) { + printf("Verification of test vector #%u's tag failed\n", (unsigned int) i); + } + if (crypto_aead_aegis128l_decrypt(decrypted, &found_message_len, NULL, ciphertext, + ciphertext_len, ad, ad_len, nonce, key) != 0) { + printf("Verification of test vector #%u failed\n", (unsigned int) i); + } + assert((size_t) found_message_len == message_len); + if (memcmp(decrypted, message, message_len) != 0) { + printf("Incorrect decryption of test vector #%u\n", (unsigned int) i); + } + memset(decrypted, 0xd0, message_len); + if (crypto_aead_aegis128l_decrypt_detached(decrypted, NULL, detached_ciphertext, + detached_ciphertext_len, mac, ad, ad_len, nonce, + key) != 0) { + printf("Detached verification of test vector #%u failed\n", (unsigned int) i); + } + if (memcmp(decrypted, message, message_len) != 0) { + printf("Incorrect decryption of test vector #%u\n", (unsigned int) i); + } + + sodium_free(message); + sodium_free(ad); + sodium_free(expected_ciphertext); + sodium_free(ciphertext); + sodium_free(decrypted); + sodium_free(detached_ciphertext); + } while (++i < (sizeof tests) / (sizeof tests[0])); + + sodium_free(key); + sodium_free(mac); + sodium_free(nonce); + + return 0; +} + +int +main(void) +{ + tv(); + assert(crypto_aead_aegis128l_keybytes() == crypto_aead_aegis128l_KEYBYTES); + assert(crypto_aead_aegis128l_nsecbytes() == crypto_aead_aegis128l_NSECBYTES); + assert(crypto_aead_aegis128l_npubbytes() == crypto_aead_aegis128l_NPUBBYTES); + assert(crypto_aead_aegis128l_abytes() == crypto_aead_aegis128l_ABYTES); + assert(crypto_aead_aegis128l_messagebytes_max() == crypto_aead_aegis128l_MESSAGEBYTES_MAX); + printf("OK\n"); + + return 0; +} diff --git a/test/default/aead_aegis128l.exp b/test/default/aead_aegis128l.exp new file mode 100644 index 00000000..d86bac9d --- /dev/null +++ b/test/default/aead_aegis128l.exp @@ -0,0 +1 @@ +OK diff --git a/test/default/aead_aegis256.c b/test/default/aead_aegis256.c new file mode 100644 index 00000000..e7158c88 --- /dev/null +++ b/test/default/aead_aegis256.c @@ -0,0 +1,723 @@ +#define TEST_NAME "aead_aegis256" +#include "cmptest.h" + +static struct { + const char *key_hex; + const char *nonce_hex; + const char *message_hex; + const char *ad_hex; + const char *ciphertext_hex; + const char *mac_hex; +} tests[] = { + { "7083505997f52fdf86548d86ee87c1429ed91f108cd56384dc840269ef7fdd73", + "18cd778e6f5b1d35d4ca975fd719a17aaf22c3eba01928b6a78bac5810c92c75", + "5d6691271eb1b2261d1b34fa7560e274b83373343c2e49b2b6a82bc0f20cee85cd608d195c1a16679d720441c95f" + "ae86631f3f2cd27f38f71cedc79aaca7fdddbd4da4eeb97632366db65ca21acd85b41fd1a9de688bddff433a4757" + "eb084e6816dbc8ff93f5995804", + "af5b16a480e6a1400be15c8e6b194c2aca175e3b5c3f3fbbeca865f9390a", + "0943a3e659b86e267ffea969ddd6d6d63aa35d1a1f31fb6f47205104b132da65799cc64cc9f66ffa5ec479550c2c" + "5dfa006f827ef02e3ab4dae3446bf93ccb5c17e1ec0393f161fca94f2944d041f162e9c964558b6b57d3bb393b97" + "43b1f8338ff878a154800fd16c", + "480091eb823480e8b29c7aa96ffd55a026ac3d7fa16787c36c25865131a639a4" }, + { "c88bb05b2aec1218e1a5026511e6d44de7bd502588e9e2a01591b39c5ead76ff", + "4a485f226a73f0c4e16242e8234841cdf6af1771eb278e7f35428d03eb5b4cf0", + "2a4c06941ec356390542d7d7833fd68fc85a00c0452281f87dee6f10180d02182791232c7007fde35dfd5a901afa" + "896296f9f344db717994d078fbd3a4cec8d782d2bdc205f3709827b776fd5c863a952fea97a14a6c2ee3f20432b8" + "baa084470179078bd6a83597478b2fd9ae00ecb424822cb0d61e9a55a4", + "38a9809dbdd2579010d38bf5314f255b", + "b8565db06c2fa493e09b6764f4d09296422095eb6e9890f606654713bfee6f362a123688b61f254f315f18b20bcc" + "5ed8b0b4f2224de9f498e3ef03532a8bcddb361f5ace8ff491bab8b3d06550496501264f9f48ebad277e74921467" + "89d0fc1a3b1e3e81598370a4183683d1fee25a9a1fe359c836932746b9", + "5d5d35e0299dea47956a2e2143cdace4de8d228784d6717ae5a6bf5ea6b3ed04" }, + { "77b473865175ebd5ddf9c382bac227029c25bdb836e683a138e4618cc964488b", + "f183d8de1e6dd4ccefa79fe22fabfda58e68dd29116d13408042f0713a4ee5f8", + "9888b8ee03c3217a777b7558a31e331909570ea196f02c8cffad2c8dc6499b8125363c06a71c057842666bfb5c6a" + "cc937d2eecd960330c2361abdd88a4b191557ddf5102de75ddc7e09aee9862f32e24f1db3847a5f5b379fb32e2ef" + "7ffb0d3a60", + "0679fd74a846965e33e558676115d843e440fa37092fbd5c57c82fd914210fcf948f911b04632d66be46248d772b" + "3eb9f55b537e54b1ec751b63f035c8", + "3464d835302583ade6ed99e23333e865d3308f31a6cb65bcefdc9a1b9b4d0e0f75513188480dac4a64922af44413" + "24ce7de74eb9f7f4e414f6177a4814edc96313694b99ff8dd36b2f7f79c7ecd70ec475abe1c1909238767f172fd6" + "b95e92c025", + "33527e829a3db1929cd643d5251ee19482aab7f2d74635cbf8370f1e1621ecdf" }, + { "b8c6e8cea59ca9fd2922530ee61911c1ed1c5af98be8fb03cbb449adcea0ed83", + "af5bc1abe7bafadee790390277874cdfcc1ac1955f249d1131555d345832f555", + "b6c15f560be043d06aa27e15d8c901af6b19db7a15e1", + "d899366a0b4e4d86cce5ba61aca2a84349c8de5757e008e94e7d7a3703", + "4c8496dfa6c419ef3c4867769a9014bd17118c22eef5", + "f81ceacaaae6263c33f836fa26d92b0f08eb0796135c7fe312c93add6a208e8a" }, + { "d4ed0fe94cda2be7e50d57833158c84180b4cb7dec95d5ba774b6b5e1b0597bd", + "cae41ba20bfd124270b76c13d61c1dffd7a42017731546d41aa071c22b9967cc", + "1cd4b85fa6c14d5adea84ed3167479c1cd18e77792cca73a540aa16a00e50ba62ddd12a62911b21d3ee108651693" + "7f33ed7756c7ec93b3", + "35564745c05bc961994ea03764eb02044f9e7b2f6130d6d1f041580d6b3ea7ade2b6e231dacc5e97db01", + "a1f64f45985a89303d1fdacf6f31ad745a8015350f1afe63d6ecc26677f661addd3c229ed76f4c627b1e902f8ce8" + "c42fd08baef481e86e", + "c706b2f13d4e76b4e024a2d72540637a8d9ff5e626d6bffeb7801c58ccab0c2e" }, + { "d755d9d980e8cb221955b63c19f3989eecce945f61307a0593bd7cbea6577e1d", + "9f83666d787e5ceb0e17fc1b084b3734dc3ea88dda73b1b7ed53be7491f4637f", + "d1093941fdb3d9710cfcbe504be2434c17296d0b7e0f4e4058e79062f2b2cf3cbe2007ae2e5d391ebf3fc1e07e4e" + "e7d1705044c9bc2bf08e97a4d8", + "f2a1432fba86dc01b3bfbf3206943bfa3dc66e9f54b576c57f61ad515555b0c371dcfcec45eaa58ca06654b6cd47" + "6aaaaf1b2602c03f9e41a2cefc265d10f19d42bda0b07aac8e86", + "58e044943cf3b73e48ce75c048464fedb0445b02bffc00c1998b212f48f48c93e89dbfbf36cfade1112629e8deb2" + "67c55118c10ab67b7ef2740fc2", + "0179f0edd217214881e90c1be3b513170d1292603c484a55499e1bc70970d5ed" }, + { "152f15933e4ae26192bd3aaecea29daf77e9b2bcd97e7eae7637025de8a3d3ac", + "e177be02348efb533fc2e9d5a259cef80aabeec97da50c937e8d5f7c6eeb32ce", + "ef86da6d5b0dab27a444a95ef5c237baa5819b863dcf0232d0162dceda8f180e1b9c6b9d94ccc0692eb52923783e" + "f9de17497f1da62d6524bbf432aa6c3bbc1e851310218a03ef97ac6676eb6ec30ba6ab131802b992a11417cd00e6" + "270ac73dec8dad88ecc3cba25734ef7de3b8e3cceb5d19778d6808", + "221b1875425844e48c2111fa59b6df729a924a43b3869ab64f8291dca8f12be34d62d11ac94f9f308e0744d5d5f4" + "564fe9fc1e014cefee3cf7706ace4643871d41f1ad5c616adbcc1e9701a3b4", + "dc48260eb047397f41c4d0a0ffe394557aaff8b149cf4b16e7c22754095f51b626ded66e3db9d4cbd98421ee9d8e" + "7c6eb72b607cd462f1fb3ab0c41b2cc84ad320c781ccda9aefa1a68ff5d280500a17c7959e869f45f97bf09cd0bf" + "2c4c068d2b9603710ca8f71f82acd47faefdebdd0abc9b45c83388", + "97191234839a54c00143463e8e8c863f5710e520ee9d9b9ce051076696bc8b52" }, + { "873edbe818233d0f51bcfc1d5340cc4712c909de36f963e6157f128b8a71e3a8", + "16e7637700a6fc10539c056663d12ec85bd529f1e6adb131a3853578f5d27c12", + "db38cdcecbd99003978832d29cf6a34acb4d0e6293e37d2795fcded538ba37d6a11ed41430dc9f4c0cfd27587d60" + "7846f42aa30682bcc295097053821b80b5869b4a0b852ba7ac1d7b784ea0e76b2d033678011889a5adbf7e091cdb" + "b9754f828b7519f1179e2426ca6bf80a509e34729c854a5052e61adf8d", + "0b0bd264fb5030f84da620f07099f42dfbad57c314102a1f7fc0b452ebb7966ad4b88ea773aa07", + "de67a4eb8821625d4451734993d93e0fafd2c55c761afb097bfccba898e6d634be975d5f2ce8d456785a089c9b40" + "724d8ea41095c1cc80f070c3ababc9258e5eea504831b034baccff61d8f73c220d5bdb1244c8a675f2d6081abea8" + "f59088b99583cae22f8bd37fa030f94d5bfe1c9e799aa71bb41874b17f", + "8665ecac1758be7eea0b5f482ce8024ce3c78b3f51af3ee4e0b440f24db2f451" }, + { "b04b735c74d2286302e5994e126a8a8f52af38d6cb094279ac883b560a52a6a6", + "6af57ad705792ac2f71a61bcea9ab38a9a5acc510de7995b66f3ae4cd2079aa4", + "1c052ab52a21894287fa7f763b12f49b2edd6a0cd266e93207573d08d75ec31b294d171f0098f804020cc12056c6" + "0f8d396ec94d97eae1c07a874849e39a3302e8c3b538de6c9e268fb922f6875ee5bbc264137035a76d9ceb269dc0" + "988517a302c2bace2fb6efc4ffaa2c1455a16b6cd0", + "52618046f112a5a35780e370c713987e24609c38157e5fd5d51ed36324359b0615af70f801b05a98ceb1", + "7183180c37ab14f38ed084bdd2aaa4e8d8e8442b526214f594054e0379a2aba6992804afa8c63bb1e580d7d905d0" + "c46536970e98bf7cb921e95db8faf388e7c98cc08496a7036b90a2e4efdfbcf79610edbc9f905067358b13934825" + "c0ed2e3c3d1f03f7ceb812945f77fcb7731f805b1c", + "483a6b3a7d5de797f0911d2a514350d5ae5af89aefe1245cb08cf8c7487eb99a" }, + { "5bd7cbff6b469c03643cabb99dc50f905091fc9cfcd6d8f28e74ac1a33fd0198", + "3b458a51fdb6b9d5a7071a22825a79f2844c5ac7ae91014ed7862499dcf10461", + "4eda7997fa3b9e12e39eb00b209b43af9949c017660e523e78d0e483f23e9113b662f42a164db3511d", + "808d8a8523a983a2afb2f9daed913efdc19a3c1ca3315382ffe757426e7ef65bc1d83d8e6af95191f3c30de29806" + "5be1e5d14d0dba8f82281aa2fde67684cf7eb6f32ca4de7a116caa796f2b27222f93b9275f4b95f08c4a4e8d6b13" + "cd326c16daf232c8", + "98959acc116ede75df052f4028783105408022ed6db9516e8a27f18c2b4d59f1bcaa7163e0811203a2", + "edff06bd132fd3031cfa5a47803d5169289a29d304f7091b20dec2b284a0e271" }, + { "1bc0dea26d8583e51cece0df7021522adb9336450929715fecb497c43cfba717", + "7cced62d655e703f54824f4e2ceb6e5af1507e2000f1bfec9e50eb87328c2218", + "edeb537b66dc39d20ef6ca5647e6f34df0f5dce2964d227b0c444613f951edbbc532b5576735e9dbf39177ccf807" + "1e5fe9fa011bf8ab7fe9f716acd50847f7a9ce35262b22f04486f1e956e09005249b5ed70e68ca9896802c4ff9b8" + "019fab057bbd5ecddaebb6a079e57cb6e39c95f6748b22cf3703e30a5e", + "36febc6e0763391b6b1031478fd485b54d427b88d06d3582c10263", + "5f75548b3bdc53e80c61fe8659f2b90350a59dff4477fad24764621dbc35ebbb6d71f80c556a825a2bba962561a9" + "db3360311438d4b3eb7452926dc5ec88d451be66eeaa491cc21837ec202b3e71b3ec2d0ed2f53ec59da253fc9920" + "482545f570e3b2e4ecb3629757f3c721fc462a380504aa8fa9fc8880fa", + "9e46a21c41a40101ca413017cadc2fed4fc3ff390a57fc0643784871af07492f" }, + { "230bf249a043d34effa31974328fce207daf3ce10b42e5b44073b70e9566b1bf", + "de67af72aa00fe1798e8b41be2528f36a45aeb3d957bbcc5c01490e4a786437d", + "12403a1905c9da8bd546946612e7d4ddab1c716a533cbd5898240b4c68c675c2f18b72dd40c218bc6f7599edb573" + "f89af867ab3c05fcef8c78b9bd0a267e8db3d9ab1dd04dd14a11f9c9e0", + "77fe28a72f7029da86bfbcddcb819f7068afc07a249e207ae80f0acb90", + "e9f1c7e28b1581f25448b1e21de4fe67c3ff432338b2f7364460b6b1f666a2ddb5b9cc896c3f410445d00c146952" + "180ad1a36944aad13956e6ff95449bcf8bb6cdb1b3e87112507663441c", + "7174e0d47bd83c1a8cf9cb14127d26bad67bf413e146bdfceab4e79b7ef13c70" }, + { "c9675c6e2c0d8cf9f45f17faff568943e4a9038df4472908dd631c5ba8a29c2f", + "bc07c8de4778d50f5dbf324e3f9e377b82e6defdb84163bc9447f156bb70beb7", + "d2c4c2773ac5fcbfe43869bafa8278709a32dc395be3df8360562184d47675133ff716c620fe4d18902dfb41d09b" + "205c87a9a2acd268f9d5662c9e4b12c50181d93ec7b676cb7afd0639f2b3c1154f7489cdf926a85f51c62eb16c47" + "b1bde2b46df56ffc9438b395", + "88a976fd2e7ab25e492f90a1901d7d3982b678217d4b248066c6d8e7a97af0aa93d04300eb0fc0be23a5db41b1c5" + "62efc21c6057c57cd723894d9735d3a651240c6c30e7afc2be2192081c4622ff1d7390e81182642a4d532dda34e2" + "ed45994ce50e1524ce", + "15f5a70290975933cbb70f830200fdd876732952577ef9c0bce0293e78c0525a1209eba2531d9c58cb742ecb4555" + "d4c9cb6bbe69c62a0910e633d14351d3b8f0c3c6734ed9adc384c294bc4935d0026fcd50d513750826da12ecb5f4" + "6b7c6595550547b963de030e", + "da44d1dc3de8523cb2dc0b3d5012f0920ef4665fb676bd4ff66fd6662db058ea" }, + { "c4de2cc53d61339da13f360f88ae40b1895067680a7a9d28b3d281bb2a7d2f34", + "29428c6b06edddd68e8f4973fc2a698fc49c71230bb97da4fbcdafb7f945c9de", + "e9d1f0438a405d57816cf8eb37d3bbada217837db578d7c8e26355ecffc3b497732a54ae509fe8402f30239dca95" + "9b0aa7bd436f23c31e2b9cec889f3bc82d4ad2d4af9c6f978a14b1a8dd325d8976368af2d3f04b83ee343a0bea47" + "0bf8d56913986121402a49ed4a68c6526cb53d41ac", + "74", + "f1bc93dc853b7989e79d34615742488c52221d9d277560406fae0dca1a086ec09ae034a37424556922cd6661bb01" + "a389aa00823fe3e2fb84e9811a078bdcbb4da5e949fefd45988131846259c64b45b279b7cce15ad2b1ba0b52db1d" + "e7d39b07458bba7b26a4a4081fa3b0b6aa53b73d6d", + "ff4527b7c136c8c92b151e0658ff456262fe74a07747f9437445d9336919939a" }, + { "0d0b70db983f4afeac46cb5e042ca51a6a85cdc500f2dfb2f97282d2f96d3235", + "a1280a20ba18cf8977c63450318ff1f6c4303b20c111fc733212e37e11cbd38e", + "d9db68a084a6aaacdbfa1cfd7ab1f9b4fde06f18ff093d9f5a04afb9f1a23a573125906fbe126e8fc0f51e65465a" + "09c1167bb6fbb623f311fe07f564ad4216a01b597d4d756acfc736b905a26dcbad3c6aae8bb7043039d06561ff59" + "7924d623767105024c170113b6", + "0a9d9525935e346ede23c3eee268c24f1070959d392d1aa1c4234cc19cce7807c477ac8e9062ff302015952aa910" + "6de9db40c8d20e022f3617", + "2f517ff86b32f3841fd9cfd34fbbf2bfb77b190dd2bdb74f438914d95809d52d20f07af6fa7a03913a517a6cf3dc" + "591045eb4fd7fa0b55d80ca54d48ee85d56841fd44db7585e5d0ad8f27264751157be2190b85f224623a40c4c821" + "cc8c7c680c548204e7f742d749", + "054df03cbd4f45572ecee0a8fe80b37eeca1f17881bd12c42ad6575a5ef304c5" }, + { "8011b1043674d753172302aa123478a121640daf4317957545749d0be6a91698", + "57bd1ac0f3db407989f88a762f60b3eabd03d3bc3bae577f3818b15c0974ae9c", + "be1833fd169fd745acaa7d8584c457657433e6a3237225a086d47806804120613d78344e097ecc6a5f869d07", + "", + "e34dff511e16bf12570a6828843c414b8fdced120db36ea0223e8700f57bea4c9dfbec5d3195caa633d52ee8", + "0ac3f0459608a7f38b5b77c3f38c73f9ebc48253b316830b9583bcd51ba5c995" }, + { "d4af433d4d7598a8bf02f3e34ba9014a85f92e7ff946d51ea7fa9a4f5cab09dc", + "4fa45413eca04bccc3c732e18fc6442646e5d809afc00e1e749a8b8f84d6926c", + "b867dea7593a03b7b7762052e58b18483163c0828f5ebecb8cbbe4d55c7f1a4ceadf55f4c3a979e619763377cfba" + "4f88e9e692c2794ee862b2aed63902879e11c5ee167ea4fc266a4556fbb54357ad243f92418a1d13c987f5b260e" + "d", + "ee4ff169ca", + "e2e12b2510c72d2d59ad8bf30235d14f3e85824e19b09f4e84eed629325b5a5368178dc94dac13b9aa262f12592f" + "8748bbed8581dad74895fe73dac4cc3a5f17ba480903ab86d349d68cfa0e4dcedea3321ffe1023b092cc77853a0" + "7", + "07a59bb7b8f5805195197a01bf6f628c689024dd64218f0a2a9b77aa5cd6b357" }, + { "2eb12f163119cd1262e0dbb26338486bc75c183026cbc71bed601f6cde324bb7", + "c59654bef68ff95760ce8fdd39f480a3655c650647d00e49620b9938f917535d", + "9cf103fd377ee14f1fd775530b5153eb31789755382697aef6008f59b0404bcf3fe34509835308cfac8cfed2678f" + "523815615423831317ad7770ef74145db7a72ca9462ecd50d7b19a0d50e894bdadbb0f63d6624c80c85836bfabf4" + "4359f700fe04b5e6bf1db1b4ded24fe9054e7318", + "a3fb893a7baf646371e92f3c34c6700e6a9306bd7e905a25be4bd7d6239416ca94a1a31b59068729", + "22139c2d9bedf4a0535c22de56fe441df6752a692a99c10c186b439fde9954e815d6e81d0bfa0a7c3caf60808343" + "3e9b8d32321392f41ae03e5b67cd7801362c371223a98989b00c79fb42d4b25cc222ef6a4fe415654030e67ec506" + "44bbc93fe83c20e1a30259a14ae1ec82ac4759d8", + "83b054697569ad69e55ee1b1491b9353255c4cef4c0f31a0db8090b7dd06ce0b" }, + { "553928dbf68b2dfdacd75bacda2cbb4fb33d81f55731f8ac6615631ed4169784", + "92e86bd57fafd57c88a090397a72f7af5967fb623eec8892b358abd1665f88ac", + "b305ac06529bc8483fdc6d765a535ccbc8125a27b8d72fa2450053ad4be45beede300f87e035a05538b3", + "1f80c2c7694a35f5653ab2fc2cc93614d959f2136bd4cf2918d2a20d6440e8ae73a652e08b7987d1df8c", + "4885419082270c83c03f5d4869adc63cd2f940bf527e8474c7c61a748fc883b74e5ffbd8b0cd3e780a92", + "ef4b2bbe41b9c4e58e207fe9fdbb0e9aed224989d9b9a77e78003b1c2fd7bc31" }, + { "4d6ffdfc693ab2d94d760163bb9b31728a2762c26236f04859b7b31b98c0e159", + "e412d9b3b1b40c740ce56cdc0bec430c0ba4f95f5d83124244cebae8295b31c5", + "ff03d03191d459d57a628a8d69d398214699bf88c2ce8694e2dcbe6d9c987056a50319ef387363b6266fb8d3e15a" + "fe3b2eeb964800799c0686c3d6f0b27d9523592690ba7d765e9a21d62e113788076267cb50193d64b43156b3683e" + "7ab0758e", + "78c96946f355a8153659dd06b41b75b8109b0c31c0d6ff2feb90c875a3b211f01061f73a88a9d42550c807676dd3" + "a405516da1d2639395cb4df526e046d621ec997c1c4fc858b60ff9051f2ee093fc8f032f367bf25b3f32361d8aec" + "5c0e239dbb129316411e96da198d6fb512", + "4c3083ed17c2de0981fcfd38bc244c6e6d0756fa3c23b22fe770c0c952159b6e112c6f4b6686aef4bbd0be98bcb2" + "c32c44af09425f70cbe031d08798ef258a820dcd3029d2b0a857615a939e2a008ef14b949f5bd4ccb4607c8a8a4f" + "c5f1236e", + "bfa101aea1676baa3b5205d45b572425ef7da415984796d2b76f01fe5e37e919" }, + { "c9bde00bad3334e5792b5c1e5a8fda8ea7f7eed152c0a3feceb565208017af73", + "2ee41bb5c473206ec00ec597548161573e8c2adf7387f88e4fcf64c84a2f5905", + "b7dac21337a4029b80ae0ce7578eb0eb45c76eb84d68c4dde73690162b377118237fd1f466ce1d7d7638945779e0" + "b148047c61b63c7e05c877f75f4a52865efe94fb65ee99e4b0d79242c69c3aad1c425d017a71eb26adc2594a6a52" + "16eb72b736f40a91001b13c91d13d5b057ff05ea883ccff3eb6033679b7b41a62f", + "26b1dbda8f99f9492955fab6891c3de81e4535ed525fdc6d98beebef67067fefb1674359525cacb2119d016876fe" + "b5dd", + "6249b44800c9d47ca20cfc1726563befbedf20639735d441917f52cbcc7ef72d5b095c6a15a7bf1239f8b93a62d9" + "bd5e7f47b05ab9f12b4da72392ab4ba093de150fb8b7b61ea92e6a3204b178e2e1c066102ea9aea6241749ebdfba" + "4b307ab0a5471d1d43fc930dc29a1ed5e687d41883c69d0de38ffdd25ce4d8ea33", + "53bf7cee58474076330dc64d1eeff748df909700dd942d8d59da2447b9f84fec" }, + { "6466a65e9fe920b026739645b446cafb70919a5d03a7e890537bf88c620c5bdf", + "db812442fcc36f2deb4b04a9c32354579abd8a57c185654dc8ce5af21f5e5463", + "39917090786a9532f0700bbdd94d960491d89b68b2b9b1425ef8db67b735ff08d73cb171d911eb94eda3354e252b" + "ee238408ced860a8c1657fdf8c9afea4f4bd041173ae22f236c238d38e469c89b2b2bc73d3ec88cda37530362939" + "34732295e29dda", + "34c8b124c1e26a893aeee4b228214ce840cd9e49f1ab7bbfbb4d90c808215be99c9da5d0d426d5933f6aaf9d1af5" + "78c1a6f2b56e6b4c2ef41f6fa67e7f2693f36b3e21223a5428a8a24d2db24d", + "e1d4206c53b1072c317a494b43323a65d4f17afd6f02f865d94c425f80153add9d611175e9f0bb45c51d7f469272" + "10bfeafdcbf29cf3e1de3c01f4fc3fa94848af52293e3f48be11d1efa5d6e2aefb62385c97ab1dc7aaa96bd0210b" + "af8a7c732386b8", + "bb406b111937304d1ede67719247747cb082efa5e8743364b763ef0e9af1059b" }, + { "be69e13f684ade9206fc567da10871fa4bface67e86e23b9bab7da87f5c2f39c", + "d8b143fd6fe42e1ddf4460592c2c3239e2dd97bad39066b86d121b658395bdce", + "4f7c016b4ad5d4822e125851ea3cff387ed83933c6e20965225c34e5da784ba36585e38293c6508eca322e9a9bfb" + "21b3d5b5b0866c2d32b850072abfebf5417f9cf7c1b3e995338b99cab418b9812863c051fd03131c82b999bfa107" + "bb987a83528931e75a5f4ca0de75f0", + "0d32bb65ce4936e3c9eed5cea33bec6cdc7c4e105c132a2dd663bb2cb0fa2ca62fa1fd55ee46ba39853c04655a84" + "fcb4eec40e5a810e8ecc01063420cae63259ed33cb3fac23b343cbfaa7d9bb30ea45f824d0eaff4d836845baf675" + "6564c66e3aef9457baa1c70e3a9b6cf4", + "4cb6bb6308675a9a03f72d1fbf1d2b7b092bb4743e6f8e6d4f8bc176e1778eb226efd8b33a14c3bf0a554d7cd648" + "80dff4adf7fe622d8b2a51d5a3becc06f77046eb98f6f8b7e4c9a9cbf24eb7a384f87912146662a065f22b984e9f" + "11bbba929183d4152c2dd607f87714", + "c06e27543c2dad50440824ab41013fa2fb34bc1c47222e5a157fe2a8d8324c18" }, + { "e365b446bd38e82eec6f10ef0ab21ee388ad485f08935ab5b27d812c77c8c2eb", + "b5d1efebc38b831ef46617bfc282e47e20a844c326c35981b0af5e97cf151cef", + "a04e8c9a01dcc73001fc6a53", "c6064f3f164594ab4bfe65c76c753d81e110a255d3cd9e512c3ef38d54", + "bca8a253d89f09d92b364671", + "4ef59bdf41cb393aada19b052ed31e568855c6edb37d286078ea3c8b8969061b" }, + { "f6c8e88d9e0da3770d3499977a5b9f9d071731244c6b0ccac921261ca799c4ca", + "de6b3d103cf9efc4cb7d60dd3458e7c5a348692ab63a87c8ff611a336f0bf63b", + "5eda6f7400227d5f0c4f8910c621dcd6ef0c4f9d2d9fb3feab68b3b162fc3db362acfb61c55b06febf04546a3bb0" + "02dd6f3b9e2f531cafb7a6b1d31c29483526b2958eddbc9f2eab5717e1", + "0dff4615b2084f8e01dce6ecf3edfc785f1cc51361f32f29b7e5c49c82f9666454f2143b9fffaac5ad9ef9fc0aab" + "e91245cc050d5e21dd3d31bb508072d8a23d3e289aede9e95bef1bc8c8dd6d1401409234237f7e4df6db44cf9290" + "ebca5ee8a69768eb6dc29dcc5aabde", + "50c1b3be72fed8b6feeeeac72b999bf7f24bec747d30dee62f91753e7a26fdb4666cbea2f437232e57edb331ef32" + "7119b8b41572e8a6198fd4377e6657520d6e833fac4b2b2b1ea4c01923", + "342804e54894f812c0879615dd7d4b8959d36f00b03c3e183148ebba41d34d88" }, + { "c9268f6053542789747187da6140b7566024b623dc9691a534bd730764b20a63", + "b0cd1ad38a01130f0b312be85a9dd570937c0fa1050ec7c3aa31befc400b8283", "60bf644abf31501722", + "3091f60cfb9fa8946e8a06b1a663e60b54a24f2e5f8eb5282d980a21878c794efaa2f6f699300e3facc64197c5", + "a3bdd452eecc7c431d", "32d6f160b3c802fc4a92344f6edd6bd47cc83630ac76b3f7d2d8ea38bf1d8886" }, + { "491c6c8be1926521f6abfdaff5f95c5fc6ee07a800fffb4715e36c5de167e8f3", + "747cf6c78d7462846364b00f21a26b18c49d7bc3878f478af38a7dedf86c9ab1", + "9ca6b63dce33c54e7122ef72a5bec5552b1cd8099596ed8917ff694390e970248f1ef672e985121c", + "3d545120992929ab79fbe41da239705bbd20ab461daeb3f13b74069b0797b02699abe360382669e6752564f6525c" + "349b0bf6a8833445d14ad99d2cfa1212e20874603760682769ec1abdf33186de04d33621d8", + "f5a2cf25a6e22b71786ebf2adeb78d0675d08711b0cc9f1bbc6b065f056f1948570ebf4dc8df1574", + "8c7250ec14c5e10239d1d8d275059a09dce220b496a4869f82718258f52d004f" }, + { "512cb5bfea47aa81a414e0e9c866daa1f2f7d7562a9ff7616ca182642695e9c2", + "39f87cc65699610a3a5b84abaf4d8333e1f83f640b7673ba630d53eb608f3c57", + "371b10a048dc329eadda98b1ab87a8fbcf817eac1fc0a40f5a8c3e34e1b735dd4bf2f185964a", + "96fdeb760af9a39b819676fbd7cf6e025de97d9a735012b0fc2aaf2f845b4d76e97220920b7beb1b7f920e0795cd" + "e96ff923865a5eec1a08fd88c837b2ac0b38e860b1ac5d5054e46c6538fd916f46e8bb17751cf152a3dd531762a8" + "abbafe38198dfbd35ce232ec1927b8f47d1833db9bdebf6f7d92eb029056835ae0", + "dfa26829a13b2383e59180b896920d0a8dc02d11ab91fcea5e004416517cbb465f951447237b", + "7325d446ad6af8023893386201dc1a8c7b3d603d13241a5bbc33f6248d42cd48" }, + { "f2ffec87944d3061075de87038cfed1797276d8c6857433c9458677f67e090b8", + "7aef11906a27ec49ace7193bf61183e4c67835c9c26b50381c7ec18b81e4bac4", + "1460c5acbb61d26d0af31b565d3696e50d6dc022c528f11569dde0ad691b32fb20538236028d51b98d441ba5ef52" + "7ace9a59ee9784c9ff14e8a1d03b2450bb75aba2a91ddf1827c14ef131", + "d95e3d49c922e70c4c34edbde880239eec5bad1c13158a07d6a13462a8978158cadb13ee5f2cc95a21673b6ce25d" + "7c30f0c8acdfa55c259c6d03a4b25d22fa65", + "bfb8d129ab8a3898eb71aa46e2d976c44d790803420ce1b6c77c399ac19842b1486339571b82d84a0461a946664a" + "68e6387b4bec56ee0acc08bec0100175d670ebdb6a9c36fcd13126762a", + "2956d57d9089e44a5c34400b411210dd35c261a9354f6ef1d07235224f2f3b85" }, + { "5c2b46c8c5e5a4661c26ad19be10a781cb845c824a403a6bb708c738e90d9c46", + "b80e79dc4b26bb75d284f0346697816efd98b0412549d4ab09e5453b14a1362f", + "ead1a7d4f2a4d5d5a979e16cdbd32005a5b5506968e18d68a598ba5c0fe2863839ecb029450b0b2d0966558a890c" + "af2b2c5ee750be7784f583b6d3e0bed0cb5d4fa6f7fd098dbe05ba8416c400faf2034c3074dc1ef7d7ee63ea1cfe" + "d18526d394c445848a959fee", + "9aa44ce6a70328ac8455e5648a34176e", + "09633b3761e956bca7602b876d9b5429e64e56c2b39ee00484ce92ffa7395751cfd43f6c46ac3b0552fbc2280404" + "df446cdd8632a41fc7989c4d603b3f6b7efbd075aaceeb3e01bbe60ef88b696ac22f41fec3d7b65b35c0c45d8bfb" + "0cc99d80316b913968089e28", + "2e1954215e5487ac78177f851a580067ff75de270b664e962240f38a42f67150" }, + { "05fead6fb5a0f2be62533e0a29377010bac0a25c753155d56de340a094e7c426", + "aa6663a20646cdcc620fcf23c31deac51ef80b68bc8c5df1f91197066763eb39", + "5e9162142770449251a541fcb7798ee6a59ef56c518a96742b4186f3d27e3a8ef9855dd5c0c586cf957725726a5d" + "9518919c54b07b87630c8f5079b49aa656d03b0a10ae7aa498c1eaf4bf0660ff999c8080524843ff8a8137d95921" + "b8425ff6a3cbac4f52c198f9932af067ef734ca00b682f6ad0ef0e", + "08fffcc594bc5d08a1f6473b604289aa885d9b199c2acbc56493cbd740a5127ed1e218a719076a310301954e54f3" + "8b682eb9f50cb05d2335e7d82bb88487f333", + "211957354e5bd50bc25009e2cdb0adbad870d25aa02c3759bebb29ea2de74afd194aa82edf530086b07569588e5f" + "bc3618f762712d63844c8177d7d24b2d9d5f6be5ff98cf7ea678ac7022a15c17430c20213ef276284ceb7f35e00f" + "2b33a124a88d9aa6ca5eb37afa4076b051f94e2c2018cd90bfb499", + "79edf8d61edd0c8d23e2337c3cc7db00a622215540796800dd4c01be03958587" }, + { "96cfab5f246dfcf8b33a9e80fb15f90a089a9078dabacbe767082da806cb4fc9", + "6a0ad0d16594d33730b03a7b40b86581fda3661264ea17f3a4327160a30f181d", + "61b0d79387c11ac4a87c37a9b3", "a62d02eac118d047cae4ebd58ce97a7c99ed90f4a4bee9a442", + "d0762aa4c8d20934e91a999ca5", + "c0dc96d5ad1cdff9445e163c0df739880bb4dd741f4ca70eef655b213b53773e" }, + { "4206ea8a06c8fdfa6aa47e76e317c3108169d142f6de50927345a2825767a7db", + "b9c7d7ce4503a4ca01b8762ff383f0c13c240d0c9ad691cabb61a73fb1ea7dd0", + "0915f9ff74e3b4cc4d9faedd463176e8b4d259aca80b64fedb9427394fc5950d1db2ee8a57", + "4b283f58f0938a62ba97144ac872b231bd93c8bc14c7bbe22f993598544d90991d713e289cc3", + "963202b6d18e7742621ccdefd04ba47457aa639ec78ea6ebc277d062117fcb7f7efbe926e7", + "33d965ed6fff8369f9e2173f784c19795ba93776e9de83fe0292830c0ad52dc5" }, + { "7729253efc6935859e8e7cbb15850aeb37e0e3fbc017754c9583d7b4353d37f6", + "8b66e8adf9bdc7907e2127485410c30bd8488901d0c75857b35c087eb9e21d18", + "ea7d864e9e1b537c409601fa7b35ed10e66b71ad6a81aae70ab07cc69123a459b9020034dd165a46035ce9ab29e7" + "01d3622a76947e7adbf6c6fecfb4316f35e24fb01a5f46cf57", + "a3788e4450cd6edc283dc66866a7d03b1250b8868364bdfa6017cd9a518046304c4e46f5203e547fbf9c5f416429" + "41b198ea1f640ae2f6431caf544fff17a09fb288904fc3f1686c496f7c3dd47f9fe013a9", + "01a5877237bc6b94f0597df25ff9482976a5ff545dd26759efa03b10280d5f9a058c7bb1c230be66977d463df1ae" + "3ddc3d7ab02c10313320b5dab74a22dc0a6d9158cd3900a184", + "7539465a447f836c3d2e6abfc53a8d9af7914d2fcb738735d64051f8f14d59c0" }, + { "d0c627cef866ebdab7a8030be47a9aae4e97311a3a1896de7971c78feba16dfa", + "505b133a1f82a9eb4c57c485d139197fd3e59dbb07b9c8a02a32438f6502fd90", + "206f537aac47c77eff924a9b3e74ea85623945e1c24490", + "636238aea904adc5f4582d48a00357c4aa57ff1f822fdbf49cadf780f5e346f0153d8ecd353073517fe4f080", + "c44ce4e69f32651596fc5fec1f9f59cfa62c7a44f7281f", + "36d1db8dfadc687ed88ccedc2796b8aa76337ed49e999091186659586295b6a8" }, + { "e13e72cd7f25a23b4f605050771ce73980ac37ea3c2104a17a6dccfae70b795f", + "3720f810b9d2fc0c01abe11477689b78ba6515488483b747fdf66f243f2bb387", + "f2468d65f0c10f82d7989e84b500178f011bc98c199f0bc299c882644373f554ef4a6eb8ff008bf005aa8b40da2" + "1", + "1041f65b724df64dd279659ade61cddf90672f490453aed4f019dd86fe5eee3c15c359b01d0f91a34a67bb67b4ac" + "f51e229ada29499a0503fcb6eff20be9f59b4ff57b73e173dcb1faddbb111e645149321883c02b7f2ec265009e1e" + "8331905cef72a24111fd80de344b420b51e4daa88e6b3b054dd96f4536f5", + "79e9eb1f7879d2c2b27e52f3f00fa7c0e813da9bd741f1a3955ea9de04703a8624f6b7b91b0d720c95432bb57fd" + "a", + "4071822c3d3d92142be2437266fba4701e5c28cab4c11e3ac32d245351b66135" }, + { "1caf2693aa463ae93d13f6b687d7a19fdf047c30d054c2fdb5e07e88b5ab5a08", + "86603e8c83f17abf6af5d8571e4f78955440c1aa97bb6a6e146d787fcc1d4e50", + "ea9eddcc4ac951c60afae654d012b307f21c823da4ca44b3276c7f7006ce82c07d8caefa665636d6f5031e31bc7" + "7", + "cfbaf3cac9237f19986571ec0e39ed09b1a5107cfde57bea24b3f5dba56bb7db7459c4fa82ade76f63ec59e9400f" + "4f51188734811bb563131f49c2e2d71841334b596a63470b2dfe3a421cc657129b449628e5c1ce39a57ff07f2130" + "643a725637014eeba27ff95146a99a06e2584cb9bb3f12", + "de9912a8bec65989ba4c82daaeebb14aa21246bdcd52d01ae5d4e1aa3d70a12277651c75d62569349e0e4cebd80" + "b", + "7af7d1875ed73bf8db71707992f07ffb5fcaa82f5a821c0d3a9000443db1bc45" }, + { "cb1a72f1752672a7fc0ccaf10c76257c047fb767f42c3f23cabc78d35a8cae4d", + "a48db1fa02317b85f1787ed869f1b13250d7f582304594fdf4a2899d50e22c3f", + "25f09554ecaab85e2d00c6e76e31222a9ac91b79fe9eccadb6fd38bdb948502849ea5ed30470d0d94335a64fbfe0" + "d01f5a5b6afb95a40c5406c43e022520c2c727d53f66846e35fa3fedb4c7efa44a16", + "72c88fc1764d922dcc6f3a61e444213e6f7877ef585c65a57ab9814813c9ae73b5a4619b316a6cec5e34241ed2f3" + "cc530d105de4e5ca356ad66cb95f2aef4cedff42a0522f5f7d9d7a9f2fa54901e914a5b733791ef5236b78d06533" + "5477a5eac9d626da94b36a76c3f702", + "ca4afd213fa1a13a18e6ec57488012451cb648902e367edf72902944422f3dddbfd4946f5b34292c39ddd84e5c76" + "91afa22f359cec4dd14afd210a5df66a5799aea2bb57c17f29fcf9c3aeb9c528c260", + "21ac240f5e13978f67a5a233e6ecadc5e555fa3c5637d29661ed9196556b231e" }, + { "34eeeed632897724c59cc20d82ec745af1a6b43665ac88290c11b9baeda6b80a", + "562c76d4ff6201116aa3ba82056b43d8106565553efa4f65be2776ec7346156c", + "485560e1c34a3f1068a77cfd144054f1add7ac802d013adf462fa1e112fef5ca2ee8b48c1a37f1d62c06", + "26f75dda69bd27835c891b9d556fb7312ed524c8f4fed9029ad963eae7a43f85a6dec0146b919e195bcbcf7eeac0" + "09ac5aac9ec784175e0d18a25693", + "4a7861fc50e5c17910876b4cc45b1249ca8b8ed3940e82f5f6bf6e0a161263c66005ce91edd32f876c4c", + "72b792ed7d8e1d5c044c452daab093029c63881044bfa97a819204f8fd87c499" }, + { "ffae6a920ea2fc5baea3c3278f8cbba1f1ab3f07f2499cc87eeb3df3858d67d4", + "81a53e4c40e507e2071b7f9464914a273065ec7f24c5e6e5d0bb77f6fce20b76", + "484672fe6dbd8223fa1cc097886e9b73e971a6120b9f909dec308cf1df8d02181216b35ca756025dc50f6bfe3d19" + "2cc5531ad9bb4dccbc1687afc507539b5fd6259c80f55fb55cee1708485f78d013a03851e4e6ce28c0", + "8bb27c47b62c7048b6117e0c631313d2e165c277742a2a1cdddd", + "8027f08446e70cb72e52679809488940fe1965ec18bf1c56882cc412e41f7727efc55acd6c2b996b5fac79bf13bf" + "ddc7e03b3900f57589215a37ff34241329ca7b5da9ee238ed7fdaf5b1bbbb172e040d1dccc6acbd8ae", + "d25734872533b137110dec26861bcb77fe062c0c41775a2a05ccb86365bcac09" }, + { "57f2386e011a547a48e5c8c170bdc2758e246d4fdb4b5f90f06945efb6bf6c9e", + "8647b48a6ac27f0b6b68f09d9a264963b0b62c8cc8b454ccef9c503e6d568b33", + "523120a8a391e743e7e2d60fa509345da8145db83631881bcf21c0c56b47990966ee08a36b361d2660268bfebaa2" + "2d4f5a8584c1c04a27693adfef76e910eeac0454c4c1aa3b", + "e7b43a9582ba177e97df8725092ae30620a9066c1cdfa627dda1042f5a325a46496c4b200baff0e0709c52ed0ed8" + "2ab11af1efec1e05d044f50d25a38eaf6da2fc2709e609df95f2dc6500d30caca60e421a169ac0f1f69b1d774f37" + "5b942edfc4151e0c78", + "a032008e9601e05f87694a001918c0389b66d13ea514f4c2d5c891591856a3e45472f74b14c409376060ecd90de7" + "b700b0048cd84bac232f5211768e4185086d7992103be87e", + "ce7174bc583746a5183676f5af292df91213a864bae6e6783cc51543cd18e80c" }, + { "29f1e4ad600bc24f64d2a99669f7317add8e61d5d3a3dcda1968b398e7ab3a8d", + "15190e8300313a59c0c6c4dcb0358cc88f7e856240091f1b1bc599a2ff3aca00", + "b01d68b18df703fa9d166efd6aa3ac15fd48dc99f4ac806194f0f500be971560b3135ae422095a", + "cf90cd99d137d5bb0203c0a97f5d4842f4c0ad975df8a5dd863269b37e94fbcd941f220736ea4987e9cfb73b17c9" + "39be601c40daa99133b9a0f98bdc4e4b77bc47d307354119a2fab2771285048a273aa859f99a4ceb6bcf5bae19d7" + "b9d766529d53e29a384304af8de07e", + "321523038cedbe3da195d701835cf62941e6260c3c4ce5466e1fe14b36bccfc0bfcf4955f1f061", + "75b72ea023300ea4fd27926d097e49d4955c6dd6747ea38d2c33bb21ca61e168" }, + { "4600adc836738547a6e1fb257d6a7c290d4895dcbff2e071dc38bac04f338a30", + "ab2f8f6a728f1bab52541407027c51a1619c1db32985120f5ab40cef22e08edd", "f8cbb1362eab78f7", + "7adb0527d13748950fc60a8f6879ec1116c73817e343958965359c8f7f7465b26fe5da1f43112465be72751de684" + "600456e97856aee757161f6157dafac3", + "26baa1fd39aa3c33", "147f674a8345d803d23714b057bf8c030ffb002b6f9dac1a1a7d7582dd89b746" }, + { "01f560d41c4dcdb3906e687c5fe23c070b9a8a9653987706f3357037d7d512d2", + "a47633929b3fbfafd2c29d25ab1e8e3b6402aeecff25d60761355ef44ace4cb0", + "6e085d40606a8042e71fc16b720cec34e47d9bd5e0676f74b6be17f7c78b53ab910980ed7b0622c248006c0ff9e9" + "4b66b8944acfe6857f3241d0abdd8d70a4a81eb0c0a86dde53849e34643b9f37e173ed218d88bea948a240", + "d7631a8eea17f31555b3d4abf16439f763501827180a1f5e58389f796f1c0b468f41ea3ff2e1c76cd02d180c9df1" + "e19f6524b2a8d006f2f954f340a2f0a5a97946d39c34b935f5da5b081f18ecf457b6f0b33a37185ea8af64aa0ade" + "40026580dafe1a5dfd2c4a7acfa8a8254897c7fd3b", + "c309272b71ffd6ee1ed80b91ad22fe88d0488fa7c2dc4539f3452d6d6d1508c162bb8df3ec1fa5ebbd8ab738387d" + "5b0e649cfd83e17b3e943ccedf4548171c82cb8f0b2ae39c48d78df07e282cc40c3068dc70f1fc080114c1", + "786061e81d76bc07550cab11bc1ba1765b41e2967bc8736e11029968cbd85ba4" }, + { "c440e9504cfb4544932adc72ff5fc1b657ba0aae703b1bff33805b7f9b81412d", + "df08a05337a532382953728ef1e921b772d435803e671a02e9cdba82522714a1", + "9dfa0945de0d4c2cb76aa55f8b55761911163b87993db7964760dc5e807f003b6875f74eb34cc160942f580bfba4" + "d96d967d50b1b20b0643ae1a2c73691b6bfb64403350272686fc8bb3a8e3a5674761c2204ca240e37005", + "0c9f5ad3e58b9bf021e09b83564c8d74b1b2bf7c8cba0dc8177084a4e1a07bb84c30c3566103f538", + "279ac5eb9bf6e01cd50a0eda161658f331226f4c8d43fdb793ae07f353e6fc2f2821a01a02be62f515af80633215" + "a908aad8e5199c4ff23a38277ff8f16f15058d69fca995718c0d837b6db3bbb5842dd21c07ca35b21bd4", + "16f09ea8657c053e907bdf8f822936f2cac056af25e0240633c80ae0baf7ade2" }, + { "ca81440758e13fe0b847ea81be8037b1be4cf995f805d4f40c1f421c9864ab9d", + "aed156910fd8af6af094c74c0ca0fba932b436bc282e0c5c910ffd3651777117", "fd83897f98974ac8", + "64ff6ab0506574c5020e14c45a009192a7a17ffbf6761393e17a86aaf339264a5c72e9e2b7fd22832a999076dbd4" + "9c75145228ba6d36b0372042e22435f34577a2c3e1c89e2e1846dbc393d57064f016d0487d591fc6b7f8499701f8" + "2568182041929386c821b74a53232dd596b300a13fa09949939967e58b2c0cf2de5b8b", + "cc1913d2e48750a0", "59db1143754b19f380fb1d1b9296fa992b7c2f5adc56f451349d1ff95cd2a1d9" }, + { "a657ee84d894bb98db137d57121d149eee96447353225f701b4c0c8bfc5d9497", + "1edcd529feb85cd69e484c0989a9b60776437dd4dcf988e3bfcce5bead13f331", + "4fd8a593ef021f81603e430e0c9eef2fa2e7cab56d86b13a9ecfee70fb96a7bb0cdc7b23df061ff73b96a289faf0" + "c0756f0c2e4692489e58391eae3574539f40189fb8735735deda0c8d71ff361155a0d3a574b193a31746f0272001" + "fbe8f840dbb4f16f522c90096ae5d76209af6eb2e423109d2bf0", + "fd167c49f8e588d06df1ac5d94d61538e399d0c531aa0ac0f9a1c030dbd3e8b649796917f4f8f8078b104352b156" + "4a042ccffd30c19340e067d4f17b0bacc47e121a8808d06b1ea6bcc06ffbc1bdaed0999dca79212c8df6ec", + "99f8a75bbaef042167ebfb927e6ff5bdc23e3a2084e539780ffbdc20d9be6d21e761381f23937f3179aeff80469b" + "a65b8d2169c5695ad2dc64e39d165eb7e57ded4ab07182ca59e516b41dc463c2093425d9dcf6a377312e4437d441" + "6d063324d24945f86c57a060cdb4c182fb3c9094e6c43af38a8d", + "977af18c47b4e1bf3f6ee45ae865d3e3dd6ebc953c4ee636c3e560beb433c5d6" }, + { "0cb4ac9b372daf29e69a698a434c67bf822f88eabe81c2fbd1869b151bec66ad", + "b34c3f1d39ac43e9a10ed22019b858a679fc4c629b7554e4b205ec3f31d601d7", + "40da148ae0cd9eb7d108fe5b04664e6369ac4f24465737a33f2a16164e67a84a403a66ea3f4166b4304f", + "1559e36d745dd40b60d8006bfa6ad62f9f1a8a7992de66bbc71d8ddf18fd68ce01e7910a972a028334f686c3b214" + "d725d3606eb3b762d69fb1460b95e949a724d09977c41b13fb094e16e186ddd429515e939e641cc38e5f6c492f3c" + "f7495cbe2b474c48f1890e214edfb8580d1de07855084d69ae241b421ae6", + "e2c7a3fcd1d66a1f71301dfcfc459ad8c3485f2586a4594a02e46d35dbc4e637e9562cee2e317adc7120", + "feae706283fea438eaa7c20641bb8446e9695cd9a0292f99b3b3ed4609a28dee" }, + { "b38e1805f202898c64975134d2369d065b808ca28ac8562bef3dd97b96650b3c", + "1bd55d1c60a6f84094c52906fb2f711aacb93831fee6dc27fb6a746f4c412012", + "d4817734cb56d6bd3321c7a3dc4e23d5481703d72075ae6127f1f366a0624bc1e2ac175db9ee2fe4a9c0a016d1d9" + "955c652970a05dbb4b16f7d2e7275b9a915bc39df5effea00190b77eeb6fd056cb2951cada1d8ef9c8e9ca0de03d" + "7b2d659c947c9a82ab512641ae734f82", + "1be672d193cec78c85db5636ebdfe4f087ab5a2fccff0885fb39b60f901e8d6921e4d285b5daa19dac9032d6b03a" + "2a81740ba4ffd833e90a942253e607a800c1ff92", + "5be3df33c976077a603612ee85cfdf388953e958e5ee0c53271058258dbcc1fa8e493e044467fd00229b64337644" + "8e9958dae478e59808839daa20c983159be864a905f97e7e00bf82ac97bfd9d005f3282886b7c1df0b505f75741c" + "518bedea91f800fcb135688940a38022", + "5fe7fac48f68d44c9c8d8be7ac95025fb4bf890650af092d1228c4858a8c1a9f" }, + { "bdeb596ed2056c8a78eb1f33340d2b8b0789cc456d6e8db9bb45516233900e29", + "7096012b1bf4f66f48c1f26ab48d8594d244be86426438993ed1cfad84376c90", + "5f3638865cb87188951620dfbcf77c6da914372635542fca218b74f5808090f8ff72919975744dff1a6693a759da" + "7579ee01c449246e12783546333d9201ddd0e9941acbedc6c1995b09", + "186d83c27e4831ef0c472840230860513d15b0f3df6a27ce2decb7a53c15e38c3b043c8a", + "399b4dbc243c979b481b18a29415fff5065c9da5367679a2bbe60b5864352fa096c65cc51c9d5054844b8f0cdacb" + "c638f8defdc81b7d80a9f5b1fa58201f0c513dbb192ea93a05dda87f", + "7f5644fb9adcbc68a86621c4d6d7b1b32a62cda6ccdbe2d5fa8e708a4de8a3f5" }, + { "42985b7c9c97ec16bba3c36bcf82e93205c35a57428262d9e45a7fd494a9020d", + "be4b2dd3dde2e7a773f7b85f0acb48d65bdbf4d8bfc103eee72697c8834a5058", + "6bfc05bc2457a43f50a7391a2c38627fb0429a446ac684e7552cd54c07b9608f716ceeb50d6bc0563247163213e6" + "2ca2bbb5067dd00b3d884795a11dab0c96e23419ce7779554bf39c50edd6ae225998cf96d1effe70c81d348a938b" + "116fcae5d402f35aa2900673376576", + "a7f9f0d4a1cdeb5abf1d927f6968beab9c6ead6995f484c016", + "985b208c4938d0fd9ac7b653e0d04445fd9666044e79a766c746354cf7c949e8724170dd76245f2af71ac34d379b" + "0be203bcb863f40081564ba161087605a9863f5b39c2c7d0f7876c84b02d9131f5284ce5d837662575efedcbb3b0" + "12053e2c4b15ef4ee0010840552759", + "ac55330373905d10205b0884596166370c6c9c52af6a358bbf09195b3e2f2626" }, + { "50034fdf7205a542055cf377ef546d1fe01ae8c7581806688c04279aeccf76de", + "215de8afdde0916097f91dda6fecbd18c5e65bc685e10488e99a225a5887d92b", + "dcd4b2ef9dd40e50adc8ce3fb674801d650e", + "6f1ce70899b24793fd8ad89784d62ebc43b750faa9bc63fa44e707cb6877dc400dbcb85500a386add1052bbf090c" + "637c8c618428040226209023a0db954ac26824ce40ba5021bb19d1a65ee3e3c4261c9801bd85b9c282753072", + "df3e9901518fa830aaacab9a5635c861aab5", + "b2a32c41c181a42175cd9108135f815663981c51f43af547e7942f77ebdc46aa" }, + { "782358a4bf3258130b1ab345e76184bd37eeff55c6efe7b8489626e5ba01741b", + "3ae5c450b1f426cedd3f5445ee785b6c2718d587f4239053cbad839e7e19f044", "454e", + "bc5971d3c8a7284f6218685581fc0e67572e5f124405136021536da07ec4d443015de3a708e72eaa943f5b5fb8f4" + "85472a3999e95dc3ab7cf72ecba533006681a49f39b5d5768e9ed22e3cfc7d20d3744308a6518d46a0", + "8a75", "d5cf51a52be53fc9b297efd9c0f3421e598143718f7f46fc3dd542f166a65e8f" }, + { "5958a371e26fff28efef8a6e71a0b81b4a14e3cf57ac75d215376e050468806b", + "1293abdd7b6c43483f8caa43836922fb3a92feb4eb1476f4fa5ec4f06a0431f7", + "06544eb4f4baafd8880df8a4e1da38d3111149aef41669b56ae2", "5f6cd8814bf4915f08cbf1", + "e4b718de939d6fbb41e32b57098b08fa16bd39ccc085625d0546", + "d1a48afe22b3c7d28e239f103b93b0a200428f4bb8e80fcb2e5110fd1ed780eb" }, + { "7bdcad0b011743f3dec12c999ac89b28f60e03564cd076fbf0183457846e606b", + "e008a14a3fb5e56e89e02d5fec31b37b3fb6357682bc3db3368f25987f6205c2", + "c2bc1a650114c6d522d2f928c6a65fb6abcca554336dfb70b51f61558a349387b35462bba19c3f8f13488fd4812f" + "9d6d58d04a6ca93e8dad62a5f695a0834dd99f876294", + "18066e9f8cdd274090f075f3047a455ca6be1ec4d1672acb013f328a1d981bece9b9c9f0f38dd25db8523b885b47" + "cfaba4844d5bb3972591bdc2b68062e7fb0e08773506e7851a18fbc6cd29c29358a347ea195a10f5a7d874010909" + "278395f2f9820ee8eb6655602b7b44c6c1642b9c157cc5c1a454e1b18b46", + "bcf887985dc0e45a156b522f02c4b2adbf90a2b30f4a30ee68505df9c61d3857a6216a827c98d1d7df6dc664a526" + "32b61361f4d86ca646c83f690015535b149c545efed3", + "bd2cbde77f6ef4955e956d440226534942f7a41a659eb826647b3a99a57efa87" }, + { "21505992872622190e47da3d4a985ceaf356b35e096429bdff8e4a21fcbeccac", + "8b4ab2427a4177cd205fda2b2b31f8f5ecc5ff591262791f88f54535f3054977", + "1ceea40aba4d9328718e9939eaba25f5b558ed0df855e743cc958506b4d0c5e44d0690b9637bf94a30e861ed9260" + "e254d602be895f173453a7977236846c4687d2b38470f074b07e16e67721646989421cf5081555fa7bef42a83066" + "6e6c2c9b61ba14932210", + "106f5b1fed2f5d3a102733ef6fbb7e190e508e7e8cb73766bf18fa4d50b87d6f83144f9b616dceef6c0b085f09e4" + "27f7f0985a535fd9edf3bc05aa8dbc0db601cb4f90761420164fba50a68c5a87322fecbe28c902b03035e88d499a" + "f758eb2049659f2561ee6c5210579f8c0c", + "1562c0d501518e478b0c5561b32a79bbf5249d0eb8db411190454b4f3a458bfc200f65af91a22eb0fce63c726cb2" + "b51023d294c9a35e0ff842da517d6f91b6126c0ecfccd72cfc35d7ef98f11ebbb4cd071c2eafeda598a5ccf4e09d" + "8cff52ed583d968525a7", + "1dfe935ef87488e515897c850bc899d4a9844d512969802e98be90c0343bc146" }, + { "337bd1641222ad96608b0928eb3e05fee02a6fb1e2f66cb4c9b698d1d96ee39b", + "b532f2e6485513a5b21a6326beded2b3a74bc49c74db3f7a23e440e5bc864e7d", + "9cdf9d6c42cff95ca0bf8d199962f55ce013348fb06d878b10a344ad5a7b2b2981b0e44ddb7dda1f74bcd24f3ff1" + "bb63da249bb02234edf123305759780e45ace82aac7a95adbd1c7e72741e374c82a4524146d13589ef28ee593678" + "9e65724b10406aff6d19d0fee8289033c094bed67df3fd45b0bdd52fccc25492cd335a", + "efa6fdd7e4c161a5cc2eb6d67b14d6d8f16ecd3c52e8c9720709c321de05973b51750a7286120a50b3039e54c4c5" + "e09785f815ddb5eb528b43e972bf4c60e41252", + "4616337212a9b1fb827ad8729cf40a8309330dcc958ac0d5f73c9e57279de69280065e13fd1309153243c1303cf1" + "16227392c9ce4b8ab505a580c06926587378c83f49c30021a1f4038180fedbe90259a9d468c87bdff827da1d01a1" + "23fbd5b091d62d3b17e3ce7f4e83cba4510dc1e41b420c2ffc7544464befe9eb5a898d", + "709914dea13632a2127159bf004a73349efc090a46bfecec911c63679a1540e6" }, + { "88f3c9cd7b2f27295c5defc7ba7071996ae5d558192c1a4788efe8a3bc3559d0", + "d1ec8bbec1bd039825009a00b35522ad81c8de7bbfb698551f880b05319330c6", + "5fc7d4fba7f9018c91533584a5e61be925559d1c8b1270621aaa2f0f51ec69ee7b14628841e2a234f3ed4279e589" + "bc40339928d600f79a051db41699a98a263864ae34909a7c37e9c833c106bc5e996c730879d7b94d18c87741a3e7" + "2bbbd30a5c7a", + "9c", + "efec904dfe14b42ca52b083ca46fc0ab80877b425e8cfbafdbcdf8600bcaa64afa05119ebbdd0f8db82ae71236c2" + "4cac6cc53b9e0ec701f94ae4a9217f9f63ad426394793cebb1f0af7ba4bf0dc8ac621c48e2a435955afc79f095ba" + "518e20bbe360", + "1ed588fb6966a006fccc5f5a6e57949f9389f89c3e346bd8851610a0b159e958" }, + { "db7c3c7c7e5aa8a1c5cd5173bfb0d25958db4038a3d8deb705c102935fea8f21", + "315686635d388d5b2ecf3b12a8450280d92555a6920f6ad3b48ba3b4f8ec5053", + "939b319d85880267f8be72b69d2a22ba2460bbd7ce68cfc9398afce09c4f0005cf510db2aa894dcbf08120f07640" + "255a9464056ec16765521f23d602b5af51cab7133cf01123b3038cd7dc47fdd7801c46fd628de0aa", + "b2da", + "783dbc7d88eb43f69d7330326e58555f58df2e75a019586beb5e4a303a3b3e4439677fd7e00a6826372cb2bc15c2" + "5ab445bb0dfa8aae1f4d9b5d6ded219e69037c161c7fd5911bf08e3179419dbef05d37df75fb19c2", + "b96409a14cdac61218fcc2ece389e570ac6c665856f36d98fa01be4d767b960c" }, + { "cf1f1538739072f57ebf0fa4090a63c72cf8f5bb904effb6051073596ed1dd19", + "41e11d23771626febef2435eaefddf0c93a484ea6c4c7fa0bfd48f93e50b646d", + "a22ba67dac88efd1988863f8991bfc9dbb9dc1a34e3866b0a51e088671971225fed3bc0369b0bccb436249d6fa30" + "e7", + "80d7f1fc70203411f8827cd7eec9888f26e39e055d8fd1c2876e1e252b3b14363f493100f157d8246c29b973a490" + "338dfa0bcb52221d260875a65e22a56f655a55330933b35e2937c53a625a55bf40564fc58f742ecf54aed0536ca3" + "f7c59f6d", + "b3c76b03eb90c78ca281f178f30a92a98ed9966698ceb24f15f6c5ebf2e65ec4880543847005a58006a0829d2d00" + "b3", + "22f4354c7487a2db0c8c2249fe96909ea1cc9a053447b4a83ad396e3b3ec87ca" }, + { "38a7aa902690a3e1b285953e0121eae7304815e12a015fa98cbd227e6f7d73c1", + "f23f9ac01c0b118b684f10031836f7c92e8a70eea0e916dba2952b685ae2c148", + "995580acc337ee1216802b1a45daf0df12280eb94953ac61916d35eee038e5ea1d1f53da1c6a3e17d54dd1555e79" + "c4ac988494f805715f59f2404eee2fdb592fa538928d", + "6b726ca02fa44684e7d92ddb0b6e2f30d6a6e75b537f209d21bf2375718b4092286ea592f3c1750af21b12f64961" + "1370ee4bfac05e0281c9731242c507a56d9d6522c26e172fb406f3e61efbf3c346917988a1dc85c829d51d3954a0" + "825d2ca4d0e2a784c78ea07bfc5973e80fe6b34ccfe72457", + "c73f3832441f59ce54910fd16dca9e2bd59a168ccd658ba3eb87fbb1ba561f63ad73ecf9618481bc6e8c8020c60e" + "8194cc65bdea155f0f6cc79adaf2334c099793efba4a", + "5c52422a24f79990f26224082d375bf81eaf5df242389c894cf89c4d0131d01e" }, + { "aa54db3f1c5e6405d443afcf4a463974448435f4002d64044a21a04c269759b9", + "0711d3a79176e4c75ac8cc1ecdbadd4203a6a4b9eda4c2ef17150f493d645b8b", + "5a80d351e6a2682a6ceeb374acf59de7e7", + "171077e40c0a689d44003bd1ce56c08b81f6fa3c118cf448f5e8b6386328d5e3465132e5bdf4f73e60b1b1e6e021" + "d05f6881fe7ec8be523ae7e6c57dd1b0af6939b79dc785d584400dfb71aabc336817e295a922aa1d46b873ad3863" + "3099ffbecbf43527a1e64f98d82cf85a18", + "5026a9cbdd2239c6a9abd45e36d5b46b14", + "afe7bea6340c227c0f062e73a05e1be4aa63b93d35f2322322d3e855e0ef5887" }, + { "c3dddd6891c6081f6b478a6cf89574636c8905efbc8079ef1924b97036a050ef", + "abc30e2892910e8c3fb83d4cb6f93eea614a7ff03b750e31ad5fc74ab77e0715", + "079db15c3fc075189ca979ae738e72f0e5a35410b0b746d2d92874f58214cedd7e69a5337485ff038a44f18cbb6c" + "9bb02bc396aa128b87e7888011e803fd9f43dd43494dfb2b58981d1f95820be9d37cec3bc4f779861cf59137f764" + "dd88ea41cf044d9a", + "56c59f42c3429832f9f2333099d2c422ea40cf36162b162e6cda56a9", + "6910f3c047011cf301c6d8458ca4d1c40aafc129476a9c89da7b35ced9479edd3c7cbd5c1ae7a8fabff159cce121" + "c170c1e1a884255b08758d640371d26eb031ae92d1deb7091f202bff0698ca059eae8ae572ada217b6d3df5d446a" + "a5aef503eda02f5e", + "f5d285ebf784c68df40ff4324bf79d0808d43f0739d297f4238b833a7cf9c013" }, + { "77716c56b9f0e158530b24ae8bc160f827eb4a11ee3b1bb3fbef3922e41d58c1", + "f340f377c03ffca01829e013ba7a175b158ac51e5ec84e13dcc1a1974e157557", + "2b9b2bf80c7c65d0a2d243cfac9d01ec9a0250b5e985d430f5eed4ca6aa62b31e3f5d4256a9c998fc588c69486ad" + "41618d8b9094468f9e74b6", + "d314a97f25ebbb16aa2d8a444c70474b5733fa18507c544515ac905450507c708868a7c3847705fcc3b7651a72a2" + "15675a24d44aec160c562c1d68f859dcd4b9aa3569595e040ef6", + "a58d41ed071ccfd12e01de4038783e6b23f84f55354dc0368a025cb9ceff0aa01d9e77badba040fdbc5cd984f95f" + "4c6c6ad1151f02b5687ffd", + "f66ee48f6ab2bbdf3ebd292a11c997bfd6f81ef5a9b61f0c9c5f9e77d7fa2624" } +}; + +static int +tv(void) +{ + unsigned char *ad; + unsigned char *ciphertext; + unsigned char *decrypted; + unsigned char *detached_ciphertext; + unsigned char *expected_ciphertext; + unsigned char *key; + unsigned char *message; + unsigned char *mac; + unsigned char *nonce; + char *hex; + unsigned long long found_ciphertext_len; + unsigned long long found_mac_len; + unsigned long long found_message_len; + size_t ad_len; + size_t ciphertext_len; + size_t detached_ciphertext_len; + size_t i = 0U; + size_t message_len; + + key = (unsigned char *) sodium_malloc(crypto_aead_aegis256_KEYBYTES); + nonce = (unsigned char *) sodium_malloc(crypto_aead_aegis256_NPUBBYTES); + mac = (unsigned char *) sodium_malloc(crypto_aead_aegis256_ABYTES); + + do { + assert(strlen(tests[i].key_hex) == 2 * crypto_aead_aegis256_KEYBYTES); + sodium_hex2bin(key, crypto_aead_aegis256_KEYBYTES, tests[i].key_hex, + strlen(tests[i].key_hex), NULL, NULL, NULL); + assert(strlen(tests[i].nonce_hex) == 2 * crypto_aead_aegis256_NPUBBYTES); + sodium_hex2bin(nonce, crypto_aead_aegis256_NPUBBYTES, tests[i].nonce_hex, + strlen(tests[i].nonce_hex), NULL, NULL, NULL); + message_len = strlen(tests[i].message_hex) / 2; + message = (unsigned char *) sodium_malloc(message_len); + sodium_hex2bin(message, message_len, tests[i].message_hex, strlen(tests[i].message_hex), + NULL, NULL, NULL); + ad_len = strlen(tests[i].ad_hex) / 2; + ad = (unsigned char *) sodium_malloc(ad_len); + sodium_hex2bin(ad, ad_len, tests[i].ad_hex, strlen(tests[i].ad_hex), NULL, NULL, NULL); + ciphertext_len = message_len + crypto_aead_aegis256_ABYTES; + detached_ciphertext_len = message_len; + expected_ciphertext = (unsigned char *) sodium_malloc(ciphertext_len); + assert(strlen(tests[i].ciphertext_hex) == 2 * message_len); + sodium_hex2bin(expected_ciphertext, message_len, tests[i].ciphertext_hex, + strlen(tests[i].ciphertext_hex), NULL, NULL, NULL); + assert(strlen(tests[i].mac_hex) == 2 * crypto_aead_aegis256_ABYTES); + sodium_hex2bin(expected_ciphertext + message_len, crypto_aead_aegis256_ABYTES, + tests[i].mac_hex, strlen(tests[i].mac_hex), NULL, NULL, NULL); + ciphertext = (unsigned char *) sodium_malloc(ciphertext_len); + detached_ciphertext = (unsigned char *) sodium_malloc(detached_ciphertext_len); + + crypto_aead_aegis256_encrypt_detached(detached_ciphertext, mac, &found_mac_len, message, + message_len, ad, ad_len, NULL, nonce, key); + assert(found_mac_len == crypto_aead_aegis256_ABYTES); + if (memcmp(detached_ciphertext, expected_ciphertext, detached_ciphertext_len) != 0 || + memcmp(mac, expected_ciphertext + message_len, crypto_aead_aegis256_ABYTES) != 0) { + printf("Detached encryption of test vector #%u failed\n", (unsigned int) i); + hex = (char *) sodium_malloc((size_t) ciphertext_len * 2 + 1); + sodium_bin2hex(hex, (size_t) ciphertext_len * 2 + 1, ciphertext, ciphertext_len); + printf("Computed: [%s]\n", hex); + sodium_free(hex); + } + + crypto_aead_aegis256_encrypt(ciphertext, &found_ciphertext_len, message, message_len, ad, + ad_len, NULL, nonce, key); + + assert((size_t) found_ciphertext_len == ciphertext_len); + if (memcmp(ciphertext, expected_ciphertext, ciphertext_len) != 0) { + printf("Encryption of test vector #%u failed\n", (unsigned int) i); + hex = (char *) sodium_malloc((size_t) found_ciphertext_len * 2 + 1); + sodium_bin2hex(hex, (size_t) found_ciphertext_len * 2 + 1, ciphertext, ciphertext_len); + printf("Computed: [%s]\n", hex); + sodium_free(hex); + } + + decrypted = (unsigned char *) sodium_malloc(message_len); + found_message_len = 1; + if (crypto_aead_aegis256_decrypt(decrypted, &found_message_len, NULL, ciphertext, + randombytes_uniform((uint32_t) ciphertext_len), ad, ad_len, + nonce, key) != -1) { + printf("Verification of test vector #%u after truncation succeeded\n", + (unsigned int) i); + } + if (found_message_len != 0) { + printf("Message length should have been set to zero after a failure\n"); + } + if (crypto_aead_aegis256_decrypt(decrypted, &found_message_len, NULL, guard_page, + randombytes_uniform(crypto_aead_aegis256_ABYTES), ad, + ad_len, nonce, key) != -1) { + printf("Verification of test vector #%u with a truncated tag failed\n", + (unsigned int) i); + } + if (i == 0 && crypto_aead_aegis256_decrypt(NULL, NULL, NULL, ciphertext, ciphertext_len, ad, + ad_len, nonce, key) != 0) { + printf("Verification of test vector #%u's tag failed\n", (unsigned int) i); + } + if (crypto_aead_aegis256_decrypt(decrypted, &found_message_len, NULL, ciphertext, + ciphertext_len, ad, ad_len, nonce, key) != 0) { + printf("Verification of test vector #%u failed\n", (unsigned int) i); + } + assert((size_t) found_message_len == message_len); + if (memcmp(decrypted, message, message_len) != 0) { + printf("Incorrect decryption of test vector #%u\n", (unsigned int) i); + } + memset(decrypted, 0xd0, message_len); + if (crypto_aead_aegis256_decrypt_detached(decrypted, NULL, detached_ciphertext, + detached_ciphertext_len, mac, ad, ad_len, nonce, + key) != 0) { + printf("Detached verification of test vector #%u failed\n", (unsigned int) i); + } + if (memcmp(decrypted, message, message_len) != 0) { + printf("Incorrect decryption of test vector #%u\n", (unsigned int) i); + } + + sodium_free(message); + sodium_free(ad); + sodium_free(expected_ciphertext); + sodium_free(ciphertext); + sodium_free(decrypted); + sodium_free(detached_ciphertext); + } while (++i < (sizeof tests) / (sizeof tests[0])); + + sodium_free(key); + sodium_free(mac); + sodium_free(nonce); + + return 0; +} + +int +main(void) +{ + tv(); + assert(crypto_aead_aegis256_keybytes() == crypto_aead_aegis256_KEYBYTES); + assert(crypto_aead_aegis256_nsecbytes() == crypto_aead_aegis256_NSECBYTES); + assert(crypto_aead_aegis256_npubbytes() == crypto_aead_aegis256_NPUBBYTES); + assert(crypto_aead_aegis256_abytes() == crypto_aead_aegis256_ABYTES); + assert(crypto_aead_aegis256_messagebytes_max() == crypto_aead_aegis256_MESSAGEBYTES_MAX); + printf("OK\n"); + + return 0; +} diff --git a/test/default/aead_aegis256.exp b/test/default/aead_aegis256.exp new file mode 100644 index 00000000..d86bac9d --- /dev/null +++ b/test/default/aead_aegis256.exp @@ -0,0 +1 @@ +OK From dc63ae9aabca280484c37718abdbc35cb28527cf Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 00:30:40 +0200 Subject: [PATCH 66/73] Visual Studio: add Windows/ARM64 support --- builds/msvc/properties/ARM64.props | 23 ++++++ .../msvc/vs2010/libsodium/libsodium.vcxproj | 51 ++++++------- .../msvc/vs2012/libsodium/libsodium.vcxproj | 51 ++++++------- .../msvc/vs2013/libsodium/libsodium.vcxproj | 51 ++++++------- .../msvc/vs2015/libsodium/libsodium.vcxproj | 51 ++++++------- .../msvc/vs2017/libsodium/libsodium.vcxproj | 51 ++++++------- .../msvc/vs2019/libsodium/libsodium.vcxproj | 73 +++++++++++++------ .../msvc/vs2022/libsodium/libsodium.vcxproj | 73 +++++++++++++------ libsodium.vcxproj | 43 +++++++---- regen-msvc/libsodium.vcxproj.tpl | 52 +------------ regen-msvc/regen-msvc.py | 41 +++++++++++ regen-msvc/tl_libsodium.vcxproj.tpl | 36 +-------- 12 files changed, 328 insertions(+), 268 deletions(-) create mode 100644 builds/msvc/properties/ARM64.props diff --git a/builds/msvc/properties/ARM64.props b/builds/msvc/properties/ARM64.props new file mode 100644 index 00000000..a5b8f546 --- /dev/null +++ b/builds/msvc/properties/ARM64.props @@ -0,0 +1,23 @@ + + + + + <_PropertySheetDisplayName>ARM64 Settings + + + + + WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions) + + + ARM64;%(PreprocessorDefinitions) + + + MachineARM64 + + + /MACHINE:ARM64 %(AdditionalOptions) + + + + diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj b/builds/msvc/vs2010/libsodium/libsodium.vcxproj index 5d1bcf46..9efcd557 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,50 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 - DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + ReleaseLIB + Win32 + ReleaseLIB x64 + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + StaticLibrary diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj b/builds/msvc/vs2012/libsodium/libsodium.vcxproj index 0f13fa25..327999fb 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,50 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 - DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + ReleaseLIB + Win32 + ReleaseLIB x64 + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + StaticLibrary diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj b/builds/msvc/vs2013/libsodium/libsodium.vcxproj index d66a33e2..d464f5f5 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,50 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 - DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + ReleaseLIB + Win32 + ReleaseLIB x64 + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + StaticLibrary diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj b/builds/msvc/vs2015/libsodium/libsodium.vcxproj index a1ff0447..2bb704dd 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,50 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 - DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + ReleaseLIB + Win32 + ReleaseLIB x64 + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + StaticLibrary diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj b/builds/msvc/vs2017/libsodium/libsodium.vcxproj index 8ef2c996..99df4cfc 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,50 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 - DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + ReleaseLIB + Win32 + ReleaseLIB x64 + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + StaticLibrary diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj b/builds/msvc/vs2019/libsodium/libsodium.vcxproj index d7090a7e..950508c0 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,74 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + DebugDLL + ARM64 + + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 + + ReleaseDLL + ARM64 DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + DebugLIB + ARM64 + + + ReleaseLIB + Win32 + ReleaseLIB x64 + + ReleaseLIB + ARM64 + + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + DebugLTCG + ARM64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + + + ReleaseLTCG + ARM64 + StaticLibrary diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index 272984f5..d3fbfa75 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -1,5 +1,6 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium @@ -10,50 +11,74 @@ DebugDLL Win32 - - ReleaseDLL - Win32 - DebugDLL x64 + + DebugDLL + ARM64 + + + ReleaseDLL + Win32 + ReleaseDLL x64 - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 + + ReleaseDLL + ARM64 DebugLIB Win32 - - ReleaseLIB - Win32 - DebugLIB x64 + + DebugLIB + ARM64 + + + ReleaseLIB + Win32 + ReleaseLIB x64 + + ReleaseLIB + ARM64 + + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + DebugLTCG + ARM64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + + + ReleaseLTCG + ARM64 + StaticLibrary diff --git a/libsodium.vcxproj b/libsodium.vcxproj index 3217a25d..a7b358d4 100644 --- a/libsodium.vcxproj +++ b/libsodium.vcxproj @@ -1,5 +1,6 @@  - + DebugDLL @@ -9,14 +10,6 @@ DebugDLL x64 - - Debug - Win32 - - - Debug - x64 - ReleaseDLL Win32 @@ -25,12 +18,36 @@ ReleaseDLL x64 - - Release + + DebugLIB Win32 - - Release + + DebugLIB + x64 + + + ReleaseLIB + Win32 + + + ReleaseLIB + x64 + + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG x64 diff --git a/regen-msvc/libsodium.vcxproj.tpl b/regen-msvc/libsodium.vcxproj.tpl index e8d326c8..79132f90 100644 --- a/regen-msvc/libsodium.vcxproj.tpl +++ b/regen-msvc/libsodium.vcxproj.tpl @@ -1,59 +1,13 @@  - + {A185B162-6CB6-4502-B03F-B56F7699A8D9} libsodium {{platform}} - - DebugDLL - Win32 - - - ReleaseDLL - Win32 - - - DebugDLL - x64 - - - ReleaseDLL - x64 - - - DebugLTCG - Win32 - - - ReleaseLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - x64 - - - DebugLIB - Win32 - - - ReleaseLIB - Win32 - - - DebugLIB - x64 - - - ReleaseLIB - x64 - + {{configurations}} StaticLibrary diff --git a/regen-msvc/regen-msvc.py b/regen-msvc/regen-msvc.py index 8b479d82..6f6de0c7 100755 --- a/regen-msvc/regen-msvc.py +++ b/regen-msvc/regen-msvc.py @@ -77,6 +77,39 @@ for dir in dirs: fd = fd + " \r\n" +def get_project_configurations(vs_version): + projconfig = "" + configs = [ + "DebugDLL", + "ReleaseDLL", + "DebugLIB", + "ReleaseLIB", + "DebugLTCG", + "ReleaseLTCG", + ] + platforms = ["Win32", "x64"] + # add arm64 platform only for v142+ toolchain + if vs_version >= 142: + platforms.append("ARM64") + for config in configs: + for platform in platforms: + projconfig = ( + projconfig + + ' \r\n'.format( + config, platform + ) + ) + projconfig = ( + projconfig + + " {}\r\n".format(config) + ) + projconfig = projconfig + " {}\r\n".format( + platform + ) + projconfig = projconfig + " \r\n" + return projconfig + + def apply_template(tplfile, outfile, sbox): tpl = "" with open(tplfile, "rb") as fd: @@ -109,6 +142,7 @@ apply_template( ) sbox.update({"platform": "v140"}) +sbox.update({"configurations": get_project_configurations(140)}) apply_template(sd + "/tl_libsodium.vcxproj.tpl", "libsodium.vcxproj", sbox) apply_template( @@ -148,6 +182,7 @@ apply_template( ) sbox.update({"platform": "v143"}) +sbox.update({"configurations": get_project_configurations(143)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2022/libsodium/libsodium.vcxproj", @@ -155,6 +190,7 @@ apply_template( ) sbox.update({"platform": "v142"}) +sbox.update({"configurations": get_project_configurations(142)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2019/libsodium/libsodium.vcxproj", @@ -162,6 +198,7 @@ apply_template( ) sbox.update({"platform": "v141"}) +sbox.update({"configurations": get_project_configurations(141)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2017/libsodium/libsodium.vcxproj", @@ -169,6 +206,7 @@ apply_template( ) sbox.update({"platform": "v140"}) +sbox.update({"configurations": get_project_configurations(140)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2015/libsodium/libsodium.vcxproj", @@ -176,6 +214,7 @@ apply_template( ) sbox.update({"platform": "v120"}) +sbox.update({"configurations": get_project_configurations(120)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2013/libsodium/libsodium.vcxproj", @@ -183,6 +222,7 @@ apply_template( ) sbox.update({"platform": "v110"}) +sbox.update({"configurations": get_project_configurations(110)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2012/libsodium/libsodium.vcxproj", @@ -190,6 +230,7 @@ apply_template( ) sbox.update({"platform": "v100"}) +sbox.update({"configurations": get_project_configurations(100)}) apply_template( sd + "/libsodium.vcxproj.tpl", "builds/msvc/vs2010/libsodium/libsodium.vcxproj", diff --git a/regen-msvc/tl_libsodium.vcxproj.tpl b/regen-msvc/tl_libsodium.vcxproj.tpl index 72bb16a8..c741a031 100644 --- a/regen-msvc/tl_libsodium.vcxproj.tpl +++ b/regen-msvc/tl_libsodium.vcxproj.tpl @@ -1,38 +1,8 @@  - + - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - + {{configurations}} {A185B162-6CB6-4502-B03F-B56F7699A8D9} From a7f6e8d2185b63a8ddb36ea5dab1982536703eb0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 12:46:08 +0200 Subject: [PATCH 67/73] Update the ChangeLog --- ChangeLog | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b20a287..ff919e42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +* Version 1.0.19 + This release includes all the changes from 1.0.18-stable, as well as two +additions: + + - New AEADs: AEGIS-128L and AEGIS-256 are now available in the +`crypto_aead_aegis128l_*()` and `crypto_aead_aegis256_*()` namespaces. +AEGIS is a family of authenticated ciphers for high-performance applications, +leveraging hardware AES acceleration on `x86_64` and `aarch64`. In addition +to performance, AEGIS ciphers have unique properties making them easier and +safer to use than AES-GCM. They can also be used as high-performance MACs. + - The HKDF key derivation mechanism, required by many standard protocols, is +now available in the `crypto_kdf_hkdf_*()` namespace. It is implemented for +the SHA-256 and SHA-512 hash functions. + - The `osx.sh` build script was renamed to `macos.sh`. + * Version 1.0.18-stable - Visual Studio: support for Windows/ARM64 builds has been added. - Visual Studio: AVX512 implementations are enabled on supported CPUs. @@ -8,12 +23,12 @@ - iOS: bitcode is not generated any more, as it was deprecated by Apple. - watchOS: support for arm64 was added. - The Zig toolchain can now be used as a modern build system to replace -autoconf/automake/libtool/make/ccache and the compiler. This allows faster -compilation times, easy cross compilation, and static libraries optimized +autoconf/automake/libtool/make/ccache and the compiler. This enables faster +compilation times, easier cross compilation, and static libraries optimized for any CPU. - - The Zig toolchain is now the only supported way to compile `libsodium` -to WebAssembly/WASI. - - `libsodium` can now be added as a dependency to Zig projects. + - The Zig toolchain is now the recommended way to compile `libsodium` +to WebAssembly/WASI(X). + - libsodium can now be added as a dependency to Zig projects. - Memory fences were added to remove some gadgets that could be used alongside speculative loads. - The AES-GCM implementation was completely rewritten. It is now faster, From 89a62f0fa89dde08c5d914aa8a9fd68accbe0cb1 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 13:20:01 +0200 Subject: [PATCH 68/73] Move Appveyor CI scripts to ci/appveyor --- Makefile.am | 4 - Makefile.in | 4 - appveyor.yml | 4 +- .../msvc/vs2010/libsodium/libsodium.vcxproj | 10 - .../msvc/vs2012/libsodium/libsodium.vcxproj | 10 - .../msvc/vs2013/libsodium/libsodium.vcxproj | 10 - .../msvc/vs2015/libsodium/libsodium.vcxproj | 10 - .../msvc/vs2017/libsodium/libsodium.vcxproj | 10 - .../msvc/vs2019/libsodium/libsodium.vcxproj | 10 - .../msvc/vs2022/libsodium/libsodium.vcxproj | 10 - libsodium.sln => ci/appveyor/libsodium.sln | 0 ci/appveyor/libsodium.vcxproj | 593 +++++++++++++ ci/appveyor/libsodium.vcxproj.filters | 810 ++++++++++++++++++ ci/appveyor/msvc-scripts/process.bat | 5 + .../appveyor/msvc-scripts}/rep.vbs | 0 .../appveyor/msvc-scripts}/sodium.props | 9 +- configure | 3 +- configure.ac | 1 - libsodium.vcxproj | 609 ------------- libsodium.vcxproj.filters | 810 ------------------ msvc-scripts/Makefile.am | 4 - msvc-scripts/Makefile.in | 503 ----------- msvc-scripts/process.bat | 5 - regen-msvc/libsodium.vcxproj.tpl | 10 - regen-msvc/regen-msvc.py | 14 +- regen-msvc/tl_libsodium.vcxproj.tpl | 45 +- 26 files changed, 1462 insertions(+), 2041 deletions(-) rename libsodium.sln => ci/appveyor/libsodium.sln (100%) create mode 100644 ci/appveyor/libsodium.vcxproj create mode 100644 ci/appveyor/libsodium.vcxproj.filters create mode 100755 ci/appveyor/msvc-scripts/process.bat rename {msvc-scripts => ci/appveyor/msvc-scripts}/rep.vbs (100%) rename {msvc-scripts => ci/appveyor/msvc-scripts}/sodium.props (70%) delete mode 100644 libsodium.vcxproj delete mode 100644 libsodium.vcxproj.filters delete mode 100644 msvc-scripts/Makefile.am delete mode 100644 msvc-scripts/Makefile.in delete mode 100755 msvc-scripts/process.bat diff --git a/Makefile.am b/Makefile.am index 1f43ff31..cd3d1fba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,6 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ autogen.sh \ - libsodium.sln \ - libsodium.vcxproj \ - libsodium.vcxproj.filters \ LICENSE \ README.markdown \ THANKS @@ -13,7 +10,6 @@ SUBDIRS = \ builds \ contrib \ dist-build \ - msvc-scripts \ src \ test diff --git a/Makefile.in b/Makefile.in index 853ecde4..ec0f2690 100644 --- a/Makefile.in +++ b/Makefile.in @@ -423,9 +423,6 @@ valgrind_tools = @valgrind_tools@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ autogen.sh \ - libsodium.sln \ - libsodium.vcxproj \ - libsodium.vcxproj.filters \ LICENSE \ README.markdown \ THANKS @@ -434,7 +431,6 @@ SUBDIRS = \ builds \ contrib \ dist-build \ - msvc-scripts \ src \ test diff --git a/appveyor.yml b/appveyor.yml index a70d581c..5c696ba7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,5 +20,5 @@ init: msbuild /version build: parallel: true - project: libsodium.vcxproj - verbosity: minimal + project: ci/appveyor/libsodium.vcxproj + verbosity: normal diff --git a/builds/msvc/vs2010/libsodium/libsodium.vcxproj b/builds/msvc/vs2010/libsodium/libsodium.vcxproj index 9efcd557..0e31ab0d 100644 --- a/builds/msvc/vs2010/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2010/libsodium/libsodium.vcxproj @@ -67,16 +67,6 @@ - - - - - - - - - - diff --git a/builds/msvc/vs2012/libsodium/libsodium.vcxproj b/builds/msvc/vs2012/libsodium/libsodium.vcxproj index 327999fb..9c080088 100644 --- a/builds/msvc/vs2012/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2012/libsodium/libsodium.vcxproj @@ -67,16 +67,6 @@ - - - - - - - - - - diff --git a/builds/msvc/vs2013/libsodium/libsodium.vcxproj b/builds/msvc/vs2013/libsodium/libsodium.vcxproj index d464f5f5..5a335fad 100644 --- a/builds/msvc/vs2013/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2013/libsodium/libsodium.vcxproj @@ -67,16 +67,6 @@ - - - - - - - - - - diff --git a/builds/msvc/vs2015/libsodium/libsodium.vcxproj b/builds/msvc/vs2015/libsodium/libsodium.vcxproj index 2bb704dd..a966c1a7 100644 --- a/builds/msvc/vs2015/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2015/libsodium/libsodium.vcxproj @@ -67,16 +67,6 @@ - - - - - - - - - - diff --git a/builds/msvc/vs2017/libsodium/libsodium.vcxproj b/builds/msvc/vs2017/libsodium/libsodium.vcxproj index 99df4cfc..ab04206c 100644 --- a/builds/msvc/vs2017/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2017/libsodium/libsodium.vcxproj @@ -67,16 +67,6 @@ - - - - - - - - - - diff --git a/builds/msvc/vs2019/libsodium/libsodium.vcxproj b/builds/msvc/vs2019/libsodium/libsodium.vcxproj index 950508c0..cf64dfbb 100644 --- a/builds/msvc/vs2019/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2019/libsodium/libsodium.vcxproj @@ -91,16 +91,6 @@ - - - - - - - - - - diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index d3fbfa75..b4fdad58 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -91,16 +91,6 @@ - - - - - - - - - - diff --git a/libsodium.sln b/ci/appveyor/libsodium.sln similarity index 100% rename from libsodium.sln rename to ci/appveyor/libsodium.sln diff --git a/ci/appveyor/libsodium.vcxproj b/ci/appveyor/libsodium.vcxproj new file mode 100644 index 00000000..e2d2f72e --- /dev/null +++ b/ci/appveyor/libsodium.vcxproj @@ -0,0 +1,593 @@ + + + + + DebugDLL + Win32 + + + DebugDLL + x64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseDLL + Win32 + + + ReleaseDLL + x64 + + + Release + Win32 + + + Release + x64 + + + + {A185B162-6CB6-4502-B03F-B56F7699A8D9} + Win32Proj + libsodium + + + + StaticLibrary + true + MultiByte + false + v140 + + + DynamicLibrary + true + MultiByte + false + v140 + + + StaticLibrary + true + MultiByte + false + v140 + + + DynamicLibrary + true + MultiByte + false + v140 + + + StaticLibrary + false + true + MultiByte + v140 + + + DynamicLibrary + false + true + MultiByte + v140 + + + StaticLibrary + false + true + MultiByte + v140 + + + DynamicLibrary + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + + + + Level3 + Disabled + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebug + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + + + Level3 + Disabled + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebugDLL + $(SolutionDir)..\..\;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + + + Level3 + Disabled + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebug + + + Console + true + + + + + + + Level3 + Disabled + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebugDLL + + + Console + true + + + + + Level3 + + + Full + true + true + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreaded + Speed + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + Level3 + + + Full + true + true + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDLL + Speed + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreaded + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDLL + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ci/appveyor/libsodium.vcxproj.filters b/ci/appveyor/libsodium.vcxproj.filters new file mode 100644 index 00000000..718694ae --- /dev/null +++ b/ci/appveyor/libsodium.vcxproj.filters @@ -0,0 +1,810 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + diff --git a/ci/appveyor/msvc-scripts/process.bat b/ci/appveyor/msvc-scripts/process.bat new file mode 100755 index 00000000..963d7515 --- /dev/null +++ b/ci/appveyor/msvc-scripts/process.bat @@ -0,0 +1,5 @@ +cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.20/ < ..\..\src\libsodium\include\sodium\version.h.in > tmp +cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/28/ < tmp > tmp2 +cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/0/ < tmp2 > tmp3 +cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > ..\..\src\libsodium\include\sodium\version.h +del tmp tmp2 tmp3 diff --git a/msvc-scripts/rep.vbs b/ci/appveyor/msvc-scripts/rep.vbs similarity index 100% rename from msvc-scripts/rep.vbs rename to ci/appveyor/msvc-scripts/rep.vbs diff --git a/msvc-scripts/sodium.props b/ci/appveyor/msvc-scripts/sodium.props similarity index 70% rename from msvc-scripts/sodium.props rename to ci/appveyor/msvc-scripts/sodium.props index 41e1e471..b5665f68 100644 --- a/msvc-scripts/sodium.props +++ b/ci/appveyor/msvc-scripts/sodium.props @@ -1,24 +1,25 @@  - + - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) true UNICODE;_UNICODE;%(PreprocessorDefinitions) NATIVE_LITTLE_ENDIAN=1;%(PreprocessorDefinitions) inline=__inline;%(PreprocessorDefinitions) - "$(SolutionDir)/msvc-scripts/process.bat" + "$(SolutionDir)\msvc-scripts\process.bat" Process .in files - "$(SolutionDir)/test/default/wintest.bat" $(Configuration) $(Platform) + "$(SolutionDir)..\..\test\default\wintest.bat" $(Configuration) $(Platform) Run the test suite diff --git a/configure b/configure index fc7871f3..b3210f72 100755 --- a/configure +++ b/configure @@ -21365,7 +21365,7 @@ then : fi -ac_config_files="$ac_config_files Makefile builds/Makefile contrib/Makefile dist-build/Makefile libsodium.pc libsodium-uninstalled.pc msvc-scripts/Makefile src/Makefile src/libsodium/Makefile src/libsodium/include/Makefile src/libsodium/include/sodium/version.h test/default/Makefile test/Makefile" +ac_config_files="$ac_config_files Makefile builds/Makefile contrib/Makefile dist-build/Makefile libsodium.pc libsodium-uninstalled.pc src/Makefile src/libsodium/Makefile src/libsodium/include/Makefile src/libsodium/include/sodium/version.h test/default/Makefile test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -22437,7 +22437,6 @@ do "dist-build/Makefile") CONFIG_FILES="$CONFIG_FILES dist-build/Makefile" ;; "libsodium.pc") CONFIG_FILES="$CONFIG_FILES libsodium.pc" ;; "libsodium-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES libsodium-uninstalled.pc" ;; - "msvc-scripts/Makefile") CONFIG_FILES="$CONFIG_FILES msvc-scripts/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/libsodium/Makefile") CONFIG_FILES="$CONFIG_FILES src/libsodium/Makefile" ;; "src/libsodium/include/Makefile") CONFIG_FILES="$CONFIG_FILES src/libsodium/include/Makefile" ;; diff --git a/configure.ac b/configure.ac index 8e0b3193..df83ef51 100644 --- a/configure.ac +++ b/configure.ac @@ -988,7 +988,6 @@ AC_CONFIG_FILES([Makefile dist-build/Makefile libsodium.pc libsodium-uninstalled.pc - msvc-scripts/Makefile src/Makefile src/libsodium/Makefile src/libsodium/include/Makefile diff --git a/libsodium.vcxproj b/libsodium.vcxproj deleted file mode 100644 index a7b358d4..00000000 --- a/libsodium.vcxproj +++ /dev/null @@ -1,609 +0,0 @@ - - - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - DebugLIB - Win32 - - - DebugLIB - x64 - - - ReleaseLIB - Win32 - - - ReleaseLIB - x64 - - - DebugLTCG - Win32 - - - DebugLTCG - x64 - - - ReleaseLTCG - Win32 - - - ReleaseLTCG - x64 - - - - {A185B162-6CB6-4502-B03F-B56F7699A8D9} - Win32Proj - libsodium - - - - StaticLibrary - true - MultiByte - false - v140 - - - DynamicLibrary - true - MultiByte - false - v140 - - - StaticLibrary - true - MultiByte - false - v140 - - - DynamicLibrary - true - MultiByte - false - v140 - - - StaticLibrary - false - true - MultiByte - v140 - - - DynamicLibrary - false - true - MultiByte - v140 - - - StaticLibrary - false - true - MultiByte - v140 - - - DynamicLibrary - false - true - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - - - - Level3 - Disabled - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebug - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - - - - - - - Level3 - Disabled - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebugDLL - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - - - - - - - Level3 - Disabled - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebug - - - Console - true - - - - - - - Level3 - Disabled - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebugDLL - - - Console - true - - - - - Level3 - - - Full - true - true - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreaded - Speed - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - - - - - Level3 - - - Full - true - true - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDLL - Speed - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreaded - - - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDLL - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libsodium.vcxproj.filters b/libsodium.vcxproj.filters deleted file mode 100644 index c9ef1c31..00000000 --- a/libsodium.vcxproj.filters +++ /dev/null @@ -1,810 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - diff --git a/msvc-scripts/Makefile.am b/msvc-scripts/Makefile.am deleted file mode 100644 index 16481929..00000000 --- a/msvc-scripts/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST = \ - process.bat \ - rep.vbs \ - sodium.props diff --git a/msvc-scripts/Makefile.in b/msvc-scripts/Makefile.in deleted file mode 100644 index c46a94be..00000000 --- a/msvc-scripts/Makefile.in +++ /dev/null @@ -1,503 +0,0 @@ -# Makefile.in generated by automake 1.16.5 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2021 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = msvc-scripts -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_fortify_source.m4 \ - $(top_srcdir)/m4/ax_check_catchable_abrt.m4 \ - $(top_srcdir)/m4/ax_check_catchable_segv.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_define.m4 \ - $(top_srcdir)/m4/ax_check_link_flag.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/ax_tls.m4 \ - $(top_srcdir)/m4/ax_valgrind_check.m4 \ - $(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -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@ -CFLAGS_MMX = @CFLAGS_MMX@ -CFLAGS_PCLMUL = @CFLAGS_PCLMUL@ -CFLAGS_RDRAND = @CFLAGS_RDRAND@ -CFLAGS_SSE2 = @CFLAGS_SSE2@ -CFLAGS_SSE3 = @CFLAGS_SSE3@ -CFLAGS_SSE41 = @CFLAGS_SSE41@ -CFLAGS_SSSE3 = @CFLAGS_SSSE3@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CSCOPE = @CSCOPE@ -CTAGS = @CTAGS@ -CWFLAGS = @CWFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DLL_VERSION = @DLL_VERSION@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ -ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ -ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ -ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ -ETAGS = @ETAGS@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FILECMD = @FILECMD@ -GREP = @GREP@ -HAVE_AMD64_ASM_V = @HAVE_AMD64_ASM_V@ -HAVE_AVX_ASM_V = @HAVE_AVX_ASM_V@ -HAVE_CPUID_V = @HAVE_CPUID_V@ -HAVE_TI_MODE_V = @HAVE_TI_MODE_V@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LIBTOOL_EXTRA_FLAGS = @LIBTOOL_EXTRA_FLAGS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGCONFIG_LIBS_PRIVATE = @PKGCONFIG_LIBS_PRIVATE@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_CXX = @PTHREAD_CXX@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -SAFECODE_HOME = @SAFECODE_HOME@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SODIUM_LIBRARY_MINIMAL_DEF = @SODIUM_LIBRARY_MINIMAL_DEF@ -SODIUM_LIBRARY_VERSION = @SODIUM_LIBRARY_VERSION@ -SODIUM_LIBRARY_VERSION_MAJOR = @SODIUM_LIBRARY_VERSION_MAJOR@ -SODIUM_LIBRARY_VERSION_MINOR = @SODIUM_LIBRARY_VERSION_MINOR@ -STRIP = @STRIP@ -TEST_LDFLAGS = @TEST_LDFLAGS@ -VALGRIND = @VALGRIND@ -VALGRIND_ENABLED = @VALGRIND_ENABLED@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -valgrind_enabled_tools = @valgrind_enabled_tools@ -valgrind_tools = @valgrind_tools@ -EXTRA_DIST = \ - process.bat \ - rep.vbs \ - sodium.props - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign msvc-scripts/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign msvc-scripts/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -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) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/msvc-scripts/process.bat b/msvc-scripts/process.bat deleted file mode 100755 index bf58298d..00000000 --- a/msvc-scripts/process.bat +++ /dev/null @@ -1,5 +0,0 @@ -cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.19/ < src\libsodium\include\sodium\version.h.in > tmp -cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/10/ < tmp > tmp2 -cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/4/ < tmp2 > tmp3 -cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h -del tmp tmp2 tmp3 diff --git a/regen-msvc/libsodium.vcxproj.tpl b/regen-msvc/libsodium.vcxproj.tpl index 79132f90..08a5b096 100644 --- a/regen-msvc/libsodium.vcxproj.tpl +++ b/regen-msvc/libsodium.vcxproj.tpl @@ -20,16 +20,6 @@ - - - - - - - - - - {{v1}} diff --git a/regen-msvc/regen-msvc.py b/regen-msvc/regen-msvc.py index 6f6de0c7..f04e3e23 100755 --- a/regen-msvc/regen-msvc.py +++ b/regen-msvc/regen-msvc.py @@ -9,24 +9,24 @@ dirs = set() tlv1 = "" for file in glob.iglob("src/libsodium/**/*.c", recursive=True): file = file.replace("/", "\\") - tlv1 = tlv1 + ' \r\n'.format(file) + tlv1 = tlv1 + ' \r\n'.format(file) tlv2 = "" for file in glob.iglob("src/libsodium/**/*.h", recursive=True): file = file.replace("/", "\\") - tlv2 = tlv2 + ' \r\n'.format(file) + tlv2 = tlv2 + ' \r\n'.format(file) tlf1 = "" for file in glob.iglob("src/libsodium/**/*.c", recursive=True): file = file.replace("/", "\\") - tlf1 = tlf1 + ' \r\n'.format(file) + tlf1 = tlf1 + ' \r\n'.format(file) tlf1 = tlf1 + " Source Files\r\n" tlf1 = tlf1 + " \r\n" tlf2 = "" for file in glob.iglob("src/libsodium/**/*.h", recursive=True): file = file.replace("/", "\\") - tlf2 = tlf2 + ' \r\n'.format(file) + tlf2 = tlf2 + ' \r\n'.format(file) tlf2 = tlf2 + " Header Files\r\n" tlf2 = tlf2 + " \r\n" @@ -138,12 +138,14 @@ sbox = { sd = os.path.dirname(os.path.realpath(__file__)) apply_template( - sd + "/tl_libsodium.vcxproj.filters.tpl", "libsodium.vcxproj.filters", sbox + sd + "/tl_libsodium.vcxproj.filters.tpl", + "ci/appveyor/libsodium.vcxproj.filters", + sbox, ) sbox.update({"platform": "v140"}) sbox.update({"configurations": get_project_configurations(140)}) -apply_template(sd + "/tl_libsodium.vcxproj.tpl", "libsodium.vcxproj", sbox) +apply_template(sd + "/tl_libsodium.vcxproj.tpl", "ci/appveyor/libsodium.vcxproj", sbox) apply_template( sd + "/libsodium.vcxproj.filters.tpl", diff --git a/regen-msvc/tl_libsodium.vcxproj.tpl b/regen-msvc/tl_libsodium.vcxproj.tpl index c741a031..b42408eb 100644 --- a/regen-msvc/tl_libsodium.vcxproj.tpl +++ b/regen-msvc/tl_libsodium.vcxproj.tpl @@ -2,7 +2,38 @@ - {{configurations}} + + DebugDLL + Win32 + + + DebugDLL + x64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseDLL + Win32 + + + ReleaseDLL + x64 + + + Release + Win32 + + + Release + x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9} @@ -151,7 +182,7 @@ SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 4244;%(DisableSpecificWarnings) MultiThreadedDebug - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) Console @@ -167,7 +198,7 @@ SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 4244;%(DisableSpecificWarnings) MultiThreadedDebugDLL - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) + $(SolutionDir)..\..\;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) Console @@ -216,7 +247,7 @@ 4244;%(DisableSpecificWarnings) MultiThreaded Speed - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) Console @@ -237,7 +268,7 @@ 4244;%(DisableSpecificWarnings) MultiThreadedDLL Speed - $(SolutionDir);$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include\sodium;$(SolutionDir)src\libsodium\include;%(AdditionalIncludeDirectories) + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) Console @@ -289,10 +320,10 @@ {{tlv2}} - + - + From 443617d7507498f7477703f0b51cb596d4539262 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 11 Nov 2021 14:15:24 +0100 Subject: [PATCH 69/73] Remove expected length from the pwhash_str_verify()/needs_rehash() --- src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c | 8 ++++---- src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c | 4 ++-- src/libsodium/crypto_pwhash/crypto_pwhash.c | 4 ++-- .../scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c | 4 ++-- src/libsodium/include/sodium/crypto_pwhash.h | 4 ++-- src/libsodium/include/sodium/crypto_pwhash_argon2i.h | 4 ++-- src/libsodium/include/sodium/crypto_pwhash_argon2id.h | 4 ++-- .../include/sodium/crypto_pwhash_scryptsalsa208sha256.h | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c b/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c index f9e9a390..8e17c5b2 100644 --- a/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +++ b/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c @@ -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); diff --git a/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c b/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c index d641a617..e08be0a8 100644 --- a/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +++ b/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c @@ -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; diff --git a/src/libsodium/crypto_pwhash/crypto_pwhash.c b/src/libsodium/crypto_pwhash/crypto_pwhash.c index a229b9f7..fde099a6 100644 --- a/src/libsodium/crypto_pwhash/crypto_pwhash.c +++ b/src/libsodium/crypto_pwhash/crypto_pwhash.c @@ -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, diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c index fe701714..f44e04e2 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c @@ -243,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]; @@ -273,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_; diff --git a/src/libsodium/include/sodium/crypto_pwhash.h b/src/libsodium/include/sodium/crypto_pwhash.h index 585a993e..40e7ceb5 100644 --- a/src/libsodium/include/sodium/crypto_pwhash.h +++ b/src/libsodium/include/sodium/crypto_pwhash.h @@ -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)); diff --git a/src/libsodium/include/sodium/crypto_pwhash_argon2i.h b/src/libsodium/include/sodium/crypto_pwhash_argon2i.h index 88ff6221..63abdf4a 100644 --- a/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +++ b/src/libsodium/include/sodium/crypto_pwhash_argon2i.h @@ -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)); diff --git a/src/libsodium/include/sodium/crypto_pwhash_argon2id.h b/src/libsodium/include/sodium/crypto_pwhash_argon2id.h index 7183abd1..98bc83e0 100644 --- a/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +++ b/src/libsodium/include/sodium/crypto_pwhash_argon2id.h @@ -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)); diff --git a/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h b/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h index 5c0bf7d3..8956dfbf 100644 --- a/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +++ b/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h @@ -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)); From d1177e2eb832f3d9dd86f6371213521d0d80520c Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 19:15:18 +0200 Subject: [PATCH 70/73] Sync build scripts with 1.0.20 --- ChangeLog | 1 + dist-build/Makefile.am | 7 +- dist-build/Makefile.in | 7 +- dist-build/android-arm.sh | 4 - dist-build/android-mips32.sh | 4 - dist-build/android-mips64.sh | 4 - dist-build/apple-xcframework.sh | 38 +++--- dist-build/generate-emscripten-symbols.sh | 12 +- dist-build/ios.sh | 135 ---------------------- dist-build/msys2-win32.sh | 12 +- dist-build/msys2-win64.sh | 12 +- dist-build/watchos.sh | 114 ------------------ 12 files changed, 42 insertions(+), 308 deletions(-) delete mode 100755 dist-build/android-arm.sh delete mode 100755 dist-build/android-mips32.sh delete mode 100755 dist-build/android-mips64.sh delete mode 100755 dist-build/ios.sh delete mode 100755 dist-build/watchos.sh diff --git a/ChangeLog b/ChangeLog index ff919e42..eb15a016 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ safer to use than AES-GCM. They can also be used as high-performance MACs. now available in the `crypto_kdf_hkdf_*()` namespace. It is implemented for the SHA-256 and SHA-512 hash functions. - The `osx.sh` build script was renamed to `macos.sh`. + - Support for android-mips was removed. * Version 1.0.18-stable - Visual Studio: support for Windows/ARM64 builds has been added. diff --git a/dist-build/Makefile.am b/dist-build/Makefile.am index fe7961d3..7bea4fbb 100644 --- a/dist-build/Makefile.am +++ b/dist-build/Makefile.am @@ -1,17 +1,14 @@ EXTRA_DIST = \ android-build.sh \ - android-arm.sh \ + android-aar.sh \ android-armv7-a.sh \ android-armv8-a.sh \ - android-mips32.sh \ - android-mips64.sh \ android-x86.sh \ android-x86_64.sh \ emscripten.sh \ - ios.sh \ apple-xcframework.sh \ + macos.sh \ msys2-win32.sh \ msys2-win64.sh \ - watchos.sh \ wasm32-wasi.sh diff --git a/dist-build/Makefile.in b/dist-build/Makefile.in index 2d6dd57a..3e8e695f 100644 --- a/dist-build/Makefile.in +++ b/dist-build/Makefile.in @@ -301,19 +301,16 @@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ EXTRA_DIST = \ android-build.sh \ - android-arm.sh \ + android-aar.sh \ android-armv7-a.sh \ android-armv8-a.sh \ - android-mips32.sh \ - android-mips64.sh \ android-x86.sh \ android-x86_64.sh \ emscripten.sh \ - ios.sh \ apple-xcframework.sh \ + macos.sh \ msys2-win32.sh \ msys2-win64.sh \ - watchos.sh \ wasm32-wasi.sh all: all-am diff --git a/dist-build/android-arm.sh b/dist-build/android-arm.sh deleted file mode 100755 index eb97828c..00000000 --- a/dist-build/android-arm.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export TARGET_ARCH=armv6 -export CFLAGS="-Os -mthumb -marm -march=${TARGET_ARCH}" -ARCH=arm HOST_COMPILER=arm-linux-androideabi "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-mips32.sh b/dist-build/android-mips32.sh deleted file mode 100755 index ab5f6314..00000000 --- a/dist-build/android-mips32.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export TARGET_ARCH=mips32 -export CFLAGS="-Os" -ARCH=mips HOST_COMPILER=mipsel-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-mips64.sh b/dist-build/android-mips64.sh deleted file mode 100755 index 75dd6eaa..00000000 --- a/dist-build/android-mips64.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export TARGET_ARCH=mips64r6 -export CFLAGS="-Os -march=${TARGET_ARCH}" -CC="mips64el-linux-android-gcc" NDK_PLATFORM=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/apple-xcframework.sh b/dist-build/apple-xcframework.sh index ed3d5563..97b11d0a 100755 --- a/dist-build/apple-xcframework.sh +++ b/dist-build/apple-xcframework.sh @@ -71,7 +71,7 @@ build_macos() { ## macOS arm64 if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then - export CFLAGS="-O2 -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}" + export CFLAGS="-Ofast -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}" export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -81,7 +81,7 @@ build_macos() { fi ## macOS x86_64 - export CFLAGS="-O2 -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}" + export CFLAGS="-Ofast -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}" export LDFLAGS="-arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -96,7 +96,7 @@ build_ios() { export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk" ## 32-bit iOS - export CFLAGS="-O2 -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" + export CFLAGS="-Ofast -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" export LDFLAGS="-mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -105,7 +105,7 @@ build_ios() { make -j${PROCESSORS} install || exit 1 ## 32-bit armv7s iOS - export CFLAGS="-O2 -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" + export CFLAGS="-Ofast -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" export LDFLAGS="-mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -114,7 +114,7 @@ build_ios() { make -j${PROCESSORS} install || exit 1 ## 64-bit iOS - export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -130,7 +130,7 @@ build_ios_simulator() { ## arm64 simulator if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then - export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -140,7 +140,7 @@ build_ios_simulator() { fi ## i386 simulator - export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -149,7 +149,7 @@ build_ios_simulator() { make -j${PROCESSORS} install || exit 1 ## x86_64 simulator - export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -164,7 +164,7 @@ build_watchos() { export SDK="${BASEDIR}/SDKs/WatchOS.sdk" # 32-bit watchOS - export CFLAGS="-O2 -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" + export CFLAGS="-Ofast -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" export LDFLAGS="-mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -173,7 +173,7 @@ build_watchos() { make -j${PROCESSORS} install || exit 1 ## 64-bit arm64_32 watchOS - export CFLAGS="-O2 -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" + export CFLAGS="-Ofast -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" export LDFLAGS="-mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -182,7 +182,7 @@ build_watchos() { make -j${PROCESSORS} install || exit 1 ## 64-bit arm64 watchOS - export CFLAGS="-O2 -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" + export CFLAGS="-Ofast -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" export LDFLAGS="-mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -198,7 +198,7 @@ build_watchos_simulator() { ## arm64 simulator if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then - export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -208,7 +208,7 @@ build_watchos_simulator() { fi ## i386 simulator - export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -217,7 +217,7 @@ build_watchos_simulator() { make -j${PROCESSORS} install || exit 1 ## x86_64 simulator - export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -232,7 +232,7 @@ build_tvos() { export SDK="${BASEDIR}/SDKs/AppleTVOS.sdk" ## 64-bit tvOS - export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}" + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}" export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -248,7 +248,7 @@ build_tvos_simulator() { ## arm64 simulator if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then - export CFLAGS="-O2 -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -258,7 +258,7 @@ build_tvos_simulator() { fi ## x86_64 simulator - export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" + export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}" make distclean >/dev/null 2>&1 @@ -304,7 +304,7 @@ build_catalyst() { ## arm64 catalyst if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then - export CFLAGS="-O2 -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}" + export CFLAGS="-Ofast -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}" export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}" make distclean >/dev/null 2>&1 @@ -314,7 +314,7 @@ build_catalyst() { fi ## x86_64 catalyst - export CFLAGS="-O2 -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}" + export CFLAGS="-Ofast -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}" export LDFLAGS="-arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}" make distclean >/dev/null 2>&1 diff --git a/dist-build/generate-emscripten-symbols.sh b/dist-build/generate-emscripten-symbols.sh index c4143706..721262e6 100755 --- a/dist-build/generate-emscripten-symbols.sh +++ b/dist-build/generate-emscripten-symbols.sh @@ -17,7 +17,7 @@ symbols() { else eval "defined_${symbol}=no" fi - done < emscripten-symbols.def + done emscripten.sh.tmp && \ +sed s/EXPORTED_FUNCTIONS_STANDARD=\'.*\'/EXPORTED_FUNCTIONS_STANDARD=\'${out}\'/ emscripten.sh.tmp && mv -f emscripten.sh.tmp emscripten.sh out=$(symbols sumo) -sed s/EXPORTED_FUNCTIONS_SUMO=\'.*\'/EXPORTED_FUNCTIONS_SUMO=\'${out}\'/ < emscripten.sh > emscripten.sh.tmp && \ +sed s/EXPORTED_FUNCTIONS_SUMO=\'.*\'/EXPORTED_FUNCTIONS_SUMO=\'${out}\'/ emscripten.sh.tmp && mv -f emscripten.sh.tmp emscripten.sh chmod +x emscripten.sh diff --git a/dist-build/ios.sh b/dist-build/ios.sh deleted file mode 100755 index ef1848ff..00000000 --- a/dist-build/ios.sh +++ /dev/null @@ -1,135 +0,0 @@ -#! /bin/sh -# -# Step 1. -# Configure for base system so simulator is covered -# -# Step 2. -# Make for iOS and iOS simulator -# -# Step 3. -# Merge libs into final version for xcode import - -export PREFIX="$(pwd)/libsodium-ios" -export IOS32_PREFIX="$PREFIX/tmp/ios32" -export IOS32s_PREFIX="$PREFIX/tmp/ios32s" -export IOS64_PREFIX="$PREFIX/tmp/ios64" -export SIMULATOR32_PREFIX="$PREFIX/tmp/simulator32" -export SIMULATOR64_PREFIX="$PREFIX/tmp/simulator64" -export XCODEDIR=$(xcode-select -p) - -export IOS_SIMULATOR_VERSION_MIN=${IOS_SIMULATOR_VERSION_MIN-"6.0.0"} -export IOS_VERSION_MIN=${IOS_VERSION_MIN-"6.0.0"} - -echo -echo "Warnings related to headers being present but not usable are due to functions" -echo "that didn't exist in the specified minimum iOS version level." -echo "They can be safely ignored." -echo - -mkdir -p $SIMULATOR32_PREFIX $SIMULATOR64_PREFIX $IOS32_PREFIX $IOS32s_PREFIX $IOS64_PREFIX || exit 1 - -# Build for the simulator -export BASEDIR="${XCODEDIR}/Platforms/iPhoneSimulator.platform/Developer" -export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" -export SDK="${BASEDIR}/SDKs/iPhoneSimulator.sdk" - -## i386 simulator -export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" -export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" - -make distclean > /dev/null - -if [ -z "$LIBSODIUM_FULL_BUILD" ]; then - export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal" -else - export LIBSODIUM_ENABLE_MINIMAL_FLAG="" -fi - -./configure --host=i686-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$SIMULATOR32_PREFIX" || exit 1 - - -NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -PROCESSORS=${NPROCESSORS:-3} - -make -j${PROCESSORS} install || exit 1 - -## x86_64 simulator -export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" -export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=x86_64-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$SIMULATOR64_PREFIX" - -make -j${PROCESSORS} install || exit 1 - -# Build for iOS -export BASEDIR="${XCODEDIR}/Platforms/iPhoneOS.platform/Developer" -export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" -export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk" - -## 32-bit iOS -export CFLAGS="-fembed-bitcode -O2 -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" -export LDFLAGS="-fembed-bitcode -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=arm-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$IOS32_PREFIX" || exit 1 - -make -j${PROCESSORS} install || exit 1 - -## 32-bit armv7s iOS -export CFLAGS="-fembed-bitcode -O2 -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" -export LDFLAGS="-fembed-bitcode -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=arm-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$IOS32s_PREFIX" || exit 1 - -make -j${PROCESSORS} install || exit 1 - -## 64-bit iOS -export CFLAGS="-fembed-bitcode -O2 -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" -export LDFLAGS="-fembed-bitcode -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=arm-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$IOS64_PREFIX" || exit 1 - -make -j${PROCESSORS} install || exit 1 - -# Create universal binary and include folder -rm -fr -- "$PREFIX/include" "$PREFIX/libsodium.a" 2> /dev/null -mkdir -p -- "$PREFIX/lib" -lipo -create \ - "$SIMULATOR32_PREFIX/lib/libsodium.a" \ - "$SIMULATOR64_PREFIX/lib/libsodium.a" \ - "$IOS32_PREFIX/lib/libsodium.a" \ - "$IOS32s_PREFIX/lib/libsodium.a" \ - "$IOS64_PREFIX/lib/libsodium.a" \ - -output "$PREFIX/lib/libsodium.a" -mv -f -- "$IOS32_PREFIX/include" "$PREFIX/" - -echo -echo "libsodium has been installed into $PREFIX" -echo -file -- "$PREFIX/lib/libsodium.a" - -# Cleanup -rm -rf -- "$PREFIX/tmp" -make distclean > /dev/null diff --git a/dist-build/msys2-win32.sh b/dist-build/msys2-win32.sh index dcc9ee06..6e801404 100755 --- a/dist-build/msys2-win32.sh +++ b/dist-build/msys2-win32.sh @@ -3,7 +3,7 @@ export CFLAGS="-Ofast -fomit-frame-pointer -m32 -march=pentium3 -mtune=westmere" export PREFIX="$(pwd)/libsodium-win32" -if (i686-w64-mingw32-gcc --version > /dev/null 2>&1) then +if (i686-w64-mingw32-gcc --version >/dev/null 2>&1); then echo MinGW found else echo Please install mingw-w64-i686-gcc >&2 @@ -11,8 +11,8 @@ else fi ./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \ - --host=i686-w64-mingw32 && \ -make clean && \ -make && \ -make check && \ -make install + --host=i686-w64-mingw32 && + make clean && + make && + make check && + make install diff --git a/dist-build/msys2-win64.sh b/dist-build/msys2-win64.sh index 0b38d6dd..ef69047d 100755 --- a/dist-build/msys2-win64.sh +++ b/dist-build/msys2-win64.sh @@ -3,7 +3,7 @@ export CFLAGS="-Ofast -fomit-frame-pointer -m64 -mtune=westmere" export PREFIX="$(pwd)/libsodium-win64" -if (x86_64-w64-mingw32-gcc --version > /dev/null 2>&1) then +if (x86_64-w64-mingw32-gcc --version >/dev/null 2>&1); then echo MinGW found else echo Please install mingw-w64-x86_64-gcc >&2 @@ -11,8 +11,8 @@ else fi ./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \ - --host=x86_64-w64-mingw32 && \ -make clean && \ -make && \ -make check && \ -make install + --host=x86_64-w64-mingw32 && + make clean && + make && + make check && + make install diff --git a/dist-build/watchos.sh b/dist-build/watchos.sh deleted file mode 100755 index 60ab4b4e..00000000 --- a/dist-build/watchos.sh +++ /dev/null @@ -1,114 +0,0 @@ -#! /bin/sh -# -# Step 1. -# Configure for base system so simulator is covered -# -# Step 2. -# Make for watchOS and watchOS simulator -# -# Step 3. -# Merge libs into final version for xcode import - -export PREFIX="$(pwd)/libsodium-watchos" -export WATCHOS32_PREFIX="$PREFIX/tmp/watchos32" -export WATCHOS64_32_PREFIX="$PREFIX/tmp/watchos64_32" -export SIMULATOR32_PREFIX="$PREFIX/tmp/simulator32" -export SIMULATOR64_PREFIX="$PREFIX/tmp/simulator64" -export XCODEDIR=$(xcode-select -p) - -export WATCHOS_SIMULATOR_VERSION_MIN=${WATCHOS_SIMULATOR_VERSION_MIN-"4.0.0"} -export WATCHOS_VERSION_MIN=${WATCHOS_VERSION_MIN-"4.0.0"} - -mkdir -p $SIMULATOR32_PREFIX $SIMULATOR64_PREFIX $WATCHOS32_PREFIX $WATCHOS64_32_PREFIX || exit 1 - -# Build for the simulator -export BASEDIR="${XCODEDIR}/Platforms/WatchSimulator.platform/Developer" -export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" -export SDK="${BASEDIR}/SDKs/WatchSimulator.sdk" - -## i386 simulator -export CFLAGS="-O2 -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" -export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" - -make distclean > /dev/null - -if [ -z "$LIBSODIUM_FULL_BUILD" ]; then - export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal" -else - export LIBSODIUM_ENABLE_MINIMAL_FLAG="" -fi - -./configure --host=i686-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$SIMULATOR32_PREFIX" || exit 1 - - -NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -PROCESSORS=${NPROCESSORS:-3} - -make -j${PROCESSORS} install || exit 1 - -## x86_64 simulator -export CFLAGS="-O2 -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" -export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=x86_64-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$SIMULATOR64_PREFIX" - -make -j${PROCESSORS} install || exit 1 - -# Build for watchOS -export BASEDIR="${XCODEDIR}/Platforms/WatchOS.platform/Developer" -export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH" -export SDK="${BASEDIR}/SDKs/WatchOS.sdk" - -## 32-bit watchOS -export CFLAGS="-fembed-bitcode -O2 -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" -export LDFLAGS="-fembed-bitcode -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=arm-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$WATCHOS32_PREFIX" || exit 1 - -make -j${PROCESSORS} install || exit 1 - -## 64-bit arm64_32 watchOS -export CFLAGS="-fembed-bitcode -O2 -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" -export LDFLAGS="-fembed-bitcode -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}" - -make distclean > /dev/null - -./configure --host=arm-apple-darwin10 \ - --disable-shared \ - ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ - --prefix="$WATCHOS64_32_PREFIX" || exit 1 - -make -j${PROCESSORS} install || exit 1 - -# Create universal binary and include folder -rm -fr -- "$PREFIX/include" "$PREFIX/libsodium.a" 2> /dev/null -mkdir -p -- "$PREFIX/lib" -lipo -create \ - "$SIMULATOR32_PREFIX/lib/libsodium.a" \ - "$SIMULATOR64_PREFIX/lib/libsodium.a" \ - "$WATCHOS32_PREFIX/lib/libsodium.a" \ - "$WATCHOS64_32_PREFIX/lib/libsodium.a" \ - -output "$PREFIX/lib/libsodium.a" -mv -f -- "$WATCHOS32_PREFIX/include" "$PREFIX/" - -echo -echo "libsodium has been installed into $PREFIX" -echo -file -- "$PREFIX/lib/libsodium.a" - -# Cleanup -rm -rf -- "$PREFIX/tmp" -make distclean > /dev/null From b795a93fa8b89de35f881e282323f78b081af4e1 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2023 19:31:38 +0200 Subject: [PATCH 71/73] Promote HKDF to minimal builds --- src/libsodium/Makefile.am | 4 +- src/libsodium/Makefile.in | 68 +++++++++++++++++----------------- src/libsodium/include/sodium.h | 2 + 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/libsodium/Makefile.am b/src/libsodium/Makefile.am index c7eb3190..b3cd6637 100644 --- a/src/libsodium/Makefile.am +++ b/src/libsodium/Makefile.am @@ -45,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 \ @@ -164,8 +166,6 @@ libsodium_la_SOURCES += \ crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ crypto_core/ed25519/core_ed25519.c \ crypto_core/ed25519/core_ristretto255.c \ - crypto_kdf/hkdf/kdf_hkdf_sha256.c \ - crypto_kdf/hkdf/kdf_hkdf_sha512.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ diff --git a/src/libsodium/Makefile.in b/src/libsodium/Makefile.in index 8f4649b4..a88dd068 100644 --- a/src/libsodium/Makefile.in +++ b/src/libsodium/Makefile.in @@ -132,8 +132,6 @@ target_triplet = @target@ @MINIMAL_FALSE@ crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ @MINIMAL_FALSE@ crypto_core/ed25519/core_ed25519.c \ @MINIMAL_FALSE@ crypto_core/ed25519/core_ristretto255.c \ -@MINIMAL_FALSE@ crypto_kdf/hkdf/kdf_hkdf_sha256.c \ -@MINIMAL_FALSE@ crypto_kdf/hkdf/kdf_hkdf_sha512.c \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ @@ -309,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 \ @@ -393,8 +393,6 @@ am__libsodium_la_SOURCES_DIST = \ crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c \ crypto_core/ed25519/core_ed25519.c \ crypto_core/ed25519/core_ristretto255.c \ - crypto_kdf/hkdf/kdf_hkdf_sha256.c \ - crypto_kdf/hkdf/kdf_hkdf_sha512.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c \ crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h \ crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c \ @@ -426,8 +424,6 @@ am__objects_1 = @MINIMAL_FALSE@ crypto_box/curve25519xchacha20poly1305/libsodium_la-box_seal_curve25519xchacha20poly1305.lo \ @MINIMAL_FALSE@ crypto_core/ed25519/libsodium_la-core_ed25519.lo \ @MINIMAL_FALSE@ crypto_core/ed25519/libsodium_la-core_ristretto255.lo \ -@MINIMAL_FALSE@ crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha256.lo \ -@MINIMAL_FALSE@ crypto_kdf/hkdf/libsodium_la-kdf_hkdf_sha512.lo \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/libsodium_la-scrypt_platform.lo \ @MINIMAL_FALSE@ crypto_pwhash/scryptsalsa208sha256/libsodium_la-pbkdf2-sha256.lo \ @@ -479,6 +475,8 @@ am_libsodium_la_OBJECTS = \ 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 \ @@ -1011,7 +1009,9 @@ libsodium_la_SOURCES = crypto_aead/aegis128l/aead_aegis128l.c \ 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 \ @@ -1604,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) @@ -1925,18 +1937,6 @@ crypto_core/ed25519/libsodium_la-core_ed25519.lo: \ crypto_core/ed25519/libsodium_la-core_ristretto255.lo: \ crypto_core/ed25519/$(am__dirstamp) \ crypto_core/ed25519/$(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_pwhash/scryptsalsa208sha256/$(am__dirstamp): @$(MKDIR_P) crypto_pwhash/scryptsalsa208sha256 @: > crypto_pwhash/scryptsalsa208sha256/$(am__dirstamp) @@ -2765,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 @@ -3101,20 +3115,6 @@ crypto_core/ed25519/libsodium_la-core_ristretto255.lo: crypto_core/ed25519/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/ed25519/libsodium_la-core_ristretto255.lo `test -f 'crypto_core/ed25519/core_ristretto255.c' || echo '$(srcdir)/'`crypto_core/ed25519/core_ristretto255.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_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo: crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.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_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo -MD -MP -MF crypto_pwhash/scryptsalsa208sha256/$(DEPDIR)/libsodium_la-crypto_scrypt-common.Tpo -c -o crypto_pwhash/scryptsalsa208sha256/libsodium_la-crypto_scrypt-common.lo `test -f 'crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c' || echo '$(srcdir)/'`crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) crypto_pwhash/scryptsalsa208sha256/$(DEPDIR)/libsodium_la-crypto_scrypt-common.Tpo crypto_pwhash/scryptsalsa208sha256/$(DEPDIR)/libsodium_la-crypto_scrypt-common.Plo diff --git a/src/libsodium/include/sodium.h b/src/libsodium/include/sodium.h index f667e063..86b7a4d2 100644 --- a/src/libsodium/include/sodium.h +++ b/src/libsodium/include/sodium.h @@ -27,6 +27,8 @@ #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" From fb4533b0a941b3a5b1db5687d1b008a5853d1f29 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 13 Sep 2023 15:46:16 +0200 Subject: [PATCH 72/73] Port the GCC target changes for aarch64 to aegis Fixes #1313 --- src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c | 5 ++++- src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c index 8f2adf8c..825de8a1 100644 --- a/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c +++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c @@ -20,9 +20,12 @@ #ifdef __clang__ #pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) #elif defined(__GNUC__) -#pragma GCC target("neon,crypto,aes") +#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 diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c index 62974ae2..e1ebd577 100644 --- a/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c +++ b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c @@ -20,9 +20,12 @@ #ifdef __clang__ #pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) #elif defined(__GNUC__) -#pragma GCC target("neon,crypto,aes") +#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 From 15a83fe00bd71f2b1419c07f8372506e9f98fa2a Mon Sep 17 00:00:00 2001 From: Cheng Date: Sun, 17 Sep 2023 18:03:54 +1000 Subject: [PATCH 73/73] my customized copy with upstream history --- .gitattributes | 76 + .../msvc/vs2022/libsodium/libsodium.vcxproj | 738 ++++---- ci/appveyor/libsodium.sln | 80 +- ci/appveyor/libsodium.vcxproj | 1186 ++++++------ ci/appveyor/libsodium.vcxproj.filters | 1620 ++++++++--------- 5 files changed, 1888 insertions(+), 1812 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..3c93bcf1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,76 @@ +############################################################################### +# Handle line endings automatically for files detected as text +# and leave all files detected as binary untouched. +# Force the following filetypes to have unix eols and encoding, so that Windows does not break them. +# If a file is going to be used on linux and windows, we want it invariant, +# rather than automatically translated, because automatic translation always screw things up. +* text=auto eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +.gitignore text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +.gitattributes text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +.gitmodules text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.sh text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=bash +*.c text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.cpp text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=cpp +*.rs text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=rust +*.py text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=python +*.h text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.txt text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.html text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=html +*.htm text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=html +*.md text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=markdown +*.pandoc text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.css text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 diff=css +*.manifest text eol=lf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 + + +makefile text eol=lf encoding=utf-8 +Makefile text eol=lf encoding=utf-8 + +# Force the following Visual Studio specific filetypes to have Windows eols, +# so that Git does not break them +*.bat text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.cmd text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.rc text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.sln text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.vcproj text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.vcxproj text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.vcxproj.filters text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.vcxproj.user text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 +*.props text eol=crlf encoding=utf-8 whitespace=trailing-space,space-before-tab,tabwidth=4 + + +# Force binary files to be binary + +*.webp binary +*.gif binary +*.jpg binary +*.png binary +*.pdf binary +*.doc binary +*.DOC binary +*.docx binary +*.DOCX binary +*.dot binary +*.DOT binary +*.PDF binary +*.rtf binary +*.RTF binary + + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/builds/msvc/vs2022/libsodium/libsodium.vcxproj b/builds/msvc/vs2022/libsodium/libsodium.vcxproj index b4fdad58..2fcd78b2 100644 --- a/builds/msvc/vs2022/libsodium/libsodium.vcxproj +++ b/builds/msvc/vs2022/libsodium/libsodium.vcxproj @@ -1,369 +1,369 @@ - - - - {A185B162-6CB6-4502-B03F-B56F7699A8D9} - libsodium - v143 - - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - DebugDLL - ARM64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - ReleaseDLL - ARM64 - - - DebugLIB - Win32 - - - DebugLIB - x64 - - - DebugLIB - ARM64 - - - ReleaseLIB - Win32 - - - ReleaseLIB - x64 - - - ReleaseLIB - ARM64 - - - DebugLTCG - Win32 - - - DebugLTCG - x64 - - - DebugLTCG - ARM64 - - - ReleaseLTCG - Win32 - - - ReleaseLTCG - x64 - - - ReleaseLTCG - ARM64 - - - - StaticLibrary - DynamicLibrary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + {A185B162-6CB6-4502-B03F-B56F7699A8D9} + libsodium + v143 + + + + DebugDLL + Win32 + + + DebugDLL + x64 + + + DebugDLL + ARM64 + + + ReleaseDLL + Win32 + + + ReleaseDLL + x64 + + + ReleaseDLL + ARM64 + + + DebugLIB + Win32 + + + DebugLIB + x64 + + + DebugLIB + ARM64 + + + ReleaseLIB + Win32 + + + ReleaseLIB + x64 + + + ReleaseLIB + ARM64 + + + DebugLTCG + Win32 + + + DebugLTCG + x64 + + + DebugLTCG + ARM64 + + + ReleaseLTCG + Win32 + + + ReleaseLTCG + x64 + + + ReleaseLTCG + ARM64 + + + + StaticLibrary + DynamicLibrary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ci/appveyor/libsodium.sln b/ci/appveyor/libsodium.sln index f5808c66..0afec291 100644 --- a/ci/appveyor/libsodium.sln +++ b/ci/appveyor/libsodium.sln @@ -1,40 +1,40 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - DebugDLL|Win32 = DebugDLL|Win32 - DebugDLL|x64 = DebugDLL|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseDLL|Win32 = ReleaseDLL|Win32 - ReleaseDLL|x64 = ReleaseDLL|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|x64.Build.0 = DebugDLL|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsodium", "libsodium.vcxproj", "{A185B162-6CB6-4502-B03F-B56F7699A8D9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DebugDLL|Win32 = DebugDLL|Win32 + DebugDLL|x64 = DebugDLL|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseDLL|Win32 = ReleaseDLL|Win32 + ReleaseDLL|x64 = ReleaseDLL|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.ActiveCfg = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|Win32.Build.0 = Debug|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.ActiveCfg = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Debug|x64.Build.0 = Debug|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.DebugDLL|x64.Build.0 = DebugDLL|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.ActiveCfg = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|Win32.Build.0 = Release|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.ActiveCfg = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.Release|x64.Build.0 = Release|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 + {A185B162-6CB6-4502-B03F-B56F7699A8D9}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ci/appveyor/libsodium.vcxproj b/ci/appveyor/libsodium.vcxproj index e2d2f72e..562fb911 100644 --- a/ci/appveyor/libsodium.vcxproj +++ b/ci/appveyor/libsodium.vcxproj @@ -1,593 +1,593 @@ - - - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - {A185B162-6CB6-4502-B03F-B56F7699A8D9} - Win32Proj - libsodium - - - - StaticLibrary - true - MultiByte - false - v140 - - - DynamicLibrary - true - MultiByte - false - v140 - - - StaticLibrary - true - MultiByte - false - v140 - - - DynamicLibrary - true - MultiByte - false - v140 - - - StaticLibrary - false - true - MultiByte - v140 - - - DynamicLibrary - false - true - MultiByte - v140 - - - StaticLibrary - false - true - MultiByte - v140 - - - DynamicLibrary - false - true - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ - - - - - - Level3 - Disabled - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebug - $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - - - - - - - Level3 - Disabled - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebugDLL - $(SolutionDir)..\..\;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - - - - - - - Level3 - Disabled - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebug - - - Console - true - - - - - - - Level3 - Disabled - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDebugDLL - - - Console - true - - - - - Level3 - - - Full - true - true - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreaded - Speed - $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - - - - - Level3 - - - Full - true - true - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDLL - Speed - $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreaded - - - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - 4244;%(DisableSpecificWarnings) - MultiThreadedDLL - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + DebugDLL + Win32 + + + DebugDLL + x64 + + + Debug + Win32 + + + Debug + x64 + + + ReleaseDLL + Win32 + + + ReleaseDLL + x64 + + + Release + Win32 + + + Release + x64 + + + + {A185B162-6CB6-4502-B03F-B56F7699A8D9} + Win32Proj + libsodium + + + + StaticLibrary + true + MultiByte + false + v140 + + + DynamicLibrary + true + MultiByte + false + v140 + + + StaticLibrary + true + MultiByte + false + v140 + + + DynamicLibrary + true + MultiByte + false + v140 + + + StaticLibrary + false + true + MultiByte + v140 + + + DynamicLibrary + false + true + MultiByte + v140 + + + StaticLibrary + false + true + MultiByte + v140 + + + DynamicLibrary + false + true + MultiByte + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + true + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + false + $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)Build\$(Configuration)\$(Platform)\Intermediate\ + + + + + + Level3 + Disabled + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebug + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + + + Level3 + Disabled + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebugDLL + $(SolutionDir)..\..\;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + + + Level3 + Disabled + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebug + + + Console + true + + + + + + + Level3 + Disabled + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDebugDLL + + + Console + true + + + + + Level3 + + + Full + true + true + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreaded + Speed + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + Level3 + + + Full + true + true + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDLL + Speed + $(SolutionDir);$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include\sodium;$(SolutionDir)..\..\src\libsodium\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + SODIUM_STATIC;SODIUM_EXPORT=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreaded + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + SODIUM_EXPORT=__declspec(dllexport);SODIUM_DLL_EXPORT;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;%(DisableSpecificWarnings) + MultiThreadedDLL + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ci/appveyor/libsodium.vcxproj.filters b/ci/appveyor/libsodium.vcxproj.filters index 718694ae..4d93c6d8 100644 --- a/ci/appveyor/libsodium.vcxproj.filters +++ b/ci/appveyor/libsodium.vcxproj.filters @@ -1,810 +1,810 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + +