commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
efff50c2d8c7fa949d8d3c34abc9b349b1b50419
Tony Arcieri
2023-01-23T01:30:32
ecdsa: add `*Signer` impls that return `RecoveryId` (#636) Allows computing recoverable signatures using the `*Signer` traits, using a 2-tuple of `Signature` and `RecoveryId`.
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index f0cbe4f..2c824b6 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -6,6 +6,7 @@ use crate::{Error, Result}; use { crate::{hazmat::SignPrimitive, SigningKey}, elliptic_curve::subtle::CtOption, + signature::{hazmat::PrehashSign...
2
53
7
cd975594dd5833ff8ed044dd8c45e63de9589b85
Tony Arcieri
2023-01-23T01:09:07
ecdsa: add `SigningKey::*_recoverable` methods (#635) Adds methods which return the `RecoveryId` along with the signature, now that the generic implementation can compute them.
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index 2600fab..f0cbe4f 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -2,20 +2,35 @@ use crate::{Error, Result}; +#[cfg(feature = "signing")] +use { + crate::{hazmat::SignPrimitive, SigningKey}, + elliptic_curve::subtle::CtOption, ...
2
55
9
57995cf811418d08cc37e53603fcf2355681cf66
Tony Arcieri
2023-01-22T23:16:26
Cargo.lock: bump dependencies (#634)
diff --git a/Cargo.lock b/Cargo.lock index 83dccff..d9b4790 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,15 +224,6 @@ dependencies = [ "signature 1.6.4", ] -[[package]] -name = "ed25519" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b313941b79fa8f26c1967e351f...
1
12
12
beabd4d4598443b5da132e9b9ad18cb7e8c68ea8
Tony Arcieri
2023-01-22T23:07:04
ecdsa: refactor RFC6979 usage and trait impls (#633) Uses `C::Digest` unilaterally as the digest function to instantiate HMAC-DRBG for RFC6979. This replaces the previous inconsistent usage where sometimes `C::Digest` was used while in `DigestSigner` the generic `D` parameter was used. With this, the various tra...
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 448cbd0..8c5be74 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -30,7 +30,7 @@ use { use { elliptic_curve::FieldSize, signature::{ - digest::{core_api::BlockSizeUser, Digest, FixedOutputReset}, + digest::{core_api::Bloc...
3
61
47
b139e5e76758b172eb1839be7053bd16d5718673
Tony Arcieri
2023-01-22T17:56:11
ecdsa: compute `RecoveryId` from `SignPrimitive` (#632) Adds support for computing the recovery ID which can be used to recover the verifying key from the signature. This makes use of the newly added `AffineYIsOdd` trait. It also switches to using the `MulByGenerator` trait for basepoint multiplication.
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 95efe3d..448cbd0 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -17,12 +17,12 @@ use elliptic_curve::{bigint::Integer, FieldBytes, PrimeCurve}; #[cfg(feature = "arithmetic")] use { crate::{RecoveryId, SignatureSize}, - core::borrow::B...
1
17
9
07a0ab4169487271d8e9f9f697aa7e24baa73151
Tony Arcieri
2023-01-21T19:43:56
ed25519: bump `ring-compat` to v0.6 (#629)
diff --git a/Cargo.lock b/Cargo.lock index c4f08a3..b26ccb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "aead" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c192eb8f11fc081b0f...
3
276
52
faeee55507c451cbc3597d529f98119e79ab3ab4
Tony Arcieri
2023-01-21T18:21:13
ed25519: have `TryFrom<&[u8]>` call `Signature::from_slice` (#626) The code is otherwise duplicated
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index 9f4bedb..2e02124 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -397,9 +397,7 @@ impl TryFrom<&[u8]> for Signature { type Error = Error; fn try_from(bytes: &[u8]) -> signature::Result<Self> { - SignatureBytes::try_from(bytes) - ...
1
1
3
b2ed9411617cc8018b2cf0872ded10925ebbac5e
Tony Arcieri
2023-01-21T18:00:43
ed25519: fix `rust-version` in Cargo.toml (#625) The tested MSRV is 1.57, not 1.56. It's correctly noted in the crate's README.md.
diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.toml index 06344e9..d9d783a 100644 --- a/ed25519/Cargo.toml +++ b/ed25519/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" categories = ["cryptography", "no-std"] keywords = ["crypto", "curve25519", "ecc", "signature", "signing"] edition = "2021" -rust-version = "1.56...
1
1
1
64b75e5531dfb220cbfd39a53b56af35e5562724
Tony Arcieri
2023-01-21T16:44:50
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 che...
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index c6fe10b..4ac1e6f 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -289,6 +289,13 @@ pub type ComponentBytes = [u8; COMPONENT_SIZE]; pub type SignatureBytes = [u8; Signature::BYTE_SIZE]; /// Ed25519 signature. +/// +/// This type represents a cont...
3
46
50
0b9c82165a572eca7f8e4f8c4a6c541db91f9dfb
Tony Arcieri
2023-01-16T00:24:10
ed25519: factor out `hex` module (#621) Note: should probably be replaced with `base16ct` as an optional dependency, but this is a quick cleanup.
diff --git a/ed25519/src/hex.rs b/ed25519/src/hex.rs new file mode 100644 index 0000000..41bc197 --- /dev/null +++ b/ed25519/src/hex.rs @@ -0,0 +1,72 @@ +//! Hexadecimal encoding support +// TODO(tarcieri): use `base16ct`? + +use crate::{Error, Signature}; +use core::{fmt, str}; + +impl fmt::LowerHex for Signature { + ...
2
79
72
7a0382c8448b11848939214e50c99d65e1a1fa33
Tony Arcieri
2023-01-15T21:51:43
Use `doc_auto_cfg` (#618) Generate feature-dependent rustdoc automatically rather than through manual annotations
diff --git a/ecdsa/src/der.rs b/ecdsa/src/der.rs index 2b1373c..5684e76 100644 --- a/ecdsa/src/der.rs +++ b/ecdsa/src/der.rs @@ -222,7 +222,6 @@ where } #[cfg(feature = "alloc")] -#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] impl<C> From<Signature<C>> for Box<[u8]> where C: PrimeCurve, @@ -235,7 +234,6 @...
12
11
86
82b34de8ada2334106521fcd0ccd72ac7a487347
Tony Arcieri
2023-01-15T20:22:28
Bump `signature` crate dependency to v2.0 (#614) Release notes: https://github.com/RustCrypto/traits/pull/1211
diff --git a/Cargo.lock b/Cargo.lock index 65a6440..4a27d71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ "rfc6979", "sha1", "sha2 0.10.6", - "signature 2.0.0-rc.1", + "signature 2.0.0", "zeroize", ] @@ -167,7 +167,7 @@ dependencies = [ "rfc6979", "serdect", "sha2 0.10.6...
4
9
9
d2d4ee1e927e444cd497553567c2cb3a2be3b244
Tony Arcieri
2023-01-08T02:10:21
ed25519 v2.0.0-rc.1 (#613)
diff --git a/Cargo.lock b/Cargo.lock index e703922..65a6440 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.0.0-rc.0" +version = "2.0.0-rc.1" dependencies = [ "bincode", "ed25519-dalek", diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.tom...
2
2
2
0696f94741db9a12892ca7e11afa184ff816abee
Tony Arcieri
2023-01-08T01:54:07
ecdsa v0.15.0-rc.1 (#612)
diff --git a/Cargo.lock b/Cargo.lock index 858172a..e703922 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.15.0-rc.0" +version = "0.15.0-rc.1" dependencies = [ "der", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index...
2
2
2
fcfadb264fafee980aff7967b5206b3499ed166c
Tony Arcieri
2023-01-08T01:26:23
dsa v0.5.0-rc.1 (#611)
diff --git a/Cargo.lock b/Cargo.lock index 857e99c..858172a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ dependencies = [ [[package]] name = "dsa" -version = "0.5.0-rc.0" +version = "0.5.0-rc.1" dependencies = [ "digest 0.10.6", "num-bigint-dig", diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml ind...
2
2
2
ec16bdd032c128fcd16520536afd64b1ee18620e
Tony Arcieri
2023-01-07T23:54:59
ecdsa: rename `signing` and `verifying` features (#610) Corresponding to the module name changes in #609, this renames the crate feature names to match: - `sign` => `signing` - `verify` => `verifying` This better matches the `SigningKey` and `VerifyingKey` type names.
diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index 03272b5..2bda115 100644 --- a/ecdsa/Cargo.toml +++ b/ecdsa/Cargo.toml @@ -32,6 +32,8 @@ sha2 = { version = "0.10", default-features = false } [features] default = ["digest"] alloc = ["signature/alloc"] +std = ["alloc", "elliptic-curve/std", "signature/std"] + a...
5
29
28
20e866a0f16dd81a85b88efe3aae40a6415fa4c7
Tony Arcieri
2023-01-07T23:42:30
ecdsa: rename `signing` and `verifying` modules (#609) Renames modules as follows: - `sign` => `signing` - `verify` => `verifying` This better matches the `SigningKey` and `VerifyingKey` type names.
diff --git a/ecdsa/src/lib.rs b/ecdsa/src/lib.rs index 6185fe1..009ba24 100644 --- a/ecdsa/src/lib.rs +++ b/ecdsa/src/lib.rs @@ -72,10 +72,10 @@ pub mod dev; pub mod hazmat; #[cfg(feature = "sign")] -mod sign; +mod signing; #[cfg(feature = "verify")] -mod verify; +mod verifying; pub use crate::recovery::Recov...
3
4
4
0680e7efaf241685f5637a6b77ddf37bb6e0d76e
Tony Arcieri
2023-01-07T23:31:42
ecdsa: have `sign` module import `VerifyingKey` from toplevel This makes it possible to rename both modules without changing either, which better preserves git history.
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index 3a7eb5c..6c442bd 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -39,7 +39,7 @@ use crate::elliptic_curve::{ }; #[cfg(feature = "verify")] -use {crate::verify::VerifyingKey, elliptic_curve::PublicKey, signature::KeypairRef}; +use {crate::VerifyingKe...
1
1
1
0dee9a99f4366f23f64f8a88a4bb3ea8be4278d6
Tony Arcieri
2023-01-07T23:23:00
signature v2.0.0-rc.1 (#608) This version moves back to `&mut impl CryptoRngCore` as the type signature for RNGs. See RustCrypto/traits#1183
diff --git a/Cargo.lock b/Cargo.lock index 15fe09e..857e99c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ "rfc6979", "sha1", "sha2 0.10.6", - "signature 2.0.0-rc.0", + "signature 2.0.0-rc.1", "zeroize", ] @@ -167,7 +167,7 @@ dependencies = [ "rfc6979", "serdect", "sha2 0...
6
20
23
6086e3eb075a142ccb64f2a16666fd826d5b58f4
Tony Arcieri
2023-01-04T21:47:23
ecdsa v0.15.0-rc.0 (#607)
diff --git a/Cargo.lock b/Cargo.lock index 1179396..15fe09e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.15.0-pre.1" +version = "0.15.0-rc.0" dependencies = [ "der", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml inde...
2
2
2
2fceb13c72f389716224b0c3c2542af796cc6e70
Tony Arcieri
2023-01-04T21:22:55
ed25519 v2.0.0-rc.0 (#606)
diff --git a/Cargo.lock b/Cargo.lock index d37480f..1179396 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.0.0-pre.2" +version = "2.0.0-rc.0" dependencies = [ "bincode", "ed25519-dalek", diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.to...
2
2
2
bee30f7d7f0e2c4853f5037d5f444763d2d5759c
Tony Arcieri
2023-01-04T21:01:22
dsa v0.5.0-rc.0 (#605)
diff --git a/Cargo.lock b/Cargo.lock index 070cf3b..d37480f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ dependencies = [ [[package]] name = "dsa" -version = "0.5.0-pre.1" +version = "0.5.0-rc.0" dependencies = [ "digest 0.10.6", "num-bigint-dig", diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml in...
2
2
2
60ce11ba47ae9327246944bbe358d83e866b0689
Tony Arcieri
2023-01-04T20:27:21
Bump `signature` to 2.0.0-rc.0 (#604)
diff --git a/Cargo.lock b/Cargo.lock index 3bbbd1f..070cf3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ "rfc6979", "sha1", "sha2 0.10.6", - "signature 2.0.0-pre.3", + "signature 2.0.0-rc.0", "zeroize", ] @@ -167,7 +167,7 @@ dependencies = [ "rfc6979", "serdect", "sha2 ...
4
8
8
7b26c6906f7ae7dfc280a8ff4f501337779c0c73
Tony Arcieri
2022-12-29T22:32:50
dsa v0.5.0-pre.1 (#603)
diff --git a/Cargo.lock b/Cargo.lock index 5f11ee2..3bbbd1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ dependencies = [ [[package]] name = "dsa" -version = "0.5.0-pre" +version = "0.5.0-pre.1" dependencies = [ "digest 0.10.6", "num-bigint-dig", diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml ind...
2
2
2
eee604917560b1835f1f665a307d709df7c0b975
Tony Arcieri
2022-12-19T20:29:07
ed25519 v2.0.0-pre.2 (#602)
diff --git a/Cargo.lock b/Cargo.lock index 4b88b65..5f11ee2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.0.0-pre.1" +version = "2.0.0-pre.2" dependencies = [ "bincode", "ed25519-dalek", diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.t...
2
2
2
9fe9d7414d98a1c0402d240d4a1c1429c24baea9
Tony Arcieri
2022-12-19T19:16:29
ed25519: impl `TryFrom<SignatureBytes>` for `Signature` (#601) Uses the `TryFrom` trait to invoke `Signature::from_bytes`.
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index cbaed37..8e64f80 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -373,6 +373,22 @@ impl From<&Signature> for SignatureBytes { } } +impl TryFrom<SignatureBytes> for Signature { + type Error = Error; + + fn try_from(bytes: SignatureBytes...
1
16
0
266dee2355c11f5e963d1ffcd19b2407cd3f418e
Tony Arcieri
2022-12-19T16:54:37
ed25519: add `Signature::from_components` (#600) Add constructor which accepts the serialized `R` and `s` components as separate parameters, (partially) validating the `s` component.
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index ad05fda..cbaed37 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -300,9 +300,17 @@ impl Signature { pub const BYTE_SIZE: usize = COMPONENT_SIZE * 2; /// Parse an Ed25519 signature from a byte slice. - pub fn from_bytes(bytes: &[u8; Se...
1
10
5
fd78bf79cb7188d908846c15965a57adab638dec
Tony Arcieri
2022-12-11T01:02:52
ed25519 v2.0.0-pre.1 (#598)
diff --git a/Cargo.lock b/Cargo.lock index 9fd57d3..4b88b65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.0.0-pre.0" +version = "2.0.0-pre.1" dependencies = [ "bincode", "ed25519-dalek", diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.t...
2
2
2
daa52e2d7977d604594a903b59a7921c2001bd0a
Tony Arcieri
2022-12-11T00:41:03
ecdsa v0.15.0-pre.1 (#597)
diff --git a/Cargo.lock b/Cargo.lock index 7d9f757..9fd57d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.15.0-pre.0" +version = "0.15.0-pre.1" dependencies = [ "der", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml ind...
2
2
2
84b93e2a4d468ae38d8e2fd21bdf3f09e28b97d3
Tony Arcieri
2022-12-11T00:18:45
Bump `signature` to v2.0.0-pre.3 (#596)
diff --git a/Cargo.lock b/Cargo.lock index e566c65..7d9f757 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ "rfc6979", "sha1", "sha2 0.10.6", - "signature 2.0.0-pre.2", + "signature 2.0.0-pre.3", "zeroize", ] @@ -167,7 +167,7 @@ dependencies = [ "rfc6979", "serdect", "sha2...
6
23
19
1c5124a19cadb6fe8efe53bd102a6c9537bcffcc
Tony Arcieri
2022-12-09T22:50:45
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)...
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index 54edfe3..ad05fda 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -2,6 +2,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![doc = include_str!("../README.md")] #![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_smal...
4
74
46
19813cdaae8ec39c4a24a22e43a1cb363b3610e8
Michal Nazarewicz
2022-12-02T03:40:32
ed25519: change Signature::from_bytes to take sized array (#593) Change Signature::from_bytes to take `[u8; 64]` as argument rather than `&[u8]` which: - provides consistency with KeypairBytes::from_bytes, - encodes the length in type system allowing clients to assert length at compile time and - removes run-ti...
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index 8359f3e..54edfe3 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -292,9 +292,7 @@ impl Signature { pub const BYTE_SIZE: usize = 64; /// Parse an Ed25519 signature from a byte slice. - pub fn from_bytes(bytes: &[u8]) -> signature::Resu...
1
4
6
018851e972e0153ea2a1d20de3997283bfdb32f9
Tony Arcieri
2022-11-21T04:17:51
pkcs8: re-export `spki` from `pkcs8` (#592)
diff --git a/ed25519/src/pkcs8.rs b/ed25519/src/pkcs8.rs index 5420f14..1953f8d 100644 --- a/ed25519/src/pkcs8.rs +++ b/ed25519/src/pkcs8.rs @@ -14,7 +14,7 @@ //! Please lock to a specific minor version of the `ed25519` crate to avoid //! breaking changes when using this module. -pub use pkcs8::{DecodePrivateKey, D...
1
1
1
aaca181fd0c892fc4d3d2f66a9966e89e8d70806
Tony Arcieri
2022-11-19T23:43:27
ed25519: make `pkcs8::*Document` re-exports public (#591) They're needed to properly impl the `EncodePrivateKey`/`EncodePublicKey` traits.
diff --git a/ed25519/src/pkcs8.rs b/ed25519/src/pkcs8.rs index 276b506..5420f14 100644 --- a/ed25519/src/pkcs8.rs +++ b/ed25519/src/pkcs8.rs @@ -19,12 +19,12 @@ pub use pkcs8::{DecodePrivateKey, DecodePublicKey, Error, PrivateKeyInfo, Result #[cfg(feature = "alloc")] pub use pkcs8::{spki::EncodePublicKey, EncodePriva...
1
3
3
04b5c861c783fe665824c4ded5c807fc8ff503e8
Tony Arcieri
2022-11-19T23:19:04
ed25519: re-export `PublicKeyBytes` and `pkcs8::PrivateKeyInfo` (#590) - Re-exports `pkcs8::PublicKeyBytes` at the toplevel - Re-exports `pkcs8::PrivateKeyInfo` from the upstream crate
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index 59c400b..8359f3e 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -269,7 +269,7 @@ mod serde; pub use signature::{self, Error, SignatureEncoding}; #[cfg(feature = "pkcs8")] -pub use crate::pkcs8::KeypairBytes; +pub use crate::pkcs8::{KeypairBytes...
2
5
5
6dae482afce30a0f9a624164326725299c51fef7
Tony Arcieri
2022-11-19T22:42:38
ed25519: re-export `pkcs8` error types (#589) These are needed to completely implement the `DecodePrivateKey`/`DecodePublicKey` and `EncodePrivateKey`/`EncodePublicKey` traits while relying only on `ed25519::pkcs8`.
diff --git a/ed25519/src/pkcs8.rs b/ed25519/src/pkcs8.rs index a56ce12..f7fd78c 100644 --- a/ed25519/src/pkcs8.rs +++ b/ed25519/src/pkcs8.rs @@ -14,7 +14,7 @@ //! Please lock to a specific minor version of the `ed25519` crate to avoid //! breaking changes when using this module. -pub use pkcs8::{DecodePrivateKey, D...
1
12
12
e752290822fb60671ff89b2e6bf8c6ef823ef8dd
Tony Arcieri
2022-11-06T19:22:22
ed25519 2.0.0-pre.0 (#586)
diff --git a/Cargo.lock b/Cargo.lock index 752e74f..2f0c5a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.0.0-pre" +version = "2.0.0-pre.0" dependencies = [ "bincode", "ed25519-dalek", diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.tom...
2
2
2
9ae1710c555e60301d3348490c4490a4a21790bf
Tony Arcieri
2022-11-06T18:58:23
ecdsa v0.15.0-pre.0 (#585)
diff --git a/Cargo.lock b/Cargo.lock index 72b00a0..752e74f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.15.0-pre" +version = "0.15.0-pre.0" dependencies = [ "der", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index...
4
4
4
b90759848898736b4982530c468258247cdc055e
Tony Arcieri
2022-11-06T18:18:09
ecdsa: use `Signature::split_scalars` in recovery (#583)
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index 1bedec1..da2c5a0 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -205,8 +205,7 @@ where signature: &Signature<C>, recovery_id: RecoveryId, ) -> Result<Self> { - let r = signature.r(); - let s = signat...
1
1
2
ea3e3f3bae3d6b2dac9e9e99466dd29b4b0ffe9b
Tony Arcieri
2022-11-06T17:15:43
ecdsa: formatting cleanup (#582)
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index 4b68f02..1bedec1 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -218,10 +218,8 @@ where let r_inv = *r.invert(); let u1 = -(r_inv * z); let u2 = r_inv * *s; - let pk = - ProjectivePoint::<C>:...
1
2
4
beb7271cb0b4a476d3285bb9f755824715536d77
Tony Arcieri
2022-11-06T00:55:54
ecdsa: add trial recovery functionality (#580) This functionality can be used to compute a `RecoveryId` from a verifying key, message, and signature, without having this information computed during signing time. It uses a brute force method and is thus much slower than computing it at signing time.
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index 1194c15..4b68f02 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -71,6 +71,78 @@ impl RecoveryId { } } +#[cfg(feature = "verify")] +#[cfg_attr(docsrs, doc(cfg(feature = "verify")))] +impl RecoveryId { + /// Given a public key,...
3
80
5
1578fe31b96cad80afdc1be47e5f0d088bd5bc2b
Tony Arcieri
2022-11-04T17:15:20
Bump `signature` to v2.0.0-pre.2; use `impl CryptoRngCore` (#579) As discussed in RustCrypto/traits#1148, this uses `&mut impl CryptoRngCore` as the API for passing CSRNGs. This removes the need for a generic parameter in the type signature while also keeping syntax to a minimum. The traits in `signature` v2.0...
diff --git a/Cargo.lock b/Cargo.lock index 910379b..72b00a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ "rfc6979", "sha1", "sha2 0.10.6", - "signature 2.0.0-pre.0", + "signature 2.0.0-pre.2", "zeroize", ] @@ -167,7 +167,7 @@ dependencies = [ "rfc6979", "serdect", "sha2...
17
42
53
d47791f1ddbf91b85046a152c152725281563352
Tony Arcieri
2022-11-03T17:52:03
rfc6979: add usage example (#577)
diff --git a/Cargo.lock b/Cargo.lock index a1a0bdf..bf5b63d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,6 +493,7 @@ version = "0.3.0" dependencies = [ "crypto-bigint", "hmac", + "sha2 0.10.6", "zeroize", ] diff --git a/rfc6979/Cargo.toml b/rfc6979/Cargo.toml index 3ae0320..764f447 100644 --- a/rfc6979/Ca...
3
30
1
5b2977d05d913c153d002a2fdeebd4f0645fc6fa
Tony Arcieri
2022-11-02T17:57:08
ecdsa: initial `VerifyingKey` recovery support (#576) Initial support for recovering a `VerifyingKey` from a `RecoveryId` and a signature over one of the following: - Message (i.e. bytestring) hashed using `DigestPrimitive::Digest` - Message `Digest` - Message prehash (i.e. output of a `Digest`)
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index c923bba..1194c15 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -2,6 +2,22 @@ use crate::{Error, Result}; +#[cfg(feature = "verify")] +use { + crate::{ + hazmat::{bits2field, DigestPrimitive, VerifyPrimitive}, + Si...
1
86
0
1580cf32a3febfcd58f84be4337be3700f5fc7b2
Tony Arcieri
2022-11-02T16:55:08
ecdsa: add tests for `bits2field` (#575)
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 05e4da8..bfab567 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -261,3 +261,42 @@ pub fn bits2field<C: PrimeCurve>(bits: &[u8]) -> Result<FieldBytes<C>> { Ok(field_bytes) } + +#[cfg(test)] +mod tests { + use super::bits2field; + u...
1
39
0
01c547eff3efbdcad66c98ec57bc3f5814ef28e7
Tony Arcieri
2022-11-02T15:38:54
ecdsa: refactor `prehash_to_field_bytes` to `bits2field` free func (#574) Removes the verbosely named `prehash_to_field_bytes` from the `DigestPrimitive` trait, chaning it to a `bits2field` free function which has a `C: PrimeCurve` generic parameter. The name is inspired by `bits2int` from RFC6979, however it doe...
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index daab5f1..05e4da8 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -10,6 +10,10 @@ //! Failure to use them correctly can lead to catastrophic failures including //! FULL PRIVATE KEY RECOVERY! +use crate::{Error, Result}; +use core::cmp; +use e...
3
44
40
393033e0b618023f08ad822101001fc22fc3f43e
Tony Arcieri
2022-11-02T15:21:53
ed25519: remove addressed TODO (#573) It was addressed in #570
diff --git a/ed25519/src/pkcs8.rs b/ed25519/src/pkcs8.rs index ebef86f..a56ce12 100644 --- a/ed25519/src/pkcs8.rs +++ b/ed25519/src/pkcs8.rs @@ -168,7 +168,6 @@ impl TryFrom<pkcs8::PrivateKeyInfo<'_>> for KeypairBytes { _ => Err(pkcs8::Error::KeyMalformed), }?; - // TODO(tarcieri): parse ...
1
0
1
f0bfb169d62a8d2a1be228ba982623a1cec27866
Tony Arcieri
2022-11-02T15:12:10
dsa: remove use of `opaque-debug` (#572) All of the `Debug` impls in this crate benefit from displaying something, including `SigningKey` which can display its associated `VerifyingKey`. This commit switches to derived `Debug` for all types except `SigningKey`, where it displays the `verifying_key` field then us...
diff --git a/Cargo.lock b/Cargo.lock index 68bb5fa..a1a0bdf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -147,7 +147,6 @@ dependencies = [ "digest 0.10.5", "num-bigint-dig", "num-traits", - "opaque-debug", "pkcs8", "rand 0.8.5", "rand_chacha 0.3.1", diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml index 7b99384....
6
15
14
f16e4bdb032eb9a11fbf0de7e13b758da29cc9d3
Tony Arcieri
2022-11-02T14:54:20
dsa: move `Signature` to toplevel (#571) It was previously in a `sig` module to avoid clashing with the `signature` crate re-export. This structure matches the one used by the `ecdsa` crate.
diff --git a/dsa/src/lib.rs b/dsa/src/lib.rs index 3499e4a..bb9e720 100644 --- a/dsa/src/lib.rs +++ b/dsa/src/lib.rs @@ -47,8 +47,7 @@ extern crate alloc; pub use crate::{ - components::Components, sig::Signature, signing_key::SigningKey, size::KeySize, - verifying_key::VerifyingKey, + components::Componen...
4
115
119
1fafac6dace1d7b682108aab47ad9c5b276bb6ba
Tony Arcieri
2022-11-02T14:42:21
ed25519: use `PublicKeyBytes` as `KeypairBytes::public_key` (#570) Uses a newtype which knows how to encode SPKI as the public key field
diff --git a/ed25519/src/pkcs8.rs b/ed25519/src/pkcs8.rs index ebe9b42..ebef86f 100644 --- a/ed25519/src/pkcs8.rs +++ b/ed25519/src/pkcs8.rs @@ -73,7 +73,7 @@ pub struct KeypairBytes { /// Ed25519 public key (if available). /// /// Compressed Edwards-y encoded curve point. - pub public_key: Option<[u8...
2
14
12
8d49b74a3a1cb47e07930427adb616b1c1d796c3
Tony Arcieri
2022-11-02T13:00:18
ecdsa: add `*Signer`/`*Verifier` impls for `der::Signature` (#569) This allows using these traits along with `SigningKey`/`VerifyingKey` to directly sign and verify `der::Signature`s.
diff --git a/ecdsa/src/der.rs b/ecdsa/src/der.rs index 1d13c5b..5103b08 100644 --- a/ecdsa/src/der.rs +++ b/ecdsa/src/der.rs @@ -159,6 +159,17 @@ where } } +impl<C> From<crate::Signature<C>> for Signature<C> +where + C: PrimeCurve, + MaxSize<C>: ArrayLength<u8>, + <FieldSize<C> as Add>::Output: Add<Max...
3
298
137
c99ecf8d8aaef20c66e3d4d25dc3adc740037630
Tony Arcieri
2022-11-02T02:24:17
ecdsa: add bounds for RFC6979 to `DigestPrimitive::Digest` (#568) RFC6979 is built on HMAC-DRBG which needs `BlockSizeUser` and `FixedOutputReset` bounds. This change ensures that `DigestPrimitive::Digest` is always usable with RFC6979.
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 3ca3fc4..daab5f1 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -27,7 +27,10 @@ use { use { core::cmp, elliptic_curve::{bigint::Encoding, FieldSize}, - signature::{digest::Digest, PrehashSignature}, + signature::{ + dige...
2
8
10
c2c6d17d179b249d3428108426e59c18689fb4c0
Tony Arcieri
2022-11-02T02:00:04
ecdsa: have `SigningKey::verifying_key` return a reference (#567) The `SigningKey` is internally a keypair, so callers can borrow the `VerifyingKey`, rather than making a copy.
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index 5082d76..0826903 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -92,12 +92,11 @@ where &self.secret_scalar } - /// Get the [`VerifyingKey`] which corresponds to this [`SigningKey`] - // TODO(tarcieri): make this return `&Verifying...
1
16
5
31263d263d3881ca9d468fc9c40f6981debc1639
Tony Arcieri
2022-11-01T15:51:57
ecdsa: use `ScalarCore` for `r` and `s` components (#565) Now that the `AsRef<[u8]>` bound on signatures has been removed, `ecdsa::Signature` can have a structured internal representation.
diff --git a/ecdsa/src/lib.rs b/ecdsa/src/lib.rs index 9942cbf..6185fe1 100644 --- a/ecdsa/src/lib.rs +++ b/ecdsa/src/lib.rs @@ -109,7 +109,7 @@ use alloc::vec::Vec; #[cfg(feature = "arithmetic")] use { core::str, - elliptic_curve::{ff::PrimeField, IsHigh, NonZeroScalar, ScalarArithmetic}, + elliptic_curve...
1
31
44
f90f81919fd1df985a83f530c57fd967ed411bd5
Tony Arcieri
2022-11-01T15:20:16
ed25519: remove deprecated infallible conversions (#564) The v1.0 release of `ed25519` included infallible conversions from `[u8; 64]`, however that was retroactively changed to reject signatures which overflowed the field modulus, so those methods were deprecated and changed to panicking conversions. Now that t...
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index 0cf043b..59c400b 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -321,19 +321,6 @@ impl Signature { pub fn to_vec(&self) -> Vec<u8> { self.0.to_vec() } - - /// DEPRECATED: Create a new signature from a byte array. - /// - ...
1
0
26
1eec6b429d644f3bd7b5540247faf3b99de038f7
Tony Arcieri
2022-10-31T20:11:34
Bump `signature` to 2.0.0-pre (#562) Implements the proposed breaking changes to the `signature` crate from https://github.com/RustCrypto/traits/pull/1141 Most notably the `Signature` trait has been replaced with a `SignatureEncoding` trait which permits an internally structured signature representation.
diff --git a/Cargo.lock b/Cargo.lock index 879f3c1..68bb5fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ dependencies = [ [[package]] name = "dsa" -version = "0.4.2" +version = "0.5.0-pre" dependencies = [ "digest 0.10.5", "num-bigint-dig", @@ -154,13 +154,13 @@ dependencies = [ "rfc6979", ...
13
220
162
4ed617c5140c2612369c2b3f5c99e49a100447be
cobratbq
2022-10-29T20:56:08
dsa: implement `Signer` and `Verifier` using SHA-256 as default (#559)
diff --git a/dsa/src/signing_key.rs b/dsa/src/signing_key.rs index ddfa787..4bd9ba8 100644 --- a/dsa/src/signing_key.rs +++ b/dsa/src/signing_key.rs @@ -14,7 +14,7 @@ use pkcs8::{ use rand::{CryptoRng, RngCore}; use signature::{ hazmat::{PrehashSigner, RandomizedPrehashSigner}, - DigestSigner, RandomizedDiges...
3
44
3
ace98c82486a322c2132345e1ec5736f3d0e3041
cobratbq
2022-10-22T20:38:34
dsa: expose signing and verifying of prehashed hash value (#558)
diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml index 8277f68..ef69b5f 100644 --- a/dsa/Cargo.toml +++ b/dsa/Cargo.toml @@ -22,7 +22,8 @@ opaque-debug = "0.3" pkcs8 = { version = "0.9", default-features = false, features = ["alloc"] } rand = { version = "0.8", default-features = false } rfc6979 = { version = "0.3", pat...
3
46
5
94790f77269ebbc5b93450bdae116aed1305edfe
Tony Arcieri
2022-10-12T02:00:45
dsa: re-export `BigUint` (#553) It's part of the public API. The `rsa` crate provides a similar re-export.
diff --git a/dsa/src/lib.rs b/dsa/src/lib.rs index a50aab4..3499e4a 100644 --- a/dsa/src/lib.rs +++ b/dsa/src/lib.rs @@ -46,15 +46,15 @@ extern crate alloc; -pub use self::{ +pub use crate::{ components::Components, sig::Signature, signing_key::SigningKey, size::KeySize, verifying_key::VerifyingKey, }; ...
1
2
2
8c7368320e8c4e9332f8d0670f628ec959d0f1be
Sorah Fukumori
2022-09-28T01:51:25
ecdsa: prehash must receive zero-pads on left (#547) `prehash_to_field_bytes` was zero-padding on the right of the byte sequence but this must be done on the left because the output is evaluated as a big integer. This behavior is defined on various documents including RFC6979 Section 2.3.2., SEC 1 Section 2.3.8....
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 511b1d6..3ca3fc4 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -232,11 +232,14 @@ pub trait DigestPrimitive: PrimeCurve { let mut field_bytes = FieldBytes::<Self>::default(); + // This is a operation according to RFC6979 Se...
1
5
2
3a13e777553393d9bf1542b02c4e2e8777070705
Nathaniel McCallum
2022-09-27T22:07:17
feat(ecdsa): impl From<SigningKey> for SecretKey (#548) Signed-off-by: Nathaniel McCallum <nathaniel@profian.com>
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index b6bb4b7..12d00ed 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -198,6 +198,28 @@ where } } +impl<C> From<SigningKey<C>> for SecretKey<C> +where + C: PrimeCurve + ProjectiveArithmetic, + Scalar<C>: Invert<Output = CtOption<Scalar<C>>> + R...
1
22
0
9f57a022b59de6341eab953a42102c67eb243f28
Tony Arcieri
2022-09-15T21:44:38
ecdsa: relax `Keypair` bounds (#539) Following RustCrypto/traits#1107 this relaxes the trait bounds to the minimum requirements.
diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index 6c1cbfd..d91b90d 100644 --- a/ecdsa/Cargo.toml +++ b/ecdsa/Cargo.toml @@ -17,7 +17,7 @@ rust-version = "1.57" [dependencies] elliptic-curve = { version = "0.12", default-features = false, features = ["digest", "sec1"] } -signature = { version = ">=1.6.1, <1.7",...
2
4
14
64646b63633b1f21ad22e8365670bcb134eb6df8
Tony Arcieri
2022-09-15T20:36:08
Cargo.lock: bump dependencies (#538)
diff --git a/Cargo.lock b/Cargo.lock index 35528ab..528857d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,9 +16,9 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64ct" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/cr...
1
64
58
44bf1ab0740a2b3a7478c77c1315bf4021c0ed77
Tony Arcieri
2022-09-12T23:50:16
ecdsa: impl `Keypair` for `SigningKey` (#535) This trait describes the relationship between signing and verifying keys, allowing the latter to be accessed from the former in a trait-based manner.
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index ea89b81..900d98e 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -22,20 +22,23 @@ use signature::{ DigestSigner, RandomizedDigestSigner, RandomizedSigner, Signer, }; -#[cfg(feature = "verify")] -use {crate::verify::VerifyingKey, elliptic_curve::...
2
71
31
556acaa45e2a6358793330bbb7fabb019733d426
Tony Arcieri
2022-09-12T22:55:33
ecdsa: impl `signature::hazmat::{PrehashSigner, PrehashVerifier}` (#534) Adds "hazmat" trait impls to `SigningKey` and `VerifyingKey` respectively which allow computing signatures over raw message digests. See RustCrypto/traits#1099. The implementation allows digests which are shorter or longer than the field si...
diff --git a/Cargo.lock b/Cargo.lock index 4f6b94e..142b7c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -574,9 +574,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ea32af43239f0d353a7dd75a22d9...
5
76
12
5e8f6a6b4647e350467d87fb1739407ab4d5a172
Tony Arcieri
2022-09-12T22:38:05
ecdsa: display hex in `Debug` impls for `Signature` (#533) Slightly more readable/useful
diff --git a/ecdsa/src/der.rs b/ecdsa/src/der.rs index e2f919c..5925df4 100644 --- a/ecdsa/src/der.rs +++ b/ecdsa/src/der.rs @@ -143,10 +143,13 @@ where <FieldSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("asn...
2
14
10
eab0ed6369b86af1c9df16803af79aa453c8fcb8
Tony Arcieri
2022-09-07T02:28:38
ecdsa: add `RecoveryId::from_byte` (#531) Adds a `const fn` by-value constructor
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index 0069dbc..c923bba 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -40,6 +40,15 @@ impl RecoveryId { (self.0 & 1) != 0 } + /// Convert a `u8` into a [`RecoveryId`]. + pub const fn from_byte(byte: u8) -> Option<Self> {...
1
10
5
923f8a1111c89a5f97867843924b7363cccf0b8d
Tony Arcieri
2022-09-07T02:17:06
ecdsa: expand clippy lints (#530)
diff --git a/ecdsa/src/lib.rs b/ecdsa/src/lib.rs index fe69283..e8defb6 100644 --- a/ecdsa/src/lib.rs +++ b/ecdsa/src/lib.rs @@ -5,8 +5,23 @@ html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg", html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/...
1
17
2
cdb6baf78377753d2f4e45fd2b2db220854d66c6
Tony Arcieri
2022-09-07T02:12:03
ecdsa: make `RecoveryId` methods `const fn` (#529) They're trivial and potentially useful for defining constants
diff --git a/ecdsa/src/recovery.rs b/ecdsa/src/recovery.rs index 98053aa..0069dbc 100644 --- a/ecdsa/src/recovery.rs +++ b/ecdsa/src/recovery.rs @@ -26,23 +26,23 @@ impl RecoveryId { /// /// - `is_y_odd`: is the affine y-coordinate of 𝑘×𝑮 odd? /// - `is_x_reduced`: did the affine x-coordinate of 𝑘×𝑮 ...
1
5
5
32c6632a44724d54065513cd3a6e00fa637889ca
Tony Arcieri
2022-09-07T01:48:42
ecdsa: add `SigningKey::as_nonzero_scalar`/`VerifyingKey::as_affine` (#528) Adds borrowing accessors for the inner `NonZeroScalar` and `AffinePoint` within `SigningKey` and `VerifyingKey` respectively. These mirror the corresponding inherent methods on `SecretKey` and `PublicKey` as defined in the `elliptic-curve...
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index 3dacc16..979fcbd 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -74,6 +74,22 @@ where Ok(Self { inner }) } + /// Serialize this [`SigningKey`] as bytes + pub fn to_bytes(&self) -> FieldBytes<C> { + self.inner.to_repr() + ...
2
32
5
91bb9c306bc9f75e14bf062d5913a3a9904ffc64
Tony Arcieri
2022-09-06T16:39:10
ecdsa: simplify impl of `EncodePrivateKey` for `SigningKey` (#527)
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index fdf291c..3dacc16 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -304,8 +304,7 @@ where SignatureSize<C>: ArrayLength<u8>, { fn to_pkcs8_der(&self) -> pkcs8::Result<SecretDocument> { - let secret_key = SecretKey::new(self.inner.into())...
1
1
2
d1630aee413737d9b4f6a12d82311f6ed19a214f
aumetra
2022-09-06T15:43:20
ed25519: Fix compilation of `pem` feature (#524)
diff --git a/ed25519/Cargo.toml b/ed25519/Cargo.toml index 170d170..b8091ef 100644 --- a/ed25519/Cargo.toml +++ b/ed25519/Cargo.toml @@ -35,7 +35,7 @@ rand_core = { version = "0.5", features = ["std"] } [features] default = ["std"] alloc = ["pkcs8/alloc"] -pem = ["pkcs8/pem"] +pem = ["alloc", "pkcs8/pem"] serde_byt...
1
1
1
c696de35e41bbd0d4da8f34a5bef92d49a62f1ea
aumetra
2022-09-06T14:37:00
ecdsa: Implement `EncodePrivateKey` for `SigningKey` (#523)
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index ee2c3b2..fdf291c 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -32,7 +32,10 @@ use crate::elliptic_curve::{ }; #[cfg(feature = "pem")] -use core::str::FromStr; +use { + crate::elliptic_curve::pkcs8::{EncodePrivateKey, SecretDocument}, + core...
1
20
1
ee3c263554f9f39dc68db17fbbefdc8d0fcdc0a7
aumetra
2022-08-15T14:13:29
dsa: Allow signature v1.6.x (#513)
diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml index 287be8a..c7b0f33 100644 --- a/dsa/Cargo.toml +++ b/dsa/Cargo.toml @@ -22,7 +22,7 @@ opaque-debug = "0.3" pkcs8 = { version = "0.9", default-features = false, features = ["alloc"] } rand = { version = "0.8", default-features = false } rfc6979 = { version = "0.3", pat...
1
1
1
619fa87f5340f964d445d3331e3d198e472f72bc
Tony Arcieri
2022-08-14T22:44:19
ecdsa: allow `signature` v1.6 (#512) This release is now out and compatible with the versions of `digest` and `rand_core` that `ecdsa` uses.
diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index d99888f..1fd3476 100644 --- a/ecdsa/Cargo.toml +++ b/ecdsa/Cargo.toml @@ -17,7 +17,7 @@ rust-version = "1.57" [dependencies] elliptic-curve = { version = "0.12", default-features = false, features = ["digest", "sec1"] } -signature = { version = ">= 1.5, < 1.6",...
1
1
1
306c464086ac5d4b721985d0cc39b6c048c2eee5
Bogdan Opanchuk
2022-08-02T02:51:27
ecdsa: add ZeroizeOnDrop marker for SigningKey (#509)
diff --git a/ecdsa/src/sign.rs b/ecdsa/src/sign.rs index cf8cc7c..ee2c3b2 100644 --- a/ecdsa/src/sign.rs +++ b/ecdsa/src/sign.rs @@ -12,7 +12,7 @@ use elliptic_curve::{ group::ff::PrimeField, ops::{Invert, Reduce}, subtle::{Choice, ConstantTimeEq, CtOption}, - zeroize::Zeroize, + zeroize::{Zeroize,...
1
9
1
099a2e172726755846d39cc3ab09555f175aa5de
aumetra
2022-08-01T22:45:21
Tighten signature version requirement (#508)
diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index 7a67b49..d99888f 100644 --- a/ecdsa/Cargo.toml +++ b/ecdsa/Cargo.toml @@ -17,7 +17,7 @@ rust-version = "1.57" [dependencies] elliptic-curve = { version = "0.12", default-features = false, features = ["digest", "sec1"] } -signature = { version = "1.5", default-f...
1
1
1
7b4c885bbf313f26ea983a2258f0f86c6e3b2b72
Sen Jiang
2022-07-20T18:13:09
ecdsa: implement EncodePublicKey for VerifyingKey (#505) * ecdsa: implement EncodePublicKey for VerifyingKey * fix build
diff --git a/ecdsa/src/verify.rs b/ecdsa/src/verify.rs index 42948b5..db16794 100644 --- a/ecdsa/src/verify.rs +++ b/ecdsa/src/verify.rs @@ -17,6 +17,9 @@ use signature::{DigestVerifier, Verifier}; #[cfg(feature = "pkcs8")] use elliptic_curve::pkcs8::{self, AssociatedOid, DecodePublicKey}; +#[cfg(feature = "pem")] ...
1
16
0
a440df135ad0feaa17978b1aabeee9d4dd55eafa
Tony Arcieri
2022-06-27T02:55:32
rfc6979: use `SimpleHmac` to implement `HmacDrbg` (#499) `SimpleHmac` allows for significantly simpler bounds on generic digest types versus `Hmac`.
diff --git a/Cargo.lock b/Cargo.lock index 9e7c1b9..8905966 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ dependencies = [ [[package]] name = "dsa" -version = "0.3.0" +version = "0.4.0-pre" dependencies = [ "digest 0.10.3", "num-bigint-dig", @@ -490,7 +490,7 @@ dependencies = [ [[package]] n...
10
35
169
cb3e9038795f5be6b34214126f8644ad95134145
Tony Arcieri
2022-06-17T18:57:58
ecdsa: use `serdect` for `Signature` types (#497) Uses the `serdect` crate (already a dependency) to serialize/deserialize `Signature` types. Fixes RustCrypto/elliptic-curves#608.
diff --git a/ecdsa/src/der.rs b/ecdsa/src/der.rs index 937e439..e2f919c 100644 --- a/ecdsa/src/der.rs +++ b/ecdsa/src/der.rs @@ -16,6 +16,9 @@ use elliptic_curve::{ #[cfg(feature = "alloc")] use alloc::boxed::Box; +#[cfg(feature = "serde")] +use serdect::serde::{de, ser, Deserialize, Serialize}; + /// Maximum over...
2
48
46
ba86f162925200743c1ce7e78d71a62bc03ce2d0
Tony Arcieri
2022-05-16T22:37:32
dsa: rename key types to `SigningKey` and `VerifyingKey` (#485) For consistency with the `ecdsa` crate. This naming scheme follows the philosophy that in a digital signature scheme, it's clearer to name keys after their roles. DSA admittedly benefits less than other schemes where there are other potential algo...
diff --git a/dsa/examples/export.rs b/dsa/examples/export.rs index 7e9face..03fa5fb 100644 --- a/dsa/examples/export.rs +++ b/dsa/examples/export.rs @@ -1,21 +1,21 @@ -use dsa::{consts::DSA_2048_256, Components, PrivateKey}; +use dsa::{consts::DSA_2048_256, Components, SigningKey}; use pkcs8::{EncodePrivateKey, Encode...
12
136
138
a93a0730f9dfb34a63f49f6f4f1bfa644b618174
Tony Arcieri
2022-05-16T20:07:16
dsa: description and boilerplate fixups (#484) - add description to Cargo.toml - minor DER signature fixup - set `opt-level = 2` at workspace level so tests run fast by default
diff --git a/Cargo.toml b/Cargo.toml index 528cd4a..fd55cc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,6 @@ members = [ "ed25519", "rfc6979" ] + +[profile.dev] +opt-level = 2 diff --git a/dsa/Cargo.toml b/dsa/Cargo.toml index afd2fe2..26bef5a 100644 --- a/dsa/Cargo.toml +++ b/dsa/Cargo.toml @@ -1,10...
4
14
4
dc0f3b35af045ff02257f120df7623caae67b362
Tony Arcieri
2022-05-16T15:12:39
ed25519: fix overflow handling in serde deserializers (#482) Avoid a panic when deserializing signatures which overflow the field modulus. Includes a test for the error case.
diff --git a/ed25519/src/serde.rs b/ed25519/src/serde.rs index 6c536d3..6e7eaeb 100644 --- a/ed25519/src/serde.rs +++ b/ed25519/src/serde.rs @@ -53,9 +53,8 @@ impl<'de> Deserialize<'de> for Signature { } } - deserializer - .deserialize_tuple(Signature::BYTE_SIZE, ByteArrayVisit...
1
33
6
2c75d59928e5672b044254663b2d9e54ffb28dcb
Tony Arcieri
2022-05-16T14:55:59
ed25519: factor `serde` support into its own module (#481)
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index 988e04e..865ad06 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -262,6 +262,9 @@ extern crate alloc; #[cfg_attr(docsrs, doc(cfg(feature = "pkcs8")))] pub mod pkcs8; +#[cfg(feature = "serde")] +mod serde; + pub use signature::{self, Error}; ...
2
109
99
330abf7890c9e481ed67014bbe6b40f083fe5d60
Tony Arcieri
2022-05-16T01:31:31
ed25519: use `TryInto` in `serde` deserializers (#479) Parses byte array parsed from `serde` deserializer using `TryInto`, which avoids potential panics. Closes #478
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index a01abb6..988e04e 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -500,7 +500,7 @@ impl<'de> Deserialize<'de> for Signature { deserializer .deserialize_tuple(Signature::BYTE_SIZE, ByteArrayVisitor) - .map(|bytes| by...
1
2
2
b33804b0828fb71b68694d1060ba594071e45674
Tony Arcieri
2022-05-10T01:43:53
ecdsa: add `try_sign_digest_rfc6979` and `verify_digest` primitives (#475) Adds primitive methods that operate on a generic `D` digest algorithm implementation. This simplifies invoking the primitive methods.
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 00eb3d1..1c95bdd 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -35,6 +35,9 @@ use crate::{ Signature, }; +#[cfg(all(feature = "arithmetic", feature = "digest"))] +use signature::digest::FixedOutput; + #[cfg(all(feature = "rfc6979"))] ...
3
53
16
ef0fac55bfe90ea267d4ff2a90f089c7def1204b
Tony Arcieri
2022-05-09T04:31:53
rfc6979: bump `crypto-bigint` dependency to v0.4 (#469)
diff --git a/rfc6979/Cargo.toml b/rfc6979/Cargo.toml index 35ca317..6d274f6 100644 --- a/rfc6979/Cargo.toml +++ b/rfc6979/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" rust-version = "1.57" [dependencies] -crypto-bigint = { version = "0.4.0-pre.0", default-features = false, features = ["generic-array", "zeroize"] }...
1
1
1
87e565ce32b6311f033f63464e02e075aabfa1c4
Tony Arcieri
2022-05-09T04:30:11
ecdsa: bump `der` to v0.6; `elliptic-curve` to v0.12 (#468)
diff --git a/Cargo.lock b/Cargo.lock index 406e2a0..be593aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.4.0-pre.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6297ed3c636678b7495c...
3
28
37
4466e7f73e940e1006a2ad2a62efe6ed50b044f0
Tony Arcieri
2022-05-08T03:13:59
ecdsa: bump `elliptic-curve` dependency to v0.12.0-pre.4 (#467)
diff --git a/Cargo.lock b/Cargo.lock index 44fb383..406e2a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.0-pre.4" +version = "0.14.0-pre.5" dependencies = [ "der 0.6.0-pre.4", "elliptic-curve", @@ -203,9 +203,9 @@ dependencies = [ ...
2
10
8
7be116deff437bc9c12b1811227b36d1a859dd5d
Tony Arcieri
2022-05-07T21:20:08
ecdsa: fix test generator macros in `dev` module (#464) Updated with the breaking changes to the `SignPrimitive` and `VerifyPrimitive` macros.
diff --git a/ecdsa/src/dev.rs b/ecdsa/src/dev.rs index 8f46a8a..ce00c7f 100644 --- a/ecdsa/src/dev.rs +++ b/ecdsa/src/dev.rs @@ -53,7 +53,7 @@ macro_rules! new_signing_test { for vector in $vectors { let d = decode_scalar(vector.d).expect("invalid vector.d"); let k = decod...
1
3
9
b5d0bb835fa7d83adab28aec7c8dafc5efc87033
Tony Arcieri
2022-05-07T17:44:18
ecdsa v0.14.0-pre.4 (#463)
diff --git a/Cargo.lock b/Cargo.lock index 6205139..44fb383 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.0-pre.3" +version = "0.14.0-pre.4" dependencies = [ "der 0.6.0-pre.4", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Ca...
2
2
2
237fde01c9fb09ac3b7b9af517881ce7de8d137c
Tony Arcieri
2022-05-07T17:31:37
ecdsa: bump `elliptic-curve` to v0.12.0-pre.3 (#462)
diff --git a/Cargo.lock b/Cargo.lock index e64bbc9..6205139 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.4.0-pre.0" +version = "0.4.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9df9647255ed39...
4
23
25
e1916f9579a3584460e564a16868b43219911813
Tony Arcieri
2022-05-06T20:08:35
ecdsa v0.14.0-pre.3 (#461)
diff --git a/Cargo.lock b/Cargo.lock index 5036517..e64bbc9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,7 +152,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.0-pre.2" +version = "0.14.0-pre.3" dependencies = [ "der 0.6.0-pre.4", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Ca...
2
2
2
995255605ad53354d5734c8b3374d0b2a775582c
Tony Arcieri
2022-05-06T18:06:07
ecdsa: have primitive methods accept field bytes + RFC6979 API (#460) Changes `SignPrimitive` and `VerifyPrimitive` to accept `FieldBytes<C>` rather than `Scalar<C>`, performing a reduction internally. Also refactors the `hazmat::rfc6979_generate_k` free function as a method of `SignPrimitive`, i.e.: SignPr...
diff --git a/ecdsa/src/hazmat.rs b/ecdsa/src/hazmat.rs index 001a4e5..00eb3d1 100644 --- a/ecdsa/src/hazmat.rs +++ b/ecdsa/src/hazmat.rs @@ -35,9 +35,9 @@ use crate::{ Signature, }; -#[cfg(all(feature = "sign"))] +#[cfg(all(feature = "rfc6979"))] use { - elliptic_curve::{ff::PrimeField, zeroize::Zeroizing, ...
3
62
60
4f2951b9ccf0b688d3696a0c2f15a08d64e9e46d
Tony Arcieri
2022-05-06T16:04:47
ecdsa: bump `elliptic-curve` dependency to v0.12.0-pre.2 (#459)
diff --git a/Cargo.lock b/Cargo.lock index 95f87cd..5036517 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,6 +59,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" +[[package]] +name = "const-oid" +v...
5
114
38
8ae226d1fd39a6815e772550041e89c1a263d87c
Tony Arcieri
2022-03-18T20:20:37
ed25519: remove `signatory` and `sodiumoxide` references (#457) The documentation previously referred to these two defunct projects
diff --git a/ed25519/src/lib.rs b/ed25519/src/lib.rs index ea1fb7f..a2ab097 100644 --- a/ed25519/src/lib.rs +++ b/ed25519/src/lib.rs @@ -224,15 +224,11 @@ //! //! - [`ed25519-dalek`] - mature pure Rust implementation of Ed25519 //! - [`ring-compat`] - compatibility wrapper for [*ring*] -//! - [`signatory-sodiumoxide...
1
0
4
6ddc647172c76b4ead0b2ed4d2e37c64812348e9
Tony Arcieri
2022-03-16T17:21:17
ecdsa v0.14.0-pre.2 (#453)
diff --git a/Cargo.lock b/Cargo.lock index 4530d6c..745e122 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,7 +135,7 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.0-pre.1" +version = "0.14.0-pre.2" dependencies = [ "der", "elliptic-curve", diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml ind...
3
10
12
f6d0130a8d33a541a3f92fa36aaf6b4253342092
Артём Павлов [Artyom Pavlov]
2022-03-16T14:33:03
Update Cargo.lock
diff --git a/Cargo.lock b/Cargo.lock index 6e3e698..4530d6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[package]] name = "base64ct" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/cr...
1
42
42
3395d43835e192c0512acbb6c8edab4f27bacdd4
Tony Arcieri
2022-03-16T13:54:57
ecdsa: add `VerifyingKey::from_affine` (#452) Adds a thunk to `PublicKey::from_affine` for initializing a `VerifyingKey` from an affine point. The method is fallible because the identity (a.k.a. point at infinity) is disallowed as a verifying key.
diff --git a/ecdsa/src/verify.rs b/ecdsa/src/verify.rs index 2ab482a..759fa82 100644 --- a/ecdsa/src/verify.rs +++ b/ecdsa/src/verify.rs @@ -62,6 +62,15 @@ where .map_err(|_| Error::new()) } + /// Initialize [`VerifyingKey`] from an affine point. + /// + /// Returns an [`Error`] if the give...
1
9
0
786b9bc158b2b9e0a8f0c07f811600957294880c
Tony Arcieri
2022-01-19T23:04:01
ecdsa: fix prerelease version pinning (#444) The `elliptic-curve` crate was pinned to inconsistent versions, and without the `=` predicate. It should still resolve to the correct version for now. This fixes the inconsistency and pins it directly to specific prerelease versions.
diff --git a/ecdsa/Cargo.toml b/ecdsa/Cargo.toml index 4cfbd67..a3b5557 100644 --- a/ecdsa/Cargo.toml +++ b/ecdsa/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" rust-version = "1.57" [dependencies] -elliptic-curve = { version = "0.12.0-pre.0", default-features = false, features = ["digest", "sec1"] } +elliptic-curve...
1
2
2