Commit graph

17 commits

Author SHA1 Message Date
Tony Arcieri
7d255cd85a
CI: test cargo doc build (#271)
* CI: test `cargo doc` build

Ensure it's free of warnings

* Fix rustdoc build
2023-01-21 00:21:35 -05:00
Tony Arcieri
f61e9dcf9b
Add on-by-default fast crate feature for gating basepoint tables (#251)
* Add on-by-default `fast` crate feature

Disabling the feature reduces overall code size at the cost of
performance, which is useful for e.g. embedded users.

This feature transitively enables the `basepoint-tables` feature in
`curve25519-dalek` where the basepoint tables are actually defined.

* Consolidated a lot of verification code

* Bump `curve25519-dalek`; use `precomputed-tables` feature

The feature name changed in dalek-cryptography/curve25519-dalek#499

Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2023-01-20 15:46:17 -05:00
pinkforest(she/her)
431e69959d
Make digest optional (#268)
digest isn't yet stable but we have use it in the public API.

This makes the digest API optional to use in opt-in basis by
feature gating this via an optional digest feature.

API items now feature-gated:

- `pub use ed25519_dalek::Digest`
- `SigningKey::sign_prehashed(D: prehashed_message, ..)`
- `SigningKey::verify_prehashed(D: prehahed_message, ..)`
- `VerifyingKey::verify_prehashed(D: prehashed_message, ..)`
- `VerifyingKey::verify_prehashed_strict(D: prehashed_message, ..)`

Also no longer re-exporting `sha2::Sha512`
2023-01-19 02:59:43 -05:00
pinkforest(she/her)
8c455f58ae
Make rand_core optional (#262)
* Make rand_core optional
* Bench requires features rand_core
2023-01-15 19:13:33 -05:00
Michael Rosenberg
b5dc40bedf
Make verify_batch deterministic (#256)
Also removed `batch_deterministic` feature
2023-01-14 21:26:39 -05:00
Michael Rosenberg
e2ed3133a6
Fix batch build (#220)
* Fixed bench when `batch` feature is not present

* Added bench build regression test to CI

* Fixed batch build more generally

* Simplified batch cfg gates in benches

* Updated criterion

* Made CI batch-nondeterministic test use nostd

* Fix batch_deterministic build

* Removed bad compile error when batch and batch_deterministic are selected
2023-01-02 00:59:19 -05:00
Tony Arcieri
f6a242a5b0
Use namespaced/weak features; MSRV 1.60 (#235)
This enables activating the `alloc` and `std` features without
unnecessarily pulling in optional dependencies like `rand` and `serde`.

It also fixes tests for `--no-default-features` (w\ `--lib` only)
2022-12-20 04:48:55 -05:00
Tony Arcieri
951d489d51
CI: check code is formatted correctly using rustfmt (#246) 2022-12-20 04:37:04 -05:00
pinkforest(she/her)
194b17f18a
Fix all Clippy warnings (#244)
- Add Clippy to CI
- Rename InternalError variants without redundant Error suffix
- Rename to_bytes to as_bytes on well known naming
- Fix Redundant refs
- Fix redundant lifetimes
- Fix late declarations
2022-12-18 13:56:41 -07:00
Tony Arcieri
55620dcde5
PKCS#8 support (#224)
Adds optional integration with `ed25519::pkcs8` with support for
decoding/encoding `Keypair` from/to PKCS#8-encoded documents as well as
`PublicKey` from/to SPKI-encoded documents.

Includes test vectors generated for the `ed25519` crate from:
https://github.com/RustCrypto/signatures/tree/master/ed25519/tests/examples
2022-12-13 18:19:31 -05:00
Tony Arcieri
cfcdf536a0
Cargo.toml: compatibility updates for curve25519-dalek and ed25519 (#236)
curve25519-dalek:

- Enables `digest` and `rand_core` features
- Removes transitive `nightly`, `simd_backend`, and `std` features

ed25519:

- `AsRef` impl for `Signature` has been removed; uses `to_bytes`
- Uses `try_from` for `InternalSignature` conversion
2022-12-09 21:14:38 -05:00
Tony Arcieri
44512a3e9c
CI: only build simd_backend; don't run tests (#232)
GitHub Actions runners are not guaranteed to have the necessary CPU
features in order for these tests to work.

Uses a `--target x86_64-unknown-linux-gnu` directive when compiling so
the `target_feature` flags don't apply to build scripts.
2022-12-07 03:07:55 -05:00
Tony Arcieri
a03c7a3f0f
Tune up CI configuration (#227)
- Consolidate `test` jobs: this allows reusing intermediate artifacts
  between tests which should improve build times, and also make it
  easier to test additional features in the future
- Switch to `dtolnay/rust-toolchain` for setting up toolchain
- Bump checkout to `actions/checkout@3`
- Switch to `run` directives for invoking Cargo: it's more
  straightforward to just call Cargo than use a DSL from an unmaintained
  action, and eliminates the 3rd party dependency
2022-11-21 17:23:05 -05:00
Tony Arcieri
ae4bd2c81e
Fix warnings and add -D warnings check in CI (#226) 2022-11-20 22:28:09 -05:00
Tony Arcieri
f7cbeee7f6
Bump curve25519-dalek to v4.0.0-pre (via git) (#223)
Also bumps these corresponding dependencies which are needed for everything to compile with this update:

* `merlin` v3.0
* `rand` v0.8
* `rand_core` v0.6
* `sha2` v0.10
2022-11-20 15:08:05 -05:00
Michael Rosenberg
8319adbff4
Bumped MSRV to 1.56.1 and added some documentation about semver (#218)
Also fixed benchmark build
2022-10-16 18:51:26 -04:00
Isis Lovecruft
10cef49824
Add CI via Github actions. 2021-09-14 01:04:53 +00:00