Commit Graph

770 Commits

Author SHA1 Message Date
Tony Arcieri 31e69fabc2 ed25519: bump ed25519-dalek to v2 (#738)
This is used as a `dev-dependency` for doctesting rustdoc documentation
showing how to use the trait-based API.
2023-08-13 13:27:02 -06:00
dependabot[bot] e14a200329 build(deps): bump der from 0.7.7 to 0.7.8 (#737)
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.7 to 0.7.8.
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.7...der/v0.7.8)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 08:59:43 -06:00
Tony Arcieri 36f195e25a README.md: add link to RSA repo 2023-07-28 11:05:51 -06:00
Tony Arcieri 4e8a30bad1 README.md: capitalize "Signatures" 2023-07-20 20:17:46 -06:00
Tony Arcieri a467b313f0 ecdsa v0.16.8 (#733) ecdsa/v0.16.8 2023-07-20 20:15:00 -06:00
Tony Arcieri d7557a62bc ecdsa: extract hazmat::{sign_prehashed, verify_prehashed}. (#731)
Extracts generic, reusable functions from the `SignPrimitive` and
`VerifyPrimitive` traits.

The main motivation for this is to make it possible for the `*Primitive`
trait impls to be composed in terms of a generic implementation, in
order to add support for low-S normalization in the `k256` crate.
2023-07-17 16:55:05 -06:00
Tony Arcieri 2c3d90ed6f ecdsa: refactor Signature constructors and improve docs (#730)
Implements `from_bytes` in terms of `from_scalars`, rather than the
other way around.

This places the logic for checking that `r` and `s` are nonzero inside
of the `from_scalars` method.

Additionally improves the documentation to note the various failure
cases, i.e. if `r` and/or `s` is out of the range `1..n`, where `n` is
the scalar modulus.
2023-07-10 12:46:56 -06:00
dependabot[bot] 5a0157620c build(deps): bump serde_bytes from 0.11.9 to 0.11.11 (#729)
Bumps [serde_bytes](https://github.com/serde-rs/bytes) from 0.11.9 to 0.11.11.
- [Release notes](https://github.com/serde-rs/bytes/releases)
- [Commits](https://github.com/serde-rs/bytes/compare/0.11.9...0.11.11)

---
updated-dependencies:
- dependency-name: serde_bytes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-08 15:45:32 -06:00
dependabot[bot] 5ae0d0fc64 build(deps): bump subtle from 2.4.1 to 2.5.0 (#726)
Bumps [subtle](https://github.com/dalek-cryptography/subtle) from 2.4.1 to 2.5.0.
- [Changelog](https://github.com/dalek-cryptography/subtle/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/subtle/compare/2.4.1...2.5.0)

---
updated-dependencies:
- dependency-name: subtle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-30 08:13:41 -06:00
dependabot[bot] e584cef4aa build(deps): bump elliptic-curve from 0.13.4 to 0.13.5 (#719)
Bumps [elliptic-curve](https://github.com/RustCrypto/traits) from 0.13.4 to 0.13.5.
- [Commits](https://github.com/RustCrypto/traits/compare/elliptic-curve-v0.13.4...elliptic-curve/v0.13.5)

---
updated-dependencies:
- dependency-name: elliptic-curve
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 18:25:15 -06:00
dependabot[bot] 3a871f3ecb build(deps): bump digest from 0.10.6 to 0.10.7 (#720)
Bumps [digest](https://github.com/RustCrypto/traits) from 0.10.6 to 0.10.7.
- [Commits](https://github.com/RustCrypto/traits/compare/digest-v0.10.6...digest-v0.10.7)

---
updated-dependencies:
- dependency-name: digest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 18:25:08 -06:00
dependabot[bot] ec0e19b36d build(deps): bump sha2 from 0.10.6 to 0.10.7 (#722)
Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.6 to 0.10.7.
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.6...sha2-v0.10.7)

---
updated-dependencies:
- dependency-name: sha2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 18:25:01 -06:00
dependabot[bot] ada6d54cc8 build(deps): bump der from 0.7.6 to 0.7.7 (#725)
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.6 to 0.7.7.
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.6...der/v0.7.7)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 18:24:50 -06:00
dependabot[bot] 36531d4b70 build(deps): bump ed25519-dalek from 2.0.0-rc.2 to 2.0.0-rc.3 (#724)
Bumps [ed25519-dalek](https://github.com/dalek-cryptography/ed25519-dalek) from 2.0.0-rc.2 to 2.0.0-rc.3.
- [Changelog](https://github.com/dalek-cryptography/ed25519-dalek/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dalek-cryptography/ed25519-dalek/compare/2.0.0-rc.2...2.0.0-rc.3)

---
updated-dependencies:
- dependency-name: ed25519-dalek
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 09:37:14 -06:00
dependabot[bot] ecb112aa25 build(deps): bump der from 0.7.5 to 0.7.6 (#718)
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.5 to 0.7.6.
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.5...der/v0.7.6)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 09:02:44 -06:00
Arthur Gautier ab5150ca46 ecdsa: v0.16.7 (#717)
Added
- RFC5480 citation for `der::Signature` (#710)
- support for the `SignatureBitStringEncoding` trait (#716)

Changed
- bump `elliptic-curve` from 0.13.3 to 0.13.4 (#709)
- `der::Signature` citation to RFC5912 (#711)
- make `fmt` impls more consistent (#713)

Fixed
- `serde` doc fixup (#712)
ecdsa/v0.16.7
2023-05-11 09:43:07 -06:00
Arthur Gautier 7bf1313e85 ecdsa: Adds support for the SignatureBitStringEncoding trait (#716) 2023-05-04 16:29:24 -06:00
dependabot[bot] b60d1d9275 build(deps): bump der from 0.7.4 to 0.7.5 (#715)
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/RustCrypto/formats/releases)
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.4...der/v0.7.5)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 09:08:26 -06:00
Tony Arcieri ce1c1f7466 Add SECURITY.md 2023-04-23 20:01:18 -06:00
dependabot[bot] d40f02c2df build(deps): bump der from 0.7.3 to 0.7.4 (#714)
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.3 to 0.7.4.
- [Release notes](https://github.com/RustCrypto/formats/releases)
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.3...der/v0.7.4)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 09:17:01 -06:00
Tony Arcieri 800eda2a07 ecdsa: make fmt impls more consistent (#713) 2023-04-14 11:30:03 -06:00
Tony Arcieri 31ebc99a15 ecdsa: serde doc fixup (#712)
The width of a serialized `Signature` is generic and based on the size
of the underlying curve's modulus, not a fixed 64-bytes.
2023-04-14 10:57:19 -06:00
Tony Arcieri 9433d578fa ecdsa: change der::Signature citation to RFC5912 (#711) 2023-04-13 14:21:53 -06:00
Tony Arcieri b776db27b0 ecdsa: add RFC5480 citation for der::Signature (#710)
Adds a reference to the ASN.1 schema and where it's defined
2023-04-13 14:09:26 -06:00
dependabot[bot] 91a62e8aba build(deps): bump elliptic-curve from 0.13.3 to 0.13.4 (#709)
Bumps [elliptic-curve](https://github.com/RustCrypto/traits) from 0.13.3 to 0.13.4.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/elliptic-curve-v0.13.3...elliptic-curve-v0.13.4)

---
updated-dependencies:
- dependency-name: elliptic-curve
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 09:18:17 -06:00
Tony Arcieri f6fc070174 ecdsa v0.16.6 (#708) ecdsa/v0.16.6 2023-04-09 18:42:16 -06:00
Tony Arcieri c3e35b13f2 ecdsa: fix test macros handling of serialized field size (#707)
Uses `C::FieldBytesSize` instead of `C::Uint::BYTES`, which is needed
for curves like P-224 where the serialized field element may be smaller
than the bigint used to represent them.
2023-04-09 18:13:59 -06:00
Tony Arcieri ce76e7b17f ecdsa v0.16.5 (#706) ecdsa/v0.16.5 2023-04-08 21:10:49 -06:00
Tony Arcieri d18b8a90f3 ecdsa: use C::FieldBytesSize over C::Uint::BYTES (#705)
This is needed to make curves like P-224 and P-521 work, since the size
of the `C::Uint` may not match the size of an integer serialization of a
field element (since `C::Uint::MAX` may be much larger than the field
modulus)
2023-04-08 20:27:34 -06:00
dependabot[bot] d60dc12dc8 build(deps): bump der from 0.7.2 to 0.7.3 (#704)
Bumps [der](https://github.com/RustCrypto/formats) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/RustCrypto/formats/releases)
- [Commits](https://github.com/RustCrypto/formats/compare/der/v0.7.2...der/v0.7.3)

---
updated-dependencies:
- dependency-name: der
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-07 09:05:27 -06:00
Tony Arcieri 4dd567e764 ecdsa v0.16.4 (#703) ecdsa/v0.16.4 2023-04-05 12:52:59 -06:00
Tony Arcieri 621a847b8a ecdsa: fix RecoveryId computation in SignPrimitive (#702)
The implementation was adapted from `k256`, which produces signatures
with low-S normalization.

However, the provided implementation does not low-S normalize
signatures, so it should not be considered in the `RecoveryId`
computation.
2023-04-05 12:19:39 -06:00
dependabot[bot] 55fbdcd42a build(deps): bump hex-literal from 0.4.0 to 0.4.1 (#701)
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.4.0...hex-literal-v0.4.1)

---
updated-dependencies:
- dependency-name: hex-literal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 09:11:52 -06:00
Tony Arcieri cb98557362 dsa v0.6.1 (#700) dsa/v0.6.1 2023-04-04 21:03:16 -06:00
Tony Arcieri dd7cacb877 ecdsa v0.16.3 (#699) ecdsa/v0.16.3 2023-04-04 20:55:30 -06:00
Tony Arcieri d25b07c18e ecdsa: forward AssociatedAlgorithmIdentifier impls (#698)
...from the `elliptic-curve` crate, as released in v0.13.3
2023-04-04 20:39:20 -06:00
Tony Arcieri 116528faf2 dsa+ecdsa: loosen signature bound to 2.0, <2.2 (#697)
`signature` v2.1.0 is out and only adds features. It does not change the
`digest` or `rand_core` dependencies (there are SemVer exceptions for
these crates, hence the non-SemVer requirement)

Because those deps are unchanged in v2.1.0, we can relax the requirement
to support v2.0 and v2.1 releases.
2023-04-04 20:14:52 -06:00
Dmitry Baryshkov 9de47b676e ecdsa: follow the DynAssociatedAlgorithmIdentifier changes (#695)
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-04-04 18:08:25 -06:00
Tony Arcieri 771e09bb60 ed25519 v2.2.1 (#694) ed25519/v2.2.1 2023-04-03 10:23:20 -06:00
Tony Arcieri 2244700450 ed25519: bump ed25519-dalek to v2.0.0-rc.2 (#693)
It's a `dev-dependency` used to doctest the usage examples in the
rustdoc
2023-04-03 10:05:06 -06:00
Tony Arcieri 6390a548fe ed25519: bump ring-compat to v0.7 (#692) 2023-04-03 09:37:50 -06:00
dependabot[bot] 2842eab590 build(deps): bump hex-literal from 0.3.4 to 0.4.0 (#691)
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.3.4 to 0.4.0.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.4...hex-literal-v0.4.0)

---
updated-dependencies:
- dependency-name: hex-literal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 09:09:05 -06:00
Tony Arcieri bb601997d8 ecdsa: add SignatureWithOid verification support (#690)
Gated under a newly added `sha2` feature.

This implementation dispatches based on RFC5758 OIDs, selecting the
appropriate hash function to use at runtime based on the OID.
2023-04-02 19:59:53 -06:00
Tony Arcieri e05b64f4d8 ecdsa: add SignatureWithOid (#689)
Adds a signature type which is paramaterized by an RFC5758-defined OID
identifying the variant of ECDSA used to produce the signature.
2023-04-02 19:22:20 -06:00
Tony Arcieri 5ebcfef950 ecdsa: impl SignatureAlgorithmIdentifier (#688)
Propagates the `AssociatedAlgorithmIdentifier` from `Signature<C>` to
`SigningKey<C>` and `VerifyingKey<C>`.
2023-04-02 18:31:20 -06:00
Tony Arcieri 56dd91a963 ecdsa: add RFC5758 OID support (#686)
Adds support for obtaining the RFC5758 OIDs associated with the digest
algorithm used with the `Signer` and `Verifier` traits, i.e. the digest
defined via `DigestPrimitive::Digest` for a given curve.

The ECDSA OID is available via an `AssociatedOid` impl on `Signature`.

The `AlgorithmIdentifier` is also available via the newly added
`AssociatedAlgorithmIdentifier` trait.
2023-04-02 16:13:16 -06:00
Tony Arcieri 08e6d2eec1 ecdsa v0.16.2 (#685) ecdsa/0.16.2 2023-03-28 11:12:45 -06:00
Tony Arcieri 6121f15d59 ecdsa: add Signature::{from_bytes, from_slice} (#684)
Adds inherent methods for parsing a signature from `SignatureBytes<C>`
and a byte slice respectively.

The existing `TryFrom<&[u8]>` impl now calls `Signature::from_slice`.

These methods match similar inherent methods on other types.
2023-03-28 10:58:49 -06:00
dependabot[bot] 02e6892f37 build(deps): bump zeroize from 1.5.7 to 1.6.0 (#683)
Bumps [zeroize](https://github.com/RustCrypto/utils) from 1.5.7 to 1.6.0.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/zeroize-v1.5.7...zeroize-v1.6.0)

---
updated-dependencies:
- dependency-name: zeroize
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 11:12:01 -06:00
Dirk Stolle 30fad0c067 Replace unmaintained actions-rs/* actions in CI workflows (#682)
Basically all of the `actions-rs/*` actions are unmaintained. See
<https://github.com/actions-rs/toolchain/issues/216> for more
information. Due to their age they generate several warnings in
CI runs.

To get rid of some of those warnings the occurrences of
`actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`,
and the occurrences of `actions-rs/cargo` are replaced by direct
invocations of `cargo`.
2023-03-20 19:08:59 -06:00