Commit graph

2267 commits

Author SHA1 Message Date
pinkforest
ad7c755f49 Documentation migrate to docs.rs hosted
This change migrates all the documentation from dalek.rs
to docs.rs hosted and fixed the backend documentation
generation that was broken.
2022-11-26 11:26:25 +11:00
Michael Rosenberg
c604520311
Made docs makefile use nightly 2022-11-24 02:37:07 -05:00
Michael Rosenberg
969940e954
Wibble 2022-11-24 02:37:07 -05:00
Michael Rosenberg
a743ea5348
Fixed doc warnings 2022-11-24 02:37:05 -05:00
Michael Rosenberg
45d6adba73
Updated CHANGELOG to reflect recent PRs 2022-11-24 02:32:20 -05:00
Michael Rosenberg
6eafb1ebda
Deprecate EdwardsPoint::hash_from_bytes (#438)
* Deprecated `EdwardsPoint::hash_from_bytes` and renamed to
  `EdwardsPoint::nonspec_map_to_curve`

* Added KAT test vectors for `RistrettoPoint::from_uniform_bytes`
2022-11-24 01:45:03 -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
d4cffc7d05
ed25519 v2.0.0-pre.0 (#222)
Bumps the `ed25519` crate to the v2.0.0-pre.0 prerelease.

This version notably uses the `signature` crate's v2 API:

https://github.com/RustCrypto/traits/pull/1141
2022-11-21 17:21: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
Tony Arcieri
f88cf6836b
Use include_str! for .md inclusion in rustdoc (#434)
Previously a now-removed nightly-only feature was used, but now that
it's stable, `include_str!` can be used for all of these cases.
2022-11-14 00:22:50 -05:00
Tony Arcieri
d05afa02a3
Add alloc feature gates to simd tests that need it (#433) 2022-11-14 00:11:23 -05:00
Tony Arcieri
7d275100bf
CI: fix build-simd job (#436)
The `RUSTFLAGS` were getting applied to build scripts, which caused them
to crash with SIGILL.

According to this issue, RUSTFLAGS won't be applied to build scripts
when cross-compiling by passing the `--target` attribute:

https://github.com/rust-lang/cargo/issues/4423

This attempts to work around the problem by explicitly passing:

    --target x86_64-unknown-linux-gnu
2022-11-13 23:21:24 -05:00
Tony Arcieri
081f632d91
Implement simplified backend selection (#428)
As proposed in #414, this commit changes the backend selection approach,
introspecting `target_pointer_width` to select `u32_backend` vs
`u64_backend` (or `fiat_u32_backend`/`fiat_u64_backend` if the
`fiat_backend` feature is enabled).

This helps eliminate the use of non-additive features, and also the
rather confusing errors that happen if multiple backends are selected
(i.e. thousands of lines of rustc errors).

The selection logic checks if `target_pointer_width = "64"` and uses the
64-bit backend, or falls back to the 32-bit backend otherwise. This
means the crate will always have a valid backend regardless of the
pointer width, although there may be odd edge cases for exotic platforms
which would optimally use the 64-bit backend but have a non-"64" target
pointer width for whatever reason. We can handle those cases as they
come up.
2022-11-13 12:17:42 -05:00
pinkforest(she/her)
977eb0d3b7
Bump criterion to 0.4.0 (#432) 2022-11-13 01:36:46 -05:00
Michael Rosenberg
e85e3c047b
Merge pull request #429 from pinkforest/docs/readme/de-dup
Use #[include_str] for top-level docs
2022-11-13 01:03:37 -05:00
pinkforest
62fe24e022 Include README.md into the crate Documentation
As proposed in #426 this commit changes to include README.md into
the crate documentation instead of maintaining a carbon copy in
the code.

This helps to keep the documentation in a single place without
duplicating the documentation in multiple places leading to less
errors and out of date documentation.
2022-11-11 22:36:57 +11:00
Michael Rosenberg
90292dccf8
Relaxed zeroize dependency 2022-11-10 03:44:26 -05:00
Thomas Pornin
d687cc8f82
Fix double-and-compress on Ristretto identity (issue #398). (#399) 2022-11-05 11:35:30 -04:00
Michael Rosenberg
0d75725da3
Merge pull request #424 from rozbb/rustfmt
Did a full formatting pass on the crate. Read the comments in the referenced for
steps to verify that the PR made no semantic changes to the code. Huge credit
goes to @robjtede for this work.
2022-11-04 03:03:32 -04:00
Michael Rosenberg
d2bf310330
cargo fmt 2022-10-28 17:00:24 -04:00
Michael Rosenberg
a959787c2e
Added more #[rusfmt::skip] 2022-10-28 16:58:40 -04:00
Michael Rosenberg
95b368a431
Whitespace formatting fixes on the [rustfmt::skip] functions 2022-10-28 16:32:45 -04:00
Michael Rosenberg
6d906bb70c
Added #[rustfmt::skip] where necessary 2022-10-28 13:51:20 -04:00
Michael Rosenberg
a32f56ba36
Undid the bad reformatting job from 5758b8c 2022-10-28 13:22:49 -04:00
Michael Rosenberg
8fa201639a
Fix AVX2 and AVX-512 builds (#419)
Build was broken by 5758b8c.
This adds a regression test to CI so it doesn't happen again
2022-10-28 13:10:44 -04:00
Michael Rosenberg
3a94bf8a8e
Cherry-picked Github actions from 1f9e527 2022-10-28 12:15:50 -04:00
Anthony Ramine
1f9e527597
Update GitHub actions (#422) 2022-10-28 11:50:24 -04:00
Michael Rosenberg
5fe0e969bf
Enable CI for arbitrary PRs 2022-10-22 13:28:00 -04:00
Hugo Tunius
c000957bae
Remove byteorder (#418)
Instead of having a dependency on `byteorder`, use methods from the
standard library(`{to,from}_le_bytes`).
2022-10-22 03:42:23 -04:00
Michael Rosenberg
3246aa7edc Noted edition change in changelog 2022-10-18 13:59:35 -04:00
Michael Rosenberg
5758b8cce1
Updated to edition 2021 (#413) 2022-10-18 13:45:59 -04:00
Michael Rosenberg
51572dae8d
Relax zeroize dependency and bump MSRV (#412) 2022-10-17 15:08:34 -04:00
Michael Rosenberg
7529d65506 Fixed installation section in README; accidentally deleted this earlier 2022-10-16 19:38:36 -04: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
Alex Xiong
9638ab40a5
Made ExpandedSecretKey private to avoid signing key oracle (#205)
This fix eliminates a scenario where a user misuses the `ExpandedSecretKey` API
in a way that leaks the user's secret key. In short, if a user sends
`ExpandedSecretKey::sign(sk, msg, pk1)` followed by
`ExpandedSecretKey::sign(sk, msg, pk2)`, where `pk1 != pk2`, a passive
adversary [can easily][0] derive `sk`. To mitigate this, we remove the API
entirely.

[0]: https://github.com/MystenLabs/ed25519-unsafe-libs
2022-10-15 15:04:03 -04:00
Isis Lovecruft
c3ed99bf93
Bump curve25519-dalek version to 4.0.0-pre.2. 2022-02-16 21:26:01 +00:00
Isis Lovecruft
f78215308a
Merge branch 'develop' into release/4.0 2022-02-16 20:57:44 +00:00
Isis Lovecruft
8abb22bcaf
Merge branch 'main' into develop 2022-02-16 20:55:36 +00:00
Isis Lovecruft
0d49dfacf6
Merge remote-tracking branch 'dalek/main' into main 2022-02-16 20:55:08 +00:00
Isis Lovecruft
f7381ac64c
Pin zeroize dependency to >=1, <1.4 to relax bounds for downstreams.
As suggested by @tarcieri in #362. See also commit b6a7406.
2022-02-16 20:52:33 +00:00
isis agora lovecruft
6820effb44
Merge pull request #381 from bitmold/patch-1
Update README.md
2022-02-01 23:58:18 +00:00
Isis Lovecruft
2ef1429665
Merge branch 'feature/digest-sha2-v0.10' into release/4.0 2022-02-01 23:53:44 +00:00
Isis Lovecruft
f9f0384aee
Bump sha2 and digest dependencies to 0.10. 2022-02-01 23:48:11 +00:00
Isis Lovecruft
71acc842c3
Merge branch 'develop' into release/4.0 2022-02-01 23:30:54 +00:00
Isis Lovecruft
bf95fcba24
Merge branch 'main' into develop 2022-02-01 23:30:13 +00:00
Isis Lovecruft
b6a7406c73
Pin zeroize dependency to =1.3.0 to maintain MSRV 1.41. 2022-02-01 23:29:41 +00:00
Isis Lovecruft
b131092c9b
Merge branch 'develop' into release/4.0 2022-02-01 23:28:22 +00:00
bitmold
b06df0376c
Update README.md
master -> main
2022-02-01 02:15:31 -05:00
Isis Lovecruft
3fc0108d7d
Merge branch 'release/2.0.0-pre.1' into release/2.0 2021-09-23 20:42:19 +00:00