aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/workflows/linux.yml12
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt10
-rw-r--r--crypto/CMakeLists.txt24
-rw-r--r--crypto/Makefile.am5
-rw-r--r--crypto/Makefile.am.elf-x86_6410
-rw-r--r--crypto/Makefile.am.macosx-x86_6410
-rw-r--r--include/arch/loongarch64/opensslconf.h10
-rw-r--r--include/arch/mips/opensslconf.h10
-rw-r--r--patches/crypto_namespace.h.patch22
-rw-r--r--patches/mlkem_internal.h.patch11
-rw-r--r--patches/ssl_namespace.h.patch21
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/mlkem_tests.bat63
-rwxr-xr-xupdate.sh2
16 files changed, 149 insertions, 74 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 8334ae6..de9d8d3 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -35,6 +35,13 @@ jobs:
35 - os: "ubuntu-24.04" # loong64 35 - os: "ubuntu-24.04" # loong64
36 arch: "loong64" 36 arch: "loong64"
37 compiler: "gcc" 37 compiler: "gcc"
38 - os: "ubuntu-24.04-arm"
39 arch: "native"
40 compiler: "gcc"
41 - os: "ubuntu-24.04-arm"
42 arch: "native"
43 compiler: "clang"
44
38 steps: 45 steps:
39 - name: "Checkout repository" 46 - name: "Checkout repository"
40 uses: actions/checkout@v4 47 uses: actions/checkout@v4
@@ -47,8 +54,8 @@ jobs:
47 54
48 # Test ASAN with and without ASM enabled. 55 # Test ASAN with and without ASM enabled.
49 test-asan: 56 test-asan:
50 name: "ASAN (${{ matrix.asm == 'ON' && 'asm' || 'no-asm' }})" 57 name: "${{ matrix.os }} - ASAN (${{ matrix.asm == 'ON' && 'asm' || 'no-asm' }})"
51 runs-on: "ubuntu-24.04" 58 runs-on: "${{ matrix.os }}"
52 if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} 59 if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }}
53 permissions: 60 permissions:
54 contents: read 61 contents: read
@@ -56,6 +63,7 @@ jobs:
56 fail-fast: false 63 fail-fast: false
57 matrix: 64 matrix:
58 asm: [ON, OFF] 65 asm: [ON, OFF]
66 os: ["ubuntu-24.04", "ubuntu-24.04-arm"]
59 steps: 67 steps:
60 - name: "Checkout repository" 68 - name: "Checkout repository"
61 uses: actions/checkout@v4 69 uses: actions/checkout@v4
diff --git a/.gitignore b/.gitignore
index c83a56d..03f44eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,6 +108,7 @@ tests/constraints*
108tests/crypto_test* 108tests/crypto_test*
109tests/ctlog.conf 109tests/ctlog.conf
110tests/*.crt 110tests/*.crt
111tests/ec_arithmetic*
111tests/ec_point_conversion* 112tests/ec_point_conversion*
112tests/ecc_cdh* 113tests/ecc_cdh*
113tests/evp_pkey_cleanup* 114tests/evp_pkey_cleanup*
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a035bb..17e5a0c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -378,6 +378,16 @@ if(HAVE_NETINET_IP_H)
378 add_definitions(-DHAVE_NETINET_IP_H) 378 add_definitions(-DHAVE_NETINET_IP_H)
379endif() 379endif()
380 380
381check_include_files(resolv.h HAVE_RESOLV_H)
382if(HAVE_RESOLV_H)
383 add_definitions(-DHAVE_RESOLV_H)
384endif()
385
386check_include_files(arpa/nameser.h HAVE_ARPA_NAMESER_H)
387if(HAVE_ARPA_NAMESER_H)
388 add_definitions(-DHAVE_ARPA_NAMESER_H)
389endif()
390
381# This isn't ready for universal binaries yet, since we do conditional 391# This isn't ready for universal binaries yet, since we do conditional
382# compilation based on the architecture, but this makes cross compiling for a 392# compilation based on the architecture, but this makes cross compiling for a
383# single architecture work on macOS at least. 393# single architecture work on macOS at least.
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index 047c228..f67d2bd 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -33,11 +33,21 @@ if(HOST_ASM_ELF_X86_64)
33 bn/arch/amd64/bignum_add.S 33 bn/arch/amd64/bignum_add.S
34 bn/arch/amd64/bignum_cmadd.S 34 bn/arch/amd64/bignum_cmadd.S
35 bn/arch/amd64/bignum_cmul.S 35 bn/arch/amd64/bignum_cmul.S
36 bn/arch/amd64/bignum_modadd.S
37 bn/arch/amd64/bignum_modsub.S
36 bn/arch/amd64/bignum_mul.S 38 bn/arch/amd64/bignum_mul.S
39 bn/arch/amd64/bignum_mul_4_8.S
37 bn/arch/amd64/bignum_mul_4_8_alt.S 40 bn/arch/amd64/bignum_mul_4_8_alt.S
41 bn/arch/amd64/bignum_mul_6_12.S
42 bn/arch/amd64/bignum_mul_6_12_alt.S
43 bn/arch/amd64/bignum_mul_8_16.S
38 bn/arch/amd64/bignum_mul_8_16_alt.S 44 bn/arch/amd64/bignum_mul_8_16_alt.S
39 bn/arch/amd64/bignum_sqr.S 45 bn/arch/amd64/bignum_sqr.S
46 bn/arch/amd64/bignum_sqr_4_8.S
40 bn/arch/amd64/bignum_sqr_4_8_alt.S 47 bn/arch/amd64/bignum_sqr_4_8_alt.S
48 bn/arch/amd64/bignum_sqr_6_12.S
49 bn/arch/amd64/bignum_sqr_6_12_alt.S
50 bn/arch/amd64/bignum_sqr_8_16.S
41 bn/arch/amd64/bignum_sqr_8_16_alt.S 51 bn/arch/amd64/bignum_sqr_8_16_alt.S
42 bn/arch/amd64/bignum_sub.S 52 bn/arch/amd64/bignum_sub.S
43 bn/arch/amd64/word_clz.S 53 bn/arch/amd64/word_clz.S
@@ -71,11 +81,21 @@ if(HOST_ASM_MACOSX_X86_64)
71 bn/arch/amd64/bignum_add.S 81 bn/arch/amd64/bignum_add.S
72 bn/arch/amd64/bignum_cmadd.S 82 bn/arch/amd64/bignum_cmadd.S
73 bn/arch/amd64/bignum_cmul.S 83 bn/arch/amd64/bignum_cmul.S
84 bn/arch/amd64/bignum_modadd.S
85 bn/arch/amd64/bignum_modsub.S
74 bn/arch/amd64/bignum_mul.S 86 bn/arch/amd64/bignum_mul.S
87 bn/arch/amd64/bignum_mul_4_8.S
75 bn/arch/amd64/bignum_mul_4_8_alt.S 88 bn/arch/amd64/bignum_mul_4_8_alt.S
89 bn/arch/amd64/bignum_mul_6_12.S
90 bn/arch/amd64/bignum_mul_6_12_alt.S
91 bn/arch/amd64/bignum_mul_8_16.S
76 bn/arch/amd64/bignum_mul_8_16_alt.S 92 bn/arch/amd64/bignum_mul_8_16_alt.S
77 bn/arch/amd64/bignum_sqr.S 93 bn/arch/amd64/bignum_sqr.S
94 bn/arch/amd64/bignum_sqr_4_8.S
78 bn/arch/amd64/bignum_sqr_4_8_alt.S 95 bn/arch/amd64/bignum_sqr_4_8_alt.S
96 bn/arch/amd64/bignum_sqr_6_12.S
97 bn/arch/amd64/bignum_sqr_6_12_alt.S
98 bn/arch/amd64/bignum_sqr_8_16.S
79 bn/arch/amd64/bignum_sqr_8_16_alt.S 99 bn/arch/amd64/bignum_sqr_8_16_alt.S
80 bn/arch/amd64/bignum_sub.S 100 bn/arch/amd64/bignum_sub.S
81 bn/arch/amd64/word_clz.S 101 bn/arch/amd64/word_clz.S
@@ -416,8 +436,10 @@ set(
416 lhash/lhash.c 436 lhash/lhash.c
417 md4/md4.c 437 md4/md4.c
418 md5/md5.c 438 md5/md5.c
419 mlkem/mlkem768.c 439 mlkem/mlkem.c
420 mlkem/mlkem1024.c 440 mlkem/mlkem1024.c
441 mlkem/mlkem768.c
442 mlkem/mlkem_key.c
421 modes/cbc128.c 443 modes/cbc128.c
422 modes/ccm128.c 444 modes/ccm128.c
423 modes/cfb128.c 445 modes/cfb128.c
diff --git a/crypto/Makefile.am b/crypto/Makefile.am
index ad241ab..610341a 100644
--- a/crypto/Makefile.am
+++ b/crypto/Makefile.am
@@ -738,9 +738,10 @@ libcrypto_la_SOURCES += md4/md4.c
738libcrypto_la_SOURCES += md5/md5.c 738libcrypto_la_SOURCES += md5/md5.c
739 739
740# mlkem 740# mlkem
741libcrypto_la_SOURCES += mlkem/mlkem768.c 741libcrypto_la_SOURCES += mlkem/mlkem.c
742libcrypto_la_SOURCES += mlkem/mlkem1024.c 742libcrypto_la_SOURCES += mlkem/mlkem1024.c
743noinst_HEADERS += mlkem/mlkem.h 743libcrypto_la_SOURCES += mlkem/mlkem768.c
744libcrypto_la_SOURCES += mlkem/mlkem_key.c
744noinst_HEADERS += mlkem/mlkem_internal.h 745noinst_HEADERS += mlkem/mlkem_internal.h
745 746
746# modes 747# modes
diff --git a/crypto/Makefile.am.elf-x86_64 b/crypto/Makefile.am.elf-x86_64
index ad49787..df67ad2 100644
--- a/crypto/Makefile.am.elf-x86_64
+++ b/crypto/Makefile.am.elf-x86_64
@@ -10,11 +10,21 @@ ASM_X86_64_ELF += rc4/rc4-elf-x86_64.S
10ASM_X86_64_ELF += bn/arch/amd64/bignum_add.S 10ASM_X86_64_ELF += bn/arch/amd64/bignum_add.S
11ASM_X86_64_ELF += bn/arch/amd64/bignum_cmadd.S 11ASM_X86_64_ELF += bn/arch/amd64/bignum_cmadd.S
12ASM_X86_64_ELF += bn/arch/amd64/bignum_cmul.S 12ASM_X86_64_ELF += bn/arch/amd64/bignum_cmul.S
13ASM_X86_64_ELF += bn/arch/amd64/bignum_modadd.S
14ASM_X86_64_ELF += bn/arch/amd64/bignum_modsub.S
13ASM_X86_64_ELF += bn/arch/amd64/bignum_mul.S 15ASM_X86_64_ELF += bn/arch/amd64/bignum_mul.S
16ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_4_8.S
14ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_4_8_alt.S 17ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_4_8_alt.S
18ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_6_12.S
19ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_6_12_alt.S
20ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_8_16.S
15ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_8_16_alt.S 21ASM_X86_64_ELF += bn/arch/amd64/bignum_mul_8_16_alt.S
16ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr.S 22ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr.S
23ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8.S
17ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8_alt.S 24ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_4_8_alt.S
25ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_6_12.S
26ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_6_12_alt.S
27ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16.S
18ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16_alt.S 28ASM_X86_64_ELF += bn/arch/amd64/bignum_sqr_8_16_alt.S
19ASM_X86_64_ELF += bn/arch/amd64/bignum_sub.S 29ASM_X86_64_ELF += bn/arch/amd64/bignum_sub.S
20ASM_X86_64_ELF += bn/arch/amd64/word_clz.S 30ASM_X86_64_ELF += bn/arch/amd64/word_clz.S
diff --git a/crypto/Makefile.am.macosx-x86_64 b/crypto/Makefile.am.macosx-x86_64
index bbccfd6..23e27e6 100644
--- a/crypto/Makefile.am.macosx-x86_64
+++ b/crypto/Makefile.am.macosx-x86_64
@@ -10,11 +10,21 @@ ASM_X86_64_MACOSX += rc4/rc4-macosx-x86_64.S
10ASM_X86_64_MACOSX += bn/arch/amd64/bignum_add.S 10ASM_X86_64_MACOSX += bn/arch/amd64/bignum_add.S
11ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmadd.S 11ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmadd.S
12ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmul.S 12ASM_X86_64_MACOSX += bn/arch/amd64/bignum_cmul.S
13ASM_X86_64_MACOSX += bn/arch/amd64/bignum_modadd.S
14ASM_X86_64_MACOSX += bn/arch/amd64/bignum_modsub.S
13ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul.S 15ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul.S
16ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8.S
14ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8_alt.S 17ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_4_8_alt.S
18ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_6_12.S
19ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_6_12_alt.S
20ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16.S
15ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16_alt.S 21ASM_X86_64_MACOSX += bn/arch/amd64/bignum_mul_8_16_alt.S
16ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr.S 22ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr.S
23ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8.S
17ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S 24ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_4_8_alt.S
25ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_6_12.S
26ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_6_12_alt.S
27ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16.S
18ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S 28ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sqr_8_16_alt.S
19ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S 29ASM_X86_64_MACOSX += bn/arch/amd64/bignum_sub.S
20ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S 30ASM_X86_64_MACOSX += bn/arch/amd64/word_clz.S
diff --git a/include/arch/loongarch64/opensslconf.h b/include/arch/loongarch64/opensslconf.h
index 868066c..c31bcc0 100644
--- a/include/arch/loongarch64/opensslconf.h
+++ b/include/arch/loongarch64/opensslconf.h
@@ -11,13 +11,3 @@
11#define OPENSSL_LINE __LINE__ 11#define OPENSSL_LINE __LINE__
12#endif 12#endif
13#endif 13#endif
14
15#if defined(HEADER_RC4_H)
16#if !defined(RC4_CHUNK)
17/*
18 * This enables code handling data aligned at natural CPU word
19 * boundary. See crypto/rc4/rc4_enc.c for further details.
20 */
21#define RC4_CHUNK unsigned long
22#endif
23#endif
diff --git a/include/arch/mips/opensslconf.h b/include/arch/mips/opensslconf.h
index dcbe113..c31bcc0 100644
--- a/include/arch/mips/opensslconf.h
+++ b/include/arch/mips/opensslconf.h
@@ -11,13 +11,3 @@
11#define OPENSSL_LINE __LINE__ 11#define OPENSSL_LINE __LINE__
12#endif 12#endif
13#endif 13#endif
14
15#if defined(HEADER_RC4_H)
16#if !defined(RC4_CHUNK)
17/*
18 * This enables code handling data aligned at natural CPU word
19 * boundary. See crypto/rc4/rc4_enc.c for further details.
20 */
21#undef RC4_CHUNK
22#endif
23#endif
diff --git a/patches/crypto_namespace.h.patch b/patches/crypto_namespace.h.patch
deleted file mode 100644
index 400030f..0000000
--- a/patches/crypto_namespace.h.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1--- crypto/hidden/crypto_namespace.h.orig Fri Aug 2 23:52:55 2024
2+++ crypto/hidden/crypto_namespace.h Fri Aug 2 23:53:17 2024
3@@ -24,6 +24,12 @@
4 * external calls use the latter name.
5 */
6
7+#ifdef _MSC_VER
8+# define LCRYPTO_UNUSED(x)
9+# define LCRYPTO_USED(x)
10+# define LCRYPTO_ALIAS1(pre, x)
11+# define LCRYPTO_ALIAS(x)
12+#else
13 #ifdef LIBRESSL_NAMESPACE
14 #ifdef LIBRESSL_CRYPTO_NAMESPACE
15 # define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \
16@@ -47,5 +53,6 @@
17 # define LCRYPTO_ALIAS1(pre,x)
18 # define LCRYPTO_ALIAS(x) asm("")
19 #endif
20+#endif /* _MSC_VER */
21
22 #endif /* _LIBCRYPTO_CRYPTO_NAMESPACE_H_ */
diff --git a/patches/mlkem_internal.h.patch b/patches/mlkem_internal.h.patch
new file mode 100644
index 0000000..b7cbdcf
--- /dev/null
+++ b/patches/mlkem_internal.h.patch
@@ -0,0 +1,11 @@
1--- crypto/mlkem/mlkem_internal.h.orig Sun Aug 17 13:20:18 2025
2+++ crypto/mlkem/mlkem_internal.h Sun Aug 17 13:20:37 2025
3@@ -19,7 +19,7 @@
4 #define OPENSSL_HEADER_CRYPTO_MLKEM_INTERNAL_H
5
6 #include "bytestring.h"
7-#include "mlkem.h"
8+#include <openssl/mlkem.h>
9
10 #if defined(__cplusplus)
11 extern "C" {
diff --git a/patches/ssl_namespace.h.patch b/patches/ssl_namespace.h.patch
deleted file mode 100644
index eb9c7a2..0000000
--- a/patches/ssl_namespace.h.patch
+++ /dev/null
@@ -1,21 +0,0 @@
1--- ssl/hidden/ssl_namespace.h.orig Fri Aug 2 23:52:55 2024
2+++ ssl/hidden/ssl_namespace.h Fri Aug 2 23:53:17 2024
3@@ -23,6 +23,11 @@
4 * and we alias that to the normal name.
5 */
6
7+#ifdef _MSC_VER
8+#define LSSL_UNUSED(x)
9+#define LSSL_USED(x)
10+#define LSSL_ALIAS(x)
11+#else
12 #ifdef LIBRESSL_NAMESPACE
13 #define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated))
14 #define LSSL_USED(x) __attribute__((visibility("hidden"))) \
15@@ -37,5 +42,6 @@
16 #define LSSL_USED(x)
17 #define LSSL_ALIAS(x) asm("")
18 #endif
19+#endif /* _MSC_VER */
20
21 #endif /* _LIBSSL_SSL_NAMESPACE_H_ */
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c497b77..55529cd 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -563,14 +563,16 @@ if(NOT WIN32)
563endif() 563endif()
564 564
565# mlkem_tests 565# mlkem_tests
566add_executable(mlkem_tests mlkem_tests.c mlkem_tests_util.c parse_test_file.c) 566add_executable(mlkem_tests mlkem_tests.c parse_test_file.c)
567target_link_libraries(mlkem_tests ${OPENSSL_TEST_LIBS}) 567target_link_libraries(mlkem_tests ${OPENSSL_TEST_LIBS})
568prepare_emscripten_test_target(mlkem_tests) 568prepare_emscripten_test_target(mlkem_tests)
569if(NOT WIN32) 569if(NOT MSVC)
570 add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.sh) 570 add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.sh)
571 set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") 571 set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
572else()
573 add_test(NAME mlkem_tests COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mlkem_tests.bat $<TARGET_FILE:mlkem_tests>)
572endif() 574endif()
573# XXX - add tests for Windows 575set_tests_properties(mlkem_tests PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
574 576
575# mlkem_iteration_tests 577# mlkem_iteration_tests
576add_executable(mlkem_iteration_tests mlkem_iteration_tests.c mlkem_tests_util.c) 578add_executable(mlkem_iteration_tests mlkem_iteration_tests.c mlkem_tests_util.c)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 914b1e5..066e020 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -577,8 +577,8 @@ noinst_HEADERS += parse_test_file.h
577# mlkem_tests 577# mlkem_tests
578TESTS += mlkem_tests.sh 578TESTS += mlkem_tests.sh
579check_PROGRAMS += mlkem_tests 579check_PROGRAMS += mlkem_tests
580mlkem_tests_SOURCES = mlkem_tests.c mlkem_tests_util.c parse_test_file.c 580mlkem_tests_SOURCES = mlkem_tests.c parse_test_file.c
581EXTRA_DIST += mlkem_tests.sh 581EXTRA_DIST += mlkem_tests.sh mlkem_tests.bat
582EXTRA_DIST += mlkem768_decap_tests.txt 582EXTRA_DIST += mlkem768_decap_tests.txt
583EXTRA_DIST += mlkem768_encap_tests.txt 583EXTRA_DIST += mlkem768_encap_tests.txt
584EXTRA_DIST += mlkem768_keygen_tests.txt 584EXTRA_DIST += mlkem768_keygen_tests.txt
diff --git a/tests/mlkem_tests.bat b/tests/mlkem_tests.bat
new file mode 100644
index 0000000..618c9e0
--- /dev/null
+++ b/tests/mlkem_tests.bat
@@ -0,0 +1,63 @@
1@echo off
2setlocal enabledelayedexpansion
3
4:: Copyright (c) 2025 Theo Beuhler
5::
6:: Permission to use, copy, modify, and distribute this software for any
7:: purpose with or without fee is hereby granted, provided that the above
8:: copyright notice and this permission notice appear in all copies.
9::
10:: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11:: WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12:: MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13:: ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14:: WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15:: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16:: OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
18set mlkem_tests_bin=%1
19set mlkem_tests_bin=%mlkem_tests_bin:/=\%
20if not exist %mlkem_tests_bin% exit /b 1
21
22%mlkem_tests_bin% mlkem768_decap_tests %srcdir%\mlkem768_decap_tests.txt
23if !errorlevel! neq 0 (
24 exit /b 1
25)
26%mlkem_tests_bin% mlkem768_encap_tests %srcdir%\mlkem768_encap_tests.txt
27if !errorlevel! neq 0 (
28 exit /b 1
29)
30%mlkem_tests_bin% mlkem768_keygen_tests %srcdir%\mlkem768_keygen_tests.txt
31if !errorlevel! neq 0 (
32 exit /b 1
33)
34%mlkem_tests_bin% mlkem768_nist_decap_tests %srcdir%\mlkem768_nist_decap_tests.txt
35if !errorlevel! neq 0 (
36 exit /b 1
37)
38%mlkem_tests_bin% mlkem768_nist_keygen_tests %srcdir%\mlkem768_nist_keygen_tests.txt
39if !errorlevel! neq 0 (
40 exit /b 1
41)
42%mlkem_tests_bin% mlkem1024_decap_tests %srcdir%\mlkem1024_decap_tests.txt
43if !errorlevel! neq 0 (
44 exit /b 1
45)
46%mlkem_tests_bin% mlkem1024_encap_tests %srcdir%\mlkem1024_encap_tests.txt
47if !errorlevel! neq 0 (
48 exit /b 1
49)
50%mlkem_tests_bin% mlkem1024_keygen_tests %srcdir%\mlkem1024_keygen_tests.txt
51if !errorlevel! neq 0 (
52 exit /b 1
53)
54%mlkem_tests_bin% mlkem1024_nist_decap_tests %srcdir%\mlkem1024_nist_decap_tests.txt
55if !errorlevel! neq 0 (
56 exit /b 1
57)
58%mlkem_tests_bin% mlkem1024_nist_keygen_tests %srcdir%\mlkem1024_nist_keygen_tests.txt
59if !errorlevel! neq 0 (
60 exit /b 1
61)
62
63endlocal
diff --git a/update.sh b/update.sh
index e8b0566..761953a 100755
--- a/update.sh
+++ b/update.sh
@@ -142,7 +142,7 @@ copy_hdrs $libcrypto_src "stack/stack.h lhash/lhash.h stack/safestack.h
142 ossl_typ.h err/err.h crypto.h comp/comp.h x509/x509.h buffer/buffer.h 142 ossl_typ.h err/err.h crypto.h comp/comp.h x509/x509.h buffer/buffer.h
143 objects/objects.h asn1/asn1.h asn1/posix_time.h bn/bn.h ec/ec.h ecdsa/ecdsa.h 143 objects/objects.h asn1/asn1.h asn1/posix_time.h bn/bn.h ec/ec.h ecdsa/ecdsa.h
144 ecdh/ecdh.h rsa/rsa.h sha/sha.h x509/x509_vfy.h pkcs7/pkcs7.h pem/pem.h 144 ecdh/ecdh.h rsa/rsa.h sha/sha.h x509/x509_vfy.h pkcs7/pkcs7.h pem/pem.h
145 hkdf/hkdf.h hmac/hmac.h rand/rand.h md5/md5.h 145 hkdf/hkdf.h hmac/hmac.h rand/rand.h md5/md5.h mlkem/mlkem.h
146 x509/x509v3.h conf/conf.h ocsp/ocsp.h 146 x509/x509v3.h conf/conf.h ocsp/ocsp.h
147 aes/aes.h modes/modes.h asn1/asn1t.h bf/blowfish.h 147 aes/aes.h modes/modes.h asn1/asn1t.h bf/blowfish.h
148 bio/bio.h cast/cast.h cmac/cmac.h cms/cms.h des/des.h dh/dh.h 148 bio/bio.h cast/cast.h cmac/cmac.h cms/cms.h des/des.h dh/dh.h