diff --git a/crypto/ciphersuite/Cargo.toml b/crypto/ciphersuite/Cargo.toml index 91cd67b2..538e1fa0 100644 --- a/crypto/ciphersuite/Cargo.toml +++ b/crypto/ciphersuite/Cargo.toml @@ -21,20 +21,20 @@ zeroize = { version = "^1.5", default-features = false } subtle = { version = "^2.4", default-features = false } digest = { version = "0.10", default-features = false } -transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3" } +transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3", default-features = false } sha2 = { version = "0.10", default-features = false, optional = true } sha3 = { version = "0.10", default-features = false, optional = true } ff = { version = "0.13", default-features = false, features = ["bits"] } group = { version = "0.13", default-features = false } -dalek-ff-group = { path = "../dalek-ff-group", version = "0.3", optional = true } +dalek-ff-group = { path = "../dalek-ff-group", version = "0.3", default-features = false, optional = true } elliptic-curve = { version = "0.13", default-features = false, features = ["hash2curve"], optional = true } p256 = { version = "^0.13.1", default-features = false, features = ["arithmetic", "bits", "hash2curve"], optional = true } k256 = { version = "^0.13.1", default-features = false, features = ["arithmetic", "bits", "hash2curve"], optional = true } -minimal-ed448 = { path = "../ed448", version = "0.3", optional = true } +minimal-ed448 = { path = "../ed448", version = "0.3", default-features = false, optional = true } [dev-dependencies] hex = "0.4" diff --git a/crypto/dkg/Cargo.toml b/crypto/dkg/Cargo.toml index bbc9ee33..c7c1be77 100644 --- a/crypto/dkg/Cargo.toml +++ b/crypto/dkg/Cargo.toml @@ -27,16 +27,17 @@ transcript = { package = "flexible-transcript", path = "../transcript", version chacha20 = { version = "0.9", default-features = false, features = ["zeroize"] } ciphersuite = { path = "../ciphersuite", version = "0.3", default-features = false } -multiexp = { path = "../multiexp", version = "0.3", default-features = false, features = ["batch"] } +multiexp = { path = "../multiexp", version = "0.3", default-features = false } -schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.4" } -dleq = { path = "../dleq", version = "0.3", default-features = false, features = ["serialize"] } +schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.4", default-features = false } +dleq = { path = "../dleq", version = "0.3", default-features = false } [dev-dependencies] +rand_core = { version = "0.6", default-features = false, features = ["getrandom"] } ciphersuite = { path = "../ciphersuite", version = "0.3", default-features = false, features = ["ristretto"] } [features] -std = ["thiserror", "std-shims/std", "ciphersuite/std", "multiexp/std", "schnorr/std", "dleq/std"] +std = ["thiserror", "rand_core/std", "std-shims/std", "ciphersuite/std", "multiexp/[batch, std]", "schnorr/std", "dleq/serialize"] serde = ["dep:serde"] tests = ["rand_core/getrandom"] default = ["std"] diff --git a/crypto/dkg/src/lib.rs b/crypto/dkg/src/lib.rs index 7f6a7c48..303bd120 100644 --- a/crypto/dkg/src/lib.rs +++ b/crypto/dkg/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![doc = include_str!("../README.md")] +#![cfg_attr(not(feature = "std"), no_std)] use core::fmt::{self, Debug}; diff --git a/crypto/dleq/Cargo.toml b/crypto/dleq/Cargo.toml index b5b0fc33..c5dfd06d 100644 --- a/crypto/dleq/Cargo.toml +++ b/crypto/dleq/Cargo.toml @@ -15,22 +15,23 @@ rustdoc-args = ["--cfg", "docsrs"] rustversion = "1" thiserror = { version = "1", optional = true } -rand_core = "0.6" +rand_core = { version = "0.6", default-features = false } -zeroize = { version = "^1.5", features = ["zeroize_derive"] } +zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] } -digest = "0.10" +digest = { version = "0.10", default-features = false } +transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3", default-features = false } -transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3" } +ff = { version = "0.13", default-features = false } +group = { version = "0.13", default-features = false } -ff = "0.13" -group = "0.13" - -multiexp = { path = "../multiexp", version = "0.3", features = ["batch"], optional = true } +multiexp = { path = "../multiexp", version = "0.3", default-features = false, features = ["batch"], optional = true } [dev-dependencies] hex-literal = "0.4" +rand_core = { version = "0.6", features = ["getrandom"] } + blake2 = "0.10" k256 = { version = "^0.13.1", default-features = false, features = ["std", "arithmetic", "bits"] } diff --git a/crypto/multiexp/Cargo.toml b/crypto/multiexp/Cargo.toml index b26969f6..9d316d3d 100644 --- a/crypto/multiexp/Cargo.toml +++ b/crypto/multiexp/Cargo.toml @@ -17,7 +17,7 @@ rustversion = "1" std-shims = { path = "../../common/std-shims", version = "0.1", default-features = false } -zeroize = { version = "^1.5", features = ["zeroize_derive"] } +zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] } ff = { version = "0.13", default-features = false, features = ["bits"] } group = { version = "0.13", default-features = false } diff --git a/crypto/schnorr/Cargo.toml b/crypto/schnorr/Cargo.toml index 4bb46c37..06d34158 100644 --- a/crypto/schnorr/Cargo.toml +++ b/crypto/schnorr/Cargo.toml @@ -17,7 +17,7 @@ std-shims = { path = "../../common/std-shims", version = "0.1", default-features rand_core = { version = "0.6", default-features = false } -zeroize = { version = "^1.5", features = ["zeroize_derive"] } +zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] } transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3", default-features = false } diff --git a/tests/no-std/Cargo.toml b/tests/no-std/Cargo.toml index 3b5b7246..834ddc4e 100644 --- a/tests/no-std/Cargo.toml +++ b/tests/no-std/Cargo.toml @@ -23,11 +23,11 @@ ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, fea multiexp = { path = "../../crypto/multiexp", default-features = false, features = ["batch"] } -# dleq = { path = "../../crypto/dleq" } +dleq = { path = "../../crypto/dleq", default-features = false } schnorr-signatures = { path = "../../crypto/schnorr", default-features = false } dkg = { path = "../../crypto/dkg", default-features = false } -# modular-frost = { path = "../../crypto/frost" } -# frost-schnorrkel = { path = "../../crypto/schnorrkel" } +# modular-frost = { path = "../../crypto/frost", default-features = false } +# frost-schnorrkel = { path = "../../crypto/schnorrkel", default-features = false } monero-generators = { path = "../../coins/monero/generators", default-features = false, features = ["alloc"] } diff --git a/tests/no-std/src/lib.rs b/tests/no-std/src/lib.rs index 71d0b185..aa63223e 100644 --- a/tests/no-std/src/lib.rs +++ b/tests/no-std/src/lib.rs @@ -9,11 +9,11 @@ pub use ciphersuite; pub use multiexp; -// pub use dleq; +pub use dleq; pub use schnorr_signatures; -/* pub use dkg; +/* pub use modular_frost; pub use frost_schnorrkel; */