Commit graph

25 commits

Author SHA1 Message Date
Michael Rosenberg
fc8a8a5276
Cut pre.0 prereleases (#784) 2025-07-09 19:04:17 +02:00
Arthur Gautier
a99efe2304
curve,ed,x: Bump rand_core to 0.9 (#777)
---------

Co-authored-by: pinkforest <36498018+pinkforest@users.noreply.github.com>
2025-07-07 15:36:11 -04:00
Tony Arcieri
a9aa94736b
Bump digest, ed25519, signature, and sha2 (#676)
Bumps the aforementioned dependencies to their latest (pre)releases.
2025-07-07 11:34:26 -06:00
Tony Arcieri
53df025bb3
Bump edition to 2024 and crate versions to prereleases (#775)
This represents the first breaking change in a new release series,
bumping all crates to the 2024 edition of Rust.

As such, the version numbers of all crates have been incremented to
represent a new prerelease series:

- `curve25519-dalek`: v5.0.0-pre
- `ed25519-dalek`: v3.0.0-pre
- `x25519-dalek`: v3.0.0-pre

Note that this commit isn't intended to cut associated crate releases of
these on crates.io, but is merely bumping the version numbers to denote
there are pending breaking changes.

This commit also includes rustfmt changes which were made as part of the
2024 edition.

Also includes clippy fixes.
2025-07-07 11:52:25 -04:00
Iñigo Querejeta Azurmendi
25a9dbb811
curve: Hash to curve and field as defined in the standard (#377)
* Implementation of `hash_to_field` as defined in the standard
* Implementation of `hash_to_curve` as defined in the standard, by changing the mechanism over which we chose the sign.
* For the point above, had to change the `elligator_encode` to return whether `eps` is a square or not (required for `hash_to_curve`).
* Included test vectors of the draft.
* Included `FieldElement::from_bytes_wide(bytes: &u8; 64])` to reduce integers encoded in 64 bytes.
2025-07-05 22:01:26 +02:00
Arthur Gautier
8c0cf3a64f
chore(deps): bump cpufeatures from 0.2.12 to 0.2.17 (#750)
This fixes warnings like:
```
warning: unexpected `cfg` condition value: ``
  --> curve25519-dalek/src/backend/mod.rs:58:9
   |
58 |         cpufeatures::new!(cpuid_avx512, "avx512ifma", "avx512vl");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
2025-05-08 14:06:28 -06:00
pinkforest(she/her)
b636fb8ee4
Make AVX512IFMA opt-in backend (#695)
* Make AVX512IFMA opt-in backend

* Updated README to have backend info

* Added entry to changelog

---------

Co-authored-by: Michael Rosenberg <michael@mrosenberg.pub>
2024-09-08 01:13:36 -04:00
Elichai Turkel
79ab6c29bd
curve: Implement ConditionallySelectable for MontgomeryPoint (#677) 2024-07-30 01:51:44 -04:00
Simon Wülker
35e78b21ef
Enable unexpected cfgs lint (#656)
Previously, the only way to configure this lint was using a build.rs
file, but now it can be done using Cargo.toml as well.
2024-07-25 20:24:39 -06:00
Tony Arcieri
5b7082bbc8
curve: use subtle::BlackBox optimization barrier (#662)
Replaces the security mitigation added in #659 and #661 for
masking-related timing variability which used an inline `black_box`
using the recently added `subtle::BlackBox` newtype (see
dalek-cryptography/subtle#123)

Internally `BlackBox` uses a volatile read by default (i.e. same
strategy which was used before) or when the `core_hint_black_box`
feature of `subtle` is enabled, it uses `core::hint::black_box`
(whose documentation was recently updated to reflect the nuances of
potential cryptographic use, see rust-lang/rust#126703)

This PR goes ahead and uses `BlackBox` for both `mask` and
`underflow_mask` where previously it was only used on `underflow_mask`.
The general pattern of bitwise masking inside a loop seems worrisome for
the optimizer potentially inserting branches in the future.

Below are godbolt inspections of the generated assembly, which are free
of the `jns` instructions originally spotted in #659/#661:

- 32-bit (read_volatile): https://godbolt.org/z/TKo9fqza4
- 32-bit (hint::black_box): https://godbolt.org/z/caoMxYbET
- 64-bit (read_volatile): https://godbolt.org/z/PM6zKjj1f
- 64-bit (hint::black_box): https://godbolt.org/z/nseaPvdWv
2024-06-24 20:13:54 +02:00
Michael Rosenberg
5312a0311e
curve: Bump version to 4.1.3 (#660)
* Bumped to v4.1.3

* Added recent PRs to changelog
2024-06-18 21:18:51 +02:00
pinkforest(she/her)
31ccb67050
Remove platforms in favor using CARGO_CFG_TARGET_POINTER_WIDTH (#636) 2024-03-01 07:35:23 -07:00
Michael Rosenberg
4ac84dd066
curve,ed,x: Bump patch version to reflect fix to nightly SIMD build (#621) 2024-02-06 20:09:18 -05:00
Michael Rosenberg
0cd099a9fb
curve: Bump version to 4.1.1 (#584) 2023-09-20 17:42:22 -05:00
Luke Parker
76a8b2a081
Add PrimeFieldBits support to Scalar (#579)
Co-authored-by: Michael Rosenberg <micro@fastmail.com>
Co-authored-by: pinkforest(she/her) <36498018+pinkforest@users.noreply.github.com>
2023-09-19 23:21:43 -04:00
Luke Parker
c157a1ed6d
Add group to documented features (#578) 2023-09-12 07:41:15 -06:00
pinkforest(she/her)
9db51a6bf7
curve: Release 4.1.0 (#574)
Co-authored-by: Rob Ede <robjtede@icloud.com>
2023-09-06 00:51:15 -04:00
Tony Arcieri
1ec4a36a80
curve: update repository in Cargo.toml (#575)
Point to the subdirectory which contains the crate
2023-09-06 00:08:06 -04:00
David Cook
a3a08b01ab
Adapt to new types introduced in fiat-crypto 0.2 (#566) 2023-09-05 10:07:49 -06:00
pinkforest(she/her)
5c5a32057c
curve: Fix no_std for fiat backend and add test for it (#572) 2023-09-04 13:49:58 -06:00
Rob Ede
c8d1d400f1
curve,ed: chore: update dev deps (#569) 2023-08-28 09:46:38 -04:00
pinkforest(she/her)
4373695c50
curve: implement ff and group traits (#562)
Originally authored by @str4d as #473
2023-08-27 14:41:06 -06:00
Michael Rosenberg
e44d4b5903
curve,ed,x: Bump curve version to 4.0.0 (#550) 2023-07-22 12:52:24 -04:00
pinkforest
6e422d96d7
Re-organize Cargo manifests to workspace 2023-06-28 09:38:06 +00:00
pinkforest
40cf5aff99
Workspace curve25519 under curve25519-dalek 2023-06-27 04:00:12 +00:00
Renamed from Cargo.toml (Browse further)