Skip to content

Commit

Permalink
curve: implement ff and group traits (#562)
Browse files Browse the repository at this point in the history
Originally authored by @str4d as #473
  • Loading branch information
pinkforest authored Aug 27, 2023
1 parent 098658d commit 4373695
Show file tree
Hide file tree
Showing 7 changed files with 662 additions and 22 deletions.
4 changes: 4 additions & 0 deletions curve25519-dalek/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ major series.

## 4.x series

### Unreleased

* Add implementations of the `ff` and `group` traits, behind the `group` feature flag.

### 4.0.0

#### Breaking changes
Expand Down
2 changes: 2 additions & 0 deletions curve25519-dalek/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ required-features = ["alloc", "rand_core"]

[dependencies]
cfg-if = "1"
group = { version = "0.13", default-features = false, optional = true }
rand_core = { version = "0.6.4", default-features = false, optional = true }
digest = { version = "0.10", default-features = false, optional = true }
subtle = { version = "2.3.0", default-features = false }
Expand All @@ -65,6 +66,7 @@ default = ["alloc", "precomputed-tables", "zeroize"]
alloc = ["zeroize?/alloc"]
precomputed-tables = []
legacy_compatibility = []
group = ["dep:group", "rand_core"]

[target.'cfg(all(not(curve25519_dalek_backend = "fiat"), not(curve25519_dalek_backend = "serial"), target_arch = "x86_64"))'.dependencies]
curve25519-dalek-derive = { version = "0.1", path = "../curve25519-dalek-derive" }
7 changes: 4 additions & 3 deletions curve25519-dalek/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ curve25519-dalek = "4"
| `digest` | | Enables `RistrettoPoint::{from_hash, hash_from_bytes}` and `Scalar::{from_hash, hash_from_bytes}`. This is an optional dependency whose version is not subject to SemVer. See [below](#public-api-semver-exemptions) for more details. |
| `serde` | | Enables `serde` serialization/deserialization for all the point and scalar types. |
| `legacy_compatibility`| | Enables `Scalar::from_bits`, which allows the user to build unreduced scalars whose arithmetic is broken. Do not use this unless you know what you're doing. |
| `group` | | Enables external `group` and `ff` crate traits |

To disable the default features when using `curve25519-dalek` as a dependency,
add `default-features = false` to the dependency in your `Cargo.toml`. To
Expand Down Expand Up @@ -190,9 +191,9 @@ From 4.x and on, MSRV changes will be accompanied by a minor version bump.
Breaking changes to SemVer exempted components affecting the public API will be accompanied by
_some_ version bump. Below are the specific policies:

| Releases | Public API Component(s) | Policy |
| :--- | :--- | :--- |
| 4.x | Dependencies `digest` and `rand_core` | Minor SemVer bump |
| Releases | Public API Component(s) | Policy |
| :--- | :--- | :--- |
| 4.x | Dependencies `group`, `digest` and `rand_core` | Minor SemVer bump |

# Safety

Expand Down
Loading

0 comments on commit 4373695

Please sign in to comment.