mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-05 20:40:02 -08:00
add fine-grained features
This commit is contained in:
28
Cargo.lock
generated
28
Cargo.lock
generated
@@ -359,9 +359,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.30"
|
version = "4.5.31"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "92b7b18d71fad5313a1e320fa9897994228ce274b60faa4d694fe0ea89cd9e6d"
|
checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
@@ -369,9 +369,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.30"
|
version = "4.5.31"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c"
|
checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
@@ -381,9 +381,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_complete"
|
name = "clap_complete"
|
||||||
version = "4.5.45"
|
version = "4.5.46"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1e3040c8291884ddf39445dc033c70abc2bc44a42f0a3a00571a0f483a83f0cd"
|
checksum = "f5c5508ea23c5366f77e53f5a0070e5a84e51687ec3ef9e0464c86dc8d13ce98"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
]
|
]
|
||||||
@@ -408,9 +408,9 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_mangen"
|
name = "clap_mangen"
|
||||||
version = "0.2.24"
|
version = "0.2.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fbae9cbfdc5d4fa8711c09bd7b83f644cb48281ac35bf97af3e47b0675864bdf"
|
checksum = "724842fa9b144f9b89b3f3d371a89f3455eea660361d13a554f68f8ae5d6c13a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"roff",
|
"roff",
|
||||||
@@ -747,9 +747,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "either"
|
name = "either"
|
||||||
version = "1.13.0"
|
version = "1.14.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "embedded-io"
|
name = "embedded-io"
|
||||||
@@ -1208,9 +1208,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.169"
|
version = "0.2.170"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libcrux"
|
name = "libcrux"
|
||||||
@@ -2673,9 +2673,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.14.0"
|
version = "1.15.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "93d59ca99a559661b96bf898d8fce28ed87935fd2bea9f05983c1464dd6c71b1"
|
checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom 0.3.1",
|
"getrandom 0.3.1",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -10,12 +10,16 @@ repository = "https://github.com/rosenpass/rosenpass"
|
|||||||
readme = "readme.md"
|
readme = "readme.md"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
experiment_libcrux = [
|
#default = ["experiment_libcrux_all"]
|
||||||
"dep:libcrux",
|
|
||||||
"dep:libcrux-blake2",
|
experiment_libcrux_all = [
|
||||||
"dep:libcrux-chacha20poly1305",
|
"experiment_libcrux_blake2",
|
||||||
"dep:libcrux-ml-kem",
|
"experiment_libcrux_chachapoly",
|
||||||
|
"experiment_libcrux_kyber",
|
||||||
]
|
]
|
||||||
|
experiment_libcrux_blake2 = ["dep:libcrux-blake2"]
|
||||||
|
experiment_libcrux_chachapoly = ["dep:libcrux-chacha20poly1305", "dep:libcrux"]
|
||||||
|
experiment_libcrux_kyber = ["dep:libcrux-ml-kem", "dep:rand"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
@@ -31,10 +35,10 @@ chacha20poly1305 = { workspace = true }
|
|||||||
blake2 = { workspace = true }
|
blake2 = { workspace = true }
|
||||||
libcrux = { workspace = true, optional = true }
|
libcrux = { workspace = true, optional = true }
|
||||||
libcrux-chacha20poly1305 = { workspace = true, optional = true }
|
libcrux-chacha20poly1305 = { workspace = true, optional = true }
|
||||||
rand = { workspace = true }
|
|
||||||
libcrux-blake2 = { workspace = true, optional = true }
|
libcrux-blake2 = { workspace = true, optional = true }
|
||||||
libcrux-ml-kem = { workspace = true, optional = true, features = ["kyber"] }
|
libcrux-ml-kem = { workspace = true, optional = true, features = ["kyber"] }
|
||||||
sha3 = { workspace = true }
|
sha3 = { workspace = true }
|
||||||
|
rand = { workspace = true, optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand = { workspace = true }
|
rand = { workspace = true }
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ pub use crate::subtle::keyed_hash::KeyedHash;
|
|||||||
|
|
||||||
/// Authenticated encryption with associated data (AEAD)
|
/// Authenticated encryption with associated data (AEAD)
|
||||||
/// Chacha20poly1305 is used.
|
/// Chacha20poly1305 is used.
|
||||||
#[cfg(feature = "experiment_libcrux")]
|
#[cfg(feature = "experiment_libcrux_chachapoly")]
|
||||||
pub use subtle::libcrux::chacha20poly1305_ietf::ChaCha20Poly1305 as Aead;
|
pub use subtle::libcrux::chacha20poly1305_ietf::ChaCha20Poly1305 as Aead;
|
||||||
|
|
||||||
/// Authenticated encryption with associated data (AEAD)
|
/// Authenticated encryption with associated data (AEAD)
|
||||||
/// Chacha20poly1305 is used.
|
/// Chacha20poly1305 is used.
|
||||||
#[cfg(not(feature = "experiment_libcrux"))]
|
#[cfg(not(feature = "experiment_libcrux_chachapoly"))]
|
||||||
pub use crate::subtle::rust_crypto::chacha20poly1305_ietf::ChaCha20Poly1305 as Aead;
|
pub use crate::subtle::rust_crypto::chacha20poly1305_ietf::ChaCha20Poly1305 as Aead;
|
||||||
|
|
||||||
/// Authenticated encryption with associated data with a extended-length nonce (XAEAD)
|
/// Authenticated encryption with associated data with a extended-length nonce (XAEAD)
|
||||||
@@ -38,6 +38,9 @@ pub use rosenpass_oqs::ClassicMceliece460896 as StaticKem;
|
|||||||
/// Use Kyber-512 as the Static KEM
|
/// Use Kyber-512 as the Static KEM
|
||||||
///
|
///
|
||||||
/// See [rosenpass_oqs::Kyber512] for more details.
|
/// See [rosenpass_oqs::Kyber512] for more details.
|
||||||
|
#[cfg(not(feature = "experiment_libcrux_kyber"))]
|
||||||
pub use rosenpass_oqs::Kyber512 as EphemeralKem;
|
pub use rosenpass_oqs::Kyber512 as EphemeralKem;
|
||||||
|
#[cfg(feature = "experiment_libcrux_kyber")]
|
||||||
|
pub use subtle::libcrux::kyber512::Kyber512 as EphemeralKem;
|
||||||
|
|
||||||
pub mod hash_domain;
|
pub mod hash_domain;
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
//! Implementations backed by libcrux, a verified crypto library
|
//! Implementations backed by libcrux, a verified crypto library
|
||||||
|
|
||||||
|
#[cfg(feature = "experiment_libcrux_blake2")]
|
||||||
pub mod blake2b;
|
pub mod blake2b;
|
||||||
|
|
||||||
|
#[cfg(feature = "experiment_libcrux_chachapoly")]
|
||||||
pub mod chacha20poly1305_ietf;
|
pub mod chacha20poly1305_ietf;
|
||||||
|
|
||||||
|
#[cfg(feature = "experiment_libcrux_kyber")]
|
||||||
pub mod kyber512;
|
pub mod kyber512;
|
||||||
|
|||||||
@@ -6,5 +6,9 @@ pub use rust_crypto::{blake2b, keyed_shake256};
|
|||||||
pub mod custom;
|
pub mod custom;
|
||||||
pub mod rust_crypto;
|
pub mod rust_crypto;
|
||||||
|
|
||||||
#[cfg(feature = "experiment_libcrux")]
|
#[cfg(any(
|
||||||
|
feature = "experiment_libcrux_blake2",
|
||||||
|
feature = "experiment_libcrux_chachapoly",
|
||||||
|
feature = "experiment_libcrux_kyber"
|
||||||
|
))]
|
||||||
pub mod libcrux;
|
pub mod libcrux;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ publish = false
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
experiment_libcrux = ["rosenpass-ciphers/experiment_libcrux"]
|
experiment_libcrux = ["rosenpass-ciphers/experiment_libcrux_all"]
|
||||||
|
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
cargo-fuzz = true
|
cargo-fuzz = true
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ required-features = ["experiment_api", "internal_testing"]
|
|||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
name = "gen-ipc-msg-types"
|
name = "gen-ipc-msg-types"
|
||||||
required-features = ["experiment_api", "internal_testing", "internal_bin_gen_ipc_msg_types"]
|
required-features = [
|
||||||
|
"experiment_api",
|
||||||
|
"internal_testing",
|
||||||
|
"internal_bin_gen_ipc_msg_types",
|
||||||
|
]
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "handshake"
|
name = "handshake"
|
||||||
@@ -81,9 +85,14 @@ tempfile = { workspace = true }
|
|||||||
rustix = { workspace = true }
|
rustix = { workspace = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
#default = ["experiment_libcrux_all"]
|
||||||
experiment_memfd_secret = ["rosenpass-wireguard-broker/experiment_memfd_secret"]
|
experiment_memfd_secret = ["rosenpass-wireguard-broker/experiment_memfd_secret"]
|
||||||
experiment_libcrux = ["rosenpass-ciphers/experiment_libcrux"]
|
experiment_libcrux_all = ["rosenpass-ciphers/experiment_libcrux_all"]
|
||||||
|
experiment_libcrux_blake2 = ["rosenpass-ciphers/experiment_libcrux_blake2"]
|
||||||
|
experiment_libcrux_chachapoly = [
|
||||||
|
"rosenpass-ciphers/experiment_libcrux_chachapoly",
|
||||||
|
]
|
||||||
|
experiment_libcrux_kyber = ["rosenpass-ciphers/experiment_libcrux_kyber"]
|
||||||
experiment_api = [
|
experiment_api = [
|
||||||
"hex-literal",
|
"hex-literal",
|
||||||
"uds",
|
"uds",
|
||||||
|
|||||||
@@ -43,4 +43,4 @@ stacker = { workspace = true }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
experiment_memfd_secret = []
|
experiment_memfd_secret = []
|
||||||
experiment_libcrux = ["rosenpass-ciphers/experiment_libcrux"]
|
experiment_libcrux = ["rosenpass-ciphers/experiment_libcrux_all"]
|
||||||
|
|||||||
Reference in New Issue
Block a user