diff options
| -rw-r--r-- | src/lib/libcrypto/mlkem/mlkem_internal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/mlkem/mlkem_internal.c b/src/lib/libcrypto/mlkem/mlkem_internal.c index 048b147806..dec841312e 100644 --- a/src/lib/libcrypto/mlkem/mlkem_internal.c +++ b/src/lib/libcrypto/mlkem/mlkem_internal.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: mlkem_internal.c,v 1.6 2026/01/18 08:49:42 tb Exp $ */ | 1 | /* $OpenBSD: mlkem_internal.c,v 1.7 2026/03/06 09:22:29 kenjiro Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024, Google Inc. | 3 | * Copyright (c) 2024, Google Inc. |
| 4 | * Copyright (c) 2024, 2025 Bob Beck <beck@obtuse.com> | 4 | * Copyright (c) 2024, 2025 Bob Beck <beck@obtuse.com> |
| @@ -1121,7 +1121,7 @@ mlkem_decap(const MLKEM_private_key *private_key, const uint8_t *ciphertext, | |||
| 1121 | encrypt_cpa(expected_ciphertext, &priv.pub, decrypted, | 1121 | encrypt_cpa(expected_ciphertext, &priv.pub, decrypted, |
| 1122 | key_and_randomness + 32, private_key->rank); | 1122 | key_and_randomness + 32, private_key->rank); |
| 1123 | kdf(failure_key, priv.fo_failure_secret, ciphertext, ciphertext_len); | 1123 | kdf(failure_key, priv.fo_failure_secret, ciphertext, ciphertext_len); |
| 1124 | mask = constant_time_eq_int_8(memcmp(ciphertext, expected_ciphertext, | 1124 | mask = constant_time_eq_int_8(timingsafe_memcmp(ciphertext, expected_ciphertext, |
| 1125 | expected_ciphertext_length), 0); | 1125 | expected_ciphertext_length), 0); |
| 1126 | for (i = 0; i < MLKEM_SHARED_SECRET_LENGTH; i++) { | 1126 | for (i = 0; i < MLKEM_SHARED_SECRET_LENGTH; i++) { |
| 1127 | out_shared_secret[i] = constant_time_select_8(mask, | 1127 | out_shared_secret[i] = constant_time_select_8(mask, |
