Skip to content

Commit 10fbc95

Browse files
Rust wrapper: add comment to MlKem about not implementing Send/Sync
Fixes F-1072.
1 parent 85ad08a commit 10fbc95

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • wrapper/rust/wolfssl-wolfcrypt/src

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ use zeroize::Zeroize;
7373
///
7474
/// An instance is created with [`MlKem::generate()`],
7575
/// [`MlKem::generate_with_random()`], or [`MlKem::new()`].
76+
///
77+
/// This struct does not implement Send or Sync because it is not safe in the
78+
/// general case to access the underlying C API from multiple threads
79+
/// concurrently.
7680
pub struct MlKem {
7781
ws_key: *mut sys::MlKemKey,
7882
}

0 commit comments

Comments
 (0)