diff --git a/config/default_config.cmake b/config/default_config.cmake index 4f3f2295..21b82b59 100644 --- a/config/default_config.cmake +++ b/config/default_config.cmake @@ -6,8 +6,8 @@ set(SOURCES_std ${PROJECT_SOURCE_DIR}/src/Hacl_HMAC_DRBG.c ${PROJECT_SOURCE_DIR}/src/Hacl_HMAC.c ${PROJECT_SOURCE_DIR}/src/Hacl_Hash_SHA2.c - ${PROJECT_SOURCE_DIR}/src/Hacl_Hash_Blake2b.c ${PROJECT_SOURCE_DIR}/src/Hacl_Hash_Blake2s.c + ${PROJECT_SOURCE_DIR}/src/Hacl_Hash_Blake2b.c ${PROJECT_SOURCE_DIR}/src/Hacl_Ed25519.c ${PROJECT_SOURCE_DIR}/src/Hacl_EC_Ed25519.c ${PROJECT_SOURCE_DIR}/src/Hacl_Hash_Base.c @@ -39,7 +39,6 @@ set(SOURCES_std ${PROJECT_SOURCE_DIR}/src/Hacl_Frodo640.c ${PROJECT_SOURCE_DIR}/src/Hacl_Frodo976.c ${PROJECT_SOURCE_DIR}/src/Hacl_Frodo64.c - ${PROJECT_SOURCE_DIR}/src/Libcrux_Kem_Kyber_Kyber768.c ${PROJECT_SOURCE_DIR}/src/EverCrypt_DRBG.c ${PROJECT_SOURCE_DIR}/src/Lib_RandomBuffer_System.c ${PROJECT_SOURCE_DIR}/src/EverCrypt_HMAC.c @@ -57,8 +56,8 @@ set(SOURCES_std set(SOURCES_vec256 ${PROJECT_SOURCE_DIR}/src/Hacl_Hash_Blake2b_Simd256.c ${PROJECT_SOURCE_DIR}/src/Hacl_AEAD_Chacha20Poly1305_Simd256.c - ${PROJECT_SOURCE_DIR}/src/Hacl_MAC_Poly1305_Simd256.c ${PROJECT_SOURCE_DIR}/src/Hacl_Chacha20_Vec256.c + ${PROJECT_SOURCE_DIR}/src/Hacl_MAC_Poly1305_Simd256.c ${PROJECT_SOURCE_DIR}/src/Hacl_SHA2_Vec256.c ${PROJECT_SOURCE_DIR}/src/Hacl_HKDF_Blake2b_256.c ${PROJECT_SOURCE_DIR}/src/Hacl_HMAC_Blake2b_256.c @@ -72,8 +71,8 @@ set(SOURCES_vec128 ${PROJECT_SOURCE_DIR}/src/Hacl_Bignum64.c ${PROJECT_SOURCE_DIR}/src/Hacl_GenericField64.c ${PROJECT_SOURCE_DIR}/src/Hacl_AEAD_Chacha20Poly1305_Simd128.c - ${PROJECT_SOURCE_DIR}/src/Hacl_MAC_Poly1305_Simd128.c ${PROJECT_SOURCE_DIR}/src/Hacl_Chacha20_Vec128.c + ${PROJECT_SOURCE_DIR}/src/Hacl_MAC_Poly1305_Simd128.c ${PROJECT_SOURCE_DIR}/src/Hacl_SHA2_Vec128.c ${PROJECT_SOURCE_DIR}/src/Hacl_HKDF_Blake2s_128.c ${PROJECT_SOURCE_DIR}/src/Hacl_HMAC_Blake2s_128.c @@ -111,16 +110,16 @@ set(INCLUDES ${PROJECT_SOURCE_DIR}/karamel/krmllib/dist/minimal/LowStar_Endianness.h ${PROJECT_SOURCE_DIR}/include/Hacl_Salsa20.h ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Streaming_Types.h ${PROJECT_SOURCE_DIR}/include/Hacl_Krmllib.h ${PROJECT_SOURCE_DIR}/include/Hacl_Curve25519_51.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Krmllib.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Krmllib.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC_DRBG.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Streaming_Types.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC.h ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_SHA2.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b.h ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2s.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Ed25519.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_SHA2.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_SHA2.h @@ -137,14 +136,16 @@ set(INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_EC_Ed25519.h ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Base.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_Blake2b.h - ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_Blake2s.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Impl_Blake2_Constants.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2b.h - ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2s.h ${PROJECT_SOURCE_DIR}/include/lib_memzero0.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b_Simd256.h + ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_Blake2s.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2s.h + ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_Blake2b_Simd256.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2b_Simd256.h ${PROJECT_SOURCE_DIR}/include/libintvector.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2s_Simd128.h + ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_Blake2s_Simd128.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2s_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_Bignum256_32.h ${PROJECT_SOURCE_DIR}/include/Hacl_Bignum.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Bignum.h @@ -158,16 +159,16 @@ set(INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_GenericField64.h ${PROJECT_SOURCE_DIR}/include/Hacl_AEAD_Chacha20Poly1305.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20.h + ${PROJECT_SOURCE_DIR}/include/internal/Hacl_MAC_Poly1305.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_MAC_Poly1305.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20_Vec32.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Chacha20.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Chacha20.h ${PROJECT_SOURCE_DIR}/include/Hacl_AEAD_Chacha20Poly1305_Simd128.h - ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20_Vec128.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_AEAD_Chacha20Poly1305_Simd256.h - ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd256.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20_Vec256.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_MAC_Poly1305_Simd256.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_MAC_Poly1305_Simd256.h @@ -194,11 +195,15 @@ set(INCLUDES ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_SHA1.h ${PROJECT_SOURCE_DIR}/include/internal/Hacl_Hash_MD5.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_MD5.h + ${PROJECT_SOURCE_DIR}/include/internal/Hacl_HMAC.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_HMAC.h ${PROJECT_SOURCE_DIR}/include/Hacl_HKDF.h ${PROJECT_SOURCE_DIR}/include/Hacl_HKDF_Blake2s_128.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC_Blake2s_128.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2s_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_HKDF_Blake2b_256.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC_Blake2b_256.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b_Simd256.h ${PROJECT_SOURCE_DIR}/include/Hacl_RSAPSS.h ${PROJECT_SOURCE_DIR}/include/Hacl_HPKE_Curve64_CP128_SHA256.h ${PROJECT_SOURCE_DIR}/include/Hacl_HPKE_Interface_Hacl_Impl_HPKE_Hacl_Meta_HPKE.h @@ -225,12 +230,6 @@ set(INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_Frodo640.h ${PROJECT_SOURCE_DIR}/include/Hacl_Frodo976.h ${PROJECT_SOURCE_DIR}/include/Hacl_Frodo64.h - ${PROJECT_SOURCE_DIR}/src/Libcrux_Kem_Kyber_Kyber768.h - ${PROJECT_SOURCE_DIR}/karamel/include/krmllib.h - ${PROJECT_SOURCE_DIR}/karamel/include/krml/internal/callconv.h - ${PROJECT_SOURCE_DIR}/karamel/include/krml/internal/builtin.h - ${PROJECT_SOURCE_DIR}/karamel/include/krml/internal/debug.h - ${PROJECT_SOURCE_DIR}/karamel/include/krml/fstar_int.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_DRBG.h ${PROJECT_SOURCE_DIR}/include/internal/EverCrypt_HMAC.h ${PROJECT_SOURCE_DIR}/include/internal/EverCrypt_Hash.h @@ -245,6 +244,8 @@ set(INCLUDES ${PROJECT_SOURCE_DIR}/include/EverCrypt_Cipher.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_Chacha20Poly1305.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_Poly1305.h + ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd256.h + ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_AEAD.h ) set(PUBLIC_INCLUDES @@ -256,15 +257,15 @@ set(PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/karamel/krmllib/dist/minimal/LowStar_Endianness.h ${PROJECT_SOURCE_DIR}/include/Hacl_Salsa20.h ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Streaming_Types.h ${PROJECT_SOURCE_DIR}/include/Hacl_Krmllib.h ${PROJECT_SOURCE_DIR}/include/Hacl_Curve25519_51.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Krmllib.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC_DRBG.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Streaming_Types.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC.h ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_SHA2.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b.h ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2s.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_SHA2.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Curve25519_51.h ${PROJECT_SOURCE_DIR}/include/lib_intrinsics.h @@ -275,11 +276,11 @@ set(PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_EC_Ed25519.h ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Base.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2b.h - ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2s.h ${PROJECT_SOURCE_DIR}/include/lib_memzero0.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b_Simd256.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2s.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2b_Simd256.h ${PROJECT_SOURCE_DIR}/include/libintvector.h - ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2s_Simd128.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_Blake2s_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_Bignum256_32.h ${PROJECT_SOURCE_DIR}/include/Hacl_Bignum.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Bignum.h @@ -292,14 +293,13 @@ set(PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_GenericField64.h ${PROJECT_SOURCE_DIR}/include/Hacl_AEAD_Chacha20Poly1305.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_MAC_Poly1305.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20_Vec32.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Chacha20.h ${PROJECT_SOURCE_DIR}/include/Hacl_AEAD_Chacha20Poly1305_Simd128.h - ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20_Vec128.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_AEAD_Chacha20Poly1305_Simd256.h - ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd256.h ${PROJECT_SOURCE_DIR}/include/Hacl_Chacha20_Vec256.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_MAC_Poly1305_Simd256.h ${PROJECT_SOURCE_DIR}/include/Hacl_Curve25519_64.h @@ -314,11 +314,14 @@ set(PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_SHA2_Vec256.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_SHA1.h ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_Hash_MD5.h + ${PROJECT_SOURCE_DIR}/include/internal/../Hacl_HMAC.h ${PROJECT_SOURCE_DIR}/include/Hacl_HKDF.h ${PROJECT_SOURCE_DIR}/include/Hacl_HKDF_Blake2s_128.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC_Blake2s_128.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2s_Simd128.h ${PROJECT_SOURCE_DIR}/include/Hacl_HKDF_Blake2b_256.h ${PROJECT_SOURCE_DIR}/include/Hacl_HMAC_Blake2b_256.h + ${PROJECT_SOURCE_DIR}/include/Hacl_Hash_Blake2b_Simd256.h ${PROJECT_SOURCE_DIR}/include/Hacl_RSAPSS.h ${PROJECT_SOURCE_DIR}/include/Hacl_HPKE_Curve64_CP128_SHA256.h ${PROJECT_SOURCE_DIR}/include/Hacl_HPKE_Interface_Hacl_Impl_HPKE_Hacl_Meta_HPKE.h @@ -343,9 +346,6 @@ set(PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include/Hacl_Frodo640.h ${PROJECT_SOURCE_DIR}/include/Hacl_Frodo976.h ${PROJECT_SOURCE_DIR}/include/Hacl_Frodo64.h - ${PROJECT_SOURCE_DIR}/src/Libcrux_Kem_Kyber_Kyber768.h - ${PROJECT_SOURCE_DIR}/karamel/include/krmllib.h - ${PROJECT_SOURCE_DIR}/karamel/include/krml/fstar_int.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_DRBG.h ${PROJECT_SOURCE_DIR}/include/internal/../EverCrypt_Hash.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_Error.h @@ -358,6 +358,8 @@ set(PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include/EverCrypt_Cipher.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_Chacha20Poly1305.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_Poly1305.h + ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd256.h + ${PROJECT_SOURCE_DIR}/include/Hacl_MAC_Poly1305_Simd128.h ${PROJECT_SOURCE_DIR}/include/EverCrypt_AEAD.h ) set(ALGORITHMS @@ -383,7 +385,6 @@ set(ALGORITHMS rsapss hpke frodo - kyber ) set(INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/include @@ -391,6 +392,7 @@ set(INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/karamel/include ${PROJECT_SOURCE_DIR}/karamel/krmllib/dist/minimal ${PROJECT_SOURCE_DIR}/vale/include + ${PROJECT_SOURCE_DIR}/libcrux/include ) set(TEST_SOURCES ${PROJECT_SOURCE_DIR}/tests/detection.cc @@ -417,6 +419,7 @@ set(TEST_SOURCES ${PROJECT_SOURCE_DIR}/tests/nacl.cc ${PROJECT_SOURCE_DIR}/tests/evercrypt.cc ${PROJECT_SOURCE_DIR}/tests/aead.cc + ${PROJECT_SOURCE_DIR}/tests/kyber.cc ) set(BENCHMARK_SOURCES ${PROJECT_SOURCE_DIR}/benchmarks/blake.cc @@ -463,6 +466,9 @@ set(VALE_SOURCES_msvc ${PROJECT_SOURCE_DIR}/vale/src/curve25519-x86_64-msvc.asm ${PROJECT_SOURCE_DIR}/vale/src/poly1305-x86_64-msvc.asm ) +set(LIBCRUX_SOURCES + ${PROJECT_SOURCE_DIR}/libcrux/src/Libcrux_Kem_Kyber_Kyber768.c +) set(ALGORITHM_TEST_FILES TEST_FILES_detection TEST_FILES_bignum @@ -485,6 +491,7 @@ set(ALGORITHM_TEST_FILES TEST_FILES_nacl TEST_FILES_evercrypt TEST_FILES_aead + TEST_FILES_kyber ) set(TEST_FILES_detection detection.cc @@ -552,3 +559,6 @@ set(TEST_FILES_evercrypt set(TEST_FILES_aead aead.cc ) +set(TEST_FILES_kyber + kyber.cc +)