From 37f7b3e4e924dde478cbfa6f927d44922d8699a9 Mon Sep 17 00:00:00 2001 From: Karolin Varner Date: Sat, 3 Aug 2024 13:56:25 +0200 Subject: [PATCH] fix: Consistently use feature flag `experiment_libcrux` Before this, some parts of the code used an incorrect feature flag name, preventing libcrux from being used. --- ciphers/src/lib.rs | 8 +++++--- ciphers/src/subtle/mod.rs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ciphers/src/lib.rs b/ciphers/src/lib.rs index 25c9cb2..58240b1 100644 --- a/ciphers/src/lib.rs +++ b/ciphers/src/lib.rs @@ -9,10 +9,12 @@ const_assert!(KEY_LEN == hash_domain::KEY_LEN); /// Authenticated encryption with associated data pub mod aead { - #[cfg(not(feature = "libcrux"))] - pub use crate::subtle::chacha20poly1305_ietf::{decrypt, encrypt, KEY_LEN, NONCE_LEN, TAG_LEN}; - #[cfg(feature = "libcrux")] + #[cfg(not(feature = "experiment_libcrux"))] pub use crate::subtle::chacha20poly1305_ietf::{decrypt, encrypt, KEY_LEN, NONCE_LEN, TAG_LEN}; + #[cfg(feature = "experiment_libcrux")] + pub use crate::subtle::chacha20poly1305_ietf_libcrux::{ + decrypt, encrypt, KEY_LEN, NONCE_LEN, TAG_LEN, + }; } /// Authenticated encryption with associated data with a constant nonce diff --git a/ciphers/src/subtle/mod.rs b/ciphers/src/subtle/mod.rs index fc82773..b716164 100644 --- a/ciphers/src/subtle/mod.rs +++ b/ciphers/src/subtle/mod.rs @@ -1,7 +1,7 @@ pub mod blake2b; -#[cfg(not(feature = "libcrux"))] +#[cfg(not(feature = "experiment_libcrux"))] pub mod chacha20poly1305_ietf; -#[cfg(feature = "libcrux")] +#[cfg(feature = "experiment_libcrux")] pub mod chacha20poly1305_ietf_libcrux; pub mod incorrect_hmac_blake2b; pub mod xchacha20poly1305_ietf;