19 Commits

Author SHA1 Message Date
Tony Arcieri 2d7866fa4c ed25519: configure and apply workspace-level lints (#1323)
Adds the workspace-level config from RustCrypto/utils#1411 to this
repo and applies it to `ed25519`.
2026-05-02 21:21:26 -06:00
Tony Arcieri e6adddcdd3 ed25519+ed448: remove bincode dev-dependency (#1120)
`bincode` is unmaintained. See https://crates.io/crates/bincode/3.0.0
2025-12-18 10:27:18 -07:00
Arthur Gautier 0e69f92b56 Upgrade all crates to the 2024 edition and bump MSRV to 1.85 (#913) 2025-02-28 20:12:00 -05:00
Tony Arcieri c5206d43db ecdsa: use EcdsaCurve in bounds (#792)
Replaces previous `PrimeCurve` bounds with the new `EcdsaCurve` trait
(which has a supertrait bound on `PrimeCurve`).
2024-01-17 16:14:01 -07:00
Alexander Kjäll 571d31fec7 ed25519: use u64 instead of usize in test (#761) 2023-11-21 10:18:22 -07:00
ashWhiteHat fb866b4933 ed448: add documentation (#750) 2023-11-12 18:41:37 -07:00
ashWhiteHat d9c304cf91 ed448: Ed448 Implementation (#727) 2023-10-15 12:47:41 -06:00
Tony Arcieri e8d4d23a43 ed25519: hexify Debug impl on Signature (#747)
Formats the `R` and `s` signature components as hexidecimal to make the
representation more compact, as requested in #723:

ed25519::Signature {
    R: 0x3f3e3d3c3b3a393837363534333231302f2e2d2c2b2a29282726252423222120,
    s: 0x1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100,
}
2023-10-15 12:47:01 -06:00
Tony Arcieri a30805e162 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`.
2023-01-21 12:33:50 -07:00
Tony Arcieri 64b75e5531 ed25519: infallible signature parsing (#623)
We've had a couple request to make signature parsing infallible.
Presently it checks that the `s` scalar component of the signature has
its three highest bits clear, which will reject some but not all
signatures where `s` overflows the curve's order.

However, this check will not reject *all* such invalid signatures (at
least as presently implemented), and the same check will be performed at
the time the signature is verified (which *will* reject all such invalid
signatures).

Though we already shipped `ed25519` v2.0.0 and this is a breaking
change, that release has been yanked so we can get this change in last
minute.
2023-01-21 09:44:50 -07:00
Tony Arcieri 1c5124a19c ed25519: store R and s components separately (#595)
Adds a `ComponentBytes` type alias for `[u8; 32]` and stores the `R` and
`s` component signatures as separate byte arrays.

This allows for simple, infallible `ComponentBytes` accessors:

- `pub fn r_bytes(&self) -> &ComponentBytes`
- `pub fn s_bytes(&self) -> &ComponentBytes`
2022-12-09 15:50:45 -07:00
Tony Arcieri 1fafac6dac ed25519: use PublicKeyBytes as KeypairBytes::public_key (#570)
Uses a newtype which knows how to encode SPKI as the public key field
2022-11-02 08:42:21 -06:00
Tony Arcieri a5bbacd683 ed25519: bump pkcs8 dependency to v0.9 (#473)
Per our SemVer policy, since this is a breaking change to the `pkcs8`
module it also bumps the minor version of this crate (currently to
v1.5.0-pre)

The MSRV with the `pkcs8` feature enabled is now 1.57
2022-05-09 07:38:00 -06:00
Tony Arcieri 40cab54bb7 ed25519: add pkcs8::PublicKeyBytes type (#455)
Adds a type for representing serialized Ed25519 public keys.

The type implements the serialization traits from the `spki` crate,
which is used for representing the public keys associated with a
PKCS#8-encoded private key.
2022-03-18 12:31:28 -06:00
Tony Arcieri 0ed65a1dff ed25519: Rust 2021 edition upgrade (#412)
Upgrades the Rust edition used by this crate to the latest available
2021-12-01 10:48:16 -07:00
Tony Arcieri 452e927738 ed25519: impl Display/LowerHex/UpperHex/FromStr for Signature (#402)
Adds support for serializing and deserializing Ed25519 signature from
hexadecimal using standard `core::{fmt, str}` traits.
2021-11-18 10:16:32 -07:00
Tony Arcieri 23947daef3 Bump pkcs8 crate; update encoding traits (#383)
Updates `pkcs8` and related crates to use the new trait names after they
were renamed in RustCrypto/formats#121.
2021-10-17 21:26:58 -06:00
Tony Arcieri 3297e5577d ed25519: add PKCS#8 support (#381)
Adds an `ed25519::pkcs8::KeypairBytes` type which impls the
`FromPrivateKey`/`ToPrivateKey` traits from the `pkcs8` crate.
2021-10-10 10:01:07 -06:00
Tony Arcieri 5286a97682 ed25519: add Signature::BYTE_SIZE + other cleanups (#380)
- Adds inherent constant `Signature::BYTE_SIZE`; deprecates
  `SIGNATURE_LENGTH` constant.
- Address TODOs
- Factor tests into `tests/`
2021-10-09 15:20:14 -06:00