diff --git a/.github/workflows/async-signature.yml b/.github/workflows/async-signature.yml index 497530a18..9d7da9f11 100644 --- a/.github/workflows/async-signature.yml +++ b/.github/workflows/async-signature.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: rust: - - 1.56.0 # MSRV + - 1.60.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/signature.yml b/.github/workflows/signature.yml index 4816bd0e8..43cd3651e 100644 --- a/.github/workflows/signature.yml +++ b/.github/workflows/signature.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: rust: - - 1.56.0 # MSRV + - 1.60.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -51,7 +51,7 @@ jobs: strategy: matrix: rust: - - 1.56.0 # MSRV + - 1.60.0 # MSRV - stable steps: - uses: actions/checkout@v4 @@ -69,7 +69,7 @@ jobs: strategy: matrix: rust: - - 1.56.0 # MSRV + - 1.60.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index e4cda3420..eda87ab96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,11 @@ members = [ "elliptic-curve", "kem", "password-hash", + "signature", + "signature/async", ] # TODO: re-add to `members` when MSRV has been bumped to 1.60+ exclude = [ - "signature", - "signature/async", "universal-hash", ] diff --git a/signature/Cargo.lock b/signature/Cargo.lock deleted file mode 100644 index 470272724..000000000 --- a/signature/Cargo.lock +++ /dev/null @@ -1,189 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "async-signature" -version = "0.3.0" -dependencies = [ - "async-trait", - "signature", -] - -[[package]] -name = "async-trait" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d042b64fd281d31d58e80ac29426e114ae8eead17beb12fbd396a1d04eee84" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.0", -] - -[[package]] -name = "block-buffer" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "hex-literal" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc38ca401ca1b8d89ff1185e39a132e5c4f86d844c0cf6364251576f2d7fa0c1" - -[[package]] -name = "libc" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36" - -[[package]] -name = "proc-macro2" -version = "1.0.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - -[[package]] -name = "sha2" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "signature" -version = "2.1.0" -dependencies = [ - "digest", - "hex-literal", - "rand_core", - "sha2", - "signature_derive", -] - -[[package]] -name = "signature_derive" -version = "2.0.1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.0", -] - -[[package]] -name = "syn" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8c8eab7d9f493cd89d4068085651d81ac7d39c56eb64f7158ea514b156e280" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "syn" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cff13bb1732bccfe3b246f3fdb09edfd51c01d6f5299b7ccd9457c2e4e37774" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "typenum" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" - -[[package]] -name = "unicode-ident" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" - -[[package]] -name = "unicode-xid" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" - -[[package]] -name = "version_check" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" diff --git a/signature/Cargo.toml b/signature/Cargo.toml index 0b1427dd5..6f736f995 100644 --- a/signature/Cargo.toml +++ b/signature/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "signature" description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)" -version = "2.1.0" +version = "2.2.0-pre" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" documentation = "https://docs.rs/signature" @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"] categories = ["cryptography", "no-std"] edition = "2021" -rust-version = "1.56" +rust-version = "1.60" [dependencies] derive = { package = "signature_derive", version = "2", optional = true, path = "derive" } @@ -23,7 +23,7 @@ sha2 = { version = "0.10", default-features = false } [features] alloc = [] -std = ["alloc"] +std = ["alloc", "rand_core?/std"] [package.metadata.docs.rs] all-features = true diff --git a/signature/README.md b/signature/README.md index 6f205d603..b0f6fa6f5 100644 --- a/signature/README.md +++ b/signature/README.md @@ -17,7 +17,7 @@ the [RustCrypto] organization, as well as [`ed25519-dalek`]. ## Minimum Supported Rust Version -Rust **1.56** or higher. +Rust **1.65** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. @@ -56,7 +56,7 @@ dual licensed as above, without any additional terms or conditions. [build-image]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml/badge.svg [build-link]: https://github.com/RustCrypto/traits/actions/workflows/signature.yml [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.65+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260048-signatures diff --git a/signature/async/Cargo.toml b/signature/async/Cargo.toml index 2fa5df953..260e540b1 100644 --- a/signature/async/Cargo.toml +++ b/signature/async/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "async-signature" description = "Traits for cryptographic signature algorithms (e.g. ECDSA, Ed25519)" -version = "0.3.0" +version = "0.4.0-pre" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" documentation = "https://docs.rs/async-signature" @@ -10,11 +10,11 @@ readme = "README.md" keywords = ["crypto", "ecdsa", "ed25519", "signature", "signing"] categories = ["cryptography", "no-std"] edition = "2021" -rust-version = "1.56" +rust-version = "1.60" [dependencies] async-trait = "0.1.9" -signature = { version = "2.0, <2.2", path = ".." } +signature = { version = "=2.2.0-pre", path = ".." } [features] digest = ["signature/digest"] diff --git a/signature/async/README.md b/signature/async/README.md index 135e6241a..55b6e64c1 100644 --- a/signature/async/README.md +++ b/signature/async/README.md @@ -9,7 +9,7 @@ ## Minimum Supported Rust Version -Rust **1.56** or higher. +Rust **1.60** or higher. Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump. @@ -36,7 +36,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/async-signature/badge.svg [docs-link]: https://docs.rs/async-signature/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260048-signatures [build-image]: https://github.com/RustCrypto/traits/workflows/async-signature/badge.svg?branch=master&event=push diff --git a/signature/src/error.rs b/signature/src/error.rs index 1bfaf33bf..6518f17b8 100644 --- a/signature/src/error.rs +++ b/signature/src/error.rs @@ -93,6 +93,19 @@ impl From> for Error { } } +#[cfg(feature = "rand_core")] +impl From for Error { + #[cfg(not(feature = "std"))] + fn from(_source: rand_core::Error) -> Error { + Error::new() + } + + #[cfg(feature = "std")] + fn from(source: rand_core::Error) -> Error { + Error::from_source(source) + } +} + #[cfg(feature = "std")] impl std::error::Error for Error { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {