diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 1cb265d21a..ffacffa5b3 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -785,6 +785,7 @@ if(BUILD_TESTING) fipsmodule/evp/evp_ctx_test.cc fipsmodule/kdf/kdf_test.cc fipsmodule/md5/md5_test.cc + fipsmodule/ml_kem/ml_kem_test.cc fipsmodule/modes/gcm_test.cc fipsmodule/modes/xts_test.cc fipsmodule/pbkdf/pbkdf_test.cc diff --git a/crypto/fipsmodule/evp/p_kem.c b/crypto/fipsmodule/evp/p_kem.c index 9e696c5167..0abd4defb7 100644 --- a/crypto/fipsmodule/evp/p_kem.c +++ b/crypto/fipsmodule/evp/p_kem.c @@ -67,9 +67,11 @@ static int pkey_kem_keygen_deterministic(EVP_PKEY_CTX *ctx, } KEM_KEY *key = KEM_KEY_new(); + size_t pubkey_len = kem->public_key_len; + size_t secret_len = kem->secret_key_len; if (key == NULL || !KEM_KEY_init(key, kem) || - !kem->method->keygen_deterministic(key->public_key, key->secret_key, seed) || + !kem->method->keygen_deterministic(key->public_key, &pubkey_len, key->secret_key, &secret_len, seed) || !EVP_PKEY_assign(pkey, EVP_PKEY_KEM, key)) { KEM_KEY_free(key); return 0; @@ -92,9 +94,11 @@ static int pkey_kem_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) { } KEM_KEY *key = KEM_KEY_new(); + size_t pubkey_len = kem->public_key_len; + size_t secret_len = kem->secret_key_len; if (key == NULL || !KEM_KEY_init(key, kem) || - !kem->method->keygen(key->public_key, key->secret_key) || + !kem->method->keygen(key->public_key, &pubkey_len, key->secret_key, &secret_len) || !EVP_PKEY_set_type(pkey, EVP_PKEY_KEM)) { KEM_KEY_free(key); return 0; @@ -172,7 +176,7 @@ static int pkey_kem_encapsulate_deterministic(EVP_PKEY_CTX *ctx, return 0; } - if (!kem->method->encaps_deterministic(ciphertext, shared_secret, key->public_key, seed)) { + if (!kem->method->encaps_deterministic(ciphertext, ciphertext_len, shared_secret, shared_secret_len, key->public_key, seed)) { return 0; } @@ -235,7 +239,7 @@ static int pkey_kem_encapsulate(EVP_PKEY_CTX *ctx, return 0; } - if (!kem->method->encaps(ciphertext, shared_secret, key->public_key)) { + if (!kem->method->encaps(ciphertext, ciphertext_len, shared_secret, shared_secret_len, key->public_key)) { return 0; } @@ -290,7 +294,7 @@ static int pkey_kem_decapsulate(EVP_PKEY_CTX *ctx, return 0; } - if (!kem->method->decaps(shared_secret, ciphertext, key->secret_key)) { + if (!kem->method->decaps(shared_secret, shared_secret_len, ciphertext, key->secret_key)) { return 0; } diff --git a/crypto/fipsmodule/kem/internal.h b/crypto/fipsmodule/kem/internal.h index d0765043a2..75651c148f 100644 --- a/crypto/fipsmodule/kem/internal.h +++ b/crypto/fipsmodule/kem/internal.h @@ -14,22 +14,31 @@ extern "C" { // KEM_METHOD structure and helper functions. typedef struct { int (*keygen_deterministic)(uint8_t *ctx, + size_t *ctx_len, uint8_t *pkey, + size_t *pkey_len, const uint8_t *seed); int (*keygen)(uint8_t *public_key, - uint8_t *secret_key); + size_t *public_key_len, + uint8_t *secret_key, + size_t *secret_key_len); int (*encaps_deterministic)(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key, const uint8_t *seed); int (*encaps)(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key); int (*decaps)(uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *ciphertext, const uint8_t *secret_key); } KEM_METHOD; diff --git a/crypto/fipsmodule/kem/kem.c b/crypto/fipsmodule/kem/kem.c index 5f8947cf33..c03e6eed0d 100644 --- a/crypto/fipsmodule/kem/kem.c +++ b/crypto/fipsmodule/kem/kem.c @@ -17,33 +17,42 @@ static const uint8_t kOIDMLKEM768[] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04 static const uint8_t kOIDMLKEM1024[] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x04, 0x03}; static int ml_kem_1024_keygen_deterministic(uint8_t *public_key, - uint8_t *secret_key, - const uint8_t *seed) { - return ml_kem_1024_keypair_deterministic(public_key, secret_key, seed) == 0; + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len, + const uint8_t *seed) { + return ml_kem_1024_keypair_deterministic(public_key, public_len, secret_key, secret_len, seed) == 0; } static int ml_kem_1024_keygen(uint8_t *public_key, - uint8_t *secret_key) { - return ml_kem_1024_keypair(public_key, secret_key) == 0; + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len) { + return ml_kem_1024_keypair(public_key, public_len, secret_key, secret_len) == 0; } static int ml_kem_1024_encaps_deterministic(uint8_t *ciphertext, - uint8_t *shared_secret, - const uint8_t *public_key, - const uint8_t *seed) { - return ml_kem_1024_encapsulate_deterministic(ciphertext, shared_secret, public_key, seed) == 0; + size_t *ciphertext_len, + uint8_t *shared_secret, + size_t *shared_secret_len, + const uint8_t *public_key, + const uint8_t *seed) { + return ml_kem_1024_encapsulate_deterministic(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key, seed) == 0; } static int ml_kem_1024_encaps(uint8_t *ciphertext, - uint8_t *shared_secret, - const uint8_t *public_key) { - return ml_kem_1024_encapsulate(ciphertext, shared_secret, public_key) == 0; + size_t *ciphertext_len, + uint8_t *shared_secret, + size_t *shared_secret_len, + const uint8_t *public_key) { + return ml_kem_1024_encapsulate(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key) == 0; } static int ml_kem_1024_decaps(uint8_t *shared_secret, - const uint8_t *ciphertext, - const uint8_t *secret_key) { - return ml_kem_1024_decapsulate(shared_secret, ciphertext, secret_key) == 0; + size_t *shared_secret_len, + const uint8_t *ciphertext, + const uint8_t *secret_key) { + return ml_kem_1024_decapsulate(shared_secret, shared_secret_len, ciphertext, secret_key) == 0; } DEFINE_LOCAL_DATA(KEM_METHOD, kem_ml_kem_1024_method) { @@ -55,33 +64,42 @@ DEFINE_LOCAL_DATA(KEM_METHOD, kem_ml_kem_1024_method) { } static int ml_kem_768_keygen_deterministic(uint8_t *public_key, - uint8_t *secret_key, - const uint8_t *seed) { - return ml_kem_768_keypair_deterministic(public_key, secret_key, seed) == 0; + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len, + const uint8_t *seed) { + return ml_kem_768_keypair_deterministic(public_key, public_len, secret_key, secret_len, seed) == 0; } static int ml_kem_768_keygen(uint8_t *public_key, - uint8_t *secret_key) { - return ml_kem_768_keypair(public_key, secret_key) == 0; + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len) { + return ml_kem_768_keypair(public_key, public_len, secret_key, secret_len) == 0; } static int ml_kem_768_encaps_deterministic(uint8_t *ciphertext, - uint8_t *shared_secret, - const uint8_t *public_key, - const uint8_t *seed) { - return ml_kem_768_encapsulate_deterministic(ciphertext, shared_secret, public_key, seed) == 0; + size_t *ciphertext_len, + uint8_t *shared_secret, + size_t *shared_secret_len, + const uint8_t *public_key, + const uint8_t *seed) { + return ml_kem_768_encapsulate_deterministic(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key, seed) == 0; } static int ml_kem_768_encaps(uint8_t *ciphertext, - uint8_t *shared_secret, - const uint8_t *public_key) { - return ml_kem_768_encapsulate(ciphertext, shared_secret, public_key) == 0; + size_t *ciphertext_len, + uint8_t *shared_secret, + size_t *shared_secret_len, + const uint8_t *public_key) { + return ml_kem_768_encapsulate(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key) == 0; } static int ml_kem_768_decaps(uint8_t *shared_secret, - const uint8_t *ciphertext, - const uint8_t *secret_key) { - return ml_kem_768_decapsulate(shared_secret, ciphertext, secret_key) == 0; + size_t *shared_secret_len, + const uint8_t *ciphertext, + const uint8_t *secret_key) { + return ml_kem_768_decapsulate(shared_secret, shared_secret_len, ciphertext, secret_key) == 0; } DEFINE_LOCAL_DATA(KEM_METHOD, kem_ml_kem_768_method) { @@ -93,33 +111,42 @@ DEFINE_LOCAL_DATA(KEM_METHOD, kem_ml_kem_768_method) { } static int ml_kem_512_keygen_deterministic(uint8_t *public_key, - uint8_t *secret_key, - const uint8_t *seed) { - return ml_kem_512_keypair_deterministic(public_key, secret_key, seed) == 0; + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len, + const uint8_t *seed) { + return ml_kem_512_keypair_deterministic(public_key, public_len, secret_key, secret_len, seed) == 0; } static int ml_kem_512_keygen(uint8_t *public_key, - uint8_t *secret_key) { - return ml_kem_512_keypair(public_key, secret_key) == 0; + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len) { + return ml_kem_512_keypair(public_key, public_len, secret_key, secret_len) == 0; } static int ml_kem_512_encaps_deterministic(uint8_t *ciphertext, - uint8_t *shared_secret, - const uint8_t *public_key, - const uint8_t *seed) { - return ml_kem_512_encapsulate_deterministic(ciphertext, shared_secret, public_key, seed) == 0; + size_t *ciphertext_len, + uint8_t *shared_secret, + size_t *shared_secret_len, + const uint8_t *public_key, + const uint8_t *seed) { + return ml_kem_512_encapsulate_deterministic(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key, seed) == 0; } static int ml_kem_512_encaps(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key) { - return ml_kem_512_encapsulate(ciphertext, shared_secret, public_key) == 0; + return ml_kem_512_encapsulate(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key) == 0; } static int ml_kem_512_decaps(uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *ciphertext, const uint8_t *secret_key) { - return ml_kem_512_decapsulate(shared_secret, ciphertext, secret_key) == 0; + return ml_kem_512_decapsulate(shared_secret, shared_secret_len, ciphertext, secret_key) == 0; } DEFINE_LOCAL_DATA(KEM_METHOD, kem_ml_kem_512_method) { diff --git a/crypto/fipsmodule/ml_kem/ml_kem.c b/crypto/fipsmodule/ml_kem/ml_kem.c index 2d6f5ad917..61ce268de5 100644 --- a/crypto/fipsmodule/ml_kem/ml_kem.c +++ b/crypto/fipsmodule/ml_kem/ml_kem.c @@ -28,169 +28,371 @@ #include "./ml_kem.h" -int ml_kem_512_keypair_deterministic(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */) { +typedef struct { + uint8_t *buffer; + size_t *length; + const size_t expected_length; +} output_buffer; + +// Ensure buffer is long enough and zero any extra memory +static int check_buffer(const output_buffer data) { + if (data.buffer == NULL || *data.length < data.expected_length) { + return 0; + } + return 1; +} + +// EVP layer assumes the length parameter passed in will be set to the number of bytes written if call is successful +static void set_written_len_on_success(const int result, output_buffer data) { + if (result == 0) { + *data.length = data.expected_length; + } +} + +int ml_kem_common_keypair(int (*keypair)(uint8_t * public_key, uint8_t *secret_key), + output_buffer public_key, + output_buffer secret_key); + +int ml_kem_common_encapsulate_deterministic(int (*encapsulate)(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key, const uint8_t *seed), + output_buffer ciphertext, + output_buffer shared_secret, + const uint8_t *public_key, + const uint8_t *seed); + +int ml_kem_common_encapsulate(int (*encapsulate)(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key), + output_buffer ciphertext, + output_buffer shared_secret, + const uint8_t *public_key); + +int ml_kem_common_decapsulate(int (*decapsulate)(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key), + output_buffer shared_secret, + const uint8_t *ciphertext, + const uint8_t *secret_key); + +// Note: These methods currently default to using the reference code for ML_KEM. +// In a future where AWS-LC has optimized options available, those can be +// conditionally (or based on compile-time flags) called here, depending on +// platform support. + +int ml_kem_512_keypair_deterministic(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */) { boringssl_ensure_ml_kem_self_test(); - return ml_kem_512_keypair_deterministic_no_self_test(public_key, secret_key, seed); + return ml_kem_512_keypair_deterministic_no_self_test( + public_key, public_len, secret_key, secret_len, seed); } int ml_kem_512_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, const uint8_t *seed /* IN */) { - int res = mlkem512_keypair_derand(public_key, secret_key, seed); + output_buffer pkey = {public_key, public_len, MLKEM512_PUBLIC_KEY_BYTES}; + output_buffer skey = {secret_key, secret_len, MLKEM512_SECRET_KEY_BYTES}; + if (!check_buffer(pkey) || !check_buffer(skey)) { + return 1; + } + const int res = mlkem512_keypair_derand(pkey.buffer, skey.buffer, seed); #if defined(AWSLC_FIPS) /* PCT failure is the only failure condition for key generation. */ if (res != 0) { - AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); + AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); } #endif + set_written_len_on_success(res, pkey); + set_written_len_on_success(res, skey); return res; } int ml_kem_512_keypair(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */) { - boringssl_ensure_ml_kem_self_test(); - int res = mlkem512_keypair(public_key, secret_key); -#if defined(AWSLC_FIPS) - /* PCT failure is the only failure condition for key generation. */ - if (res != 0) { - AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); - } -#endif - return res; + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */) { + output_buffer pkey = {public_key, public_len, MLKEM512_PUBLIC_KEY_BYTES}; + output_buffer skey = {secret_key, secret_len, MLKEM512_SECRET_KEY_BYTES}; + return ml_kem_common_keypair(mlkem512_keypair, pkey, skey); } int ml_kem_512_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, const uint8_t *public_key /* IN */, const uint8_t *seed /* IN */) { boringssl_ensure_ml_kem_self_test(); - return ml_kem_512_encapsulate_deterministic_no_self_test(ciphertext, shared_secret, public_key, seed); + return ml_kem_512_encapsulate_deterministic_no_self_test(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key, seed); } int ml_kem_512_encapsulate_deterministic_no_self_test(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, const uint8_t *seed /* IN */) { - return mlkem512_enc_derand(ciphertext, shared_secret, public_key, seed); + output_buffer ctext = {ciphertext, ciphertext_len, MLKEM512_CIPHERTEXT_BYTES}; + output_buffer ss = {shared_secret, shared_secret_len, MLKEM512_SHARED_SECRET_LEN}; + return ml_kem_common_encapsulate_deterministic(mlkem512_enc_derand, ctext, ss, public_key, seed); } int ml_kem_512_encapsulate(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */) { - boringssl_ensure_ml_kem_self_test(); - return mlkem512_enc(ciphertext, shared_secret, public_key); + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */) { + output_buffer ctext = {ciphertext, ciphertext_len, MLKEM512_CIPHERTEXT_BYTES}; + output_buffer ss = {shared_secret, shared_secret_len, MLKEM512_SHARED_SECRET_LEN}; + return ml_kem_common_encapsulate(mlkem512_enc, ctext, ss, public_key); } int ml_kem_512_decapsulate(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */) { + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */) { boringssl_ensure_ml_kem_self_test(); - return ml_kem_512_decapsulate_no_self_test(shared_secret, ciphertext, secret_key); + return ml_kem_512_decapsulate_no_self_test(shared_secret, shared_secret_len, ciphertext, secret_key); } int ml_kem_512_decapsulate_no_self_test(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, const uint8_t *ciphertext /* IN */, const uint8_t *secret_key /* IN */) { - return mlkem512_dec(shared_secret, ciphertext, secret_key); + output_buffer ss = {shared_secret, shared_secret_len, MLKEM512_SHARED_SECRET_LEN}; + return ml_kem_common_decapsulate(mlkem512_dec, ss, ciphertext, secret_key); } -int ml_kem_768_keypair_deterministic(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */) { +int ml_kem_768_keypair_deterministic(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */) { boringssl_ensure_ml_kem_self_test(); - int res = mlkem768_keypair_derand(public_key, secret_key, seed); + return ml_kem_768_keypair_deterministic_no_self_test(public_key, public_len, secret_key, secret_len, seed); +} + + +int ml_kem_768_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */) { + output_buffer pkey = {public_key, public_len, MLKEM768_PUBLIC_KEY_BYTES}; + output_buffer skey = {secret_key, secret_len, MLKEM768_SECRET_KEY_BYTES}; + if (!check_buffer(pkey) || !check_buffer(skey)) { + return 1; + } + const int res = mlkem768_keypair_derand(pkey.buffer, skey.buffer, seed); #if defined(AWSLC_FIPS) /* PCT failure is the only failure condition for key generation. */ if (res != 0) { - AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); + AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); } #endif + set_written_len_on_success(res, pkey); + set_written_len_on_success(res, skey); return res; } int ml_kem_768_keypair(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */) { - boringssl_ensure_ml_kem_self_test(); - int res = mlkem768_keypair(public_key, secret_key); -#if defined(AWSLC_FIPS) - /* PCT failure is the only failure condition for key generation. */ - if (res != 0) { - AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); - } -#endif - return res; + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */) { + output_buffer pkey = {public_key, public_len, MLKEM768_PUBLIC_KEY_BYTES}; + output_buffer skey = {secret_key, secret_len, MLKEM768_SECRET_KEY_BYTES}; + return ml_kem_common_keypair(mlkem768_keypair, pkey, skey); } int ml_kem_768_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, const uint8_t *seed /* IN */) { boringssl_ensure_ml_kem_self_test(); - return mlkem768_enc_derand(ciphertext, shared_secret, public_key, seed); + return ml_kem_768_encapsulate_deterministic_no_self_test(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key, seed); +} + +int ml_kem_768_encapsulate_deterministic_no_self_test(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, + const uint8_t *seed /* IN */) { + output_buffer ctext = {ciphertext, ciphertext_len, MLKEM768_CIPHERTEXT_BYTES}; + output_buffer ss = {shared_secret, shared_secret_len, MLKEM768_SHARED_SECRET_LEN}; + return ml_kem_common_encapsulate_deterministic(mlkem768_enc_derand, ctext, ss, public_key, seed); } int ml_kem_768_encapsulate(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */) { - boringssl_ensure_ml_kem_self_test(); - return mlkem768_enc(ciphertext, shared_secret, public_key); + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */) { + output_buffer ctext = {ciphertext, ciphertext_len, MLKEM768_CIPHERTEXT_BYTES}; + output_buffer ss = {shared_secret, shared_secret_len, MLKEM768_SHARED_SECRET_LEN}; + return ml_kem_common_encapsulate(mlkem768_enc, ctext, ss, public_key); } int ml_kem_768_decapsulate(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */) { + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */) { boringssl_ensure_ml_kem_self_test(); - return mlkem768_dec(shared_secret, ciphertext, secret_key); + return ml_kem_768_decapsulate_no_self_test(shared_secret, shared_secret_len, ciphertext, secret_key); +} + +int ml_kem_768_decapsulate_no_self_test(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */) { + output_buffer ss = {shared_secret, shared_secret_len, MLKEM768_SHARED_SECRET_LEN}; + return ml_kem_common_decapsulate(mlkem768_dec, ss, ciphertext, secret_key); } -int ml_kem_1024_keypair_deterministic(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */) { +int ml_kem_1024_keypair_deterministic(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */) { boringssl_ensure_ml_kem_self_test(); - int res = mlkem1024_keypair_derand(public_key, secret_key, seed); + return ml_kem_1024_keypair_deterministic_no_self_test(public_key, public_len, secret_key, secret_len, seed); +} + +int ml_kem_1024_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */) { + output_buffer pkey = {public_key, public_len, MLKEM1024_PUBLIC_KEY_BYTES}; + output_buffer skey = {secret_key, secret_len, MLKEM1024_SECRET_KEY_BYTES}; + if (!check_buffer(pkey) || !check_buffer(skey)) { + return 1; + } + const int res = mlkem1024_keypair_derand(pkey.buffer, skey.buffer, seed); #if defined(AWSLC_FIPS) /* PCT failure is the only failure condition for key generation. */ if (res != 0) { - AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); + AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); } #endif + set_written_len_on_success(res, pkey); + set_written_len_on_success(res, skey); return res; } int ml_kem_1024_keypair(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */) { - boringssl_ensure_ml_kem_self_test(); - int res = mlkem1024_keypair(public_key, secret_key); -#if defined(AWSLC_FIPS) - /* PCT failure is the only failure condition for key generation. */ - if (res != 0) { - AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); - } -#endif - return res; + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */) { + output_buffer pkey = {public_key, public_len, MLKEM1024_PUBLIC_KEY_BYTES}; + output_buffer skey = {secret_key, secret_len, MLKEM1024_SECRET_KEY_BYTES}; + return ml_kem_common_keypair(mlkem1024_keypair, pkey, skey); } int ml_kem_1024_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, const uint8_t *seed /* IN */) { boringssl_ensure_ml_kem_self_test(); - return mlkem1024_enc_derand(ciphertext, shared_secret, public_key, seed); + return ml_kem_1024_encapsulate_deterministic_no_self_test(ciphertext, ciphertext_len, shared_secret, shared_secret_len, public_key, seed); +} + +int ml_kem_1024_encapsulate_deterministic_no_self_test(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, + const uint8_t *seed /* IN */) { + output_buffer ctext = {ciphertext, ciphertext_len, MLKEM1024_CIPHERTEXT_BYTES}; + output_buffer ss = {shared_secret, shared_secret_len, MLKEM1024_SHARED_SECRET_LEN}; + return ml_kem_common_encapsulate_deterministic(mlkem1024_enc_derand, ctext, ss, public_key, seed); } int ml_kem_1024_encapsulate(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */) { - boringssl_ensure_ml_kem_self_test(); - return mlkem1024_enc(ciphertext, shared_secret, public_key); + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */) { + output_buffer ctext = {ciphertext, ciphertext_len, MLKEM1024_CIPHERTEXT_BYTES}; + output_buffer ss = {shared_secret, shared_secret_len, MLKEM1024_SHARED_SECRET_LEN}; + return ml_kem_common_encapsulate(mlkem1024_enc, ctext, ss, public_key); } int ml_kem_1024_decapsulate(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */) { + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */) { + boringssl_ensure_ml_kem_self_test(); + return ml_kem_1024_decapsulate_no_self_test(shared_secret, shared_secret_len, ciphertext, secret_key); +} + +int ml_kem_1024_decapsulate_no_self_test(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */) { + output_buffer ss = {shared_secret, shared_secret_len, MLKEM1024_SHARED_SECRET_LEN}; + return ml_kem_common_decapsulate(mlkem1024_dec, ss, ciphertext, secret_key); +} + +int ml_kem_common_keypair(int (*keypair)(uint8_t * public_key, uint8_t *secret_key), + output_buffer public_key, + output_buffer secret_key) { boringssl_ensure_ml_kem_self_test(); - return mlkem1024_dec(shared_secret, ciphertext, secret_key); + if (!check_buffer(public_key) || !check_buffer(secret_key)) { + return 1; + } + const int res = keypair(public_key.buffer, secret_key.buffer); +#if defined(AWSLC_FIPS) + /* PCT failure is the only failure condition for key generation. */ + if (res != 0) { + AWS_LC_FIPS_failure("ML-KEM keygen PCT failed"); + } +#endif + set_written_len_on_success(res, public_key); + set_written_len_on_success(res, secret_key); + return res; +} + +int ml_kem_common_encapsulate_deterministic(int (*encapsulate)(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key, const uint8_t *seed), + output_buffer ciphertext, + output_buffer shared_secret, + const uint8_t *public_key, + const uint8_t *seed) { + if (!check_buffer(ciphertext) || !check_buffer(shared_secret)) { + return 1; + } + const int res = encapsulate(ciphertext.buffer, shared_secret.buffer, public_key, seed); + set_written_len_on_success(res, ciphertext); + set_written_len_on_success(res, shared_secret); + return res; +} + +int ml_kem_common_encapsulate(int (*encapsulate)(uint8_t *ciphertext, uint8_t *shared_secret, const uint8_t *public_key), + output_buffer ciphertext, + output_buffer shared_secret, + const uint8_t *public_key) { + boringssl_ensure_ml_kem_self_test(); + if (!check_buffer(ciphertext) || !check_buffer(shared_secret)) { + return 1; + } + const int res = encapsulate(ciphertext.buffer, shared_secret.buffer, public_key); + set_written_len_on_success(res, ciphertext); + set_written_len_on_success(res, shared_secret); + return res; +} + +int ml_kem_common_decapsulate(int (*decapsulate)(uint8_t *shared_secret, const uint8_t *ciphertext, const uint8_t *secret_key), + output_buffer shared_secret, + const uint8_t *ciphertext, + const uint8_t *secret_key) { + if (!check_buffer(shared_secret)) { + return 1; + } + const int res = decapsulate(shared_secret.buffer, ciphertext, secret_key); + set_written_len_on_success(res, shared_secret); + return res; } diff --git a/crypto/fipsmodule/ml_kem/ml_kem.h b/crypto/fipsmodule/ml_kem/ml_kem.h index 0341cd3daf..8da358e2a0 100644 --- a/crypto/fipsmodule/ml_kem/ml_kem.h +++ b/crypto/fipsmodule/ml_kem/ml_kem.h @@ -28,107 +28,155 @@ #define MLKEM1024_SECRET_KEY_BYTES (3168) #define MLKEM1024_CIPHERTEXT_BYTES (1568) -int ml_kem_512_keypair_deterministic(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */); +#if defined(__cplusplus) +extern "C" { +#endif + +OPENSSL_EXPORT int ml_kem_512_keypair_deterministic(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */); int ml_kem_512_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, const uint8_t *seed /* IN */); -int ml_kem_512_keypair(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */); +OPENSSL_EXPORT int ml_kem_512_keypair(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */); -int ml_kem_512_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, - const uint8_t *seed /* IN */); +OPENSSL_EXPORT int ml_kem_512_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, + const uint8_t *seed /* IN */); int ml_kem_512_encapsulate_deterministic_no_self_test(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, const uint8_t *public_key /* IN */, const uint8_t *seed /* IN */); -int ml_kem_512_encapsulate(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */); +OPENSSL_EXPORT int ml_kem_512_encapsulate(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */); -int ml_kem_512_decapsulate(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */); +OPENSSL_EXPORT int ml_kem_512_decapsulate(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */); int ml_kem_512_decapsulate_no_self_test(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, const uint8_t *ciphertext /* IN */, const uint8_t *secret_key /* IN */); -int ml_kem_768_keypair_deterministic(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */); - -int ml_kem_768_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */); - - -int ml_kem_768_keypair(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */); - -int ml_kem_768_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, - const uint8_t *seed /* IN */); +OPENSSL_EXPORT int ml_kem_768_keypair_deterministic(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */); + +int ml_kem_768_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */); + +OPENSSL_EXPORT int ml_kem_768_keypair(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */); + +OPENSSL_EXPORT int ml_kem_768_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, + const uint8_t *seed /* IN */); int ml_kem_768_encapsulate_deterministic_no_self_test(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, const uint8_t *public_key /* IN */, const uint8_t *seed /* IN */); +OPENSSL_EXPORT int ml_kem_768_encapsulate(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */); -int ml_kem_768_encapsulate(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */); - -int ml_kem_768_decapsulate(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */); +OPENSSL_EXPORT int ml_kem_768_decapsulate(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */); int ml_kem_768_decapsulate_no_self_test(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */); - -int ml_kem_1024_keypair_deterministic(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */); - -int ml_kem_1024_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */, - const uint8_t *seed /* IN */); - -int ml_kem_1024_keypair(uint8_t *public_key /* OUT */, - uint8_t *secret_key /* OUT */); - -int ml_kem_1024_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, - const uint8_t *seed /* IN */); + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */); + +OPENSSL_EXPORT int ml_kem_1024_keypair_deterministic(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */); + +int ml_kem_1024_keypair_deterministic_no_self_test(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */, + const uint8_t *seed /* IN */); + +OPENSSL_EXPORT int ml_kem_1024_keypair(uint8_t *public_key /* OUT */, + size_t *public_len /* IN_OUT */, + uint8_t *secret_key /* OUT */, + size_t *secret_len /* IN_OUT */); + +OPENSSL_EXPORT int ml_kem_1024_encapsulate_deterministic(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, + const uint8_t *seed /* IN */); int ml_kem_1024_encapsulate_deterministic_no_self_test(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */, - const uint8_t *seed /* IN */); + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */, + const uint8_t *seed /* IN */); + +OPENSSL_EXPORT int ml_kem_1024_encapsulate(uint8_t *ciphertext /* OUT */, + size_t *ciphertext_len /* IN_OUT */, + uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *public_key /* IN */); -int ml_kem_1024_encapsulate(uint8_t *ciphertext /* OUT */, - uint8_t *shared_secret /* OUT */, - const uint8_t *public_key /* IN */); +OPENSSL_EXPORT int ml_kem_1024_decapsulate(uint8_t *shared_secret /* OUT */, + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */); -int ml_kem_1024_decapsulate(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */); int ml_kem_1024_decapsulate_no_self_test(uint8_t *shared_secret /* OUT */, - const uint8_t *ciphertext /* IN */, - const uint8_t *secret_key /* IN */); + size_t *shared_secret_len /* IN_OUT */, + const uint8_t *ciphertext /* IN */, + const uint8_t *secret_key /* IN */); +#if defined(__cplusplus) +} +#endif #endif // ML_KEM_H diff --git a/crypto/fipsmodule/ml_kem/ml_kem_test.cc b/crypto/fipsmodule/ml_kem/ml_kem_test.cc new file mode 100644 index 0000000000..5efebcf62d --- /dev/null +++ b/crypto/fipsmodule/ml_kem/ml_kem_test.cc @@ -0,0 +1,1628 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 OR ISC + +#include +#include "ml_kem.h" +#include "../../test/test_util.h" +#include "../../test/file_test.h" + +static const uint8_t keyGen512Seed[MLKEM512_KEYGEN_SEED_LEN] = { + 0xf8, 0x8c, 0xb2, 0x5f, 0x89, 0xa3, 0x55, 0x5f, 0xae, 0xc6, 0x71, 0xa1, + 0xdf, 0xc6, 0xf6, 0x1d, 0x60, 0xd0, 0x62, 0x22, 0x7d, 0x6a, 0x8f, 0xf6, + 0x2b, 0x3c, 0x6d, 0x7b, 0xd6, 0x14, 0x0f, 0x66, 0x24, 0xc0, 0x84, 0xa6, + 0x4d, 0xa7, 0x4c, 0x63, 0x32, 0x7e, 0x11, 0x77, 0x58, 0xaa, 0x33, 0x8a, + 0x02, 0xe4, 0x43, 0x74, 0x10, 0xb8, 0xf9, 0xf2, 0x00, 0x88, 0xa1, 0x29, + 0xc1, 0x68, 0x3d, 0xe7 +}; + +static const uint8_t keyGen768Seed[MLKEM768_KEYGEN_SEED_LEN] = { + 0xf8, 0x8c, 0xb2, 0x5f, 0x89, 0xa3, 0x55, 0x5f, 0xae, 0xc6, 0x71, 0xa1, + 0xdf, 0xc6, 0xf6, 0x1d, 0x60, 0xd0, 0x62, 0x22, 0x7d, 0x6a, 0x8f, 0xf6, + 0x2b, 0x3c, 0x6d, 0x7b, 0xd6, 0x14, 0x0f, 0x66, 0x24, 0xc0, 0x84, 0xa6, + 0x4d, 0xa7, 0x4c, 0x63, 0x32, 0x7e, 0x11, 0x77, 0x58, 0xaa, 0x33, 0x8a, + 0x02, 0xe4, 0x43, 0x74, 0x10, 0xb8, 0xf9, 0xf2, 0x00, 0x88, 0xa1, 0x29, + 0xc1, 0x68, 0x3d, 0xe7 +}; + +static const uint8_t keyGen1024Seed[MLKEM1024_KEYGEN_SEED_LEN] = { + 0xf8, 0x8c, 0xb2, 0x5f, 0x89, 0xa3, 0x55, 0x5f, 0xae, 0xc6, 0x71, 0xa1, + 0xdf, 0xc6, 0xf6, 0x1d, 0x60, 0xd0, 0x62, 0x22, 0x7d, 0x6a, 0x8f, 0xf6, + 0x2b, 0x3c, 0x6d, 0x7b, 0xd6, 0x14, 0x0f, 0x66, 0x24, 0xc0, 0x84, 0xa6, + 0x4d, 0xa7, 0x4c, 0x63, 0x32, 0x7e, 0x11, 0x77, 0x58, 0xaa, 0x33, 0x8a, + 0x02, 0xe4, 0x43, 0x74, 0x10, 0xb8, 0xf9, 0xf2, 0x00, 0x88, 0xa1, 0x29, + 0xc1, 0x68, 0x3d, 0xe7 +}; + +struct MLKEMKeypairTestVector { + size_t public_len; + size_t secret_len; + const uint8_t *seed; + int (*keypair_deterministic)(uint8_t *public_key, size_t *public_len, uint8_t *secret_key, size_t *secret_len, const uint8_t *seed); + int (*keypair)(uint8_t *public_key, size_t *public_len, uint8_t *secret_key, size_t *secret_len); +}; + + +static constexpr MLKEMKeypairTestVector keypairParameterSet[] = { + { + MLKEM512_PUBLIC_KEY_BYTES, + MLKEM512_SECRET_KEY_BYTES, + keyGen512Seed, + ml_kem_512_keypair_deterministic, + ml_kem_512_keypair + }, + { + MLKEM768_PUBLIC_KEY_BYTES, + MLKEM768_SECRET_KEY_BYTES, + keyGen768Seed, + ml_kem_768_keypair_deterministic, + ml_kem_768_keypair + }, + { + MLKEM1024_PUBLIC_KEY_BYTES, + MLKEM1024_SECRET_KEY_BYTES, + keyGen1024Seed, + ml_kem_1024_keypair_deterministic, + ml_kem_1024_keypair + } +}; + +class MLKEMKeypairLengthTest : public testing::TestWithParam { +public: + void TearDown() override { + delete [] encaps; + delete [] decaps; + } + + uint8_t *encaps; + uint8_t *decaps; +}; + +INSTANTIATE_TEST_SUITE_P(All, MLKEMKeypairLengthTest, testing::ValuesIn(keypairParameterSet)); + +TEST_P(MLKEMKeypairLengthTest, ExactLengthDeterministic) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len; + decaps = new uint8_t[decaps_len]; + ASSERT_EQ(0, params.keypair_deterministic(encaps, &encaps_len, decaps, &decaps_len, params.seed)); + ASSERT_EQ(params.public_len, encaps_len); + ASSERT_EQ(params.secret_len, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, ExactLength) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len; + decaps = new uint8_t[decaps_len]; + ASSERT_EQ(0, params.keypair(encaps, &encaps_len, decaps, &decaps_len)); + ASSERT_EQ(params.public_len, encaps_len); + ASSERT_EQ(params.secret_len, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, AllShortLengthDeterministic) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len/2; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len/2; + decaps = new uint8_t[decaps_len]; + ASSERT_NE(0, params.keypair_deterministic(encaps, &encaps_len, decaps, &decaps_len, params.seed)); + ASSERT_EQ(params.public_len/2, encaps_len); + ASSERT_EQ(params.secret_len/2, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, ShortEncapsLengthDeterministic) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len/2; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len; + decaps = new uint8_t[decaps_len]; + ASSERT_NE(0, params.keypair_deterministic(encaps, &encaps_len, decaps, &decaps_len, params.seed)); + ASSERT_EQ(params.public_len/2, encaps_len); + ASSERT_EQ(params.secret_len, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, ShortDecapsLengthDeterministic) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len/2; + decaps = new uint8_t[decaps_len]; + ASSERT_NE(0, params.keypair_deterministic(encaps, &encaps_len, decaps, &decaps_len, params.seed)); + ASSERT_EQ(params.public_len, encaps_len); + ASSERT_EQ(params.secret_len/2, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, AllShortLength) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len/2; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len/2; + decaps = new uint8_t[decaps_len]; + ASSERT_NE(0, params.keypair(encaps, &encaps_len, decaps, &decaps_len)); + ASSERT_EQ(params.public_len/2, encaps_len); + ASSERT_EQ(params.secret_len/2, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, ShortEncapsLength) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len/2; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len; + decaps = new uint8_t[decaps_len]; + ASSERT_NE(0, params.keypair(encaps, &encaps_len, decaps, &decaps_len)); + ASSERT_EQ(params.public_len/2, encaps_len); + ASSERT_EQ(params.secret_len, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, ShortDecapsLength) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len/2; + decaps = new uint8_t[decaps_len]; + ASSERT_NE(0, params.keypair(encaps, &encaps_len, decaps, &decaps_len)); + ASSERT_EQ(params.public_len, encaps_len); + ASSERT_EQ(params.secret_len/2, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, LongLengthDeterministic) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len*2; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len*2; + decaps = new uint8_t[decaps_len]; + ASSERT_EQ(0, params.keypair_deterministic(encaps, &encaps_len, decaps, &decaps_len, params.seed)); + ASSERT_EQ(params.public_len, encaps_len); + ASSERT_EQ(params.secret_len, decaps_len); +} + +TEST_P(MLKEMKeypairLengthTest, LongLength) { + MLKEMKeypairTestVector params = GetParam(); + size_t encaps_len = params.public_len*2; + encaps = new uint8_t[encaps_len]; + size_t decaps_len = params.secret_len*2; + decaps = new uint8_t[decaps_len]; + ASSERT_EQ(0, params.keypair(encaps, &encaps_len, decaps, &decaps_len)); + ASSERT_EQ(params.public_len, encaps_len); + ASSERT_EQ(params.secret_len, decaps_len); +} + +static const uint8_t encaps512Key[MLKEM512_PUBLIC_KEY_BYTES] = { + 0x57, 0xc3, 0xba, 0x4c, 0xd7, 0x81, 0xd8, 0x69, 0x0b, 0x4c, 0x39, 0x0d, + 0x9a, 0x58, 0xb3, 0x5d, 0x69, 0xa5, 0x2d, 0x52, 0xcd, 0x19, 0x01, 0x2a, + 0x25, 0xe1, 0x58, 0xa2, 0xc1, 0x9b, 0x75, 0x47, 0x0a, 0x03, 0x9a, 0x05, + 0xc5, 0x98, 0x33, 0xc5, 0xd2, 0xa8, 0x28, 0x0b, 0x33, 0xde, 0x95, 0xb6, + 0x0c, 0x1b, 0xb5, 0xc6, 0x33, 0xaf, 0x71, 0x13, 0x8f, 0xb0, 0x64, 0x28, + 0x14, 0x37, 0x12, 0xb7, 0xa0, 0x33, 0xeb, 0xaa, 0x3c, 0x0d, 0x6a, 0x84, + 0x12, 0x11, 0x20, 0x4c, 0x67, 0x56, 0x4b, 0xc5, 0x16, 0xf3, 0x43, 0x73, + 0xb3, 0x04, 0x70, 0xa1, 0xa5, 0x03, 0x3b, 0x85, 0x2a, 0x2c, 0x3a, 0x80, + 0xad, 0xfc, 0x8f, 0x8c, 0x17, 0x62, 0xfb, 0x06, 0x29, 0x0e, 0x55, 0x75, + 0x9d, 0x46, 0x6d, 0x67, 0xd2, 0x7e, 0xfd, 0x3b, 0xb8, 0xf6, 0x5c, 0x7f, + 0x1a, 0xd0, 0x11, 0xb9, 0x9a, 0xc6, 0x96, 0xe0, 0xba, 0x78, 0xf4, 0x56, + 0xc1, 0x91, 0x03, 0x30, 0x43, 0x0d, 0xa6, 0xcc, 0x91, 0x86, 0xcb, 0x21, + 0x9e, 0x47, 0xa8, 0xce, 0xfb, 0xc2, 0xbe, 0x58, 0x05, 0x52, 0xc3, 0x0a, + 0xf1, 0xe8, 0x73, 0x4c, 0x57, 0x2f, 0x48, 0x90, 0xc1, 0xec, 0x14, 0x22, + 0x5b, 0x2a, 0xc6, 0x41, 0xe6, 0xc2, 0x3c, 0x94, 0x94, 0x29, 0x84, 0x32, + 0x3f, 0xc5, 0x4a, 0xf9, 0x29, 0x9a, 0x72, 0xe9, 0x2d, 0x05, 0x68, 0x37, + 0xc4, 0x50, 0x54, 0x5a, 0x88, 0x49, 0x41, 0x7b, 0x40, 0xa3, 0x23, 0x68, + 0x62, 0xb4, 0x07, 0xd0, 0x9a, 0x70, 0x22, 0xdc, 0x54, 0x47, 0x55, 0x15, + 0x5b, 0x23, 0xaf, 0x0f, 0x30, 0x6d, 0xac, 0x83, 0x37, 0x34, 0x78, 0x03, + 0x41, 0x2c, 0xcd, 0x57, 0xdb, 0x4b, 0xeb, 0xf9, 0x78, 0x70, 0xd5, 0xb8, + 0x61, 0xdb, 0xac, 0x6c, 0x4a, 0x8d, 0x7f, 0xdb, 0xc9, 0x26, 0x92, 0x3f, + 0xae, 0xa1, 0x71, 0xbe, 0x17, 0x23, 0x54, 0xf5, 0x4c, 0x11, 0xb6, 0x8c, + 0x9f, 0xf6, 0xc0, 0xfe, 0x05, 0x86, 0x93, 0x24, 0x61, 0x16, 0x8b, 0xa9, + 0x01, 0x88, 0xc8, 0x6c, 0xba, 0xce, 0x80, 0x49, 0x82, 0xe1, 0x88, 0x12, + 0x16, 0x40, 0x11, 0x66, 0xc6, 0x5a, 0x55, 0x64, 0x25, 0xab, 0x21, 0x45, + 0x51, 0x6c, 0x76, 0x99, 0x03, 0x1d, 0xf5, 0x6b, 0x14, 0x78, 0x1b, 0xa2, + 0x44, 0x57, 0x29, 0x47, 0xf6, 0x3f, 0x7c, 0xe9, 0x35, 0x62, 0xb1, 0x09, + 0x01, 0x78, 0x04, 0x01, 0xe2, 0x44, 0x17, 0x47, 0x97, 0xcf, 0xe6, 0xab, + 0x5d, 0x5a, 0xca, 0xfd, 0x07, 0x48, 0x6d, 0x13, 0x36, 0x30, 0x63, 0x1e, + 0x3e, 0x00, 0x9f, 0xda, 0x23, 0xc4, 0x27, 0xf5, 0xb4, 0xc2, 0x05, 0x64, + 0x31, 0x47, 0xc0, 0xef, 0x17, 0xcc, 0x4a, 0x67, 0x4c, 0x96, 0x91, 0x77, + 0xb5, 0x0a, 0x37, 0x24, 0x25, 0xad, 0xbe, 0x65, 0x4a, 0x74, 0xca, 0xa8, + 0x87, 0xf8, 0x7c, 0xdd, 0xe4, 0x92, 0xec, 0x50, 0x27, 0x05, 0x60, 0x9b, + 0x9e, 0x31, 0x8a, 0xe6, 0xbb, 0x5c, 0xe4, 0xa9, 0xa2, 0x82, 0xf1, 0x24, + 0x44, 0x77, 0x9b, 0xba, 0xe0, 0x32, 0x0d, 0x12, 0x97, 0xd9, 0xcb, 0xbb, + 0x87, 0x61, 0x00, 0x03, 0x07, 0x89, 0xc9, 0x05, 0x21, 0x5f, 0x38, 0x69, + 0x03, 0xa9, 0x4e, 0xe6, 0x8c, 0xbc, 0x97, 0x73, 0x10, 0xcb, 0xa0, 0x2b, + 0x79, 0x37, 0x5c, 0x4a, 0x8a, 0x5e, 0xec, 0x55, 0x69, 0x52, 0x8a, 0x10, + 0x02, 0xc0, 0x8a, 0x90, 0x9b, 0xca, 0x05, 0xf1, 0x32, 0x3a, 0x34, 0xae, + 0xf2, 0x08, 0x1f, 0x66, 0x76, 0x93, 0x9b, 0x82, 0x6e, 0xb7, 0x74, 0x8b, + 0x80, 0xd4, 0x5a, 0x1e, 0xa1, 0x5a, 0x6f, 0xb3, 0x19, 0x63, 0xf6, 0x18, + 0x19, 0x96, 0x30, 0xa2, 0xd3, 0x30, 0x1a, 0xf1, 0x13, 0xde, 0xf4, 0x28, + 0xbf, 0x10, 0x75, 0x18, 0xfc, 0x30, 0x55,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x2d, 0x17, 0x91, + 0x0f, 0x0a, 0x49, 0xf6, 0x74, 0x72, 0xc1, 0x8a, 0x34, 0x39, 0xcc, 0x03, + 0x7c, 0xa4, 0x2d, 0x7e, 0xb8, 0x61, 0x09, 0xe3, 0xc4, 0x7b, 0xd9, 0x4e, + 0xc7, 0xbc, 0x99, 0xd5, 0xb8, 0x2a, 0x8f, 0x4c, 0x4d, 0x1d, 0x72, 0x47, + 0xc8, 0x47, 0x99, 0xa9, 0x05, 0x8d, 0x01, 0x84, 0x2f, 0xed, 0x69, 0x57, + 0xce, 0xb4, 0x8d, 0xd2, 0x02, 0x91, 0x22, 0xaa, 0x8f, 0xf4, 0x38, 0x84, + 0x10, 0xe1, 0xb3, 0xbb, 0xa2, 0x76, 0xc2, 0xaa, 0x54, 0x4e, 0xf9, 0x91, + 0x97, 0x3f, 0x15, 0xe7, 0xc5, 0x9b, 0x89, 0x4a, 0xab, 0x27, 0xf5, 0xce, + 0xad, 0xdd, 0xe8, 0x25, 0x33, 0x3f, 0x44, 0x03, 0x9b, 0x02, 0xe7, 0xbd, + 0xec, 0x21, 0xfc, 0x0d, 0x8f, 0x9b, 0x3a, 0x22}; + +static const uint8_t encaps768Key[MLKEM768_PUBLIC_KEY_BYTES] = { + 0x01, 0xf6, 0x0a, 0xf1, 0xdc, 0x8e, 0x63, 0x60, 0xae, 0x78, 0xb5, 0x9d, + 0x4a, 0x50, 0x42, 0xeb, 0x91, 0x45, 0xa2, 0x69, 0x04, 0x6d, 0x62, 0x36, + 0xb8, 0x30, 0x4f, 0x30, 0x5c, 0x2d, 0x9d, 0xcb, 0x18, 0x9f, 0xe5, 0xa6, + 0x2d, 0xf8, 0x9b, 0x2f, 0x5a, 0x7b, 0xce, 0x3b, 0xbc, 0x75, 0x3c, 0x1e, + 0x78, 0xf7, 0x30, 0xa9, 0x98, 0x69, 0xf8, 0x09, 0xab, 0xa8, 0x56, 0xb6, + 0x76, 0xb7, 0x07, 0xb2, 0x66, 0x01, 0xd1, 0xd9, 0x09, 0xba, 0xb3, 0x24, + 0x51, 0x49, 0x4e, 0xb7, 0xd0, 0xa2, 0x15, 0x3a, 0x63, 0x50, 0xb7, 0x97, + 0x89, 0xa9, 0xb1, 0x15, 0xf8, 0x3e, 0xa1, 0x20, 0x37, 0x25, 0x65, 0x62, + 0xf0, 0x6a, 0x1d, 0x5a, 0xba, 0x37, 0x8d, 0xa7, 0x70, 0x39, 0xd3, 0xbd, + 0xec, 0xac, 0xa8, 0xe6, 0xa2, 0x2a, 0x49, 0x05, 0x0a, 0x76, 0x30, 0x0a, + 0x02, 0x67, 0xcd, 0xb3, 0x8b, 0x7a, 0xc7, 0x79, 0x03, 0xc5, 0x0c, 0xa5, + 0x3b, 0x99, 0x28, 0x3c, 0xac, 0x6b, 0x95, 0xfb, 0xa6, 0x51, 0xb1, 0x1a, + 0x4d, 0x1a, 0x69, 0x2e, 0x40, 0x72, 0x96, 0x50, 0x60, 0x58, 0x76, 0x69, + 0xf2, 0x53, 0xb1, 0xbb, 0x18, 0x2e, 0x66, 0x14, 0x46, 0x16, 0x8a, 0xc6, + 0x02, 0x21, 0x89, 0x46, 0x60, 0x02, 0x0e, 0x9b, 0xb5, 0xf5, 0xb7, 0x12, + 0x4a, 0x03, 0x03, 0xe2, 0x54, 0x3e, 0xa3, 0xea, 0x6c, 0xe9, 0x7a, 0x24, + 0x82, 0xb2, 0x55, 0xca, 0x34, 0x6f, 0xb2, 0x7a, 0x84, 0x7b, 0x33, 0xb9, + 0x3f, 0x3a, 0xb2, 0xd3, 0x30, 0x64, 0xc6, 0xe6, 0x63, 0x2d, 0x1a, 0x23, + 0xf1, 0x14, 0x4e, 0x90, 0x7b, 0x24, 0x6b, 0x47, 0x9f, 0x4a, 0x5c, 0x92, + 0x89, 0x29, 0xa1, 0xe2, 0x41, 0x50, 0xf5, 0x24, 0x12, 0x58, 0xa5, 0xb6, + 0x77, 0x66, 0xa6, 0x6f, 0x6a, 0x33, 0x84, 0x64, 0x95, 0x90, 0x78, 0x28, + 0xeb, 0xe4, 0x4e, 0xcc, 0x5b, 0x73, 0x12, 0x40, 0x71, 0xba, 0x47, 0x90, + 0x73, 0x91, 0x04, 0x10, 0xa1, 0x6d, 0x5d, 0x56, 0x96, 0xb4, 0x8b, 0x19, + 0x47, 0x52, 0x97, 0x97, 0x95, 0x77, 0x2a, 0x91, 0xc3, 0x48, 0xf5, 0x02, + 0xb3, 0x7a, 0xa6, 0x50, 0x98, 0x3e, 0xbb, 0x89, 0xbf, 0x3c, 0x08, 0x1f, + 0xf2, 0x73, 0x54, 0x41, 0x29, 0xc9, 0x13, 0x7a, 0x6e, 0x18, 0x34, 0xc8, + 0xf2, 0xe7, 0xce, 0x14, 0xc7, 0x87, 0x0c, 0x53, 0xc0, 0x5b, 0x9b, 0x94, + 0xec, 0xd3, 0x8e, 0x66, 0x45, 0x91, 0x1b, 0x09, 0x12, 0x33, 0x68, 0x63, + 0xec, 0x16, 0x88, 0x31, 0xf8, 0x11, 0x88, 0x10, 0x75, 0xcf, 0x38, 0xa5, + 0x9d, 0xe4, 0xb5, 0xc7, 0x38, 0xaa, 0x6e, 0xf0, 0x3d, 0x77, 0x9b, 0x29, + 0x55, 0x88, 0xcf, 0xb6, 0x24, 0x91, 0xcc, 0x7b, 0x3e, 0x08, 0xb4, 0x84, + 0x73, 0x35, 0x4f, 0x9a, 0xc8, 0x06, 0x1c, 0x15, 0x2a, 0x9e, 0x20, 0x59, + 0x97, 0x49, 0x9b, 0x97, 0x0b, 0x69, 0xbc, 0xe6, 0x6f, 0xe4, 0x2b, 0xca, + 0x29, 0x24, 0xcc, 0xdf, 0x01, 0x03, 0xd0, 0xa4, 0xc3, 0x91, 0x93, 0xc2, + 0xdf, 0x25, 0x11, 0x8d, 0x72, 0xb1, 0x7a, 0xab, 0x26, 0xb0, 0xc6, 0x0d, + 0x4c, 0xd2, 0xc3, 0x06, 0xca, 0x46, 0x96, 0xc1, 0x85, 0xde, 0x05, 0x03, + 0x5f, 0x4a, 0x09, 0xcf, 0x97, 0x0a, 0xec, 0xc8, 0xcc, 0x93, 0x43, 0x6f, + 0x83, 0xb1, 0xae, 0xaf, 0x45, 0x2c, 0x41, 0x92, 0x9a, 0x2e, 0xab, 0xc1, + 0x51, 0x93, 0x8f, 0x74, 0xc9, 0x3b, 0x85, 0x85, 0x46, 0xdf, 0x22, 0x64, + 0xee, 0xea, 0xb6, 0x02, 0xe0, 0x4a, 0x85, 0xc5, 0x22, 0xf8, 0xfb, 0x1a, + 0x52, 0x14, 0xaf, 0xd8, 0xd4, 0xca, 0xe5, 0x7a, 0x47, 0xb6, 0xf3, 0x81, + 0xa2, 0x31, 0x26, 0xbd, 0x99, 0x17, 0x17, 0x31, 0x28, 0xaf, 0x91, 0x7f, + 0x1d, 0x48, 0x36, 0x91, 0xc4, 0x50, 0xd1, 0x15, 0x1c, 0xfe, 0x9a, 0x14, + 0x92, 0xd4, 0x73, 0xed, 0x86, 0x2e, 0x27, 0xda, 0x92, 0x50, 0x0c, 0x86, + 0xa2, 0x00, 0x19, 0xe9, 0xf9, 0x75, 0xe4, 0xf5, 0x4a, 0xd3, 0x19, 0xba, + 0x2c, 0x56, 0x30, 0xc4, 0x01, 0x42, 0x19, 0xd7, 0xba, 0x23, 0x54, 0x56, + 0xfe, 0x53, 0x01, 0x40, 0x19, 0x3d, 0x66, 0x24, 0x45, 0xe6, 0xa9, 0x41, + 0xd1, 0xe2, 0x38, 0x56, 0x7b, 0xa8, 0xd4, 0xd9, 0x5a, 0xb1, 0xc7, 0x44, + 0x7d, 0x69, 0x08, 0x21, 0x87, 0x6d, 0x01, 0x72, 0x70, 0xcf, 0xb1, 0x69, + 0xf2, 0xd7, 0x92, 0xf0, 0x3c, 0x80, 0x07, 0x20, 0x69, 0x7b, 0x41, 0x0a, + 0xb4, 0x1c, 0x66, 0xf2, 0xb2, 0x45, 0x85, 0x12, 0x56, 0x55, 0xeb, 0x10, + 0xaa, 0x10, 0x87, 0xff, 0xcb, 0x77, 0x50, 0xcb,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f, + 0x35, 0x77, 0x22, 0x5c, 0xca, 0x4c, 0x8a, 0x93, 0x30, 0xce, 0x61, 0x3e, + 0x71, 0x77, 0x98, 0xc9, 0x67, 0x09, 0x24, 0xb2, 0x71, 0xac, 0x40, 0x2b, + 0x51, 0x53, 0x8b, 0x8b, 0x59, 0x67, 0xac, 0x49, 0x0d, 0xca, 0xb5, 0x30, + 0x0e, 0x6c, 0x54, 0xd6, 0xa3, 0x63, 0x2f, 0x3b, 0x97, 0x3e, 0x41, 0x86, + 0xee, 0x1a, 0x7e, 0x2e, 0x85, 0x64, 0x91, 0x85, 0xb2, 0x63, 0x70, 0xc3, + 0x87, 0x23, 0x5c, 0x4d, 0xf2, 0x8a, 0x99, 0x37, 0xa4, 0x9d, 0x40, 0x78, + 0xbf, 0x88, 0x3f, 0x4e, 0x63, 0x46, 0xcb, 0x32, 0x51, 0xd9, 0xe1, 0x3f, + 0x1b, 0xda, 0x08, 0x7b, 0x28, 0x5a, 0xfa, 0xa8, 0x0e, 0x26, 0x26, 0x41, + 0xc5, 0x52, 0x7b, 0x0a, 0x18, 0x4b, 0x8b, 0xc8, 0x4a, 0x62, 0xe5, 0x77, + 0x31, 0x46, 0x58, 0xe2, 0x02, 0x9d, 0x85, 0x00, 0x64, 0xf7, 0xa7, 0xb8, + 0x1f, 0x25, 0x3e, 0x7c, 0xc1, 0x24, 0xa9, 0xc5, 0xb0, 0x39, 0xdc, 0x9b, + 0x17, 0x9a, 0x80, 0xc2, 0xf6, 0xae, 0xe6, 0xea, 0x08, 0x15, 0x17, 0x25, + 0x37, 0x33, 0x1a, 0x57, 0xb5, 0x05, 0xba, 0xa7, 0x6f, 0xf5, 0xb4, 0xc1, + 0xf0, 0xda, 0x75, 0x4b, 0x61, 0x94, 0xf4, 0xb3, 0x9a, 0x9b, 0x18, 0x73, + 0x0d, 0x3c, 0xda, 0xb9, 0x25, 0xd6, 0x91, 0xed, 0x77, 0xa8, 0xdb, 0x99, + 0x27, 0xea, 0x23, 0x3a, 0xc2, 0xa1, 0x27, 0x44, 0xfd, 0xc2, 0x7e, 0x5d, + 0x22, 0x1b, 0x93, 0x69, 0xad, 0xb3, 0x25, 0xd8}; + +static const uint8_t encaps1024Key[MLKEM1024_PUBLIC_KEY_BYTES] = { + 0xa8, 0x12, 0x2f, 0x37, 0x6b, 0x3f, 0x5d, 0x35, 0x52, 0x63, 0xeb, 0xa5, + 0x22, 0xc4, 0x39, 0x95, 0x04, 0x4b, 0xec, 0xa7, 0x8b, 0x9b, 0xa9, 0x92, + 0x4b, 0x87, 0x03, 0x54, 0x90, 0xae, 0x78, 0xa9, 0x4d, 0x52, 0x3c, 0x7b, + 0xa5, 0x88, 0xa3, 0x86, 0xeb, 0x49, 0xbf, 0x65, 0x2f, 0xdf, 0x12, 0x71, + 0x63, 0x73, 0x18, 0x7a, 0x1c, 0xa0, 0x47, 0xcc, 0x61, 0x38, 0x62, 0x7a, + 0xae, 0xab, 0x8f, 0x6c, 0xeb, 0xbf, 0x87, 0xa1, 0x76, 0xb8, 0x6c, 0x9f, + 0x7f, 0x09, 0x3c, 0x8f, 0x5b, 0x0b, 0xdc, 0x14, 0x73, 0x99, 0xe8, 0x39, + 0xae, 0x73, 0x70, 0x38, 0xd0, 0xbd, 0x01, 0x42, 0x36, 0x9f, 0x9c, 0x9d, + 0x46, 0xb2, 0x5b, 0x9a, 0xe5, 0x40, 0xb8, 0x00, 0x23, 0xd5, 0xd7, 0x57, + 0xe7, 0x6b, 0x3f, 0xdd, 0x30, 0x64, 0xdd, 0x2b, 0x44, 0xcd, 0x06, 0xb4, + 0x43, 0x69, 0x27, 0x71, 0x47, 0xb6, 0x15, 0x65, 0x4b, 0x32, 0x50, 0x44, + 0xe1, 0xbc, 0x60, 0x6f, 0xa6, 0x29, 0x05, 0x5a, 0x2e, 0x6a, 0x4b, 0x02, + 0xb2, 0xf1, 0xb1, 0xaa, 0x98, 0xa6, 0x93, 0x91, 0xc9, 0x1b, 0xd9, 0x8f, + 0x10, 0x58, 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x73, 0xcb, 0x65, 0xec, 0x87, 0x16, 0x5a, 0x65, + 0x30, 0xa0, 0x97, 0x1a, 0x75, 0x20, 0x69, 0xa4, 0x2a, 0xfb, 0xd2, 0x71, + 0xe1, 0xe2, 0x36, 0xfc, 0x15, 0x5a, 0xef, 0xf7, 0x59, 0xec, 0x76, 0x25, + 0x51, 0xe5, 0xbc, 0xdf, 0x3a, 0x66, 0xd6, 0xa9, 0xaf, 0x92, 0xb4, 0xce, + 0x14, 0xa2, 0x9e, 0xd4, 0x10, 0xcf, 0x72, 0xa8, 0x08, 0xe9, 0x0c, 0x81, + 0xa4, 0x60, 0x74, 0x61, 0x10, 0x59, 0x80, 0x23, 0x91, 0x00, 0x6c, 0x52, + 0xc5, 0x99, 0x45, 0x19, 0x71, 0x8a, 0x84, 0xf4, 0x45, 0xe8, 0xd9, 0xc3, + 0xc6, 0x61, 0x6e, 0x02, 0x68, 0xb2, 0xe1, 0xd5, 0xaf, 0x48, 0xb0, 0x91, + 0xc6, 0x05, 0x3b, 0x74, 0x77, 0x74, 0x0f, 0xea, 0x36, 0x18, 0x53, 0x36, + 0x4d, 0xe6, 0x42, 0xa4, 0x4b, 0x83, 0x36, 0x42, 0x35, 0xb6, 0xa8, 0x65, + 0x03, 0x78, 0x78, 0x07, 0x4b, 0x37, 0x40, 0x0c, 0x82, 0x59, 0x17, 0x94, + 0xa0, 0x90, 0x55, 0xd5, 0xb3, 0x4a, 0x9f, 0x18, 0x6e, 0x15, 0x74, 0xcc, + 0xb3, 0x84, 0x8f, 0x4b, 0x62, 0x00, 0x16, 0xd8, 0x07, 0xb9, 0x45, 0x48, + 0x5b, 0xc4, 0xc9, 0xe1, 0x76, 0x44, 0xfe, 0xa6, 0x5f, 0x53, 0x45, 0xc8, + 0x62, 0xd8, 0x3a, 0xa1, 0xa4, 0xcd, 0x1b, 0x67, 0x64, 0x09, 0xfa, 0x54, + 0x5c, 0x57, 0x12, 0x61, 0x3c, 0x26, 0x7b, 0x80, 0x44, 0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x5f, 0xf4, 0x80, 0x67, 0xc7, 0x01, + 0xdf, 0x84, 0x36, 0x50, 0x73, 0x73, 0xfd, 0xc7, 0xa4, 0x75, 0xf1, 0x3d, + 0x96, 0x1a, 0x45, 0x71, 0x8b, 0xa1, 0xa4, 0xb5, 0x6f, 0x02, 0xd0, 0x09, + 0x50, 0x30, 0x19, 0x4a, 0x5c, 0xb3, 0x48, 0x38, 0x72, 0x83, 0x87, 0xa3, + 0x3a, 0x31, 0x05, 0x61, 0xe7, 0x3d, 0x18, 0xc2, 0xaf, 0x34, 0x11, 0x63, + 0x84, 0x87, 0x9c, 0xfd, 0x2c, 0x70, 0xaa, 0xe0, 0x40, 0x0e, 0xec, 0x2b, + 0xd6, 0x67, 0xc2, 0xa4, 0xc5, 0xa0, 0x51, 0xe6, 0x43, 0xc7, 0xd8, 0xae, + 0x8d, 0x1b, 0xab, 0x43, 0x52, 0xb9, 0xbd, 0x27, 0xb3, 0xe6, 0x47, 0x25, + 0x9b, 0xb1, 0xcc, 0xcb, 0x23, 0x04, 0xd7, 0x25, 0xcb, 0x2e, 0x73, 0xc6, + 0x71, 0x8b, 0x5a, 0xbc, 0x88, 0x80, 0x09, 0x49, 0xb2, 0xc1, 0xd0, 0x3f, + 0x15, 0x9f, 0xbf, 0x39, 0x6a, 0xdc, 0xa8, 0x52, 0x6f, 0x1b, 0x47, 0x6f, + 0x80, 0xfe, 0x91, 0xc1, 0x33, 0x08, 0xd6, 0x45}; + +static const uint8_t encaps512Seed[MLKEM512_ENCAPS_SEED_LEN] = { + 0x2c, 0x87, 0xaa, 0x8b, 0x11, 0x76, 0x75, 0x54, 0x74, 0xdf, 0x76, + 0x3b, 0x2a, 0xe0, 0x46, 0x35, 0x39, 0xe9, 0x53, 0xe0, 0x04, 0xc4, + 0x6a, 0x11, 0x83, 0xfd, 0x53, 0xcf, 0x84, 0xef, 0x81, 0x03}; + +static const uint8_t encaps768Seed[MLKEM768_ENCAPS_SEED_LEN] = { + 0x2c, 0x87, 0xaa, 0x8b, 0x11, 0x76, 0x75, 0x54, 0x74, 0xdf, 0x76, + 0x3b, 0x2a, 0xe0, 0x46, 0x35, 0x39, 0xe9, 0x53, 0xe0, 0x04, 0xc4, + 0x6a, 0x11, 0x83, 0xfd, 0x53, 0xcf, 0x84, 0xef, 0x81, 0x03}; + +static const uint8_t encaps1024Seed[MLKEM1024_ENCAPS_SEED_LEN] = { + 0x2c, 0x87, 0xaa, 0x8b, 0x11, 0x76, 0x75, 0x54, 0x74, 0xdf, 0x76, + 0x3b, 0x2a, 0xe0, 0x46, 0x35, 0x39, 0xe9, 0x53, 0xe0, 0x04, 0xc4, + 0x6a, 0x11, 0x83, 0xfd, 0x53, 0xcf, 0x84, 0xef, 0x81, 0x03}; + +struct MLKEMEncapsulateTestVector { + size_t ciphertext_len; + size_t shared_secret_len; + const uint8_t *public_key; + const uint8_t *seed; + int (*encapsulate_deterministic)(uint8_t *ciphertext, size_t *ciphertext_len, uint8_t *shared_secret, size_t *shared_secret_len, const uint8_t *public_key, const uint8_t *seed); + int (*encapsulate)(uint8_t *ciphertext, size_t *ciphertext_len, uint8_t *shared_secret, size_t *shared_secret_len, const uint8_t *public_key); +}; + +static constexpr MLKEMEncapsulateTestVector encapsulateParameterSet[] = { + { + MLKEM512_CIPHERTEXT_BYTES, + MLKEM512_SHARED_SECRET_LEN, + encaps512Key, + encaps512Seed, + ml_kem_512_encapsulate_deterministic, + ml_kem_512_encapsulate + }, + { + MLKEM768_CIPHERTEXT_BYTES, + MLKEM768_SHARED_SECRET_LEN, + encaps768Key, + encaps768Seed, + ml_kem_768_encapsulate_deterministic, + ml_kem_768_encapsulate + }, + { + MLKEM1024_CIPHERTEXT_BYTES, + MLKEM1024_SHARED_SECRET_LEN, + encaps1024Key, + encaps1024Seed, + ml_kem_1024_encapsulate_deterministic, + ml_kem_1024_encapsulate + } +}; + +class MLKEMEncapsulateLengthTest : public testing::TestWithParam { +public: + void TearDown() override { + delete [] ciphertext; + delete [] shared_secret; + } + + uint8_t *ciphertext{}; + uint8_t *shared_secret{}; +}; + +INSTANTIATE_TEST_SUITE_P(All, MLKEMEncapsulateLengthTest, testing::ValuesIn(encapsulateParameterSet)); + +TEST_P(MLKEMEncapsulateLengthTest, ExactLengthDeterministic) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_EQ(0, params.encapsulate_deterministic(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key, params.seed)); + ASSERT_EQ(params.ciphertext_len, ciphertext_len); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, ExactLength) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_EQ(0, params.encapsulate(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key)); + ASSERT_EQ(params.ciphertext_len, ciphertext_len); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, AllShortLengthDeterministic) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len/2; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len/2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.encapsulate_deterministic(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key, params.seed)); + ASSERT_EQ(params.ciphertext_len/2, ciphertext_len); + ASSERT_EQ(params.shared_secret_len/2, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, ShortCiphertextLengthDeterministic) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len/2; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.encapsulate_deterministic(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key, params.seed)); + ASSERT_EQ(params.ciphertext_len/2, ciphertext_len); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, ShortSharedSecretLengthDeterministic) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len/2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.encapsulate_deterministic(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key, params.seed)); + ASSERT_EQ(params.ciphertext_len, ciphertext_len); + ASSERT_EQ(params.shared_secret_len/2, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, AllShortLength) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len/2; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len/2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.encapsulate(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key)); + ASSERT_EQ(params.ciphertext_len/2, ciphertext_len); + ASSERT_EQ(params.shared_secret_len/2, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, ShortCiphertextLength) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len/2; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.encapsulate(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key)); + ASSERT_EQ(params.ciphertext_len/2, ciphertext_len); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, ShortSharedSecretLength) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len/2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.encapsulate(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key)); + ASSERT_EQ(params.ciphertext_len, ciphertext_len); + ASSERT_EQ(params.shared_secret_len/2, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, LongLengthDeterministic) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len*2; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len*2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_EQ(0, params.encapsulate_deterministic(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key, params.seed)); + ASSERT_EQ(params.ciphertext_len, ciphertext_len); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +TEST_P(MLKEMEncapsulateLengthTest, LongLength) { + MLKEMEncapsulateTestVector params = GetParam(); + size_t ciphertext_len = params.ciphertext_len*2; + ciphertext = new uint8_t[ciphertext_len]; + size_t shared_secret_len = params.shared_secret_len*2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_EQ(0, params.encapsulate(ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, params.public_key)); + ASSERT_EQ(params.ciphertext_len, ciphertext_len); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +static const uint8_t decaps512Key[MLKEM512_SECRET_KEY_BYTES] = { + 0x73, 0x9b, 0x8b, 0x1f, 0x6a, 0x57, 0x66, 0x31, 0x0b, 0x06, 0x19, 0x04, + 0x02, 0x14, 0x38, 0xbb, 0xd6, 0x1a, 0x14, 0xf0, 0x85, 0xfd, 0xe0, 0x29, + 0xb5, 0x33, 0x86, 0xec, 0x37, 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97, 0xcb, 0x95, 0xe9, 0x20, + 0x0a, 0x99, 0x0b, 0x71, 0xbb, 0x4e, 0x10, 0xba, 0x3e, 0x7c, 0x08, 0xc4, + 0xa6, 0x28, 0x28, 0xb5, 0x49, 0xcc, 0xe4, 0xf5, 0x08, 0x7f, 0xd2, 0xa4, + 0xeb, 0x78, 0x64, 0xfd, 0xdc, 0x5f, 0x92, 0xa8, 0x68, 0xd5, 0xbb, 0x70, + 0xab, 0x51, 0x51, 0x0c, 0xb0, 0x43, 0xc1, 0x45, 0xb7, 0x4e, 0xb0, 0x5f, + 0x72, 0xe5, 0x96, 0x4b, 0xc7, 0x05, 0x00, 0xb0, 0xc8, 0x93, 0xe0, 0x1e, + 0xa1, 0xab, 0x77, 0xc4, 0x73, 0x7f, 0x23, 0x6a, 0xa8, 0xdd, 0x1c, 0x61, + 0xf2, 0xd7, 0xae, 0x5c, 0x93, 0x10, 0x24, 0x28, 0x12, 0xaa, 0x03, 0x4a, + 0xaa, 0xd3, 0xbc, 0xdf, 0x22, 0x4d, 0x42, 0xf3, 0x47, 0x09, 0xc0, 0x5f, + 0x12, 0x38, 0xb2, 0x18, 0xec, 0x33, 0xdd, 0x80, 0x4c, 0xb3, 0x31, 0x32, + 0xf3, 0x64, 0x7c, 0xbd, 0x48, 0xa6, 0xf5, 0xf5, 0x4a, 0x68, 0x66, 0xb2, + 0x4b, 0x51, 0x83, 0xeb, 0x66, 0x91, 0xd0, 0xa0, 0x84, 0x6b, 0x34, 0x6f, + 0x87, 0x79, 0x87, 0xf2, 0x6b, 0x76, 0xbe, 0xb3, 0x05, 0x50, 0x7b, 0x34, + 0xf2, 0xe1, 0xcc, 0x95, 0xcb, 0x81, 0x85, 0xbb, 0x5e, 0x35, 0x60, 0x67, + 0x6f, 0x30, 0x27, 0x52, 0xc3, 0x82, 0x4e, 0x90, 0xbd, 0x84, 0x08, 0x1b, + 0x28, 0x89, 0x1f, 0xcd, 0xda, 0x31, 0x3f, 0x06, 0x37, 0x65, 0x59, 0x4e, + 0x41, 0xe0, 0x85, 0x2a, 0x65, 0x55, 0x1f, 0xf2, 0x50, 0xb3, 0x18, 0x8a, + 0x2a, 0x61, 0xbc, 0x5f, 0x76, 0x50, 0x3b, 0x39, 0x16, 0xf0, 0x64, 0x61, + 0xca, 0x01, 0x1f, 0xe1, 0xd1, 0x91, 0x53, 0xe2, 0x64, 0x29, 0xb0, 0x37, + 0x3a, 0x45, 0x39, 0xdf, 0x32, 0x47, 0x47, 0x76, 0xbe, 0xcb, 0xec, 0xa6, + 0x08, 0xe9, 0x70, 0x6f, 0x65, 0xad, 0x92, 0x42, 0x2b, 0xbb, 0x28, 0xb6, + 0xb9, 0xc9, 0x6c, 0xa0, 0x2b, 0x61, 0x3d, 0x5c, 0x06, 0xee, 0xe3, 0x1f, + 0x9f, 0x32, 0x22, 0x33, 0x00, 0xb2, 0x22, 0xe3, 0x95, 0x5c, 0xb0, 0x5a, + 0x1b, 0xab, 0xac, 0x60, 0x2a, 0xb3, 0x1e, 0x18, 0x74, 0x15, 0x4a, 0x83, + 0xd4, 0xbc, 0x54, 0xdc, 0xdc, 0x94, 0xd6, 0xd0, 0x5a, 0xdf, 0xbc, 0x6f, + 0x46, 0x61, 0x3d, 0x85, 0x81, 0x45, 0xed, 0xeb, 0x63, 0xf9, 0x20, 0x44, + 0x55, 0x1b, 0xb9, 0xe8, 0xbb, 0x63, 0x07, 0x10, 0x1b, 0xef, 0x5b, 0xc2, + 0x68, 0x5b, 0xcb, 0x04, 0x35, 0x3c, 0x94, 0x84, 0x3e, 0xc9, 0x94, 0x28, + 0x69, 0x89, 0x99, 0xf9, 0x95, 0x80, 0x33, 0x6a, 0x90, 0x3e, 0xb3, 0x08, + 0x08, 0xe3, 0x01, 0xa1, 0x88, 0x79, 0xb0, 0x9b, 0x8b, 0x20, 0x59, 0x68, + 0xe6, 0x24, 0x7f, 0x3a, 0x14, 0xb9, 0x00, 0x93, 0x5d, 0x80, 0x8a, 0x7c, + 0xf8, 0x21, 0x85, 0x15, 0xf3, 0xb8, 0xc1, 0x3b, 0x54, 0x07, 0x29, 0xaa, + 0x74, 0x1b, 0x42, 0x46, 0x0b, 0x41, 0x17, 0xe0, 0x55, 0x56, 0x19, 0x46, + 0x0a, 0x5a, 0x48, 0x4c, 0x52, 0x15, 0x0f, 0x3b, 0x1b, 0x60, 0x00, 0x95, + 0xd2, 0x25, 0x9f, 0x45, 0x56, 0x7a, 0x3e, 0x03, 0x4e, 0x14, 0x39, 0xaf, + 0x5e, 0xd3, 0xbc, 0x41, 0x61, 0x93, 0x52, 0x77, 0x53, 0x05, 0x29, 0x24, + 0x26, 0x18, 0x49, 0x13, 0xc2, 0x53, 0xd9, 0x54, 0x46, 0xfc, 0x45, 0x33, + 0xfe, 0x12, 0x79, 0xf5, 0x5a, 0x04, 0x9b, 0xcc, 0x70, 0xad, 0x50, 0x86, + 0xad, 0x72, 0xc7, 0x40, 0xd5, 0x3d, 0x58, 0x5b, 0x4b, 0x93, 0x20, 0x42, + 0xa2, 0x84, 0x3b, 0x69, 0x5c, 0x21, 0x9f, 0xb1, 0x3c, 0xa3, 0xc0, 0xcf, + 0x62, 0x56, 0xca, 0x82, 0xe5, 0x8a, 0x98, 0xfb, 0x79, 0x88, 0x06, 0x91, + 0x27, 0x1c, 0x1a, 0xc5, 0x30, 0x38, 0x95, 0x3c, 0x0e, 0xc6, 0x07, 0x92, + 0x06, 0xc5, 0x0c, 0x5d, 0x24, 0xcd, 0xfe, 0x80, 0x23, 0x43, 0x91, 0xba, + 0x17, 0x62, 0x19, 0x7d, 0xf1, 0x2c, 0xcd, 0x01, 0x04, 0x7b, 0x74, 0x3b, + 0x9c, 0xab, 0x2d, 0xc8, 0xab, 0xb8, 0x61, 0x19, 0x0f, 0xfc, 0x92, 0xc6, + 0xa2, 0x6b, 0x86, 0x50, 0xf6, 0xa0, 0x0d, 0xf4, 0x40, 0x4d, 0xb2, 0x54, + 0x24, 0x68, 0x6a, 0x34, 0x55, 0xc6, 0x45, 0x90, 0x51, 0x1a, 0x34, 0x3a, + 0x8c, 0x73, 0x4c, 0x55, 0x8b, 0x42, 0x74, 0xb4, 0x39, 0x77, 0x12, 0x13, + 0xed, 0x5b, 0xc6, 0x28, 0x58, 0x5f, 0x75, 0x0b, 0x67, 0xd3, 0xc0, 0x42, + 0x96, 0xdc, 0x4b, 0xda, 0x56, 0x44, 0xec, 0xd5, 0x84, 0xee, 0x87, 0x0b, + 0x46, 0xa7, 0x04, 0xe5, 0xd1, 0x9f, 0xa1, 0x37, 0x6e, 0x66, 0x88, 0x09, + 0x73, 0xab, 0x56, 0xa5, 0x16, 0x0d, 0x8b, 0x99, 0xc2, 0xb4, 0xba, 0x4e, + 0x17, 0x7c, 0x25, 0xb2, 0x4a, 0x9b, 0xdf, 0x80, 0xba, 0x1b, 0x48, 0xc2, + 0x7c, 0x88, 0xbd, 0x2c, 0xab, 0xbd, 0x98, 0x80, 0x34, 0xf3, 0x5c, 0xa7, + 0x92, 0x54, 0x9e, 0x4d, 0x57, 0x9b, 0x20, 0xa5, 0x07, 0x45, 0x47, 0x43, + 0x11, 0x97, 0xa3, 0x62, 0x7b, 0x5d, 0x7c, 0x75, 0x73, 0xfa, 0x93, 0x06, + 0x52, 0xfa, 0x99, 0x9a, 0x12, 0x89, 0x15, 0xcc, 0x01, 0x73, 0x7a, 0x08, + 0x70, 0xa3, 0x02, 0xa1, 0x51, 0x38, 0xb3, 0x85, 0x48, 0xb5, 0x9a, 0x65, + 0xd3, 0x97, 0xb6, 0xa0, 0xfc, 0xb6, 0x61, 0x23, 0xad, 0x93, 0x47, 0xc8, + 0x9c, 0xf5, 0xbe, 0x90, 0xa9, 0xac, 0xcf, 0x4a, 0x61, 0x6f, 0x42, 0x36, + 0x9a, 0x83, 0x99, 0xcf, 0xc4, 0x6e, 0x9c, 0xc6, 0xa1, 0x01, 0xfc, 0x35, + 0x3f, 0xf2, 0x27, 0xc6, 0xf2, 0x62, 0xb7, 0x95, 0xa2, 0x15, 0x70, 0x49, + 0x7a, 0x9b, 0xad, 0x2d, 0x7c, 0xbf, 0x2e, 0x87, 0x7a, 0xde, 0x82, 0xc8, + 0x37, 0xea, 0x68, 0xbc, 0x42, 0x43, 0x8d, 0xf7, 0x9e, 0xc5, 0x96, 0x31, + 0x8b, 0x57, 0x98, 0x1c, 0x35, 0x96, 0x87, 0x15, 0xa7, 0x59, 0xf4, 0x53, + 0x83, 0x5c, 0xbc, 0x27, 0xd7, 0x59, 0x4c, 0xb8, 0x65, 0xdd, 0x51, 0x15, + 0x21, 0x72, 0xb0, 0xa1, 0x36, 0xbe, 0x2a, 0x4a, 0x95, 0xed, 0x0a, 0x80, + 0x27, 0xe1, 0x5f, 0xca, 0x37, 0x35, 0x13, 0xe9, 0x8a, 0x2a, 0x32, 0xc8, + 0xe2, 0x24, 0x62, 0xff, 0xb4, 0x46, 0x43, 0x54, 0x1e, 0x8c, 0x45, 0x83, + 0x5e, 0x67, 0x81, 0xd1, 0x99, 0x8e, 0x97, 0xa9, 0x4e, 0xf4, 0x98, 0xcf, + 0x41, 0xa0, 0x80, 0x20, 0xb0, 0x9f, 0x9c, 0xac, 0x36, 0xac, 0x42, 0x28, + 0x89, 0x45, 0x58, 0xf3, 0x29, 0x61, 0x0d, 0x52, 0x88, 0x20, 0x8a, 0x9b, + 0x44, 0xf6, 0x14, 0xd8, 0x26, 0x44, 0x0a, 0x87, 0xb9, 0x20, 0xe0, 0x7c, + 0x54, 0x70, 0xc1, 0x01, 0x24, 0x5a, 0xd7, 0x78, 0x5b, 0x30, 0xa4, 0xc5, + 0x4c, 0xd3, 0xa0, 0xec, 0x08, 0x8c, 0xf6, 0xb2, 0x7d, 0x43, 0x10, 0x4c, + 0x63, 0xf0, 0x56, 0x75, 0x68, 0x26, 0x38, 0xfb, 0xaf, 0x16, 0xa8, 0xaa, + 0xb8, 0x91, 0x04, 0x58, 0xb5, 0xc1, 0xe1, 0xdb, 0x60, 0xb3, 0xa2, 0x06, + 0xb7, 0xf2, 0x7f, 0x50, 0x44, 0x0b, 0xc2, 0x26, 0x09, 0x58, 0x45, 0x38, + 0xb3, 0x53, 0x70, 0x09, 0x01, 0x98, 0x8b, 0x44, 0x56, 0xda, 0xd6, 0x0c, + 0x98, 0xfa, 0x54, 0xc2, 0xba, 0xab, 0xd2, 0xbb, 0x38, 0x79, 0xb7, 0x2f, + 0xbc, 0xd5, 0x03, 0x15, 0x3a, 0x68, 0xa5, 0x28, 0x3e, 0x17, 0x60, 0x89, + 0x6e, 0x19, 0xcf, 0xdb, 0xbc, 0xb4, 0x3e, 0x86, 0x45, 0x88, 0x9a, 0x2a, + 0xe1, 0x1c, 0x0f, 0x9c, 0x74, 0xaa, 0x38, 0xb5, 0xa8, 0x13, 0x12, 0x0a, + 0x3f, 0xf5, 0x08, 0xf7, 0x53, 0xc8, 0x28, 0xf6, 0x46, 0x65, 0xf1, 0x1e, + 0xa6, 0x1c, 0x54, 0xc2, 0xa8, 0xb0, 0xaa, 0xb8, 0xc3, 0xd8, 0x35, 0x34, + 0xaf, 0x09, 0x38, 0xdc, 0x98, 0x59, 0x8d, 0xf0, 0x15, 0xc8, 0x37, 0xc6, + 0x9f, 0xb5, 0x53, 0x0d, 0x70, 0x01, 0xf5, 0x3b, 0x42, 0x9c, 0x0a, 0xbe, + 0x42, 0x30, 0x60, 0x87, 0xe5, 0x38, 0xdc, 0x27, 0xc8, 0xd6, 0x34, 0x80, + 0x96, 0xd7, 0xcf, 0x19, 0x41, 0x2e, 0x3e, 0x32, 0xb3, 0xd2, 0x53, 0xc8, + 0x23, 0x38, 0x19, 0x83, 0xe0, 0x88, 0xc1, 0xe0, 0xa1, 0x9f, 0x11, 0x51, + 0x07, 0x33, 0xaa, 0x07, 0xf6, 0x16, 0x02, 0xda, 0x8d, 0xbd, 0x20, 0x6a, + 0x62, 0xb6, 0xa9, 0xe1, 0x90, 0xad, 0x8d, 0xd9, 0xc1, 0x91, 0x52, 0x6d, + 0x26, 0xd7, 0x27, 0xfd, 0x15, 0x95, 0x46,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 0xbd, 0x03, 0x23, + 0x4f, 0x09, 0x97, 0x52, 0xd7, 0xb1, 0x05, 0xec, 0x45, 0xc1, 0xa1, 0x53, + 0xbb, 0x30, 0x0d, 0xb7, 0x75, 0x3b, 0x3e, 0xb3, 0x0b, 0x76, 0x59, 0x56, + 0xe8, 0x37, 0xbb, 0xaa, 0x8c, 0x51, 0xab, 0xd8, 0xbe, 0x54, 0xeb, 0x64, + 0xab, 0x52, 0x29, 0x61, 0x1b, 0x4b, 0x8c, 0xee, 0xd4, 0xd7, 0x7a, 0xe3, + 0xb3, 0x93, 0x35, 0xa4, 0xa4, 0x7a, 0x68, 0xaa, 0x38, 0x50, 0x42, 0x50, + 0x82, 0x98, 0x74, 0xd0, 0xec, 0xc6, 0xdf, 0xf4, 0x98, 0x6d, 0x1a, 0xe5, + 0x8c, 0xfe, 0x53, 0x7a, 0xfd, 0x2e, 0x02, 0xb2, 0xc4, 0x4b, 0xa0, 0x88, + 0xe7, 0xf3, 0xdb, 0xd2, 0x1f, 0x9d, 0x1c, 0x02, 0x37, 0x17, 0x85, 0x74, + 0x6e, 0x66, 0x72, 0x63, 0xb5, 0x0d, 0x48, 0xc4, 0x85, 0x5a, 0xe2, 0x49, + 0xab, 0x4c, 0x80, 0xc9, 0xb4, 0x93, 0xd2, 0x2b, 0xf9, 0x59, 0xcd, 0x6e, + 0x85, 0xfd, 0x28, 0xc0, 0xcd, 0x9f, 0xae, 0xce, 0xd7, 0x0f, 0xa7, 0x90}; + + static const uint8_t ciphertext512[MLKEM512_CIPHERTEXT_BYTES] = { + 0xaf, 0x4a, 0x00, 0x68, 0xc3, 0x73, 0x44, 0xd7, 0xe1, 0x06, 0xa9, 0xcd, + 0x39, 0x77, 0x9c, 0xf8, 0xc7, 0x67, 0xd5, 0xb8, 0x1c, 0xb3, 0x44, 0x34, + 0x40, 0xda, 0xde, 0x14, 0xc2, 0xc4, 0x83, 0x27, 0xba, 0x34, 0x28, 0x45, + 0xdc, 0x8c, 0x58, 0x8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, 0x3f, 0x21}; + +static const uint8_t decaps768Key[MLKEM768_SECRET_KEY_BYTES] = { + 0x9c, 0x70, 0x0f, 0xe4, 0x44, 0x90, 0x4d, 0xb5, 0x70, 0x8e, 0x16, 0xb1, + 0xba, 0x76, 0x50, 0xfb, 0xe9, 0x4f, 0x24, 0xa6, 0xab, 0xba, 0x26, 0x2a, + 0xd7, 0xac, 0xbd, 0x1a, 0x13, 0x87, 0x75, 0x65, 0x66, 0xe1, 0xac, 0x7a, + 0x1e, 0x54, 0x5b, 0x23, 0x6c, 0x54, 0x8e, 0x86, 0x61, 0xc5, 0xf4, 0x68, + 0xc5, 0x8c, 0x3b, 0xbc, 0x49, 0xcc, 0xca, 0xfb, 0x7a, 0x66, 0xa3, 0xb6, + 0x16, 0x78, 0x61, 0x07, 0x84, 0xa8, 0x8a, 0x88, 0x72, 0x25, 0x51, 0x39, + 0xd9, 0x79, 0xbd, 0xb1, 0x40, 0x64, 0x9b, 0x06, 0xac, 0xbc, 0xc9, 0x1c, + 0x74, 0xd3, 0xbc, 0x79, 0x15, 0x91, 0xb0, 0xf3, 0x1f, 0x2c, 0x9a, 0xb2, + 0x4d, 0x32, 0x99, 0x34, 0x79, 0x54, 0x05, 0xb7, 0x57, 0x0a, 0x99, 0x4e, + 0x0d, 0x12, 0x8a, 0xa0, 0x86, 0x81, 0xa3, 0xcc, 0x58, 0x68, 0x09, 0x37, + 0x40, 0x1a, 0x56, 0x3b, 0xfb, 0x4e, 0x62, 0x1a, 0x41, 0x93, 0x41, 0x6c, + 0xcb, 0x1c, 0x3c, 0x9d, 0x9b, 0x23, 0xdf, 0xc9, 0x97, 0x9f, 0x91, 0x14, + 0x0b, 0x37, 0xc6, 0xe7, 0xa5, 0x17, 0xae, 0x6c, 0x8f, 0x26, 0x8b, 0x33, + 0x46, 0xe5, 0x2a, 0xd0, 0xa3, 0x11, 0xf7, 0x9a, 0xce, 0xa0, 0xa5, 0x6c, + 0xb9, 0x29, 0x1c, 0xa0, 0x16, 0x1a, 0x98, 0xaa, 0xc4, 0x3e, 0xf2, 0xba, + 0x55, 0x61, 0x83, 0x12, 0x91, 0x00, 0x12, 0xab, 0x60, 0x3a, 0xc4, 0xc0, + 0xbe, 0x64, 0xa4, 0x98, 0xe5, 0x8e, 0xcb, 0x21, 0x7e, 0x2a, 0x10, 0x2b, + 0x8a, 0x51, 0x8b, 0xbb, 0xf9, 0xc4, 0x57, 0x41, 0x2f, 0x03, 0x0c, 0x1a, + 0x82, 0xcc, 0x7e, 0xa6, 0x7c, 0x8f, 0xd1, 0x45, 0x11, 0xe5, 0x54, 0x36, + 0xda, 0xa7, 0x38, 0x3e, 0xe2, 0xc9, 0x42, 0xda, 0x15, 0xf6, 0x75, 0x81, + 0xf0, 0x69, 0x56, 0x3e, 0x8b, 0xa3, 0x75, 0x2b, 0xa1, 0x59, 0x31, 0x49, + 0x73, 0xdb, 0xc7, 0x37, 0x42, 0x44, 0xed, 0x48, 0x6c, 0x6a, 0xd7, 0x7a, + 0xbb, 0xd8, 0x9c, 0xab, 0x1c, 0x19, 0x34, 0x15, 0x34, 0x39, 0xb5, 0x8f, + 0x58, 0x6b, 0xcf, 0x00, 0x81, 0x3b, 0x05, 0x07, 0x44, 0xde, 0xbb, 0x78, + 0x9d, 0xc4, 0xb3, 0xa1, 0xd0, 0x54, 0xe7, 0x10, 0x90, 0x5f, 0x06, 0x6b, + 0xc2, 0xab, 0x76, 0x43, 0xd2, 0x88, 0x3e, 0x09, 0x6e, 0x74, 0x99, 0x88, + 0xa0, 0x61, 0x26, 0x67, 0x63, 0x3a, 0x9b, 0x98, 0x74, 0x8c, 0x23, 0xc7, + 0x08, 0xd2, 0x98, 0x91, 0xe8, 0x4e, 0xdc, 0x8c, 0x4c, 0xbc, 0x43, 0x99, + 0x9e, 0xc8, 0x8c, 0x8a, 0x85, 0x4d, 0x69, 0x40, 0x2b, 0x8e, 0xba, 0xa4, + 0xd6, 0xcc, 0x09, 0xab, 0x42, 0x22, 0x0b, 0x84, 0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0x0a, 0x7a, + 0xdb, 0xcc, 0x2a, 0xea, 0xb0, 0x27, 0x8c, 0x96, 0x51, 0x3b, 0x25, 0x94, + 0x5d, 0xc3, 0x2b, 0x9f, 0x38, 0x2d, 0x27, 0x51, 0xa2, 0x7c, 0xa5, 0x72, + 0x52, 0x41, 0x27, 0x69, 0x57, 0x65, 0xf9, 0xb4, 0x5c, 0x88, 0xf9, 0x23, + 0xc2, 0x88, 0x69, 0xbd, 0xa5, 0xc7, 0xaf, 0x40, 0x60, 0x04, 0x29, 0x13, + 0xf4, 0xd3, 0x30, 0xc0, 0x45, 0x3c, 0x98, 0x54, 0x42, 0xdc, 0xa5, 0x8e, + 0xe2, 0x8a, 0x94, 0xbf, 0xeb, 0x85, 0xf2, 0xb4, 0x9c, 0x21, 0xa5, 0x56, + 0xff, 0xf0, 0x4e, 0x09, 0xd6, 0x6a, 0xba, 0x87, 0x5a, 0x48, 0x19, 0x39, + 0x0b, 0xba, 0x75, 0x86, 0xf7, 0x7b, 0xdf, 0xc0, 0xb1, 0xf6, 0x39, 0xb5, + 0x86, 0xfc, 0x59, 0x1a, 0xb9, 0x25, 0x0c, 0x89, 0x51, 0xe1, 0x43, 0xc2, + 0xf9, 0xc7, 0x90, 0x69, 0x7a, 0xc5, 0x1a, 0x9c, 0x15, 0x3b, 0x49, 0x33, + 0x15, 0x64, 0x4a, 0x73, 0x27, 0x46, 0x74, 0xfb, 0x08, 0x3c, 0x85, 0x2a, + 0x10, 0x72, 0xb8, 0x01, 0x81, 0xbe, 0x1e, 0xcb, 0x8f, 0x59, 0x76, 0x9e, + 0xe0, 0x90, 0x37, 0x57, 0x32, 0x66, 0x25, 0x37, 0x6f, 0x9f, 0xba, 0x33, + 0x80, 0xa5, 0x5c, 0xca, 0x42, 0x78, 0x6e, 0x11, 0xa4, 0x76, 0x9c, 0x7b, + 0x47, 0x61, 0xc5, 0xf5, 0xdb, 0x11, 0x2d, 0xf6, 0x98, 0x39, 0x57, 0x9d, + 0x82, 0xab, 0x03, 0x40, 0xa3, 0x4d, 0xd6, 0x2c, 0x15, 0x16, 0x5b, 0xcd, + 0x67, 0xb6, 0x6f, 0x04, 0x65, 0x54, 0x6a, 0xf5, 0x6b, 0x6a, 0x63, 0x74, + 0x67, 0x39, 0x3b, 0x28, 0x24, 0x2c, 0x40, 0xc3, 0x87, 0x00, 0x03, 0x49, + 0xa6, 0x0a, 0x73, 0x02, 0x37, 0x25, 0x07, 0x09, 0xb2, 0x08, 0x95, 0x6d, + 0x00, 0xfd, 0x71, 0x5b, 0x23, 0x9a, 0xf9, 0x6c, 0x41, 0x8a, 0xc0, 0x14, + 0x7d, 0x0c, 0x63, 0xf8, 0xf9, 0xaf, 0x30, 0xa2, 0x72, 0xcb, 0xd6, 0x29, + 0x29, 0x33, 0x95, 0xca, 0xd1, 0x09, 0x37, 0xc3, 0x2e, 0x74, 0x54, 0x81, + 0x5f, 0x93, 0xaa, 0x9a, 0x4c, 0x06, 0x61, 0xdb, 0xa4, 0xdb, 0xb1, 0x06, + 0x9f, 0xa4, 0xb5, 0x94, 0x74, 0xcf, 0x8f, 0x10, 0xad, 0x45, 0x56, 0x3c, + 0x98, 0x39, 0x06, 0xed, 0x32, 0x4b, 0x5f, 0x77, 0x6e, 0x57, 0x25, 0xbe, + 0x93, 0x86, 0x96, 0xc0, 0xf6, 0x79, 0x9e, 0x48, 0x9d, 0x8b, 0x80, 0x65, + 0x69, 0x13, 0xc6, 0x87, 0x37, 0x4d, 0xfe, 0xac, 0x8a, 0xdb, 0x31, 0x53, + 0x6c, 0x90, 0xc6, 0x07, 0x90, 0x69, 0xee, 0x14, 0x2f, 0xd8, 0x00, 0xb3, + 0x72, 0x1b, 0x0a, 0xea, 0x35, 0x22, 0x0d, 0xd0, 0x4d, 0x85, 0xb1, 0x9b, + 0x87, 0x25, 0x48, 0xe7, 0x00, 0x5e, 0x92, 0xe6, 0x74, 0xa2, 0x35, 0x16, + 0x4d, 0x6a, 0x2e, 0x53, 0xb6, 0x77, 0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, 0x30, 0x0a, + 0x02, 0x67, 0xcd, 0xb3, 0x8b, 0x7a, 0xc7, 0x79, 0x03, 0xc5, 0x0c, 0xa5, + 0x3b, 0x99, 0x28, 0x3c, 0xac, 0x6b, 0x95, 0xfb, 0xa6, 0x51, 0xb1, 0x1a, + 0x4d, 0x1a, 0x69, 0x2e, 0x40, 0x72, 0x96, 0x50, 0x60, 0x58, 0x76, 0x69, + 0xf2, 0x53, 0xb1, 0xbb, 0x18, 0x2e, 0x66, 0x14, 0x46, 0x16, 0x8a, 0xc6, + 0x02, 0x21, 0x89, 0x46, 0x60, 0x02, 0x0e, 0x9b, 0xb5, 0xf5, 0xb7, 0x12, + 0x4a, 0x03, 0x03, 0xe2, 0x54, 0x3e, 0xa3, 0xea, 0x6c, 0xe9, 0x7a, 0x24, + 0x82, 0xb2, 0x55, 0xca, 0x34, 0x6f, 0xb2, 0x7a, 0x84, 0x7b, 0x33, 0xb9, + 0x3f, 0x3a, 0xb2, 0xd3, 0x30, 0x64, 0xc6, 0xe6, 0x63, 0x2d, 0x1a, 0x23, + 0xf1, 0x14, 0x4e, 0x90, 0x7b, 0x24, 0x6b, 0x47, 0x9f, 0x4a, 0x5c, 0x92, + 0x89, 0x29, 0xa1, 0xe2, 0x41, 0x50, 0xf5, 0x24, 0x12, 0x58, 0xa5, 0xb6, + 0x77, 0x66, 0xa6, 0x6f, 0x6a, 0x33, 0x84, 0x64, 0x95, 0x90, 0x78, 0x28, + 0xeb, 0xe4, 0x4e, 0xcc, 0x5b, 0x73, 0x12, 0x40, 0x71, 0xba, 0x47, 0x90, + 0x73, 0x91, 0x04, 0x10, 0xa1, 0x6d, 0x5d, 0x56, 0x96, 0xb4, 0x8b, 0x19, + 0x47, 0x52, 0x97, 0x97, 0x95, 0x77, 0x2a, 0x91, 0xc3, 0x48, 0xf5, 0x02, + 0xb3, 0x7a, 0xa6, 0x50, 0x98, 0x3e, 0xbb, 0x89, 0xbf, 0x3c, 0x08, 0x1f, + 0xf2, 0x73, 0x54, 0x41, 0x29, 0xc9, 0x13, 0x7a, 0x6e, 0x18, 0x34, 0xc8, + 0xf2, 0xe7, 0xce, 0x14, 0xc7, 0x87, 0x0c, 0x53, 0xc0, 0x5b, 0x9b, 0x94, + 0xec, 0xd3, 0x8e, 0x66, 0x45, 0x91, 0x1b, 0x09, 0x12, 0x33, 0x68, 0x63, + 0xec, 0x16, 0x88, 0x31, 0xf8, 0x11, 0x88, 0x10, 0x75, 0xcf, 0x38, 0xa5, + 0x9d, 0xe4, 0xb5, 0xc7, 0x38, 0xaa, 0x6e, 0xf0, 0x3d, 0x77, 0x9b, 0x29, + 0x55, 0x88, 0xcf, 0xb6, 0x24, 0x91, 0xcc, 0x7b, 0x3e, 0x08, 0xb4, 0x84, + 0x73, 0x35, 0x4f, 0x9a, 0xc8, 0x06, 0x1c, 0x15, 0x2a, 0x9e, 0x20, 0x59, + 0x97, 0x49, 0x9b, 0x97, 0x0b, 0x69, 0xbc, 0xe6, 0x6f, 0xe4, 0x2b, 0xca, + 0x29, 0x24, 0xcc, 0xdf, 0x01, 0x03, 0xd0, 0xa4, 0xc3, 0x91, 0x93, 0xc2, + 0xdf, 0x25, 0x11, 0x8d, 0x72, 0xb1, 0x7a, 0xab, 0x26, 0xb0, 0xc6, 0x0d, + 0x4c, 0xd2, 0xc3, 0x06, 0xca, 0x46, 0x96, 0xc1, 0x85, 0xde, 0x05, 0x03, + 0x5f, 0x4a, 0x09, 0xcf, 0x97, 0x0a, 0xec, 0xc8, 0xcc, 0x93, 0x43, 0x6f, + 0x83, 0xb1, 0xae, 0xaf, 0x45, 0x2c, 0x41, 0x92, 0x9a, 0x2e, 0xab, 0xc1, + 0x51, 0x93, 0x8f, 0x74, 0xc9, 0x3b, 0x85, 0x85, 0x46, 0xdf, 0x22, 0x64, + 0xee, 0xea, 0xb6, 0x02, 0xe0, 0x4a, 0x85, 0xc5, 0x22, 0xf8, 0xfb, 0x1a, + 0x52, 0x14, 0xaf, 0xd8, 0xd4, 0xca, 0xe5, 0x7a, 0x47, 0xb6, 0xf3, 0x81, + 0xa2, 0x31, 0x26, 0xbd, 0x99, 0x17, 0x17, 0x31, 0x28, 0xaf, 0x91, 0x7f, + 0x1d, 0x48, 0x36, 0x91, 0xc4, 0x50, 0xd1, 0x15, 0x1c, 0xfe, 0x9a, 0x14, + 0x92, 0xd4, 0x73, 0xed, 0x86, 0x2e, 0x27, 0xda, 0x92, 0x50, 0x0c, 0x86, + 0xa2, 0x00, 0x19, 0xe9, 0xf9, 0x75, 0xe4, 0xf5, 0x4a, 0xd3, 0x19, 0xba, + 0x2c, 0x56, 0x30, 0xc4, 0x01, 0x42, 0x19, 0xd7, 0xba, 0x23, 0x54, 0x56, + 0xfe, 0x53, 0x01, 0x40, 0x19, 0x3d, 0x66, 0x24, 0x45, 0xe6, 0xa9, 0x41, + 0xd1, 0xe2, 0x38, 0x56, 0x7b, 0xa8, 0xd4, 0xd9, 0x5a, 0xb1, 0xc7, 0x44, + 0x7d, 0x69, 0x08, 0x21, 0x87, 0x6d, 0x01, 0x72, 0x70, 0xcf, 0xb1, 0x69, + 0xf2, 0xd7, 0x92, 0xf0, 0x3c, 0x80, 0x07, 0x20, 0x69, 0x7b, 0x41, 0x0a, + 0xb4, 0x1c, 0x66, 0xf2, 0xb2, 0x45, 0x85, 0x12, 0x56, 0x55, 0xeb, 0x10, + 0xaa, 0x10, 0x87, 0xff, 0xcb, 0x77, 0x50, 0xcb, 0x88, 0x7a, 0xd4, 0x46, + 0x73, 0x77, 0x50, 0x0a, 0x6a, 0x7d, 0x3a, 0x82, 0x97, 0x6b, 0x41, 0x5a, + 0x54, 0x46, 0x95, 0x77, 0xb4, 0x13, 0x8d, 0x91, 0x9b, 0x03, 0xf4, 0xc9, + 0xa4, 0xd3, 0x39, 0x0b, 0xdc, 0xb6, 0xf1, 0x71, 0x7a, 0x5f, 0xa4, 0xab, + 0x25, 0xa3, 0x4f, 0x4b, 0xa5, 0x03, 0x9b, 0xb2, 0x2c, 0x7f, 0x3c, 0x23, + 0x4e, 0xa4, 0x42, 0x73, 0x47, 0xaa, 0x72, 0x51, 0x46, 0x4e, 0x63, 0x19, + 0x04, 0xd7, 0xca, 0xc4, 0x78, 0x4f, 0x78, 0xb4, 0x9d, 0x5f, 0x4a, 0x10, + 0x4a, 0x30, 0x18, 0x09, 0xa7, 0x79, 0xf6, 0x46, 0x61, 0x31, 0xf9, 0xc6, + 0x2b, 0xb6, 0x71, 0x47, 0xf4, 0xcd, 0x49, 0x73, 0xa6, 0xaa, 0x1c, 0x29, + 0xae, 0x6a, 0x86, 0x47, 0xb6, 0x26, 0x8b, 0xe0, 0x89, 0xfe, 0x04, 0x8c, + 0xe9, 0x90, 0xcd, 0x63, 0x87, 0x43, 0xd2, 0x85, 0xc8, 0x89, 0xa7, 0x07, + 0xf5, 0x81, 0xb6, 0x3a, 0xf4, 0x17, 0x31, 0xf0, 0x24, 0x6b, 0x05, 0x4b, + 0xc4, 0xb4, 0x7a, 0xab, 0x01, 0xb6, 0x84, 0x2a, 0x27, 0x09, 0xd0, 0x2e, + 0x81, 0x58, 0xab, 0x90, 0xf4, 0x8b, 0x69, 0xd1, 0x36, 0x08, 0x2b, 0x34, + 0xcb, 0x06, 0x73, 0xb7, 0x4a, 0xa3, 0xf5, 0x45, 0x08, 0xed, 0x02, 0x9f, + 0xb8, 0xf5, 0x04, 0x5e, 0xe0, 0x63, 0x9e, 0x15, 0x0e, 0xe3, 0xb3, 0xc8, + 0x5f, 0x68, 0xa3, 0x10, 0xec, 0x04, 0x41, 0x98, 0x01, 0x00, 0xb4, 0x2a, + 0xbf, 0x2b, 0xad, 0x10, 0xd4, 0xa9, 0xe0, 0xc7, 0xb2, 0xbc, 0x5b, 0xbc, + 0xaf, 0x73, 0xcb, 0xcd, 0xc4, 0x9d, 0xc2, 0xc9, 0x49, 0x11, 0x19, 0x36, + 0x77, 0x9b, 0x17, 0x89, 0x74, 0xa0, 0x39, 0x29, 0x47, 0x74, 0x5a, 0x47, + 0x18, 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x2e, 0x85, 0x64, 0x91, 0x85, 0xb2, 0x63, 0x70, 0xc3, + 0x87, 0x23, 0x5c, 0x4d, 0xf2, 0x8a, 0x99, 0x37, 0xa4, 0x9d, 0x40, 0x78, + 0xbf, 0x88, 0x3f, 0x4e, 0x63, 0x46, 0xcb, 0x32, 0x51, 0xd9, 0xe1, 0x3f, + 0x1b, 0xda, 0x08, 0x7b, 0x28, 0x5a, 0xfa, 0xa8, 0x0e, 0x26, 0x26, 0x41, + 0xc5, 0x52, 0x7b, 0x0a, 0x18, 0x4b, 0x8b, 0xc8, 0x4a, 0x62, 0xe5, 0x77, + 0x31, 0x46, 0x58, 0xe2, 0x02, 0x9d, 0x85, 0x00, 0x64, 0xf7, 0xa7, 0xb8, + 0x1f, 0x25, 0x3e, 0x7c, 0xc1, 0x24, 0xa9, 0xc5, 0xb0, 0x39, 0xdc, 0x9b, + 0x17, 0x9a, 0x80, 0xc2, 0xf6, 0xae, 0xe6, 0xea, 0x08, 0x15, 0x17, 0x25, + 0x37, 0x33, 0x1a, 0x57, 0xb5, 0x05, 0xba, 0xa7, 0x6f, 0xf5, 0xb4, 0xc1, + 0xf0, 0xda, 0x75, 0x4b, 0x61, 0x94, 0xf4, 0xb3, 0x9a, 0x9b, 0x18, 0x73, + 0x0d, 0x3c, 0xda, 0xb9, 0x25, 0xd6, 0x91, 0xed, 0x77, 0xa8, 0xdb, 0x99, + 0x27, 0xea, 0x23, 0x3a, 0xc2, 0xa1, 0x27, 0x44, 0xfd, 0xc2, 0x7e, 0x5d, + 0x22, 0x1b, 0x93, 0x69, 0xad, 0xb3, 0x25, 0xd8, 0x6f, 0xf6, 0x94, 0xa7, + 0x3b, 0x67, 0x01, 0xf2, 0xa7, 0x40, 0x87, 0x73, 0xf9, 0x90, 0x91, 0x18, + 0xef, 0x52, 0xe1, 0xc8, 0x92, 0x85, 0xb2, 0xcd, 0xe4, 0x65, 0xa0, 0xb0, + 0x49, 0x80, 0x12, 0x0a, 0xf6, 0x96, 0x48, 0x40, 0x48, 0xec, 0x21, 0xf9, + 0x6c, 0xf5, 0x0a, 0x56, 0xd0, 0x75, 0x9c, 0x44, 0x8f, 0x37, 0x79, 0x75, + 0x2f, 0x03, 0x83, 0xd3, 0x74, 0x49, 0x69, 0x06, 0x94, 0xcf, 0x7a, 0x68}; + +static const uint8_t ciphertext768[MLKEM768_CIPHERTEXT_BYTES] = { + 0x16, 0xa6, 0x1f, 0xf8, 0x47, 0x87, 0xfd, 0x4a, 0x5f, 0x19, 0xca, 0x59, + 0xb3, 0x65, 0x7d, 0xb3, 0xa1, 0x06, 0xa7, 0x32, 0x9e, 0x2d, 0x62, 0x74, + 0x7a, 0x2e, 0xf8, 0x51, 0x49, 0x16, 0x31, 0x09, 0xbe, 0xff, 0xf6, 0xbc, + 0xb3, 0x3d, 0xf6, 0x62, 0x30, 0xb8, 0xf6, 0x72, 0x5c, 0xe7, 0x19, 0xf5, + 0x8f, 0x71, 0x19, 0x6e, 0x89, 0x5b, 0xef, 0xc9, 0x75, 0x4d, 0x9f, 0x04, + 0x24, 0x94, 0x64, 0x8c, 0x88, 0xa6, 0xed, 0x4c, 0x4c, 0xf1, 0x3f, 0x2f, + 0xaf, 0x9f, 0x65, 0x1d, 0xe7, 0x9d, 0xae, 0x07, 0x77, 0x33, 0xcb, 0x23, + 0x5f, 0x9d, 0xce, 0x44, 0x89, 0x77, 0xfd, 0x42, 0xd5, 0x48, 0x6b, 0x7d, + 0xfd, 0xf6, 0xd7, 0xbd, 0x91, 0x72, 0xb1, 0x42, 0x47, 0x65, 0x5d, 0x34, + 0xf1, 0x05, 0x24, 0xd4, 0x69, 0x47, 0x8d, 0x9a, 0x96, 0x39, 0xf3, 0x4d, + 0x2a, 0xcd, 0xe6, 0xe3, 0xc0, 0x48, 0xd5, 0x2b, 0x30, 0x8b, 0x66, 0x24, + 0x5f, 0xe9, 0xa2, 0x8c, 0xde, 0x79, 0x83, 0xb9, 0xd1, 0x4c, 0x03, 0xb3, + 0x77, 0x15,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bf, 0x26, + 0x46, 0xff, 0x46, 0x02, 0x2c, 0x05, 0x9d, 0x57, 0x94, 0xc3, 0xa4, 0xb7, + 0xf9, 0x0c, 0x41, 0x0d, 0xe7, 0x1a, 0x52, 0x31, 0xdd, 0x9b, 0x83, 0xbb, + 0xd0, 0xe6, 0xbd, 0xab, 0x1b, 0xf9, 0xe6, 0x2f}; + +static const uint8_t decaps1024Key[MLKEM1024_SECRET_KEY_BYTES] = { + 0x4b, 0x8a, 0xc4, 0x00, 0x21, 0x8a, 0x24, 0x91, 0x50, 0xaf, 0xf2, 0x33, + 0x93, 0x67, 0x48, 0x4a, 0x6b, 0xcb, 0xf6, 0x37, 0x64, 0x6c, 0xf7, 0x50, + 0x15, 0x6a, 0x7b, 0x35, 0xa9, 0x36, 0xd0, 0x5a, 0x25, 0x64, 0x7a, 0x33, + 0x68, 0xe4, 0x89, 0x1a, 0x03, 0x0b, 0xeb, 0xa9, 0x9f, 0xf9, 0xd5, 0x50, + 0xca, 0x83, 0x0e, 0xbf, 0x9b, 0x4a, 0xae, 0x23, 0x1f, 0xc2, 0xdc, 0x40, + 0x73, 0xaa, 0x98, 0x41, 0x1a, 0x18, 0x8b, 0xc2, 0x44, 0x2c, 0x53, 0x49, + 0xf2, 0x01, 0x40, 0xc5, 0xa3, 0x78, 0x03, 0x76, 0x79, 0x84, 0x0b, 0x23, + 0xa7, 0x95, 0xbd, 0x0e, 0xd5, 0x94, 0x9d, 0x0b, 0x5d, 0x66, 0x3b, 0xb0, + 0x1c, 0x57, 0x5d, 0x7f, 0xf3, 0x45, 0x94, 0xf4, 0x00, 0x70, 0x53, 0x19, + 0x4c, 0xa6, 0xc4, 0xec, 0xf9, 0x04, 0x58, 0xe6, 0x4f, 0x80, 0xe9, 0x8e, + 0xcf, 0xc9, 0xb0, 0x62, 0x94, 0x5e, 0xb1, 0x29, 0x22, 0xc5, 0x81, 0x3f, + 0xd1, 0xb9, 0x37, 0x0b, 0x7a, 0xce, 0x2c, 0xb5, 0x70, 0x7d, 0x72, 0x84, + 0x62, 0x74, 0xaf, 0x20, 0x3c, 0xc6, 0xbf, 0xb1, 0x8a, 0x2f, 0xb3, 0x52, + 0x65, 0xb1, 0x16, 0x0c, 0x33, 0x39, 0x3a, 0xb6, 0x58, 0xd7, 0x12, 0x43, + 0x4a, 0x91, 0x49, 0x61, 0x6b, 0xca, 0x8b, 0x83, 0x9c, 0x8f, 0xfa, 0x85, + 0xc7, 0x05, 0x4d, 0x6e, 0x69, 0x7e, 0x6f, 0x18, 0x1b, 0x31, 0x08, 0x58, + 0x77, 0x4c, 0x94, 0xfb, 0x40, 0x89, 0x80, 0x4b, 0x98, 0x9c, 0xc9, 0x1c, + 0xb3, 0xdc, 0xa5, 0xda, 0x8b, 0x31, 0xb4, 0x73, 0x32, 0x71, 0xb4, 0x12, + 0xcc, 0x38, 0x47, 0x7b, 0x46, 0x83, 0x6b, 0x08, 0x83, 0x73, 0xa5, 0x33, + 0x8d, 0x68, 0x16, 0xe7, 0xf8, 0x99, 0x3c, 0xeb, 0x16, 0xe2, 0x60, 0x08, + 0x62, 0x03, 0xc4, 0x65, 0xa7, 0x69, 0xbe, 0x79, 0x68, 0xa9, 0x18, 0x9c, + 0x5e, 0x02, 0x83, 0xde, 0x59, 0x0d, 0x5c, 0x61, 0xc5, 0xb1, 0xa3, 0x83, + 0xd1, 0x63, 0x5b, 0xed, 0xd4, 0x7b, 0xa4, 0xc8, 0x6d, 0x80, 0x3c, 0x62, + 0x5f, 0x22, 0xba, 0x8a, 0x86, 0x09, 0x3f, 0x03, 0xba, 0xa8, 0xc6, 0x38, + 0x95, 0x88, 0x05, 0xb5, 0x36, 0x7e, 0x1b, 0x79, 0x37, 0x05, 0xd0, 0xc5, + 0xaa, 0xf3, 0x6f, 0x2a, 0x52, 0xc0, 0x1c, 0x80, 0x35, 0x16, 0xb0, 0xc3, + 0x8e, 0x84, 0x07, 0xb3, 0xe6, 0x13, 0x32, 0x45, 0x3c, 0xc3, 0x7b, 0x73,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x93, 0xac, 0xe4, 0x86, 0x88, 0xe6, 0x5b, 0x08, 0x47, 0x25, + 0xfc, 0x38, 0x99, 0xdc, 0x7a, 0xc1, 0x46, 0x9c, 0xbb, 0x00, 0x58, 0x87, + 0x82, 0xe2, 0x79, 0x2c, 0x30, 0xc4, 0xfe, 0xe8, 0xac, 0x44, 0x16, 0x8d, + 0x8a, 0xbc, 0x8c, 0x53, 0x5a, 0x39, 0x87, 0x97, 0x0c, 0x9c, 0x70, 0x6a, + 0xef, 0x78, 0xb8, 0xde, 0x59, 0x05, 0x69, 0x79, 0x1c, 0xc1, 0xc9, 0xb3, + 0xe8, 0xf7, 0x2a, 0x49, 0xcc, 0x47, 0x8f, 0xf2, 0xab, 0xb0, 0xe5, 0x61, + 0x61, 0x32, 0x69, 0x3d, 0xfb, 0x7c, 0xb5, 0x38, 0x6f, 0xcf, 0x6a, 0xc7, + 0x74, 0x7a, 0xb3, 0x28, 0xd1, 0x2d, 0x88, 0x49, 0x67, 0x64, 0xfc, 0xb8, + 0xee, 0x68, 0x2c, 0x88, 0x64, 0x62, 0xda, 0x1a, 0xc8, 0xb0, 0x28, 0xae, + 0xb6, 0x5b, 0x6c, 0x77, 0xfc, 0x94, 0xf6, 0x51, 0x1e, 0xf6, 0xc2, 0x0f, + 0x66, 0x48, 0x5c, 0xa6, 0xea, 0x27, 0xb7, 0xba, 0x33, 0x9f, 0x88, 0x65, + 0xfa, 0x10, 0x95, 0x7e, 0xf2, 0xc7, 0xef, 0xb4, 0x6c, 0xa5, 0x84, 0x19, + 0x76, 0xd6, 0xb3, 0xdc, 0xcc, 0x75, 0x37, 0x15, 0x2f, 0x8e, 0x14, 0x2c, + 0xb1, 0x8c, 0x93, 0xe2, 0x32, 0x12, 0x4a, 0x42, 0x6f, 0x0b, 0x02, 0x88, + 0xa3, 0x04, 0x5c, 0x94, 0xf5, 0xa9, 0x45, 0x01, 0x56, 0xd8, 0xf5, 0x90, + 0xa4, 0x97, 0x99, 0x5f, 0x68, 0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, 0x96, 0xc1, 0xea, 0x71, + 0x64, 0xe1, 0x48, 0xb3, 0xa2, 0xb3, 0x7f, 0xbb, 0xc0, 0x49, 0xc2, 0xce, + 0xfe, 0x88, 0x63, 0xfa, 0xf4, 0x77, 0x9b, 0xc0, 0xa3, 0xd2, 0x20, 0x3c, + 0x4d, 0x65, 0x78, 0xb4, 0x68, 0x0e, 0xd2, 0x51, 0x0f, 0x70, 0x39, 0x78, + 0x3a, 0x6a, 0x77, 0x1a, 0x7b, 0x97, 0x28, 0x7a, 0x51, 0x11, 0x58, 0xc4, + 0xeb, 0x64, 0x55, 0xa1, 0xeb, 0xb8, 0xfc, 0x98, 0x3c, 0x78, 0x0b, 0xb2, + 0x88, 0x91, 0x64, 0x4f, 0x36, 0x0a, 0x98, 0xb4, 0xb9, 0x54, 0xb8, 0xa2, + 0x83, 0x47, 0x0f, 0x47, 0x20, 0x96, 0x36, 0x07, 0x03, 0xae, 0x9a, 0x63, + 0x35, 0x87, 0x03, 0xa0, 0x03, 0x65, 0xda, 0x3b, 0xa0, 0x5e, 0x02, 0x44, + 0x82, 0x06, 0x63, 0xd1, 0x57, 0x84, 0xae, 0x79, 0x37, 0x72, 0x11, 0x6b, + 0x24, 0xf3, 0x20, 0x1e, 0xc7, 0x99, 0xa0, 0x30, 0xaa, 0xcd, 0xb4, 0x33, + 0xd1, 0x14, 0x09, 0xeb, 0x98, 0xb1, 0xdb, 0x93, 0xa0, 0x4a, 0x9c, 0x65, + 0x4a, 0x61, 0x88, 0xcb, 0x84, 0x74, 0xc2, 0x80, 0xb4, 0xdb, 0xd4, 0x3f, + 0x38, 0x6a, 0x3f, 0x44, 0x99, 0xab, 0x75, 0x29, 0x55, 0x6a, 0x38, 0x44, + 0x9d, 0x30, 0x18, 0x10, 0x88, 0xaa, 0x32, 0x38, 0x46, 0xc2, 0xdb, 0x45, + 0xa1, 0xd9, 0x35, 0x9e, 0xd4, 0x0d, 0x04, 0x29, 0xa2, 0x50, 0xb6, 0x60, + 0x15, 0x17, 0x3b, 0x2a, 0xaa, 0x53, 0x25, 0x23, 0x60, 0x67, 0x37, 0xa1, + 0xf8, 0x23, 0x25, 0x85, 0x29, 0x39, 0x3d, 0x28, 0xc9, 0xfc, 0x21, 0x3b, + 0x37, 0x62, 0x07, 0xd9, 0xc5, 0x39, 0xa2, 0xa4, 0x90, 0x8a, 0xa9, 0x62, + 0x30, 0xf2, 0xc1, 0x38, 0x01, 0xa6, 0xb3, 0x69, 0x25, 0xb4, 0x16, 0x61, + 0x96, 0x37, 0x3e, 0xc7, 0xf7, 0x43, 0x03, 0x1a, 0xcd, 0x72, 0x3b, 0x63, + 0x12, 0x32, 0x45, 0x8a, 0xba, 0xaa, 0x01, 0x93, 0x65, 0xd4, 0x89, 0x15, + 0xd6, 0x2b, 0x4f, 0x30, 0xa1, 0xbc, 0xee, 0x39, 0x33, 0x4c, 0xf9, 0x95, + 0x9f, 0x16, 0x8e, 0x0b, 0x6b, 0xaf, 0x63, 0x51, 0x9c, 0xd2, 0x58, 0x4c, + 0xe7, 0x80, 0xca, 0x7c, 0x28, 0x0f, 0x3c, 0x39, 0x57, 0x25, 0xb0, 0x3a, + 0x0a, 0x51, 0x83, 0x53, 0xd2, 0xb2, 0xfd, 0xdc, 0x56, 0x3b, 0xa2, 0x8e, + 0xbc, 0xc2, 0x10, 0x11, 0x53, 0x84, 0x1e, 0x5a, 0x17, 0xae, 0x30, 0x2b, + 0xbd, 0xe2, 0xb8, 0x00, 0xdb, 0xb2, 0xbd, 0x60, 0xad, 0x29, 0x44, 0x39, + 0x38, 0x41, 0x54, 0x96, 0x72, 0x74, 0xfe, 0x14, 0x2b, 0x43, 0x7b, 0x64, + 0xa4, 0xf0, 0xa6, 0xa7, 0xa0, 0x6c, 0x96, 0xac, 0x83, 0x7d, 0x48, 0x8d, + 0x98, 0x68, 0xca, 0x00, 0xf3, 0xbf, 0x18, 0x9a, 0xc2, 0x17, 0x28, 0x73, + 0xd6, 0x5b, 0x28, 0x4a, 0x07, 0xc3, 0xd8, 0x8a, 0xc6, 0x26, 0xda, 0x31, + 0x9e, 0x53, 0x40, 0x31, 0xcc, 0xb8, 0x25, 0xba, 0x60, 0xc5, 0x52, 0x10, + 0x63, 0x8b, 0x74, 0xa5, 0x7a, 0xc5, 0x98, 0xc5, 0x50, 0xae, 0x17, 0xab, + 0x4a, 0xe2, 0x72, 0xea, 0xe2, 0x8e, 0x3b, 0x56, 0x0c, 0xd2, 0x62, 0x27, + 0x34, 0xe3, 0x66, 0x1e, 0xc3, 0x25, 0xba, 0xd6, 0x45, 0x1a, 0xe1, 0xab, + 0xe5, 0xe7, 0x48, 0xa3, 0x4c, 0x3b, 0x14, 0xba, 0x7d, 0x13, 0xfb, 0x9b, + 0xb3, 0x70, 0x5a, 0x17, 0xb7, 0x04, 0xe6, 0xd4, 0x9b, 0xa0, 0x64, 0x64, + 0x1b, 0xcc, 0xcb, 0x29, 0xd2, 0x7e, 0x15, 0x44, 0xcd, 0x18, 0x78, 0xb3, + 0x7b, 0x49, 0x44, 0xe5, 0x65, 0x27, 0xec, 0x85, 0x4c, 0x8d, 0x06, 0xcd, + 0x30, 0xda, 0x96, 0x14, 0x03, 0x27, 0x79, 0xb7, 0x05, 0xc4, 0x02, 0x16, + 0xb4, 0xb7, 0x63, 0x33, 0xc7, 0x57, 0xb0, 0x9c, 0x8c, 0xcf, 0x11, 0x90, + 0x47, 0x13, 0x97, 0x60, 0x03, 0x56, 0xdc, 0x74, 0x22, 0xf2, 0xf5, 0x56, + 0x9d, 0xe1, 0x1f, 0x6a, 0x65, 0x42, 0xb1, 0xe1, 0x2a, 0x8e, 0x72, 0x77, + 0x17, 0x24, 0x02, 0x20, 0x45, 0x71, 0x23, 0x0a, 0x08, 0x85, 0xc4, 0x1d, + 0xc8, 0x90, 0x04, 0xe7, 0xc5, 0xcb, 0xc2, 0x97, 0x3b, 0x96, 0x40, 0xcf, + 0x71, 0x0b, 0x72, 0xbd, 0xf3, 0xac, 0xfc, 0x05, 0x50, 0x78, 0x8b, 0x29, + 0x6c, 0x42, 0x49, 0xce, 0x30, 0xa0, 0xbe, 0x86, 0x63, 0x2b, 0x9b, 0x97, + 0x3a, 0x77, 0xb5, 0x3d, 0x36, 0x31, 0x33, 0xd0, 0x07, 0xd0, 0x4a, 0x99, + 0xa8, 0x79, 0x58, 0x7d, 0x15, 0x50, 0x73, 0x17, 0x1b, 0xf4, 0x99, 0x2e, + 0x2d, 0x98, 0x9f, 0xab, 0x06, 0xaa, 0x67, 0x99, 0x49, 0x3b, 0x78, 0x68, + 0xc9, 0x2a, 0x58, 0xb6, 0x8b, 0x7d, 0xf4, 0x23, 0x86, 0x30, 0xda, 0x07, + 0xfe, 0x44, 0x3c, 0x49, 0xc1, 0x49, 0xbe, 0xb0, 0x58, 0xd0, 0xd6, 0x40, + 0x39, 0x57, 0xbe, 0x71, 0xc5, 0x47, 0x5c, 0x46, 0xc8, 0x66, 0xc1, 0xc1, + 0x85, 0x9a, 0x14, 0x30, 0x16, 0x81, 0xf7, 0x72, 0xcd, 0x78, 0x09, 0x62, + 0x53, 0x41, 0x53, 0xd7, 0xe9, 0x1e, 0x39, 0x86, 0x24, 0x66, 0xe9, 0x9f, + 0xa8, 0x12, 0x2f, 0x37, 0x6b, 0x3f, 0x5d, 0x35, 0x52, 0x63, 0xeb, 0xa5, + 0x22, 0xc4, 0x39, 0x95, 0x04, 0x4b, 0xec, 0xa7, 0x8b, 0x9b, 0xa9, 0x92, + 0x4b, 0x87, 0x03, 0x54, 0x90, 0xae, 0x78, 0xa9, 0x4d, 0x52, 0x3c, 0x7b, + 0xa5, 0x88, 0xa3, 0x86, 0xeb, 0x49, 0xbf, 0x65, 0x2f, 0xdf, 0x12, 0x71, + 0x63, 0x73, 0x18, 0x7a, 0x1c, 0xa0, 0x47, 0xcc, 0x61, 0x38, 0x62, 0x7a, + 0xae, 0xab, 0x8f, 0x6c, 0xeb, 0xbf, 0x87, 0xa1, 0x76, 0xb8, 0x6c, 0x9f, + 0x7f, 0x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99, 0x4c, 0x20, 0x2f, 0xa0, 0x51, 0x79, 0x35, 0x2f, + 0x92, 0xa1, 0x86, 0x30, 0x82, 0x28, 0x92, 0x15, 0x1a, 0x7b, 0x8b, 0x16, + 0x3e, 0xea, 0x68, 0x5c, 0x2c, 0x4f, 0x02, 0x60, 0x15, 0xfe, 0xe7, 0x82, + 0xf1, 0xc5, 0x3c, 0xa5, 0x73, 0x80, 0x7a, 0xfc, 0x6b, 0xc7, 0x66, 0xbe, + 0x00, 0x87, 0x96, 0xfb, 0xb9, 0x06, 0xe9, 0xe1, 0xab, 0xd1, 0xcc, 0x84, + 0x5f, 0x60, 0x42, 0x3f, 0x09, 0x78, 0xdf, 0x89, 0x92, 0x4a, 0xa1, 0x18, + 0xa2, 0xb4, 0x1c, 0x7f, 0x45, 0x83, 0x08, 0xe8, 0x7b, 0x19, 0x0a, 0x27, + 0x00, 0x2b, 0xa7, 0xf7, 0x73, 0xcb, 0x65, 0xec, 0x87, 0x16, 0x5a, 0x65, + 0x30, 0xa0, 0x97, 0x1a, 0x75, 0x20, 0x69, 0xa4, 0x2a, 0xfb, 0xd2, 0x71, + 0xe1, 0xe2, 0x36, 0xfc, 0x15, 0x5a, 0xef, 0xf7, 0x59, 0xec, 0x76, 0x25, + 0x51, 0xe5, 0xbc, 0xdf, 0x3a, 0x66, 0xd6, 0xa9, 0xaf, 0x92, 0xb4, 0xce, + 0x14, 0xa2, 0x9e, 0xd4, 0x10, 0xcf, 0x72, 0xa8, 0x08, 0xe9, 0x0c, 0x81, + 0xa4, 0x60, 0x74, 0x61, 0x10, 0x59, 0x80, 0x23, 0x91, 0x00, 0x6c, 0x52, + 0xc5, 0x99, 0x45, 0x19, 0x71, 0x8a, 0x84, 0xf4, 0x45, 0xe8, 0xd9, 0xc3, + 0xc6, 0x61, 0x6e, 0x02, 0x68, 0xb2, 0xe1, 0xd5, 0xaf, 0x48, 0xb0, 0x91, + 0xc6, 0x05, 0x3b, 0x74, 0x77, 0x74, 0x0f, 0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77, + 0xb1, 0x48, 0x60, 0xf9, 0x39, 0x84, 0x08, 0x57, 0x5a, 0xf5, 0x18, 0x19, + 0x93, 0x68, 0x83, 0xd0, 0x80, 0x21, 0x8a, 0xb0, 0xac, 0xaf, 0xbb, 0x63, + 0x9a, 0x30, 0x19, 0xa3, 0x88, 0x78, 0xa4, 0x5a, 0x12, 0x64, 0xb3, 0x0f, + 0x70, 0x9c, 0x46, 0xa3, 0xfa, 0x5e, 0x2d, 0x57, 0x1f, 0x8f, 0x59, 0x4d, + 0x3b, 0xa9, 0x0c, 0x43, 0x28, 0x13, 0xb7, 0x80, 0x05, 0xe1, 0xd2, 0x0b, + 0x72, 0x55, 0x1f, 0x87, 0xe9, 0x78, 0xfc, 0xd8, 0x48, 0x7b, 0xb5, 0x84, + 0xa4, 0xe9, 0x7a, 0x66, 0xa0, 0x58, 0xa9, 0xa7, 0x50, 0xd1, 0x5c, 0x47, + 0x99, 0x19, 0xc8, 0x1e, 0xd2, 0x35, 0x80, 0x3b, 0x8a, 0x65, 0x7a, 0x8e, + 0x08, 0x80, 0x4f, 0x8c, 0x10, 0x9f, 0x8d, 0xd1, 0x60, 0x74, 0x12, 0x4d, + 0xf2, 0x2b, 0x0c, 0x4b, 0x27, 0x6d, 0x2a, 0xc8, 0x65, 0xb5, 0x5a, 0x53, + 0x8d, 0x73, 0x82, 0x62, 0x26, 0x21, 0x6b, 0xa2, 0x1e, 0xc7, 0x36, 0x8f, + 0x30, 0xc6, 0x38, 0xe3, 0xf2, 0x01, 0x28, 0x8a, 0x23, 0xc2, 0x86, 0x1c, + 0x3c, 0x88, 0x59, 0x9f, 0x90, 0x27, 0x12, 0x0b, 0x0d, 0xd7, 0x57, 0x5a, + 0x88, 0x55, 0xc5, 0x41, 0x15, 0x54, 0xf6, 0x99, 0xb4, 0x7e, 0xc6, 0x67, + 0xa3, 0xb2, 0xa6, 0x2f, 0x82, 0x8b, 0x24, 0x58, 0x96, 0x51, 0x30, 0x12, + 0x6f, 0x29, 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, 0x99, 0x33, 0x70, 0x04, 0x81, 0xf3, 0x41, + 0xb2, 0xa3, 0xc2, 0x79, 0x02, 0x1e, 0xd2, 0xd7, 0x01, 0x30, 0x36, 0x99, + 0xaa, 0xb1, 0x2d, 0xf4, 0x88, 0x63, 0x03, 0xd3, 0xb3, 0xe2, 0x94, 0x93, + 0x41, 0xb5, 0x77, 0xf8, 0x5a, 0xc3, 0x26, 0x28, 0x4a, 0x85, 0xf2, 0x49, + 0x49, 0x76, 0x79, 0x0e, 0x76, 0x2e, 0xc5, 0x1c, 0x1a, 0x88, 0xfa, 0xa2, + 0xf5, 0xe0, 0x3c, 0x0f, 0xab, 0x44, 0xe3, 0x99, 0x73, 0x53, 0x74, 0x50, + 0x2f, 0x00, 0x29, 0xcf, 0xdb, 0x74, 0xe9, 0xe1, 0x51, 0x72, 0x63, 0x65, + 0x42, 0x62, 0x32, 0x0f, 0xf3, 0xc1, 0x5f, 0xf4, 0x80, 0x67, 0xc7, 0x01, + 0xdf, 0x84, 0x36, 0x50, 0x73, 0x73, 0xfd, 0xc7, 0xa4, 0x75, 0xf1, 0x3d, + 0x96, 0x1a, 0x45, 0x71, 0x8b, 0xa1, 0xa4, 0xb5, 0x6f, 0x02, 0xd0, 0x09, + 0x50, 0x30, 0x19, 0x4a, 0x5c, 0xb3, 0x48, 0x38, 0x72, 0x83, 0x87, 0xa3, + 0x3a, 0x31, 0x05, 0x61, 0xe7, 0x3d, 0x18, 0xc2, 0xaf, 0x34, 0x11, 0x63, + 0x84, 0x87, 0x9c, 0xfd, 0x2c, 0x70, 0xaa, 0xe0, 0x40, 0x0e, 0xec, 0x2b, + 0xd6, 0x67, 0xc2, 0xa4, 0xc5, 0xa0, 0x51, 0xe6, 0x43, 0xc7, 0xd8, 0xae, + 0x8d, 0x1b, 0xab, 0x43, 0x52, 0xb9, 0xbd, 0x27, 0xb3, 0xe6, 0x47, 0x25, + 0x9b, 0xb1, 0xcc, 0xcb, 0x23, 0x04, 0xd7, 0x25, 0xcb, 0x2e, 0x73, 0xc6, + 0x71, 0x8b, 0x5a, 0xbc, 0x88, 0x80, 0x09, 0x49, 0xb2, 0xc1, 0xd0, 0x3f, + 0x15, 0x9f, 0xbf, 0x39, 0x6a, 0xdc, 0xa8, 0x52, 0x6f, 0x1b, 0x47, 0x6f, + 0x80, 0xfe, 0x91, 0xc1, 0x33, 0x08, 0xd6, 0x45, 0x2f, 0xd6, 0x26, 0x05, + 0x3c, 0x94, 0x15, 0x02, 0xe2, 0x8d, 0x79, 0x6c, 0xd6, 0x55, 0xa3, 0xcd, + 0x49, 0xdf, 0x9f, 0x15, 0xca, 0x02, 0xad, 0x62, 0x6e, 0x48, 0x6f, 0x6a, + 0x49, 0x21, 0x10, 0x6b, 0xf6, 0x96, 0x48, 0x40, 0x48, 0xec, 0x21, 0xf9, + 0x6c, 0xf5, 0x0a, 0x56, 0xd0, 0x75, 0x9c, 0x44, 0x8f, 0x37, 0x79, 0x75, + 0x2f, 0x03, 0x83, 0xd3, 0x74, 0x49, 0x69, 0x06, 0x94, 0xcf, 0x7a, 0x68}; + +static const uint8_t ciphertext1024[MLKEM1024_CIPHERTEXT_BYTES] = { + 0x70, 0x7d, 0x18, 0xca, 0xbc, 0xf8, 0x96, 0x70, 0xc8, 0x00, 0x03, 0xb4, + 0x7d, 0x2b, 0x86, 0x78, 0xad, 0x0d, 0xa4, 0xaa, 0xad, 0x78, 0x1a, 0x33, + 0x51, 0xe8, 0x2a, 0xc3, 0xe4, 0x47, 0xe7, 0x01, 0x9a, 0xf5, 0xcb, 0x86, + 0x02, 0x0f, 0xb2, 0xac, 0x72, 0x7e, 0x79, 0x65, 0x41, 0x55, 0x83, 0x5b, + 0x45, 0xde, 0x9b, 0x8a, 0xf5, 0xe5, 0xc7, 0xef, 0xa0, 0x12, 0x95, 0xda, + 0x89, 0x88, 0x13, 0x1d, 0xc8, 0xd6, 0xed, 0xb0, 0x64, 0x5c, 0x3e, 0x41, + 0x16, 0xaa, 0xb0, 0x80, 0x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x7b, 0x34, + 0xda, 0x00, 0x6f, 0x24, 0x45, 0x2e, 0xa0, 0x5e, 0x76, 0x6e, 0x6b, 0x5d, + 0xca, 0xc9, 0x37, 0xef, 0x74, 0x3a, 0xa9, 0x08, 0xa7, 0xb7, 0xcf, 0x2f, + 0x3e, 0xd8, 0x93, 0x1c, 0x61, 0xcd, 0xd3, 0x43, 0xdf, 0xdf, 0x6c, 0x58, + 0x8d, 0x1b, 0x1f, 0x40, 0x99, 0xba, 0x5b, 0xe5, 0x3e, 0x76, 0x91, 0x09, + 0x96, 0x60, 0x87, 0x74, 0x63, 0xc4, 0x31, 0x0a, 0x36, 0x76, 0x7e, 0xe2, + 0x7e, 0x0d, 0xbd, 0x31, 0x32, 0xac, 0xf6, 0x88, 0x84, 0x21, 0xe1, 0x01, + 0x2e, 0xdf, 0x38, 0x3d, 0x4e, 0xec, 0x96, 0x43, 0xe8, 0xa1, 0x0b, 0x50, + 0xe1, 0x05, 0x27, 0xc5, 0xa1, 0x47, 0x44, 0x58, 0xb3, 0x5e, 0x54, 0xb8, + 0x41, 0xfc, 0x02, 0x59, 0x9e, 0xd0, 0x7c, 0x19, 0x01, 0x54, 0x52, 0x5c, + 0x47, 0xb8, 0x5e, 0x69, 0xb0, 0x9e, 0x82, 0x08, 0xdc, 0xf3, 0x6f, 0x7e, + 0x38, 0xd9, 0xf1, 0x09, 0x0b, 0x8d, 0xaf, 0x0a, 0x32, 0x4d, 0x7c, 0xb4, + 0x8a, 0xce, 0x08, 0xda, 0xc1, 0x1b, 0xe4, 0x60, 0x58, 0x5d, 0xba, 0x90, + 0x61, 0xab, 0xe7, 0xef, 0x72, 0x43, 0x43, 0xa4, 0xba, 0xf1, 0xc7, 0x40, + 0x90, 0xe8, 0xd7, 0x91, 0x86, 0x48, 0xd0, 0xdd, 0xc4, 0x37, 0x43, 0xbc, + 0x03, 0x1e, 0xec, 0x9e, 0x3a, 0x29, 0x12, 0xd8, 0x70, 0xf5, 0x0e, 0xdc, + 0xdb, 0x6e, 0x29, 0x24, 0x56, 0xc4, 0x00, 0x00, 0x6e, 0xf6, 0x5e, 0xb2, + 0xc2, 0x4e, 0x03, 0x8c, 0xa3, 0xdd, 0xf9, 0x75, 0xe2, 0xa2, 0x61, 0x1a, + 0x8b, 0x18, 0x7e, 0x33, 0xe5, 0x2a, 0xad, 0xdc, 0x11, 0x9e, 0xf9, 0xe6, + 0x40, 0x3c, 0x61, 0x92, 0x4a, 0x7c, 0xf2, 0x29, 0xf6, 0x61, 0x9e, 0xf9, + 0xba, 0xce, 0xee, 0x7c, 0x04, 0xf2, 0x67, 0x59, 0x96, 0x17, 0x4c, 0x93, + 0x80, 0x78, 0xf5, 0x0c, 0xca, 0xf6, 0xd6, 0x58, 0x0f, 0xce, 0xd0, 0x15, + 0x64, 0x72, 0x3d, 0x29, 0x79, 0xb3, 0x3b, 0x77, 0xf6, 0x89, 0x95, 0x1b, + 0x7c, 0x77, 0xb6, 0x50, 0xe4, 0x8a, 0x84, 0x08, 0x53, 0x93, 0x26, 0x12, + 0xc0, 0x80, 0xf9, 0xb5, 0x5b, 0xfc, 0x78, 0xde, 0x64, 0x1e, 0x09, 0x02, + 0xc5, 0x50, 0x3b, 0x2f, 0x6c, 0xc4, 0x50, 0x66, 0x47, 0x71, 0xb9, 0x4d, + 0x55, 0x90, 0x95, 0x7b, 0x66, 0x9e, 0xa0, 0x8b, 0x96, 0xf3, 0x68, 0xe1, + 0x1e, 0xb9, 0x05, 0x42, 0x7e, 0x26, 0x50, 0xed, 0x18, 0x5d, 0x60, 0x03, + 0xab, 0x70, 0x4e, 0x23, 0x88, 0x93, 0x00, 0xcd, 0xd9, 0x20, 0x06, 0x0d, + 0x39, 0x34, 0xb4, 0x40, 0x74, 0x78, 0x3d, 0xb3, 0x97, 0x17, 0x28, 0x38, + 0xc9, 0xbe, 0x31, 0x8b, 0x5f, 0x89, 0x20, 0x58, 0xe6, 0x7d, 0x9e, 0xc9, + 0x40, 0x19, 0x87, 0x0d, 0x75, 0x82, 0x29, 0xe6, 0x30, 0x18, 0xcd, 0x85, + 0xd4, 0x49, 0x2e, 0x0e, 0xb8, 0xc0, 0xa9, 0x0d, 0x3a, 0x66, 0x6e, 0x76, + 0x16, 0xdd, 0xab, 0x33, 0x16, 0x01, 0xec, 0x96, 0x11, 0x57, 0x29, 0x29, + 0xee, 0x74, 0xbc, 0xe8, 0xd3, 0xbf, 0xb8, 0xa7, 0x08, 0x85, 0x8f, 0xdb, + 0xf6, 0x61, 0xbe, 0xa1, 0xf0, 0x92, 0x7f, 0x6e, 0x51, 0x92, 0xa8, 0x61, + 0x51, 0xfd, 0x03, 0xb0, 0x01, 0x93, 0x6c, 0x82, 0xda, 0x6d, 0x8c, 0x14, + 0x7a, 0x1a, 0xf2, 0xe9, 0x1b, 0x22, 0xa4, 0x02, 0xce, 0x75, 0x8f, 0xd7, + 0x43, 0x22, 0x6a, 0x87, 0x0f, 0x3e, 0x36, 0x35, 0x23, 0x1a, 0x39, 0x0a, + 0x20, 0xc6, 0xae, 0xe1, 0x72, 0x81, 0x89, 0x79, 0xdc, 0xc4, 0xdb, 0x5e, + 0x8b, 0xd9, 0x80, 0x2b, 0xc5, 0xc0, 0xbf, 0xfd, 0xa3, 0x5c, 0x28, 0x8d, + 0x02, 0x7c, 0xba, 0xde, 0x7d, 0x61, 0x59, 0x96, 0x87, 0x9a, 0x09, 0x29, + 0x2b, 0xb3, 0xca, 0x2c, 0x97, 0x20, 0xe7, 0x41, 0xe5, 0x19, 0x59, 0xd8, + 0x18, 0xc9, 0xdf, 0x69, 0x03, 0xbb, 0x71, 0x1a, 0x93, 0xba, 0x67, 0xb8, + 0x45, 0x39, 0x7d, 0xd1, 0xd5, 0x78, 0xc6, 0xb9, 0x37, 0xf8, 0xc3, 0xee, + 0xe4, 0x67, 0x50, 0x46, 0xf3, 0xc3, 0x00, 0x4a, 0xb1, 0x04, 0xa4, 0x36, + 0xc5, 0x51, 0x35, 0x2e, 0x70, 0xd5, 0x17, 0x9c, 0x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3d, 0xef, 0x66, 0x6f, 0xb0, 0xbf, 0xed, 0x43, 0x58, 0xaf, 0xdf, 0x5b, + 0x60, 0x05, 0x05, 0x1e, 0x74, 0xc1, 0x62, 0x44, 0xf4, 0x57, 0x92, 0x88, + 0xa0, 0xda, 0x8c, 0x2f, 0x49, 0x59, 0x8f, 0x74}; + +struct MLKEMDecapsulateTestVector { + size_t shared_secret_len; + const uint8_t *ciphertext; + const uint8_t *secret_key; + int (*decapsulate)(uint8_t *shared_secret, size_t *shared_secret_len, const uint8_t *ciphertext, const uint8_t *secret_key); +}; + +static constexpr MLKEMDecapsulateTestVector decapsulateParameterSet[] = { + { + MLKEM512_SHARED_SECRET_LEN, + ciphertext512, + decaps512Key, + ml_kem_512_decapsulate + }, + { + MLKEM768_SHARED_SECRET_LEN, + ciphertext768, + decaps768Key, + ml_kem_768_decapsulate + }, + { + MLKEM1024_SHARED_SECRET_LEN, + ciphertext1024, + decaps1024Key, + ml_kem_1024_decapsulate + } +}; + +class MLKEMDecapsulateLengthTest : public testing::TestWithParam { +public: + void TearDown() override { + delete [] shared_secret; + } + + uint8_t *shared_secret{}; +}; + +INSTANTIATE_TEST_SUITE_P(All, MLKEMDecapsulateLengthTest, testing::ValuesIn(decapsulateParameterSet)); + +TEST_P(MLKEMDecapsulateLengthTest, ExactLength) { + MLKEMDecapsulateTestVector params = GetParam(); + size_t shared_secret_len = params.shared_secret_len; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_EQ(0, params.decapsulate(shared_secret, &shared_secret_len, params.ciphertext, params.secret_key)); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} + +TEST_P(MLKEMDecapsulateLengthTest, ShortLength) { + MLKEMDecapsulateTestVector params = GetParam(); + size_t shared_secret_len = params.shared_secret_len/2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_NE(0, params.decapsulate(shared_secret, &shared_secret_len, params.ciphertext, params.secret_key)); + ASSERT_EQ(params.shared_secret_len/2, shared_secret_len); +} + +TEST_P(MLKEMDecapsulateLengthTest, LongLength) { + MLKEMDecapsulateTestVector params = GetParam(); + size_t shared_secret_len = params.shared_secret_len*2; + shared_secret = new uint8_t[shared_secret_len]; + ASSERT_EQ(0, params.decapsulate(shared_secret, &shared_secret_len, params.ciphertext, params.secret_key)); + ASSERT_EQ(params.shared_secret_len, shared_secret_len); +} diff --git a/crypto/fipsmodule/self_check/self_check.c b/crypto/fipsmodule/self_check/self_check.c index 690dcc9851..4025ebd9ee 100644 --- a/crypto/fipsmodule/self_check/self_check.c +++ b/crypto/fipsmodule/self_check/self_check.c @@ -887,12 +887,14 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { 0x38, 0x1c, 0x9b, 0x7f, 0x49, 0x99, 0x1f, 0x19, 0xa4, 0xff, 0x83, 0x69, 0x63, 0x8d, 0xe3, 0x80, 0xb5, 0xd8, 0x28, 0xb7, 0xb5, 0xfc, 0xfd, 0xd9, 0x1f, 0xe6, 0x8e, 0xfe, 0x16, 0xd4, 0xcd, 0x9e, 0xed, 0x66, 0xd6, 0x5c, - 0x1d, 0x2d, 0x8c, 0xaf, 0x5a, 0xf4, 0xa6, 0x92}; + 0x1d, 0x2d, 0x8c, 0xaf, 0x5a, 0xf4, 0xa6, 0x92}; + size_t public_len = MLKEM512_PUBLIC_KEY_BYTES; + size_t secret_len = MLKEM512_SECRET_KEY_BYTES; uint8_t keygen_decaps[MLKEM512_SECRET_KEY_BYTES] = {0}; uint8_t keygen_encaps[MLKEM512_PUBLIC_KEY_BYTES] = {0}; if (ml_kem_512_keypair_deterministic_no_self_test( - keygen_encaps, keygen_decaps, kKeyGenEKSeed) || + keygen_encaps, &public_len, keygen_decaps, &secret_len, kKeyGenEKSeed) || !check_test(kKeyGenEK, keygen_encaps, sizeof(keygen_encaps), "ML-KEM-keyGen-encaps")) { goto err; @@ -904,6 +906,8 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { // dk = (dkPKE‖ek‖H(ek)‖𝑧) // where dkPKE is the secret key, ek is the public key, and z is the hash of // the public key + public_len = MLKEM512_PUBLIC_KEY_BYTES; + secret_len = MLKEM512_SECRET_KEY_BYTES; static const uint8_t kKeyGenDKSeed[MLKEM512_KEYGEN_SEED_LEN] = { 0xec, 0xdb, 0x97, 0x62, 0xf4, 0x78, 0xb2, 0xfa, 0x26, 0x3d, 0xf4, 0x6d, 0xe4, 0x47, 0xf3, 0xd1, 0x52, 0xa1, 0xbc, 0x0e, 0x02, 0xee, @@ -911,7 +915,7 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { 0x07, 0x4b, 0xff, 0x80, 0x44, 0x44, 0x5e, 0x11, 0x66, 0x0b, 0x1b, 0x6b, 0x26, 0xdf, 0x24, 0x2b, 0x8f, 0xc0, 0x2b, 0x9e, 0x8d, 0xf5, 0x38, 0xdb, 0x17, 0xa6, 0x39, 0xd7, 0xc4, 0x61, 0x32 -}; + }; static const uint8_t kKeyGenDK[MLKEM512_SECRET_KEY_BYTES] = { 0x88, 0xc1, 0x2c, 0xea, 0xa6, 0xcb, 0x91, 0xf5, 0x89, 0xac, 0xb8, 0x6d, 0x91, 0x3c, 0x7a, 0x60, 0xf7, 0xcd, 0xab, 0xe3, 0xb7, 0xb5, 0x90, 0x09, @@ -1050,7 +1054,7 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { 0x11, 0x66, 0x0b, 0x1b, 0x6b, 0x26, 0xdf, 0x24, 0x2b, 0x8f, 0xc0, 0x2b, 0x9e, 0x8d, 0xf5, 0x38, 0xdb, 0x17, 0xa6, 0x39, 0xd7, 0xc4, 0x61, 0x32}; if (ml_kem_512_keypair_deterministic_no_self_test( - keygen_encaps, keygen_decaps, kKeyGenDKSeed) || + keygen_encaps, &public_len, keygen_decaps, &secret_len, kKeyGenDKSeed) || !check_test(kKeyGenDK, keygen_decaps, sizeof(keygen_decaps), "ML-KEM-keyGen-decaps")) { goto err; @@ -1198,11 +1202,13 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { 0x82, 0x0b, 0x57, 0xf2, 0xae, 0x05, 0xf9, 0xa4, 0x12, 0xab, 0x55, 0xba, 0xa4, 0x21, 0xd4, 0xaf, 0x6d, 0xac, 0x62, 0x66, 0x2a}; + size_t ciphertext_len = MLKEM512_CIPHERTEXT_BYTES; + size_t shared_secret_len = MLKEM512_SHARED_SECRET_LEN; uint8_t ciphertext[MLKEM512_CIPHERTEXT_BYTES] = {0}; uint8_t shared_secret[MLKEM512_SHARED_SECRET_LEN] = {0}; if (ml_kem_512_encapsulate_deterministic_no_self_test( - ciphertext, shared_secret, kEncapEK, kEncapM) || + ciphertext, &ciphertext_len, shared_secret, &shared_secret_len, kEncapEK, kEncapM) || !check_test(kEncapCiphertext, ciphertext, sizeof(kEncapCiphertext), "ML-KEM-encapsulate-ciphertext") || !check_test(kEncapSharedSecret, shared_secret, sizeof(kEncapSharedSecret), @@ -1210,6 +1216,7 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { goto err; } + shared_secret_len = MLKEM512_SHARED_SECRET_LEN; static const uint8_t kDecapDK[MLKEM512_SECRET_KEY_BYTES] = { 0x73, 0x9b, 0x8b, 0x1f, 0x6a, 0x57, 0x66, 0x31, 0x0b, 0x06, 0x19, 0x04, 0x02, 0x14, 0x38, 0xbb, 0xd6, 0x1a, 0x14, 0xf0, 0x85, 0xfd, 0xe0, 0x29, @@ -1486,12 +1493,12 @@ static OPENSSL_NOINLINE int boringssl_self_test_ml_kem(void) { 0x15, 0xd4, 0x69, 0x5b, 0xa0, 0x96, 0xce, 0x2b, 0x32, 0xc3, 0x75, 0x24, 0x4f, 0x79, 0xa5, 0x74, 0xda, 0x06, 0xb4, 0xb1, 0xbd}; - if (ml_kem_512_decapsulate_no_self_test(shared_secret, kDecapCiphertext, + if (ml_kem_512_decapsulate_no_self_test(shared_secret, &shared_secret_len, kDecapCiphertext, kDecapDK) || !check_test(kDecapSharedSecret, shared_secret, sizeof(kDecapSharedSecret), "ML-KEM decapsulate non-rejection") || ml_kem_512_decapsulate_no_self_test( - shared_secret, kDecapCiphertextRejection, kDecapDK) || + shared_secret, &shared_secret_len, kDecapCiphertextRejection, kDecapDK) || !check_test(kDecapSharedSecretRejection, shared_secret, sizeof(kDecapSharedSecretRejection), "ML-KEM decapsulate implicit rejection")) { diff --git a/crypto/kyber/kem_kyber.c b/crypto/kyber/kem_kyber.c index 85a8d691b0..e7f400636c 100644 --- a/crypto/kyber/kem_kyber.c +++ b/crypto/kyber/kem_kyber.c @@ -12,30 +12,39 @@ // and fails (0). Define wrappers to handle that. static int kyber512r3_keygen_deterministic(uint8_t *public_key, + size_t *public_len, uint8_t *secret_key, + size_t *secret_len, const uint8_t *seed) { return pqcrystals_kyber512_ref_keypair_derand(public_key, secret_key, seed) == 0; } static int kyber512r3_keygen(uint8_t *public_key, - uint8_t *secret_key) { + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len) { return pqcrystals_kyber512_ref_keypair(public_key, secret_key) == 0; } static int kyber512r3_encaps_deterministic(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key, const uint8_t *seed) { return pqcrystals_kyber512_ref_enc_derand(ciphertext, shared_secret, public_key, seed) == 0; } static int kyber512r3_encaps(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key) { return pqcrystals_kyber512_ref_enc(ciphertext, shared_secret, public_key) == 0; } static int kyber512r3_decaps(uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *ciphertext, const uint8_t *secret_key) { return pqcrystals_kyber512_ref_dec(shared_secret, ciphertext, secret_key) == 0; @@ -50,30 +59,39 @@ static const KEM_METHOD kem_kyber512r3_method = { }; static int kyber768r3_keygen_deterministic(uint8_t *public_key, + size_t *public_len, uint8_t *secret_key, + size_t *secret_len, const uint8_t *seed) { return pqcrystals_kyber768_ref_keypair_derand(public_key, secret_key, seed) == 0; } static int kyber768r3_keygen(uint8_t *public_key, - uint8_t *secret_key) { + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len) { return pqcrystals_kyber768_ref_keypair(public_key, secret_key) == 0; } static int kyber768r3_encaps_deterministic(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key, const uint8_t *seed) { return pqcrystals_kyber768_ref_enc_derand(ciphertext, shared_secret, public_key, seed) == 0; } static int kyber768r3_encaps(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key) { return pqcrystals_kyber768_ref_enc(ciphertext, shared_secret, public_key) == 0; } static int kyber768r3_decaps(uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *ciphertext, const uint8_t *secret_key) { return pqcrystals_kyber768_ref_dec(shared_secret, ciphertext, secret_key) == 0; @@ -88,30 +106,39 @@ static const KEM_METHOD kem_kyber768r3_method = { }; static int kyber1024r3_keygen_deterministic(uint8_t *public_key, + size_t *public_len, uint8_t *secret_key, + size_t *secret_len, const uint8_t *seed) { return pqcrystals_kyber1024_ref_keypair_derand(public_key, secret_key, seed) == 0; } static int kyber1024r3_keygen(uint8_t *public_key, - uint8_t *secret_key) { + size_t *public_len, + uint8_t *secret_key, + size_t *secret_len) { return pqcrystals_kyber1024_ref_keypair(public_key, secret_key) == 0; } static int kyber1024r3_encaps_deterministic(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key, const uint8_t *seed) { return pqcrystals_kyber1024_ref_enc_derand(ciphertext, shared_secret, public_key, seed) == 0; } static int kyber1024r3_encaps(uint8_t *ciphertext, + size_t *ciphertext_len, uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *public_key) { return pqcrystals_kyber1024_ref_enc(ciphertext, shared_secret, public_key) == 0; } static int kyber1024r3_decaps(uint8_t *shared_secret, + size_t *shared_secret_len, const uint8_t *ciphertext, const uint8_t *secret_key) { return pqcrystals_kyber1024_ref_dec(shared_secret, ciphertext, secret_key) == 0;