diff options
author | beck <> | 2025-05-19 06:47:40 +0000 |
---|---|---|
committer | beck <> | 2025-05-19 06:47:40 +0000 |
commit | b5d568ea85f2380b8447d6b8b652e81e0cbdfb8d (patch) | |
tree | c0473c2a6778acc8c1c57a2e73ed27b1d35552a6 /src/lib/libcrypto/mlkem/mlkem_internal.h | |
parent | 4ec16279eb7cfd33c1785a5832ba16feff4a0ed8 (diff) | |
download | openbsd-b5d568ea85f2380b8447d6b8b652e81e0cbdfb8d.tar.gz openbsd-b5d568ea85f2380b8447d6b8b652e81e0cbdfb8d.tar.bz2 openbsd-b5d568ea85f2380b8447d6b8b652e81e0cbdfb8d.zip |
API changes for ML-KEM
- Get rid of CBB/CBS usage in public api
- Make void functions return int that can fail if malloc fails.
Along with some fallout and resulting bikeshedding in the regress tests.
ok jsing@, tb@
Diffstat (limited to 'src/lib/libcrypto/mlkem/mlkem_internal.h')
-rw-r--r-- | src/lib/libcrypto/mlkem/mlkem_internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/mlkem/mlkem_internal.h b/src/lib/libcrypto/mlkem/mlkem_internal.h index d3f325932f..7a51197c36 100644 --- a/src/lib/libcrypto/mlkem/mlkem_internal.h +++ b/src/lib/libcrypto/mlkem/mlkem_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mlkem_internal.h,v 1.4 2024/12/19 23:52:26 tb Exp $ */ | 1 | /* $OpenBSD: mlkem_internal.h,v 1.5 2025/05/19 06:47:40 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2023, Google Inc. | 3 | * Copyright (c) 2023, Google Inc. |
4 | * | 4 | * |
@@ -41,7 +41,7 @@ __BEGIN_HIDDEN_DECLS | |||
41 | * regular callers should use the non-deterministic |MLKEM_generate_key| | 41 | * regular callers should use the non-deterministic |MLKEM_generate_key| |
42 | * directly. | 42 | * directly. |
43 | */ | 43 | */ |
44 | void MLKEM768_generate_key_external_entropy( | 44 | int MLKEM768_generate_key_external_entropy( |
45 | uint8_t out_encoded_public_key[MLKEM768_PUBLIC_KEY_BYTES], | 45 | uint8_t out_encoded_public_key[MLKEM768_PUBLIC_KEY_BYTES], |
46 | struct MLKEM768_private_key *out_private_key, | 46 | struct MLKEM768_private_key *out_private_key, |
47 | const uint8_t entropy[MLKEM_SEED_BYTES]); | 47 | const uint8_t entropy[MLKEM_SEED_BYTES]); |
@@ -80,7 +80,7 @@ void MLKEM768_encap_external_entropy( | |||
80 | * regular callers should use the non-deterministic |MLKEM_generate_key| | 80 | * regular callers should use the non-deterministic |MLKEM_generate_key| |
81 | * directly. | 81 | * directly. |
82 | */ | 82 | */ |
83 | void MLKEM1024_generate_key_external_entropy( | 83 | int MLKEM1024_generate_key_external_entropy( |
84 | uint8_t out_encoded_public_key[MLKEM1024_PUBLIC_KEY_BYTES], | 84 | uint8_t out_encoded_public_key[MLKEM1024_PUBLIC_KEY_BYTES], |
85 | struct MLKEM1024_private_key *out_private_key, | 85 | struct MLKEM1024_private_key *out_private_key, |
86 | const uint8_t entropy[MLKEM_SEED_BYTES]); | 86 | const uint8_t entropy[MLKEM_SEED_BYTES]); |