Skip to content

Commit fc677d7

Browse files
authored
Merge pull request wolfSSL#9833 from holtrop-wolfssl/rust-ml-kem
Rust wrapper: add mlkem module
2 parents ed8f67c + a87446c commit fc677d7

File tree

6 files changed

+1138
-0
lines changed

6 files changed

+1138
-0
lines changed

.github/workflows/rust-wrapper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
'',
4040
'--enable-all',
4141
'--enable-all --enable-dilithium',
42+
'--enable-all --enable-mlkem',
4243
'--enable-cryptonly --disable-examples',
4344
'--enable-cryptonly --disable-examples --disable-aes --disable-aesgcm',
4445
'--enable-cryptonly --disable-examples --disable-aescbc',

wrapper/rust/wolfssl-wolfcrypt/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ fn scan_cfg() -> Result<()> {
328328
check_cfg(&binding, "DILITHIUM_SEED_SZ", "dilithium_make_key_seed_sz");
329329
check_cfg(&binding, "DILITHIUM_RND_SZ", "dilithium_rnd_sz");
330330

331+
/* mlkem / ML-KEM */
332+
check_cfg(&binding, "wc_MlKemKey_Init", "mlkem");
333+
331334
/* sha */
332335
check_cfg(&binding, "wc_InitSha", "sha");
333336
check_cfg(&binding, "wc_InitSha224", "sha224");

wrapper/rust/wolfssl-wolfcrypt/headers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
#include "wolfssl/wolfcrypt/aes.h"
2121
#include "wolfssl/wolfcrypt/pwdbased.h"
2222
#include "wolfssl/wolfcrypt/dilithium.h"
23+
#include "wolfssl/wolfcrypt/mlkem.h"

wrapper/rust/wolfssl-wolfcrypt/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pub mod fips;
3737
pub mod hkdf;
3838
pub mod hmac;
3939
pub mod kdf;
40+
pub mod mlkem;
4041
pub mod prf;
4142
pub mod random;
4243
pub mod rsa;

0 commit comments

Comments
 (0)