Skip to content

Commit 03a4939

Browse files
authored
x-wing: Expose Encapsulate and Decapsulate traits from x-wing directly (#128)
Small usability PR. Using x-wing otherwise requires importing the `kem` crate directly (and syncing versions).
1 parent 311b4cd commit 03a4939

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-wing/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
2929
use core::convert::Infallible;
3030

31-
use kem::{Decapsulate, Encapsulate};
31+
pub use kem::{self, Decapsulate, Encapsulate};
3232
use ml_kem::array::ArrayN;
33-
use ml_kem::{B32, EncodedSizeUser, KemCore, MlKem768, MlKem768Params, kem};
33+
use ml_kem::{B32, EncodedSizeUser, KemCore, MlKem768, MlKem768Params};
3434
use rand_core::CryptoRng;
3535
#[cfg(feature = "os_rng")]
3636
use rand_core::{OsRng, TryRngCore};
@@ -40,8 +40,8 @@ use x25519_dalek::{EphemeralSecret, PublicKey, StaticSecret};
4040
#[cfg(feature = "zeroize")]
4141
use zeroize::{Zeroize, ZeroizeOnDrop};
4242

43-
type MlKem768DecapsulationKey = kem::DecapsulationKey<MlKem768Params>;
44-
type MlKem768EncapsulationKey = kem::EncapsulationKey<MlKem768Params>;
43+
type MlKem768DecapsulationKey = ml_kem::kem::DecapsulationKey<MlKem768Params>;
44+
type MlKem768EncapsulationKey = ml_kem::kem::EncapsulationKey<MlKem768Params>;
4545

4646
const X_WING_LABEL: &[u8; 6] = br"\.//^\";
4747

0 commit comments

Comments
 (0)