diff --git a/common/db/Cargo.toml b/common/db/Cargo.toml index 77b46fd6..e2adffe1 100644 --- a/common/db/Cargo.toml +++ b/common/db/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/common/db" authors = ["Luke Parker "] keywords = [] edition = "2021" +rust-version = "1.65" [package.metadata.docs.rs] all-features = true diff --git a/common/env/Cargo.toml b/common/env/Cargo.toml index 7e40073b..010b933b 100644 --- a/common/env/Cargo.toml +++ b/common/env/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/common/env" authors = ["Luke Parker "] keywords = [] edition = "2021" +rust-version = "1.60" [package.metadata.docs.rs] all-features = true diff --git a/common/std-shims/Cargo.toml b/common/std-shims/Cargo.toml index b7d3abbe..efad19ab 100644 --- a/common/std-shims/Cargo.toml +++ b/common/std-shims/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/common/std-shims" authors = ["Luke Parker "] keywords = ["nostd", "no_std", "alloc", "io"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true diff --git a/common/zalloc/Cargo.toml b/common/zalloc/Cargo.toml index c639e341..c8076df5 100644 --- a/common/zalloc/Cargo.toml +++ b/common/zalloc/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/common/zalloc" authors = ["Luke Parker "] keywords = [] edition = "2021" +rust-version = "1.60" [package.metadata.docs.rs] all-features = true diff --git a/crypto/ciphersuite/Cargo.toml b/crypto/ciphersuite/Cargo.toml index d6dfdbfe..a3bd0582 100644 --- a/crypto/ciphersuite/Cargo.toml +++ b/crypto/ciphersuite/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ciphersuite authors = ["Luke Parker "] keywords = ["ciphersuite", "ff", "group"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true diff --git a/crypto/dalek-ff-group/Cargo.toml b/crypto/dalek-ff-group/Cargo.toml index c4aaa7e4..4c6317f4 100644 --- a/crypto/dalek-ff-group/Cargo.toml +++ b/crypto/dalek-ff-group/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dalek-ff-gr authors = ["Luke Parker "] keywords = ["curve25519", "ed25519", "ristretto", "dalek", "group"] edition = "2021" +rust-version = "1.65" [package.metadata.docs.rs] all-features = true diff --git a/crypto/dkg/Cargo.toml b/crypto/dkg/Cargo.toml index dbbabd1f..390c3bbe 100644 --- a/crypto/dkg/Cargo.toml +++ b/crypto/dkg/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dkg" authors = ["Luke Parker "] keywords = ["dkg", "multisig", "threshold", "ff", "group"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true diff --git a/crypto/dleq/Cargo.toml b/crypto/dleq/Cargo.toml index c5dfd06d..77ea5e44 100644 --- a/crypto/dleq/Cargo.toml +++ b/crypto/dleq/Cargo.toml @@ -6,6 +6,7 @@ license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dleq" authors = ["Luke Parker "] edition = "2021" +rust-version = "1.66" [package.metadata.docs.rs] all-features = true diff --git a/crypto/ed448/Cargo.toml b/crypto/ed448/Cargo.toml index 17f42c01..44558ad3 100644 --- a/crypto/ed448/Cargo.toml +++ b/crypto/ed448/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ed448" authors = ["Luke Parker "] keywords = ["ed448", "ff", "group"] edition = "2021" +rust-version = "1.65" [package.metadata.docs.rs] all-features = true diff --git a/crypto/ed448/src/scalar.rs b/crypto/ed448/src/scalar.rs index b0078285..ec8d0ad4 100644 --- a/crypto/ed448/src/scalar.rs +++ b/crypto/ed448/src/scalar.rs @@ -54,7 +54,9 @@ field!( impl Scalar { /// Perform a wide reduction to obtain a non-biased Scalar. pub fn wide_reduce(bytes: [u8; 114]) -> Scalar { - let wide = U1024::from_le_slice(&[bytes.as_ref(), &[0; 14]].concat()); + let mut bytes_128 = [0; 128]; + bytes_128[.. 114].copy_from_slice(&bytes); + let wide = U1024::from_le_slice(&bytes_128); Scalar(Residue::new(&U448::from_le_slice( &wide.rem(&WIDE_REDUCTION_MODULUS).to_le_bytes()[.. 56], ))) diff --git a/crypto/ff-group-tests/Cargo.toml b/crypto/ff-group-tests/Cargo.toml index 3e50531e..e998fbfa 100644 --- a/crypto/ff-group-tests/Cargo.toml +++ b/crypto/ff-group-tests/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ff-group-te authors = ["Luke Parker "] keywords = ["ff", "group", "ecc"] edition = "2021" +rust-version = "1.60" [package.metadata.docs.rs] all-features = true @@ -17,6 +18,7 @@ rand_core = "0.6" subtle = "^2.4" +ff = { version = "0.13", features = ["bits"] } group = "0.13" [dev-dependencies] diff --git a/crypto/frost/Cargo.toml b/crypto/frost/Cargo.toml index 89233750..8db51b9c 100644 --- a/crypto/frost/Cargo.toml +++ b/crypto/frost/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/frost" authors = ["Luke Parker "] keywords = ["frost", "multisig", "threshold"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true diff --git a/crypto/multiexp/Cargo.toml b/crypto/multiexp/Cargo.toml index 9d316d3d..c254ce19 100644 --- a/crypto/multiexp/Cargo.toml +++ b/crypto/multiexp/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/multiexp" authors = ["Luke Parker "] keywords = ["multiexp", "ff", "group"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true @@ -31,7 +32,7 @@ k256 = { version = "^0.13.1", default-features = false, features = ["arithmetic" dalek-ff-group = { path = "../dalek-ff-group" } [features] -std = ["std-shims/std"] +std = ["std-shims/std", "zeroize/std"] batch = ["rand_core"] diff --git a/crypto/schnorr/Cargo.toml b/crypto/schnorr/Cargo.toml index f687ad5a..f0f2b183 100644 --- a/crypto/schnorr/Cargo.toml +++ b/crypto/schnorr/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/schnorr" authors = ["Luke Parker "] keywords = ["schnorr", "ff", "group"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true diff --git a/crypto/schnorrkel/Cargo.toml b/crypto/schnorrkel/Cargo.toml index bf611bc8..5cff6e11 100644 --- a/crypto/schnorrkel/Cargo.toml +++ b/crypto/schnorrkel/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/schnorrkel" authors = ["Luke Parker "] keywords = ["frost", "multisig", "threshold", "schnorrkel"] edition = "2021" +rust-version = "1.70" [package.metadata.docs.rs] all-features = true diff --git a/crypto/transcript/Cargo.toml b/crypto/transcript/Cargo.toml index a9db75ce..1b38b206 100644 --- a/crypto/transcript/Cargo.toml +++ b/crypto/transcript/Cargo.toml @@ -7,6 +7,7 @@ repository = "https://github.com/serai-dex/serai/tree/develop/crypto/transcript" authors = ["Luke Parker "] keywords = ["transcript"] edition = "2021" +rust-version = "1.66" [package.metadata.docs.rs] all-features = true