diff --git a/.devcontainer b/.devcontainer index 8c08f0bbbc..5a9747edc3 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit 8c08f0bbbcff882a932fd81552aa161a829fff15 +Subproject commit 5a9747edc363b70de6700c140cb3eb58a8aa919c diff --git a/.github/release-tag.json b/.github/release-tag.json new file mode 100644 index 0000000000..68211f26d5 --- /dev/null +++ b/.github/release-tag.json @@ -0,0 +1,4 @@ +{ + "message": "xpro version 1.0.22.1 tag", + "tag": "xpv1.0.22.1" +} diff --git a/.gitignore b/.gitignore index e3ddc45f13..7bea6a7d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -193,3 +193,7 @@ tmp/ Vagrantfile zig-cache zig-out +# externpro +.env +_bld*/ +docker-compose.override.yml diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..4c636aa8f4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 4.3) +file(STRINGS configure.ac configure_ac REGEX ^AC_INIT) +string(REGEX MATCH "([0-9]+)[.][0-9]+[.][0-9]+" VER "${configure_ac}") +project(libsodium VERSION ${VER} LANGUAGES C ASM) +include(configure.cmake) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables Solution Folders +option(DISABLE_TESTS "Disable tests" OFF) +option(ENABLE_BLOCKING_RANDOM "Enable only if /dev/urandom is totally broken on the target platform" OFF) +option(ENABLE_MINIMAL "Only compile the minimum set of functions required for the high-level API" OFF) +######################################## +function(compareCmakeFilesys files) + file(GLOB_RECURSE filesys RELATIVE ${CMAKE_CURRENT_LIST_DIR} *) + file(GLOB_RECURSE ignorefiles RELATIVE ${CMAKE_CURRENT_LIST_DIR} .*.swp) + if(ignorefiles) + list(REMOVE_ITEM filesys ${ignorefiles}) + endif() + foreach(f ${filesys}) + list(FIND files ${f} index) + if(${index} GREATER -1) + list(REMOVE_AT files ${index}) + list(REMOVE_ITEM filesys ${f}) + endif() + endforeach() + if(filesys) + message(FATAL_ERROR "files not in cmake: ${filesys}") + endif() + foreach(f ${files}) + get_filename_component(absPath ${f} ABSOLUTE) + if(NOT absPath MATCHES CMAKE_CURRENT_LIST_DIR) + # remove any files that aren't under CMAKE_CURRENT_LIST_DIR + list(REMOVE_ITEM files ${f}) + endif() + endforeach() + if(files) + message(FATAL_ERROR "files not in repo, but in cmake: ${files}") + endif() +endfunction() +######################################## +add_subdirectory(src/libsodium) +if(NOT DISABLE_TESTS) + enable_testing() + add_subdirectory(test) +endif() diff --git a/configure.cmake b/configure.cmake new file mode 100644 index 0000000000..395790849e --- /dev/null +++ b/configure.cmake @@ -0,0 +1,729 @@ +include(CheckCCompilerFlag) +include(CheckCSourceCompiles) +include(CheckCSourceRuns) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckLinkerFlag) +include(TestBigEndian) +######################################## +macro(check_include_file_def incfile var) + check_include_file("${incfile}" ${var}) + if(${var}) + list(APPEND pvtDefs ${var}=1) + endif() +endmacro() +macro(check_compiles_def var src) + check_c_source_compiles("${src}" ${var}) + if(${var}) + list(APPEND pvtDefs ${var}=1) + endif() +endmacro() +macro(check_runs_def var src) + check_c_source_runs("${src}" ${var}) + if(${var}) + list(APPEND pvtDefs ${var}=1) + endif() +endmacro() +macro(check_compiler_opt) + foreach(opt ${ARGN}) + string(REPLACE "-" "_" opt_ ${opt}) + string(REPLACE "=" "_" opt_ ${opt_}) + check_c_compiler_flag("${opt}" has_na_c${opt_}) + if(has_na_c${opt_}) + list(APPEND pvtOpts ${opt}) + endif() + endforeach() +endmacro() +macro(check_link_opts) + foreach(opt ${ARGN}) + string(REPLACE "-" "_" opt_ ${opt}) + string(REPLACE "," "_" opt_ ${opt_}) + check_linker_flag(C "${opt}" has_na_ln${opt_}) + if(has_na_ln${opt_}) + list(APPEND linkOpts ${opt}) + endif() + endforeach() +endmacro() +macro(check_func_exists_def func def) + check_function_exists(${func} ${def}) + if(${def}) + list(APPEND pvtDefs ${def}=1) + endif() +endmacro() +######################################## +test_big_endian(IS_BIG_ENDIAN) +if(IS_BIG_ENDIAN) + list(APPEND pvtDefs NATIVE_BIG_ENDIAN=1) +else() + list(APPEND pvtDefs NATIVE_LITTLE_ENDIAN=1) +endif() +######################################## +if(ENABLE_BLOCKING_RANDOM) + list(APPEND pvtDefs USE_BLOCKING_RANDOM=1) +endif() +if(ENABLE_MINIMAL) + list(APPEND pvtDefs MINIMAL=1) +endif() +######################################## +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads) +if(CMAKE_USE_PTHREADS_INIT) + list(APPEND pvtDefs HAVE_PTHREAD=1) +endif() +######################################## +check_compiles_def(HAVE_LIBCTGRIND + " + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + char ct_poison (); + int main(void) + { + return ct_poison (); + return 0; + } + " + ) +check_compiles_def(HAVE_C_VARARRAYS + " + /* Test for VLA support. This test is partly inspired + from examples in the C standard. Use at least two VLA + functions to detect the GCC 3.4.3 bug described in: + https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html + */ + #ifdef __STDC_NO_VLA__ + syntax error; + #else + extern int n; + int B[100]; + int fvla(int m, int C[m][m]); + int simple(int count, int all[static count]) + { + return all[count - 1]; + } + int fvla(int m, int C[m][m]) + { + typedef int VLA[m][m]; + VLA x; + int D[m]; + static int (*q)[m] = &B; + int (*s)[n] = q; + return C && &x[0][0] == &D[0] && &D[0] == s[0]; + } + #endif + int main(void) + { + return 0; + } + " + ) +if(NOT HAVE_C_VARARRAYS) + list(APPEND pvtDefs __STDC_NO_VLA__=1) +endif() +check_compiles_def(HAVE_CATCHABLE_SEGV + " + #include + #include + static void sig(int _) { exit(0); } + int main(void) + { + volatile unsigned char * volatile x = (volatile unsigned char *) malloc(8); + size_t i; + signal(SIGSEGV, sig); + signal(SIGBUS, sig); + #if !defined(__SANITIZE_ADDRESS__) && !defined(__EMSCRIPTEN__) + for (i = 0; i < 10000000; i += 1024) { x[-i] = x[i] = (unsigned char) i; } + #endif + free((void *) x); + exit(1) + return 0; + } + " + ) +check_compiles_def(HAVE_CATCHABLE_ABRT + " + #include + #include + #ifndef SIGABRT + # error SIGABRT is not defined + #endif + static void sigabrt_handler_3(int _) + { + exit(0); + } + static void sigabrt_handler_2(int _) + { + signal(SIGABRT, sigabrt_handler_3); + abort(); + exit(1); + } + static void sigabrt_handler_1(int _) + { + signal(SIGABRT, sigabrt_handler_2); + abort(); + exit(1); + } + int main(void) + { + signal(SIGABRT, sigabrt_handler_1); + abort(); + exit(1); + return 0; + } + " + ) +######################################## +# TLS +set(tls_keywords + thread_local + _Thread_local + __thread + "__declspec(thread)" + ) +set(idx 0) +foreach(tls_keyword ${tls_keywords}) + check_c_source_compiles( + " + #include + int main(void) + { + static ${tls_keyword} int bar; + return 0; + } + " + TLS_${idx} + ) + if(TLS_${idx}) + list(APPEND pvtDefs TLS=${tls_keyword}) + check_compiler_opt(-ftls-model=local-dynamic) + break() + endif() + math(EXPR idx "${idx}+1") +endforeach() +######################################## +check_runs_def(HAVE_MMINTRIN_H + " + #pragma GCC target(\"mmx\") + #include + int main(void) + { + __m64 x = _mm_setzero_si64(); + return 0; + } + " + ) +if(HAVE_MMINTRIN_H) + check_compiler_opt(-mmmx) +endif() +check_runs_def(HAVE_EMMINTRIN_H + " + #pragma GCC target(\"sse2\") + #ifndef __SSE2__ + # define __SSE2__ + #endif + #include + int main(void) + { + __m128d x = _mm_setzero_pd(); + __m128i z = _mm_srli_epi64(_mm_setzero_si128(), 26); + return 0; + } + " + ) +if(HAVE_EMMINTRIN_H) + check_compiler_opt(-msse2) +endif() +check_runs_def(HAVE_PMMINTRIN_H + " + #pragma GCC target(\"sse3\") + #include + int main(void) + { + __m128 x = _mm_addsub_ps(_mm_cvtpd_ps(_mm_setzero_pd()), _mm_cvtpd_ps(_mm_setzero_pd())); + return 0; + } + " + ) +# NOTE: Disabling compiler usage of sse3 due to minimum hardware requirement +#if(HAVE_PMMINTRIN_H) +# check_compiler_opt(-msse3) +#endif() +check_runs_def(HAVE_TMMINTRIN_H + " + #pragma GCC target(\"ssse3\") + #include + int main(void) + { + __m64 x = _mm_abs_pi32(_m_from_int(0)); + return 0; + } + " + ) +if(HAVE_TMMINTRIN_H) + check_compiler_opt(-mssse3) +endif() +check_runs_def(HAVE_SMMINTRIN_H + " + #pragma GCC target(\"sse4.1\") + #include + int main(void) + { + __m128i x = _mm_minpos_epu16(_mm_setzero_si128()); + return 0; + } + " + ) +if(HAVE_SMMINTRIN_H) + check_compiler_opt(-msse4.1) +endif() +check_runs_def(HAVE_AVXINTRIN_H + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX opcodes + #endif + #pragma GCC target(\"avx\") + #include + int main(void) + { + _mm256_zeroall(); + return 0; + } + " + ) +# NOTE: Disabling compiler usage of avx due to minimum hardware requirement +#if(HAVE_AVXINTRIN_H) +# check_compiler_opt(-mavx) +#endif() +check_runs_def(HAVE_AVX2INTRIN_H + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX2 opcodes + #endif + #pragma GCC target(\"avx2\") + #include + int main(void) + { + __m256 x = _mm256_set1_ps(3.14); + __m256 y = _mm256_permutevar8x32_ps(x, _mm256_set1_epi32(42)); + return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); + } + " + ) +if(HAVE_AVX2INTRIN_H) + # NOTE: Disabling compiler usage of avx2 due to minimum hardware requirement + #check_compiler_opt(-mavx2) + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX2 opcodes + #endif + #pragma GCC target(\"avx2\") + #include + int main(void) + { + __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); + return 0; + } + " + _mm256_broadcastsi128_si256_DEFINED + ) + if(NOT _mm256_broadcastsi128_si256_DEFINED) + list(APPEND pvtDefs _mm256_broadcastsi128_si256=_mm_broadcastsi128_256) + endif() +endif() +######################################## +check_runs_def(HAVE_AVX512FINTRIN_H + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX512F opcodes + #endif + #pragma GCC target(\"avx512f\") + #include + #ifndef __AVX512F__ + # error No AVX512 support + #elif defined(__clang__) + # if __clang_major__ < 4 + # error Compiler AVX512 support may be broken + # endif + #elif defined(__GNUC__) + # if __GNUC__ < 6 + # error Compiler AVX512 support may be broken + # endif + #endif + int main(void) + { + __m512i x = _mm512_setzero_epi32(); + __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), x); + return 0; + } + " + ) +# NOTE: Disabling compiler usage of avx512 due to minimum hardware requirement +#if(HAVE_AVX512FINTRIN_H) +# check_compiler_opt(-mavx512f) +#endif() +check_runs_def(HAVE_WMMINTRIN_H + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AESNI opcodes + #endif + #pragma GCC target(\"aes\") + #pragma GCC target(\"pclmul\") + #include + int main(void) + { + __m128i x = _mm_aesimc_si128(_mm_setzero_si128()); + __m128i y = _mm_clmulepi64_si128(_mm_setzero_si128(), _mm_setzero_si128(), 0); + return 0; + } + " + ) +if(HAVE_WMMINTRIN_H) + check_compiler_opt(-maes -mpclmul) +endif() +######################################## +check_runs_def(HAVE_RDRAND + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding RDRAND opcodes + #endif + pragma GCC target(\"rdrnd\") + #include + int main(void) + { + unsigned long long x; + _rdrand64_step(&x); + return 0; + } + " + ) +# NOTE: Disabling compiler usage of rdrand due to minimum hardware requirement +#if(HAVE_RDRAND) +# check_compiler_opt(-mrdrnd) +#endif() +######################################## +check_include_file_def(sys/mman.h HAVE_SYS_MMAN_H) +check_include_file_def(sys/param.h HAVE_SYS_PARAM_H) +check_include_file_def(sys/random.h HAVE_SYS_RANDOM_H) +check_include_file_def(intrin.h HAVE_INTRIN_H) +######################################## +check_runs_def(HAVE__XGETBV + " + #include + int main(void) + { + (void) _xgetbv(0); + return 0; + } + " + ) +check_runs_def(HAVE_INLINE_ASM + " + int main(void) + { + int a = 42; + int *pnt = &a; + __asm__ __volatile__ (\"\" : : \"r\"(pnt) : \"memory\"); + return 0; + } + " + ) +check_runs_def(HAVE_AMD64_ASM + " + #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) + # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) + # error Windows x86_64 calling conventions are not supported yet + # endif + /* neat */ + #else + # error !x86_64 + #endif + int main(void) + { + unsigned char i = 0, o = 0, t; + __asm__ __volatile__ (\"pxor %%xmm12, %%xmm6 \n\" + \"movb (%[i]), %[t] \n\" + \"addb %[t], (%[o]) \n\" + : [t] \"=&r\"(t) + : [o] \"D\"(&o), [i] \"S\"(&i) + : \"memory\", \"flags\", \"cc\"); + return 0; + } + " + ) +check_runs_def(HAVE_AVX_ASM + " + #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) + # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) + # error Windows x86_64 calling conventions are not supported yet + # endif + /* neat */ + #else + # error !x86_64 + #endif + int main(void) + { + __asm__ __volatile__ (\"vpunpcklqdq %xmm0,%xmm13,%xmm0\"); + return 0; + } + " + ) +check_runs_def(HAVE_TI_MODE + " + #if !defined(__clang__) && !defined(__GNUC__) && !defined(__SIZEOF_INT128__) + # error mode(TI) is a gcc extension, and __int128 is not available + #endif + #if defined(__clang__) && !defined(__x86_64__) && !defined(__aarch64__) + # error clang does not properly handle the 128-bit type on 32-bit systems + #endif + #ifndef NATIVE_LITTLE_ENDIAN + # error libsodium currently expects a little endian CPU for the 128-bit type + #endif + #ifdef __EMSCRIPTEN__ + # error emscripten currently doesn't support some operations on integers larger than 64 bits + #endif + #include + #include + #if defined(__SIZEOF_INT128__) + typedef unsigned __int128 uint128_t; + #else + typedef unsigned uint128_t __attribute__((mode(TI))); + #endif + void fcontract(uint128_t *t) + { + *t += 0x8000000000000 - 1; + *t *= *t; + *t >>= 84; + } + int main(void) + { + (void) fcontract; + return 0; + } + " + ) +check_runs_def(HAVE_CPUID + " + int main(void) + { + unsigned int cpu_info[4]; + __asm__ __volatile__ (\"xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1\" : + \"=a\" (cpu_info[0]), \"=&r\" (cpu_info[1]), + \"=c\" (cpu_info[2]), \"=d\" (cpu_info[3]) : + \"0\" (0U), \"2\" (0U)); + return 0; + } + " + ) +######################################## +# ASM_HIDE_SYMBOL +check_c_source_compiles( + " + int main(void) + { + __asm__ __volatile__ (\".hidden dummy_symbol \n\" + \".hidden _dummy_symbol \n\" + \".globl dummy_symbol \n\" + \".globl _dummy_symbol \n\" + \"dummy_symbol: \n\" + \"_dummy_symbol: \n\" + \" nop \n\" + ); + return 0; + } + " + ASM_HIDE_SYMBOL + ) +if(ASM_HIDE_SYMBOL) + list(APPEND pvtDefs ASM_HIDE_SYMBOL=.hidden) +endif() +######################################## +check_runs_def(HAVE_WEAK_SYMBOLS + " + #if !defined(__ELF__) && !defined(__APPLE_CC__) + # error Support for weak symbols may not be available + #endif + __attribute__((weak)) void __dummy(void *x) { } + void f(void *x) { __dummy(x); } + int main(void) + { + return 0; + } + " + ) +check_runs_def(HAVE_ATOMIC_OPS + " + int main(void) + { + static volatile int _sodium_lock; + __sync_lock_test_and_set(&_sodium_lock, 1); + __sync_lock_release(&_sodium_lock); + return 0; + } + " + ) +check_compiles_def(HAVE_ALLOCA_H + " + #include + int main(void) + { + char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + return 0; + } + " + ) +check_compiles_def(HAVE_ALLOCA + " + #include + #include + #ifndef alloca + # ifdef __GNUC__ + # define alloca __builtin_alloca + # elif defined _MSC_VER + # include + # define alloca _alloca + # else + # ifdef __cplusplus + extern \"C\" + # endif + void *alloca (size_t); + # endif + #endif + int main(void) + { + char *p = (char *) alloca (1); + if (p) return 0; + return 0; + } + " + ) +######################################## +check_func_exists_def(arc4random HAVE_ARC4RANDOM) +check_func_exists_def(mmap HAVE_MMAP) +check_func_exists_def(mlock HAVE_MLOCK) +check_func_exists_def(madvise HAVE_MADVISE) +check_func_exists_def(mprotect HAVE_MPROTECT) +check_func_exists_def(raise HAVE_RAISE) +check_func_exists_def(sysconf HAVE_SYSCONF) +######################################## +check_compiles_def(HAVE_GETRANDOM + " + #include + #ifdef HAVE_UNISTD_H + # include + #endif + #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); + return 0; + } + " + ) +check_compiles_def(HAVE_GETENTROPY + " + #include + #ifdef HAVE_UNISTD_H + # include + #endif + #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); + } + return 0; + } + " + ) +check_compiles_def(HAVE_GETPID + " + #include + #include + int main(void) + { + pid_t pid = getpid(); + return 0; + } + " + ) +######################################## +check_func_exists_def(posix_memalign HAVE_POSIX_MEMALIGN) +check_func_exists_def(nanosleep HAVE_NANOSLEEP) +check_func_exists_def(memset_s HAVE_MEMSET_S) +check_func_exists_def(explicit_bzero HAVE_EXPLICIT_BZERO) +check_func_exists_def(explicit_memset HAVE_EXPLICIT_MEMSET) +######################################## +check_compiler_opt( + -fvisibility=hidden + -fPIC + -fno-strict-aliasing + -fno-strict-overflow + -fstack-protector + -flax-vector-conversions + -Wall + -Wextra + -Wbad-function-cast + -Wcast-qual + -Wdiv-by-zero + -Wduplicated-branches + -Wduplicated-cond + -Wfloat-equal + -Wformat=2 + -Wlogical-op + -Wmaybe-uninitialized + -Wmisleading-indentation + -Wmissing-declarations + -Wmissing-prototypes + -Wnested-externs + -Wno-type-limits + -Wno-unknown-pragmas + -Wnormalized=id + -Wnull-dereference + -Wold-style-declaration + -Wpointer-arith + -Wredundant-decls + -Wrestrict + -Wshorten-64-to-32 + -Wsometimes-uninitialized + -Wstrict-prototypes + -Wswitch-enum + -Wvariable-decl + -Wwrite-strings + ) +if(MSVC) + list(REMOVE_ITEM pvtOpts + -Wall # too many warnings + ) +endif() +######################################## +check_link_opts( + # populates linkOpts... + # TODO target_link_options() cannot be used to + # add options for static library targets + "-fstack-protector" + "-Wl,-z,relro" + "-Wl,-z,now" + "-Wl,-z,noexecstack" + ) +######################################## +list(APPEND pvtDefs CONFIGURED=1) +######################################## +if(VERBOSE_DEFS_OPTS) + message(STATUS "pvtDefs: ${pvtDefs}") + message(STATUS "pvtOpts: ${pvtOpts}") + message(STATUS "linkOpts: ${linkOpts}") +endif() diff --git a/src/libsodium/CMakeLists.txt b/src/libsodium/CMakeLists.txt new file mode 100644 index 0000000000..8bfd4631fb --- /dev/null +++ b/src/libsodium/CMakeLists.txt @@ -0,0 +1,892 @@ +set(lib_name sodium) +############################################################ +set(root_srcs + CMakeLists.txt + Makefile.am + Makefile.in + ) +source_group("" FILES ${root_srcs}) +list(APPEND ${lib_name}_libsrcs ${root_srcs}) +############################################################ +set(crypto_aead_aegis128l_srcs + crypto_aead/aegis128l/aead_aegis128l.c + crypto_aead/aegis128l/aegis128l_aesni.c + crypto_aead/aegis128l/aegis128l_aesni.h + crypto_aead/aegis128l/aegis128l_armcrypto.c + crypto_aead/aegis128l/aegis128l_armcrypto.h + crypto_aead/aegis128l/aegis128l_common.h + crypto_aead/aegis128l/aegis128l_soft.c + crypto_aead/aegis128l/aegis128l_soft.h + crypto_aead/aegis128l/implementations.h + ) +source_group(crypto_aead\\aegis128l FILES ${crypto_aead_aegis128l_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_aegis128l_srcs}) +############### +set(crypto_aead_aegis256_srcs + crypto_aead/aegis256/aead_aegis256.c + crypto_aead/aegis256/aegis256_aesni.c + crypto_aead/aegis256/aegis256_aesni.h + crypto_aead/aegis256/aegis256_armcrypto.c + crypto_aead/aegis256/aegis256_armcrypto.h + crypto_aead/aegis256/aegis256_common.h + crypto_aead/aegis256/aegis256_soft.c + crypto_aead/aegis256/aegis256_soft.h + crypto_aead/aegis256/implementations.h + ) +source_group(crypto_aead\\aegis256 FILES ${crypto_aead_aegis256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_aegis256_srcs}) +############### +set(crypto_aead_aes256gcm_srcs + crypto_aead/aes256gcm/aead_aes256gcm.c + ) +source_group(crypto_aead\\aes256gcm FILES ${crypto_aead_aes256gcm_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_aes256gcm_srcs}) +############### +set(crypto_aead_aes256gcm_aesni_srcs + crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c + ) +source_group(crypto_aead\\aes256gcm\\aesni FILES ${crypto_aead_aes256gcm_aesni_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_aes256gcm_aesni_srcs}) +############### +set(crypto_aead_aes256gcm_armcrypto_srcs + crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c + ) +source_group(crypto_aead\\aes256gcm\\armcrypto FILES ${crypto_aead_aes256gcm_armcrypto_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_aes256gcm_armcrypto_srcs}) +############### +set(crypto_aead_chacha20poly1305_srcs + crypto_aead/chacha20poly1305/aead_chacha20poly1305.c + ) +source_group(crypto_aead\\chacha20poly1305 FILES ${crypto_aead_chacha20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_chacha20poly1305_srcs}) +############### +set(crypto_aead_xchacha20poly1305_srcs + crypto_aead/xchacha20poly1305/aead_xchacha20poly1305.c + ) +source_group(crypto_aead\\xchacha20poly1305 FILES ${crypto_aead_xchacha20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_aead_xchacha20poly1305_srcs}) +############################################################ +set(crypto_auth_srcs + crypto_auth/crypto_auth.c + ) +source_group(crypto_auth FILES ${crypto_auth_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_auth_srcs}) +############### +set(crypto_auth_hmacsha256_srcs + crypto_auth/hmacsha256/auth_hmacsha256.c + ) +source_group(crypto_auth\\hmacsha256 FILES ${crypto_auth_hmacsha256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_auth_hmacsha256_srcs}) +############### +set(crypto_auth_hmacsha512_srcs + crypto_auth/hmacsha512/auth_hmacsha512.c + ) +source_group(crypto_auth\\hmacsha512 FILES ${crypto_auth_hmacsha512_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_auth_hmacsha512_srcs}) +############### +set(crypto_auth_hmacsha512256_srcs + crypto_auth/hmacsha512256/auth_hmacsha512256.c + ) +source_group(crypto_auth\\hmacsha512256 FILES ${crypto_auth_hmacsha512256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_auth_hmacsha512256_srcs}) +############################################################ +set(crypto_box_srcs + crypto_box/crypto_box.c + crypto_box/crypto_box_easy.c + crypto_box/crypto_box_seal.c + ) +source_group(crypto_box FILES ${crypto_box_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_box_srcs}) +############### +set(crypto_box_curve25519xchacha20poly1305_srcs + crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c + crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c + ) +source_group(crypto_box\\curve25519xchacha20poly1305 FILES ${crypto_box_curve25519xchacha20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_box_curve25519xchacha20poly1305_srcs}) +############### +set(crypto_box_curve25519xsalsa20poly1305_srcs + crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c + ) +source_group(crypto_box\\curve25519xsalsa20poly1305 FILES ${crypto_box_curve25519xsalsa20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_box_curve25519xsalsa20poly1305_srcs}) +############################################################ +set(crypto_core_ed25519_srcs + crypto_core/ed25519/core_ed25519.c + crypto_core/ed25519/core_ristretto255.c + ) +source_group(crypto_core\\ed25519 FILES ${crypto_core_ed25519_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_ed25519_srcs}) +############### +set(crypto_core_ed25519_ref10_srcs + crypto_core/ed25519/ref10/ed25519_ref10.c + ) +source_group(crypto_core\\ed25519\\ref10 FILES ${crypto_core_ed25519_ref10_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_ed25519_ref10_srcs}) +############### +set(crypto_core_ed25519_ref10_fe_25_5_srcs + crypto_core/ed25519/ref10/fe_25_5/base.h + crypto_core/ed25519/ref10/fe_25_5/base2.h + crypto_core/ed25519/ref10/fe_25_5/constants.h + crypto_core/ed25519/ref10/fe_25_5/fe.h + ) +source_group(crypto_core\\ed25519\\ref10\\fe_25_5 FILES ${crypto_core_ed25519_ref10_fe_25_5_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_ed25519_ref10_fe_25_5_srcs}) +############### +set(crypto_core_ed25519_ref10_fe_51_srcs + crypto_core/ed25519/ref10/fe_51/base.h + crypto_core/ed25519/ref10/fe_51/base2.h + crypto_core/ed25519/ref10/fe_51/constants.h + crypto_core/ed25519/ref10/fe_51/fe.h + ) +source_group(crypto_core\\ed25519\\ref10\\fe_51 FILES ${crypto_core_ed25519_ref10_fe_51_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_ed25519_ref10_fe_51_srcs}) +############### +set(crypto_core_hchacha20_srcs + crypto_core/hchacha20/core_hchacha20.c + ) +source_group(crypto_core\\hchacha20 FILES ${crypto_core_hchacha20_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_hchacha20_srcs}) +############### +set(crypto_core_hsalsa20_srcs + crypto_core/hsalsa20/core_hsalsa20.c + ) +source_group(crypto_core\\hsalsa20 FILES ${crypto_core_hsalsa20_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_hsalsa20_srcs}) +############### +set(crypto_core_hsalsa20_ref2_srcs + crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c + ) +source_group(crypto_core\\hsalsa20\\ref2 FILES ${crypto_core_hsalsa20_ref2_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_hsalsa20_ref2_srcs}) +############### +set(crypto_core_keccak1600_srcs + crypto_core/keccak1600/keccak1600.c + ) +source_group(crypto_core\\keccak1600 FILES ${crypto_core_keccak1600_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_keccak1600_srcs}) +############### +set(crypto_core_keccak1600_armsha3_srcs + crypto_core/keccak1600/armsha3/keccak1600_armsha3.c + crypto_core/keccak1600/armsha3/keccak1600_armsha3.h + ) +source_group(crypto_core\\keccak1600\\armsha3 FILES ${crypto_core_keccak1600_armsha3_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_keccak1600_armsha3_srcs}) +############### +set(crypto_core_keccak1600_ref_srcs + crypto_core/keccak1600/ref/keccak1600_ref.c + crypto_core/keccak1600/ref/keccak1600_ref.h + ) +source_group(crypto_core\\keccak1600\\ref FILES ${crypto_core_keccak1600_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_keccak1600_ref_srcs}) +############### +set(crypto_core_salsa_ref_srcs + crypto_core/salsa/ref/core_salsa_ref.c + ) +source_group(crypto_core\\salsa\\ref FILES ${crypto_core_salsa_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_salsa_ref_srcs}) +############### +set(crypto_core_softaes_srcs + crypto_core/softaes/softaes.c + ) +source_group(crypto_core\\softaes FILES ${crypto_core_softaes_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_core_softaes_srcs}) +############################################################ +set(crypto_generichash_srcs + crypto_generichash/crypto_generichash.c + ) +source_group(crypto_generichash FILES ${crypto_generichash_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_generichash_srcs}) +############### +set(crypto_generichash_blake2b_srcs + crypto_generichash/blake2b/generichash_blake2.c + ) +source_group(crypto_generichash\\blake2b FILES ${crypto_generichash_blake2b_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_generichash_blake2b_srcs}) +############### +set(crypto_generichash_blake2b_ref_srcs + crypto_generichash/blake2b/ref/blake2.h + crypto_generichash/blake2b/ref/blake2b-compress-avx2.c + crypto_generichash/blake2b/ref/blake2b-compress-avx2.h + crypto_generichash/blake2b/ref/blake2b-compress-ref.c + crypto_generichash/blake2b/ref/blake2b-compress-sse41.c + crypto_generichash/blake2b/ref/blake2b-compress-sse41.h + crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c + crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h + crypto_generichash/blake2b/ref/blake2b-load-avx2.h + crypto_generichash/blake2b/ref/blake2b-load-sse2.h + crypto_generichash/blake2b/ref/blake2b-load-sse41.h + crypto_generichash/blake2b/ref/blake2b-ref.c + crypto_generichash/blake2b/ref/generichash_blake2b.c + ) +source_group(crypto_generichash\\blake2b\\ref FILES ${crypto_generichash_blake2b_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_generichash_blake2b_ref_srcs}) +############################################################ +set(crypto_hash_srcs + crypto_hash/crypto_hash.c + ) +source_group(crypto_hash FILES ${crypto_hash_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_hash_srcs}) +############### +set(crypto_hash_sha256_srcs + crypto_hash/sha256/hash_sha256.c + ) +source_group(crypto_hash\\sha256 FILES ${crypto_hash_sha256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_hash_sha256_srcs}) +############### +set(crypto_hash_sha256_cp_srcs + crypto_hash/sha256/cp/hash_sha256_cp.c + ) +source_group(crypto_hash\\sha256\\cp FILES ${crypto_hash_sha256_cp_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_hash_sha256_cp_srcs}) +############### +set(crypto_hash_sha3_srcs + crypto_hash/sha3/hash_sha3.c + ) +source_group(crypto_hash\\sha3 FILES ${crypto_hash_sha3_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_hash_sha3_srcs}) +############### +set(crypto_hash_sha512_srcs + crypto_hash/sha512/hash_sha512.c + ) +source_group(crypto_hash\\sha512 FILES ${crypto_hash_sha512_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_hash_sha512_srcs}) +############### +set(crypto_hash_sha512_cp_srcs + crypto_hash/sha512/cp/hash_sha512_cp.c + ) +source_group(crypto_hash\\sha512\\cp FILES ${crypto_hash_sha512_cp_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_hash_sha512_cp_srcs}) +############################################################ +set(crypto_ipcrypt_srcs + crypto_ipcrypt/crypto_ipcrypt.c + crypto_ipcrypt/implementations.h + crypto_ipcrypt/ipcrypt_aesni.c + crypto_ipcrypt/ipcrypt_aesni.h + crypto_ipcrypt/ipcrypt_armcrypto.c + crypto_ipcrypt/ipcrypt_armcrypto.h + crypto_ipcrypt/ipcrypt_soft.c + crypto_ipcrypt/ipcrypt_soft.h + ) +source_group(crypto_ipcrypt FILES ${crypto_ipcrypt_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_ipcrypt_srcs}) +############################################################ +set(crypto_kdf_srcs + crypto_kdf/crypto_kdf.c + ) +source_group(crypto_kdf FILES ${crypto_kdf_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kdf_srcs}) +############### +set(crypto_kdf_blake2b_srcs + crypto_kdf/blake2b/kdf_blake2b.c + ) +source_group(crypto_kdf\\blake2b FILES ${crypto_kdf_blake2b_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kdf_blake2b_srcs}) +############### +set(crypto_kdf_hkdf_srcs + crypto_kdf/hkdf/kdf_hkdf_sha256.c + crypto_kdf/hkdf/kdf_hkdf_sha512.c + ) +source_group(crypto_kdf\\hkdf FILES ${crypto_kdf_hkdf_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kdf_hkdf_srcs}) +############################################################ +set(crypto_kem_srcs + crypto_kem/crypto_kem.c + ) +source_group(crypto_kem FILES ${crypto_kem_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kem_srcs}) +############### +set(crypto_kem_mlkem768_srcs + crypto_kem/mlkem768/kem_mlkem768.c + ) +source_group(crypto_kem\\mlkem768 FILES ${crypto_kem_mlkem768_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kem_mlkem768_srcs}) +############### +set(crypto_kem_mlkem768_ref_srcs + crypto_kem/mlkem768/ref/kem_mlkem768_ref.c + crypto_kem/mlkem768/ref/kem_mlkem768_ref.h + ) +source_group(crypto_kem\\mlkem768\\ref FILES ${crypto_kem_mlkem768_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kem_mlkem768_ref_srcs}) +############### +set(crypto_kem_xwing_srcs + crypto_kem/xwing/kem_xwing.c + ) +source_group(crypto_kem\\xwing FILES ${crypto_kem_xwing_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kem_xwing_srcs}) +############################################################ +set(crypto_kx_srcs + crypto_kx/crypto_kx.c + ) +source_group(crypto_kx FILES ${crypto_kx_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_kx_srcs}) +############################################################ +set(crypto_onetimeauth_srcs + crypto_onetimeauth/crypto_onetimeauth.c + ) +source_group(crypto_onetimeauth FILES ${crypto_onetimeauth_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_onetimeauth_srcs}) +############### +set(crypto_onetimeauth_poly1305_srcs + crypto_onetimeauth/poly1305/onetimeauth_poly1305.c + crypto_onetimeauth/poly1305/onetimeauth_poly1305.h + ) +source_group(crypto_onetimeauth\\poly1305 FILES ${crypto_onetimeauth_poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_onetimeauth_poly1305_srcs}) +############### +set(crypto_onetimeauth_poly1305_donna_srcs + crypto_onetimeauth/poly1305/donna/poly1305_donna.c + crypto_onetimeauth/poly1305/donna/poly1305_donna.h + crypto_onetimeauth/poly1305/donna/poly1305_donna32.h + crypto_onetimeauth/poly1305/donna/poly1305_donna64.h + ) +source_group(crypto_onetimeauth\\poly1305\\donna FILES ${crypto_onetimeauth_poly1305_donna_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_onetimeauth_poly1305_donna_srcs}) +############### +set(crypto_onetimeauth_poly1305_sse2_srcs + crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c + crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h + ) +source_group(crypto_onetimeauth\\poly1305\\sse2 FILES ${crypto_onetimeauth_poly1305_sse2_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_onetimeauth_poly1305_sse2_srcs}) +############################################################ +set(crypto_pwhash_srcs + crypto_pwhash/crypto_pwhash.c + ) +source_group(crypto_pwhash FILES ${crypto_pwhash_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_pwhash_srcs}) +############### +set(crypto_pwhash_argon2_srcs + crypto_pwhash/argon2/argon2-core.c + crypto_pwhash/argon2/argon2-core.h + crypto_pwhash/argon2/argon2-encoding.c + crypto_pwhash/argon2/argon2-encoding.h + crypto_pwhash/argon2/argon2-fill-block-avx2.c + crypto_pwhash/argon2/argon2-fill-block-avx512f.c + crypto_pwhash/argon2/argon2-fill-block-neon.c + crypto_pwhash/argon2/argon2-fill-block-ref.c + crypto_pwhash/argon2/argon2-fill-block-ssse3.c + crypto_pwhash/argon2/argon2-fill-block-wasm32.c + crypto_pwhash/argon2/argon2.c + crypto_pwhash/argon2/argon2.h + crypto_pwhash/argon2/blake2b-long.c + crypto_pwhash/argon2/blake2b-long.h + crypto_pwhash/argon2/blamka-round-avx2.h + crypto_pwhash/argon2/blamka-round-avx512f.h + crypto_pwhash/argon2/blamka-round-neon.h + crypto_pwhash/argon2/blamka-round-ref.h + crypto_pwhash/argon2/blamka-round-ssse3.h + crypto_pwhash/argon2/blamka-round-wasm32.h + crypto_pwhash/argon2/pwhash_argon2i.c + crypto_pwhash/argon2/pwhash_argon2id.c + ) +source_group(crypto_pwhash\\argon2 FILES ${crypto_pwhash_argon2_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_pwhash_argon2_srcs}) +############### +set(crypto_pwhash_scryptsalsa208sha256_srcs + crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c + crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h + crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c + crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h + crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c + crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c + ) +source_group(crypto_pwhash\\scryptsalsa208sha256 FILES ${crypto_pwhash_scryptsalsa208sha256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_pwhash_scryptsalsa208sha256_srcs}) +############### +set(crypto_pwhash_scryptsalsa208sha256_nosse_srcs + crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c + ) +source_group(crypto_pwhash\\scryptsalsa208sha256\\nosse FILES ${crypto_pwhash_scryptsalsa208sha256_nosse_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_pwhash_scryptsalsa208sha256_nosse_srcs}) +############### +set(crypto_pwhash_scryptsalsa208sha256_sse_srcs + crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c + ) +source_group(crypto_pwhash\\scryptsalsa208sha256\\sse FILES ${crypto_pwhash_scryptsalsa208sha256_sse_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_pwhash_scryptsalsa208sha256_sse_srcs}) +############################################################ +set(crypto_scalarmult_srcs + crypto_scalarmult/crypto_scalarmult.c + ) +source_group(crypto_scalarmult FILES ${crypto_scalarmult_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_scalarmult_srcs}) +############### +set(crypto_scalarmult_curve25519_srcs + crypto_scalarmult/curve25519/scalarmult_curve25519.c + crypto_scalarmult/curve25519/scalarmult_curve25519.h + ) +source_group(crypto_scalarmult\\curve25519 FILES ${crypto_scalarmult_curve25519_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_scalarmult_curve25519_srcs}) +############### +set(crypto_scalarmult_curve25519_ref10_srcs + crypto_scalarmult/curve25519/ref10/x25519_ref10.c + crypto_scalarmult/curve25519/ref10/x25519_ref10.h + ) +source_group(crypto_scalarmult\\curve25519\\ref10 FILES ${crypto_scalarmult_curve25519_ref10_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_scalarmult_curve25519_ref10_srcs}) +############### +set(crypto_scalarmult_curve25519_sandy2x_srcs + crypto_scalarmult/curve25519/sandy2x/consts.S + crypto_scalarmult/curve25519/sandy2x/consts_namespace.h + crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c + crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h + crypto_scalarmult/curve25519/sandy2x/fe.h + crypto_scalarmult/curve25519/sandy2x/fe51.h + crypto_scalarmult/curve25519/sandy2x/fe51_invert.c + crypto_scalarmult/curve25519/sandy2x/fe51_mul.S + crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h + crypto_scalarmult/curve25519/sandy2x/fe51_nsquare.S + crypto_scalarmult/curve25519/sandy2x/fe51_pack.S + crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c + crypto_scalarmult/curve25519/sandy2x/ladder.S + crypto_scalarmult/curve25519/sandy2x/ladder.h + crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h + crypto_scalarmult/curve25519/sandy2x/sandy2x.S + ) +source_group(crypto_scalarmult\\curve25519\\sandy2x FILES ${crypto_scalarmult_curve25519_sandy2x_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_scalarmult_curve25519_sandy2x_srcs}) +############### +set(crypto_scalarmult_ed25519_ref10_srcs + crypto_scalarmult/ed25519/ref10/scalarmult_ed25519_ref10.c + ) +source_group(crypto_scalarmult\\ed25519\\ref10 FILES ${crypto_scalarmult_ed25519_ref10_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_scalarmult_ed25519_ref10_srcs}) +############### +set(crypto_scalarmult_ristretto255_ref10_srcs + crypto_scalarmult/ristretto255/ref10/scalarmult_ristretto255_ref10.c + ) +source_group(crypto_scalarmult\\ristretto255\\ref10 FILES ${crypto_scalarmult_ristretto255_ref10_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_scalarmult_ristretto255_ref10_srcs}) +############################################################ +set(crypto_secretbox_srcs + crypto_secretbox/crypto_secretbox.c + crypto_secretbox/crypto_secretbox_easy.c + ) +source_group(crypto_secretbox FILES ${crypto_secretbox_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_secretbox_srcs}) +############### +set(crypto_secretbox_xchacha20poly1305_srcs + crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c + ) +source_group(crypto_secretbox\\xchacha20poly1305 FILES ${crypto_secretbox_xchacha20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_secretbox_xchacha20poly1305_srcs}) +############### +set(crypto_secretbox_xsalsa20poly1305_srcs + crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c + ) +source_group(crypto_secretbox\\xsalsa20poly1305 FILES ${crypto_secretbox_xsalsa20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_secretbox_xsalsa20poly1305_srcs}) +############################################################ +set(crypto_secretstream_xchacha20poly1305_srcs + crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c + ) +source_group(crypto_secretstream\\xchacha20poly1305 FILES ${crypto_secretstream_xchacha20poly1305_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_secretstream_xchacha20poly1305_srcs}) +############################################################ +set(crypto_shorthash_srcs + crypto_shorthash/crypto_shorthash.c + ) +source_group(crypto_shorthash FILES ${crypto_shorthash_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_shorthash_srcs}) +############### +set(crypto_shorthash_siphash24_srcs + crypto_shorthash/siphash24/shorthash_siphash24.c + crypto_shorthash/siphash24/shorthash_siphashx24.c + ) +source_group(crypto_shorthash\\siphash24 FILES ${crypto_shorthash_siphash24_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_shorthash_siphash24_srcs}) +############### +set(crypto_shorthash_siphash24_ref_srcs + crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c + crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h + crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c + ) +source_group(crypto_shorthash\\siphash24\\ref FILES ${crypto_shorthash_siphash24_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_shorthash_siphash24_ref_srcs}) +############################################################ +set(crypto_sign_srcs + crypto_sign/crypto_sign.c + ) +source_group(crypto_sign FILES ${crypto_sign_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_sign_srcs}) +############### +set(crypto_sign_ed25519_srcs + crypto_sign/ed25519/sign_ed25519.c + ) +source_group(crypto_sign\\ed25519 FILES ${crypto_sign_ed25519_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_sign_ed25519_srcs}) +############### +set(crypto_sign_ed25519_ref10_srcs + crypto_sign/ed25519/ref10/keypair.c + crypto_sign/ed25519/ref10/obsolete.c + crypto_sign/ed25519/ref10/open.c + crypto_sign/ed25519/ref10/sign.c + crypto_sign/ed25519/ref10/sign_ed25519_ref10.h + ) +source_group(crypto_sign\\ed25519\\ref10 FILES ${crypto_sign_ed25519_ref10_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_sign_ed25519_ref10_srcs}) +############################################################ +set(crypto_stream + crypto_stream/crypto_stream.c + ) +source_group(crypto_stream FILES ${crypto_stream}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream}) +############### +set(crypto_stream_chacha20_srcs + crypto_stream/chacha20/stream_chacha20.c + crypto_stream/chacha20/stream_chacha20.h + ) +source_group(crypto_stream\\chacha20 FILES ${crypto_stream_chacha20_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_chacha20_srcs}) +############### +set(crypto_stream_chacha20_dolbeau_srcs + crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c + crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h + crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c + crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h + crypto_stream/chacha20/dolbeau/u0.h + crypto_stream/chacha20/dolbeau/u1.h + crypto_stream/chacha20/dolbeau/u4.h + crypto_stream/chacha20/dolbeau/u8.h + ) +source_group(crypto_stream\\chacha20\\dolbeau FILES ${crypto_stream_chacha20_dolbeau_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_chacha20_dolbeau_srcs}) +############### +set(crypto_stream_chacha20_ref_srcs + crypto_stream/chacha20/ref/chacha20_ref.c + crypto_stream/chacha20/ref/chacha20_ref.h + ) +source_group(crypto_stream\\chacha20\\ref FILES ${crypto_stream_chacha20_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_chacha20_ref_srcs}) +############### +set(crypto_stream_salsa20_srcs + crypto_stream/salsa20/stream_salsa20.c + crypto_stream/salsa20/stream_salsa20.h + ) +source_group(crypto_stream\\salsa20 FILES ${crypto_stream_salsa20_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa20_srcs}) +############### +set(crypto_stream_salsa20_ref_srcs + crypto_stream/salsa20/ref/salsa20_ref.c + crypto_stream/salsa20/ref/salsa20_ref.h + ) +source_group(crypto_stream\\salsa20\\ref FILES ${crypto_stream_salsa20_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa20_ref_srcs}) +############### +set(crypto_stream_salsa20_xmm6_srcs + crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S + crypto_stream/salsa20/xmm6/salsa20_xmm6.c + crypto_stream/salsa20/xmm6/salsa20_xmm6.h + ) +source_group(crypto_stream\\salsa20\\xmm6 FILES ${crypto_stream_salsa20_xmm6_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa20_xmm6_srcs}) +############### +set(crypto_stream_salsa20_xmm6int_srcs + crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c + crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h + crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c + crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h + crypto_stream/salsa20/xmm6int/u0.h + crypto_stream/salsa20/xmm6int/u1.h + crypto_stream/salsa20/xmm6int/u4.h + crypto_stream/salsa20/xmm6int/u8.h + ) +source_group(crypto_stream\\salsa20\\xmm6int FILES ${crypto_stream_salsa20_xmm6int_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa20_xmm6int_srcs}) +############### +set(crypto_stream_salsa208_srcs + crypto_stream/salsa208/stream_salsa208.c + ) +source_group(crypto_stream\\salsa208 FILES ${crypto_stream_salsa208_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa208_srcs}) +############### +set(crypto_stream_salsa208_ref_srcs + crypto_stream/salsa208/ref/stream_salsa208_ref.c + ) +source_group(crypto_stream\\salsa208\\ref FILES ${crypto_stream_salsa208_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa208_ref_srcs}) +############### +set(crypto_stream_salsa2012_srcs + crypto_stream/salsa2012/stream_salsa2012.c + ) +source_group(crypto_stream\\salsa2012 FILES ${crypto_stream_salsa2012_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa2012_srcs}) +############### +set(crypto_stream_salsa2012_ref_srcs + crypto_stream/salsa2012/ref/stream_salsa2012_ref.c + ) +source_group(crypto_stream\\salsa2012\\ref FILES ${crypto_stream_salsa2012_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_salsa2012_ref_srcs}) +############### +set(crypto_stream_xchacha20_srcs + crypto_stream/xchacha20/stream_xchacha20.c + ) +source_group(crypto_stream\\xchacha20 FILES ${crypto_stream_xchacha20_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_xchacha20_srcs}) +############### +set(crypto_stream_xsalsa20_srcs + crypto_stream/xsalsa20/stream_xsalsa20.c + ) +source_group(crypto_stream\\xsalsa20 FILES ${crypto_stream_xsalsa20_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_stream_xsalsa20_srcs}) +############################################################ +set(crypto_verify_srcs + crypto_verify/verify.c + ) +source_group(crypto_verify FILES ${crypto_verify_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_verify_srcs}) +############################################################ +set(crypto_xof_shake128_srcs + crypto_xof/shake128/xof_shake128.c + ) +source_group(crypto_xof\\shake128 FILES ${crypto_xof_shake128_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_shake128_srcs}) +############### +set(crypto_xof_shake128_ref_srcs + crypto_xof/shake128/ref/shake128_ref.c + crypto_xof/shake128/ref/shake128_ref.h + ) +source_group(crypto_xof\\shake128\\ref FILES ${crypto_xof_shake128_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_shake128_ref_srcs}) +############### +set(crypto_xof_shake256_srcs + crypto_xof/shake256/xof_shake256.c + ) +source_group(crypto_xof\\shake256 FILES ${crypto_xof_shake256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_shake256_srcs}) +############### +set(crypto_xof_shake256_ref_srcs + crypto_xof/shake256/ref/shake256_ref.c + crypto_xof/shake256/ref/shake256_ref.h + ) +source_group(crypto_xof\\shake256\\ref FILES ${crypto_xof_shake256_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_shake256_ref_srcs}) +############### +set(crypto_xof_turboshake128_srcs + crypto_xof/turboshake128/xof_turboshake128.c + ) +source_group(crypto_xof\\turboshake128 FILES ${crypto_xof_turboshake128_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_turboshake128_srcs}) +############### +set(crypto_xof_turboshake128_ref_srcs + crypto_xof/turboshake128/ref/turboshake128_ref.c + crypto_xof/turboshake128/ref/turboshake128_ref.h + ) +source_group(crypto_xof\\turboshake128\\ref FILES ${crypto_xof_turboshake128_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_turboshake128_ref_srcs}) +############### +set(crypto_xof_turboshake256_srcs + crypto_xof/turboshake256/xof_turboshake256.c + ) +source_group(crypto_xof\\turboshake256 FILES ${crypto_xof_turboshake256_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_turboshake256_srcs}) +############### +set(crypto_xof_turboshake256_ref_srcs + crypto_xof/turboshake256/ref/turboshake256_ref.c + crypto_xof/turboshake256/ref/turboshake256_ref.h + ) +source_group(crypto_xof\\turboshake256\\ref FILES ${crypto_xof_turboshake256_ref_srcs}) +list(APPEND ${lib_name}_libsrcs ${crypto_xof_turboshake256_ref_srcs}) +############################################################ +set(include_srcs + include/Makefile.am + include/Makefile.in + include/sodium.h + ) +source_group(include FILES ${include_srcs}) +list(APPEND ${lib_name}_libsrcs ${include_srcs}) +############### +set(include_sodium_srcs + 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 + include/sodium/crypto_auth.h + include/sodium/crypto_auth_hmacsha256.h + include/sodium/crypto_auth_hmacsha512.h + include/sodium/crypto_auth_hmacsha512256.h + include/sodium/crypto_box.h + include/sodium/crypto_box_curve25519xchacha20poly1305.h + include/sodium/crypto_box_curve25519xsalsa20poly1305.h + include/sodium/crypto_core_ed25519.h + include/sodium/crypto_core_hchacha20.h + include/sodium/crypto_core_hsalsa20.h + include/sodium/crypto_core_keccak1600.h + include/sodium/crypto_core_ristretto255.h + include/sodium/crypto_core_salsa20.h + include/sodium/crypto_core_salsa2012.h + include/sodium/crypto_core_salsa208.h + include/sodium/crypto_generichash.h + include/sodium/crypto_generichash_blake2b.h + include/sodium/crypto_hash.h + include/sodium/crypto_hash_sha256.h + include/sodium/crypto_hash_sha3.h + include/sodium/crypto_hash_sha512.h + include/sodium/crypto_ipcrypt.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_kem.h + include/sodium/crypto_kem_mlkem768.h + include/sodium/crypto_kem_xwing.h + include/sodium/crypto_kx.h + include/sodium/crypto_onetimeauth.h + include/sodium/crypto_onetimeauth_poly1305.h + include/sodium/crypto_pwhash.h + include/sodium/crypto_pwhash_argon2i.h + include/sodium/crypto_pwhash_argon2id.h + include/sodium/crypto_pwhash_scryptsalsa208sha256.h + include/sodium/crypto_scalarmult.h + include/sodium/crypto_scalarmult_curve25519.h + include/sodium/crypto_scalarmult_ed25519.h + include/sodium/crypto_scalarmult_ristretto255.h + include/sodium/crypto_secretbox.h + include/sodium/crypto_secretbox_xchacha20poly1305.h + include/sodium/crypto_secretbox_xsalsa20poly1305.h + include/sodium/crypto_secretstream_xchacha20poly1305.h + include/sodium/crypto_shorthash.h + include/sodium/crypto_shorthash_siphash24.h + include/sodium/crypto_sign.h + include/sodium/crypto_sign_ed25519.h + include/sodium/crypto_sign_edwards25519sha512batch.h + include/sodium/crypto_stream.h + include/sodium/crypto_stream_chacha20.h + include/sodium/crypto_stream_salsa20.h + include/sodium/crypto_stream_salsa2012.h + include/sodium/crypto_stream_salsa208.h + include/sodium/crypto_stream_xchacha20.h + include/sodium/crypto_stream_xsalsa20.h + include/sodium/crypto_verify_16.h + include/sodium/crypto_verify_32.h + include/sodium/crypto_verify_64.h + include/sodium/crypto_xof_shake128.h + include/sodium/crypto_xof_shake256.h + include/sodium/crypto_xof_turboshake128.h + include/sodium/crypto_xof_turboshake256.h + include/sodium/export.h + include/sodium/randombytes.h + include/sodium/randombytes_internal_random.h + include/sodium/randombytes_sysrandom.h + include/sodium/runtime.h + include/sodium/utils.h + include/sodium/version.h.in + ) +source_group(include\\sodium FILES ${include_sodium_srcs}) +list(APPEND ${lib_name}_libsrcs ${include_sodium_srcs}) +############### +set(include_sodium_private_srcs + include/sodium/private/asm_cet.h + include/sodium/private/chacha20_ietf_ext.h + include/sodium/private/common.h + include/sodium/private/ed25519_ref10.h + include/sodium/private/ed25519_ref10_fe_25_5.h + include/sodium/private/ed25519_ref10_fe_51.h + include/sodium/private/implementations.h + include/sodium/private/mutex.h + include/sodium/private/quirks.h + include/sodium/private/softaes.h + include/sodium/private/sse2_64_32.h + ) +source_group(include\\sodium\\private FILES ${include_sodium_private_srcs}) +list(APPEND ${lib_name}_libsrcs ${include_sodium_private_srcs}) +############################################################ +set(randombytes_srcs + randombytes/randombytes.c + ) +source_group(randombytes FILES ${randombytes_srcs}) +list(APPEND ${lib_name}_libsrcs ${randombytes_srcs}) +############### +set(randombytes_internal_srcs + randombytes/internal/randombytes_internal_random.c + ) +source_group(randombytes\\internal FILES ${randombytes_internal_srcs}) +list(APPEND ${lib_name}_libsrcs ${randombytes_internal_srcs}) +############### +set(randombytes_sysrandom_srcs + randombytes/sysrandom/randombytes_sysrandom.c + ) +source_group(randombytes\\sysrandom FILES ${randombytes_sysrandom_srcs}) +list(APPEND ${lib_name}_libsrcs ${randombytes_sysrandom_srcs}) +############################################################ +set(sodium_srcs + sodium/codecs.c + sodium/core.c + sodium/runtime.c + sodium/utils.c + sodium/version.c + ) +source_group(sodium FILES ${sodium_srcs}) +list(APPEND ${lib_name}_libsrcs ${sodium_srcs}) +############################################################ +set(libsrcs ${${lib_name}_libsrcs}) +if(ENABLE_MINIMAL) + # grep "@MINIMAL_FALSE@" src/libsodium/Makefile.in + list(REMOVE_ITEM libsrcs + ${crypto_box_curve25519xchacha20poly1305_srcs} + ${crypto_core_ed25519_srcs} + ${crypto_pwhash_scryptsalsa208sha256_srcs} + ${crypto_pwhash_scryptsalsa208sha256_nosse_srcs} + ${crypto_pwhash_scryptsalsa208sha256_sse_srcs} + ${crypto_scalarmult_ed25519_ref10_srcs} + ${crypto_scalarmult_ristretto255_ref10_srcs} + ${crypto_secretbox_xchacha20poly1305_srcs} + crypto_shorthash/siphash24/shorthash_siphashx24.c + crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c + crypto_sign/ed25519/ref10/obsolete.c + ${crypto_stream_salsa2012_srcs} + ${crypto_stream_salsa2012_ref_srcs} + ${crypto_stream_salsa208_srcs} + ${crypto_stream_salsa208_ref_srcs} + ${crypto_stream_xchacha20_srcs} + ) +endif() +############################################################ +set(VERSION ${PROJECT_VERSION}) +file(STRINGS ${CMAKE_SOURCE_DIR}/configure.ac configure_ac REGEX "^SODIUM_LIBRARY_VERSION_MAJOR=([0-9]+)") +string(REGEX MATCH "([0-9]+)" SODIUM_LIBRARY_VERSION_MAJOR "${configure_ac}") +file(STRINGS ${CMAKE_SOURCE_DIR}/configure.ac configure_ac REGEX "^SODIUM_LIBRARY_VERSION_MINOR=([0-9]+)") +string(REGEX MATCH "([0-9]+)" SODIUM_LIBRARY_VERSION_MINOR "${configure_ac}") +if(ENABLE_MINIMAL) + set(SODIUM_LIBRARY_MINIMAL_DEF "#define SODIUM_LIBRARY_MINIMAL 1") +endif() +configure_file(include/sodium/version.h.in include/sodium/version.h) +############################################################ +add_library(${lib_name} STATIC ${libsrcs}) +target_compile_definitions(${lib_name} PUBLIC SODIUM_STATIC PRIVATE ${pvtDefs}) +target_compile_options(${lib_name} PRIVATE ${pvtOpts}) +target_include_directories(${lib_name} PUBLIC $ + $ + $ + $ + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include/sodium + ) +target_link_libraries(${lib_name} PRIVATE Threads::Threads) +############################################################ +set(targetsFile ${lib_name}-targets) +if(COMMAND xpExternPackage) + xpExternPackage(TARGETS_FILE ${targetsFile} + LIBRARIES ${lib_name} DEFAULT_TARGETS ${lib_name} + BASE ${PROJECT_VERSION} XPDIFF "auto" + WEB "https://doc.libsodium.org/" UPSTREAM "github.com/jedisct1/libsodium" + DESC "library for encryption, decryption, signatures, password hashing and more" + LICENSE "[ISC](https://doc.libsodium.org/#license 'Internet Systems Consortium License, functionally equivalent to simplified BSD and MIT licenses')" + ) +elseif(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) + set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) +endif() +install(DIRECTORY include/ ${CMAKE_CURRENT_BINARY_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.h" + PATTERN "private*" EXCLUDE + ) +install(TARGETS ${lib_name} EXPORT ${targetsFile} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) +install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} NAMESPACE ${PROJECT_NAME}::) +compareCmakeFilesys("${${lib_name}_libsrcs}") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000000..e37643fad4 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,99 @@ +set(tests + 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 + core_ed25519 + core_ristretto255 + ed25519_convert + generichash + generichash2 + generichash3 + hash + hash3 + kdf + keygen + kx + metamorphic + misuse + onetimeauth + onetimeauth2 + onetimeauth7 + pwhash_argon2i + pwhash_argon2id + pwhash_scrypt + pwhash_scrypt_ll + randombytes + scalarmult + scalarmult2 + scalarmult5 + scalarmult6 + scalarmult7 + scalarmult8 + scalarmult_ed25519 + scalarmult_ristretto255 + secretbox + secretbox2 + secretbox7 + secretbox8 + secretbox_easy + secretbox_easy2 + secretstream_xchacha20poly1305 + shorthash + sign + siphashx24 + sodium_core + sodium_utils + sodium_utils2 + sodium_utils3 + sodium_version + stream + stream2 + stream3 + stream4 + verify1 + xchacha20 + ) +if(ENABLE_MINIMAL) + # grep "@MINIMAL_FALSE@" test/default/Makefile.in + list(REMOVE_ITEM tests + core_ed25519 + core_ristretto255 + pwhash_scrypt + pwhash_scrypt_ll + scalarmult_ed25519 + scalarmult_ristretto255 + siphashx24 + xchacha20 + ) +endif() +foreach(test ${tests}) + add_executable(${test} default/${test}.c) + target_include_directories(${test} PRIVATE quirks) + target_link_libraries(${test} PRIVATE sodium) + add_test(NAME ${test} COMMAND ${test} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/default) + set_property(TARGET ${test} PROPERTY FOLDER test) +endforeach()