mirror of
https://github.com/RustCrypto/signatures
synced 2026-06-21 13:45:42 +00:00
ed25519: use namespaced features for serde_bytes; MSRV 1.60 (#628)
Since workspaces have to be bumped to MSRV 1.60 at the same time, this also bumps the MSRV of other crates in this repo along with bumping their version numbers to `-pre`.
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
||||
- thumbv7em-none-eabi
|
||||
- wasm32-unknown-unknown
|
||||
toolchain:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
toolchain:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
@@ -60,4 +60,4 @@ jobs:
|
||||
override: true
|
||||
- run: cargo test --release --no-default-features
|
||||
- run: cargo test --release
|
||||
- run: cargo test --release --all-features
|
||||
- run: cargo test --release --all-features
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- thumbv7em-none-eabi
|
||||
- wasm32-unknown-unknown
|
||||
rust:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
- thumbv7em-none-eabi
|
||||
- wasm32-unknown-unknown
|
||||
toolchain:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
toolchain:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
- thumbv7em-none-eabi
|
||||
- wasm32-unknown-unknown
|
||||
rust:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- 1.57.0 # MSRV
|
||||
- 1.60.0 # MSRV
|
||||
- stable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.57.0
|
||||
toolchain: 1.66.0
|
||||
components: clippy
|
||||
override: true
|
||||
profile: minimal
|
||||
|
||||
Generated
+3
-3
@@ -142,7 +142,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dsa"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0-pre"
|
||||
dependencies = [
|
||||
"digest 0.10.6",
|
||||
"num-bigint-dig",
|
||||
@@ -159,7 +159,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ecdsa"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0-pre"
|
||||
dependencies = [
|
||||
"der",
|
||||
"elliptic-curve",
|
||||
@@ -489,7 +489,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rfc6979"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0-pre"
|
||||
dependencies = [
|
||||
"crypto-bigint",
|
||||
"hmac",
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dsa"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0-pre"
|
||||
description = """
|
||||
Pure Rust implementation of the Digital Signature Algorithm (DSA) as specified
|
||||
in FIPS 186-4 (Digital Signature Standard), providing RFC6979 deterministic
|
||||
@@ -12,14 +12,14 @@ readme = "README.md"
|
||||
repository = "https://github.com/RustCrypto/signatures/tree/master/dsa"
|
||||
categories = ["cryptography", "no-std"]
|
||||
keywords = ["crypto", "nist", "signature"]
|
||||
rust-version = "1.57"
|
||||
rust-version = "1.60"
|
||||
|
||||
[dependencies]
|
||||
digest = "0.10"
|
||||
num-bigint = { package = "num-bigint-dig", version = "0.8", default-features = false, features = ["prime", "rand", "zeroize"] }
|
||||
num-traits = { version = "0.2", default-features = false }
|
||||
pkcs8 = { version = "0.9", default-features = false, features = ["alloc"] }
|
||||
rfc6979 = { version = "0.3", path = "../rfc6979" }
|
||||
rfc6979 = { version = "=0.4.0-pre", path = "../rfc6979" }
|
||||
sha2 = { version = "0.10", default-features = false }
|
||||
signature = { version = "2.0, <2.1", default-features = false, features = ["alloc", "digest", "rand_core"] }
|
||||
zeroize = { version = "1.5", default-features = false }
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ USE AT YOUR OWN RISK!
|
||||
|
||||
## Minimum Supported Rust Version
|
||||
|
||||
This crate requires **Rust 1.57** at a minimum.
|
||||
This crate requires **Rust 1.60** at a minimum.
|
||||
|
||||
We may change the MSRV in the future, but it will be accompanied by a minor
|
||||
version bump.
|
||||
@@ -59,7 +59,7 @@ dual licensed as above, without any additional terms or conditions.
|
||||
[build-image]: https://github.com/RustCrypto/signatures/actions/workflows/dsa.yml/badge.svg
|
||||
[build-link]: https://github.com/RustCrypto/signatures/actions/workflows/dsa.yml
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.57+-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
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ impl VerifyingKey {
|
||||
|
||||
let w = s.mod_inverse(q)?.to_biguint().unwrap();
|
||||
|
||||
let n = (q.bits() / 8) as usize;
|
||||
let n = q.bits() / 8;
|
||||
let block_size = hash.len(); // Hash function output size
|
||||
|
||||
let z_len = min(n, block_size);
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ecdsa"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0-pre"
|
||||
description = """
|
||||
Pure Rust implementation of the Elliptic Curve Digital Signature Algorithm
|
||||
(ECDSA) as specified in FIPS 186-4 (Digital Signature Standard), providing
|
||||
@@ -13,7 +13,7 @@ readme = "README.md"
|
||||
categories = ["cryptography", "no-std"]
|
||||
keywords = ["crypto", "ecc", "nist", "secp256k1", "signature"]
|
||||
edition = "2021"
|
||||
rust-version = "1.57"
|
||||
rust-version = "1.60"
|
||||
|
||||
[dependencies]
|
||||
elliptic-curve = { version = "0.12", default-features = false, features = ["digest", "sec1"] }
|
||||
@@ -21,7 +21,7 @@ signature = { version = "2.0, <2.1", default-features = false, features = ["rand
|
||||
|
||||
# optional dependencies
|
||||
der = { version = "0.6", optional = true }
|
||||
rfc6979 = { version = "0.3", optional = true, path = "../rfc6979" }
|
||||
rfc6979 = { version = "=0.4.0-pre", optional = true, path = "../rfc6979" }
|
||||
serdect = { version = "0.1", optional = true, default-features = false, features = ["alloc"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ USE AT YOUR OWN RISK!
|
||||
|
||||
## Minimum Supported Rust Version
|
||||
|
||||
This crate requires **Rust 1.57** at a minimum.
|
||||
This crate requires **Rust 1.60** at a minimum.
|
||||
|
||||
We may change the MSRV in the future, but it will be accompanied by a minor
|
||||
version bump.
|
||||
@@ -70,7 +70,7 @@ dual licensed as above, without any additional terms or conditions.
|
||||
[build-image]: https://github.com/RustCrypto/signatures/actions/workflows/ecdsa.yml/badge.svg
|
||||
[build-link]: https://github.com/RustCrypto/signatures/actions/workflows/ecdsa.yml
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.57+-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
|
||||
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@ readme = "README.md"
|
||||
categories = ["cryptography", "no-std"]
|
||||
keywords = ["crypto", "curve25519", "ecc", "signature", "signing"]
|
||||
edition = "2021"
|
||||
rust-version = "1.57"
|
||||
rust-version = "1.60"
|
||||
|
||||
[dependencies]
|
||||
signature = { version = "2", default-features = false }
|
||||
@@ -22,7 +22,7 @@ signature = { version = "2", default-features = false }
|
||||
# optional dependencies
|
||||
pkcs8 = { version = "0.9", optional = true }
|
||||
serde = { version = "1", optional = true, default-features = false }
|
||||
serde_bytes_crate = { package = "serde_bytes", version = "0.11", optional = true }
|
||||
serde_bytes = { version = "0.11", optional = true }
|
||||
zeroize = { version = "1", optional = true, default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -36,7 +36,7 @@ rand_core = { version = "0.5", features = ["std"] }
|
||||
default = ["std"]
|
||||
alloc = ["pkcs8/alloc"]
|
||||
pem = ["alloc", "pkcs8/pem"]
|
||||
serde_bytes = ["serde", "serde_bytes_crate", "std"]
|
||||
serde_bytes = ["serde", "dep:serde_bytes"]
|
||||
std = ["signature/std"]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ Ed25519 implementations, including HSMs or Cloud KMS services.
|
||||
|
||||
## Minimum Supported Rust Version
|
||||
|
||||
This crate requires **Rust 1.57** at a minimum.
|
||||
This crate requires **Rust 1.60** at a minimum.
|
||||
|
||||
Our policy is to allow MSRV to be raised in future released without that
|
||||
qualifing as a SemVer-breaking change, but it will be accompanied by a minor
|
||||
@@ -64,7 +64,7 @@ dual licensed as above, without any additional terms or conditions.
|
||||
[build-image]: https://github.com/RustCrypto/signatures/actions/workflows/ed25519.yml/badge.svg
|
||||
[build-link]: https://github.com/RustCrypto/signatures/actions/workflows/ed25519.yml
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.57+-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
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@ use crate::{Signature, SignatureBytes};
|
||||
use ::serde::{de, ser, Deserialize, Serialize};
|
||||
use core::fmt;
|
||||
|
||||
#[cfg(feature = "serde_bytes")]
|
||||
use serde_bytes_crate as serde_bytes;
|
||||
|
||||
impl Serialize for Signature {
|
||||
fn serialize<S: ser::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
use ser::SerializeTuple;
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
use ed25519::{Signature, SignatureBytes};
|
||||
use hex_literal::hex;
|
||||
|
||||
#[cfg(feature = "serde_bytes")]
|
||||
use serde_bytes_crate as serde_bytes;
|
||||
|
||||
const EXAMPLE_SIGNATURE: SignatureBytes = hex!(
|
||||
"3f3e3d3c3b3a393837363534333231302f2e2d2c2b2a29282726252423222120"
|
||||
"1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100"
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rfc6979"
|
||||
version = "0.3.1"
|
||||
version = "0.4.0-pre"
|
||||
description = """
|
||||
Pure Rust implementation of RFC6979: Deterministic Usage of the
|
||||
Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)
|
||||
@@ -12,7 +12,7 @@ readme = "README.md"
|
||||
categories = ["cryptography", "no-std"]
|
||||
keywords = ["dsa", "ecdsa", "signature"]
|
||||
edition = "2021"
|
||||
rust-version = "1.57"
|
||||
rust-version = "1.60"
|
||||
|
||||
[dependencies]
|
||||
crypto-bigint = { version = "0.4", default-features = false, features = ["generic-array", "zeroize"] }
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ Algorithm described in RFC 6979 § 3.2:
|
||||
|
||||
## Minimum Supported Rust Version
|
||||
|
||||
This crate requires **Rust 1.57** at a minimum.
|
||||
This crate requires **Rust 1.60** at a minimum.
|
||||
|
||||
We may change the MSRV in the future, but it will be accompanied by a minor
|
||||
version bump.
|
||||
@@ -46,7 +46,7 @@ dual licensed as above, without any additional terms or conditions.
|
||||
[build-image]: https://github.com/RustCrypto/signatures/actions/workflows/rfc6979.yml/badge.svg
|
||||
[build-link]: https://github.com/RustCrypto/signatures/actions/workflows/rfc6979.yml
|
||||
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
||||
[rustc-image]: https://img.shields.io/badge/rustc-1.57+-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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user