Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ed25519/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ed25519"
version = "1.3.0"
version = "1.4.0-pre"
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
description = """
Expand All @@ -10,10 +10,10 @@ decoding/encoding support
"""
documentation = "https://docs.rs/ed25519"
repository = "https://github.com/RustCrypto/signatures/tree/master/ed25519"
edition = "2018"
readme = "README.md"
categories = ["cryptography", "no-std"]
keywords = ["crypto", "curve25519", "ecc", "signature", "signing"]
edition = "2021"
rust-version = "1.56"

[dependencies]
Expand Down
22 changes: 17 additions & 5 deletions ed25519/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
[Edwards Digital Signature Algorithm (EdDSA)][1] over Curve25519 as specified
in [RFC 8032][2].

[Documentation][docs-link]

## About

This crate doesn't contain an implementation of Ed25519, but instead
contains an [`ed25519::Signature`][3] type which other crates can use in
conjunction with the [`signature::Signer`][4] and [`signature::Verifier`][5]
Expand All @@ -20,14 +24,22 @@ to be written abstractly in such a way that different signer/verifier
providers can be plugged in, enabling support for using different
Ed25519 implementations, including HSMs or Cloud KMS services.

[Documentation][docs-link]

## Minimum Supported Rust Version

This crate requires **Rust 1.56** at a minimum.
This crate requires **Rust 1.56** at a minimum as it is a Rust 2021 edition crate.

Previous 1.x releases of this crate supported an MSRV of 1.47. If you would
like to use this crate with earlier releases of Rust, use the following version
constraint in your project's Cargo.toml to constrain it to the supported
version range:

```toml
[dependencies]
ed25519 = ">=1, <1.4" # ed25519 1.4 requires MSRV 1.56
```

We may change the MSRV in the future, but it will be accompanied by a minor
version bump.
Note that is our policy that we may change the MSRV in the future, but it will
be accompanied by a minor version bump.

## License

Expand Down
31 changes: 4 additions & 27 deletions ed25519/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
//! Ed25519 signatures.
//!
//! Edwards Digital Signature Algorithm (EdDSA) over Curve25519 as specified in
//! RFC 8032: <https://tools.ietf.org/html/rfc8032>
//!
//! This crate doesn't contain an implementation of Ed25519, but instead
//! contains an [`ed25519::Signature`][`Signature`] type which other crates can
//! use in conjunction with the [`signature::Signer`] and
//! [`signature::Verifier`] traits defined in the [`signature`] crate.
//!
//! These traits allow crates which produce and consume Ed25519 signatures
//! to be written abstractly in such a way that different signing_key/verifier
//! providers can be plugged in, enabling support for using different
//! Ed25519 implementations, including HSMs or Cloud KMS services.
//!
//! ## Minimum Supported Rust Version
//!
//! Rust **1.56** or higher.
//!
//! Minimum supported Rust version may be changed in the future, but such
//! changes will be accompanied with a minor version bump.
//!
#![doc = include_str!("../README.md")]

//! # Using Ed25519 generically over algorithm implementations/providers
//!
//! By using the `ed25519` crate, you can write code which signs and verifies
Expand Down Expand Up @@ -272,7 +252,7 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png",
html_root_url = "https://docs.rs/ed25519/1.3.0"
html_root_url = "https://docs.rs/ed25519/1.4.0-pre"
)]
#![forbid(unsafe_code)]
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
Expand All @@ -286,10 +266,7 @@ pub use signature::{self, Error};
#[cfg(feature = "pkcs8")]
pub use crate::pkcs8::KeypairBytes;

use core::{
convert::{TryFrom, TryInto},
fmt, str,
};
use core::{fmt, str};

#[cfg(feature = "serde")]
use serde::{de, ser, Deserialize, Serialize};
Expand Down
5 changes: 1 addition & 4 deletions ed25519/src/pkcs8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ pub use pkcs8::DecodePrivateKey;
#[cfg(feature = "alloc")]
pub use pkcs8::EncodePrivateKey;

use core::{
convert::{TryFrom, TryInto},
fmt,
};
use core::fmt;
use pkcs8::ObjectIdentifier;

#[cfg(feature = "zeroize")]
Expand Down
6 changes: 2 additions & 4 deletions ed25519/tests/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#![cfg(feature = "serde")]

use ed25519::Signature;
use signature::Signature as _;
use std::{convert::TryFrom, vec::Vec};

#[cfg(feature = "serde_bytes")]
use serde_bytes_crate as serde_bytes;
Expand All @@ -25,7 +23,7 @@ fn test_serialize() {
#[test]
fn test_deserialize() {
let signature = bincode::deserialize::<Signature>(&EXAMPLE_SIGNATURE).unwrap();
assert_eq!(&EXAMPLE_SIGNATURE[..], signature.as_bytes());
assert_eq!(&EXAMPLE_SIGNATURE[..], signature.as_ref());
}

#[cfg(feature = "serde_bytes")]
Expand Down Expand Up @@ -62,5 +60,5 @@ fn test_deserialize_bytes() {

let signature: Signature = serde_bytes::deserialize(&mut deserializer).unwrap();

assert_eq!(&EXAMPLE_SIGNATURE[..], signature.as_bytes());
assert_eq!(&EXAMPLE_SIGNATURE[..], signature.as_ref());
}