Skip to content

Add advisory for timing variability in curve25519-dalek-ng #2339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions crates/curve25519-dalek-ng/RUSTSEC-0000-0000.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
```toml
[advisory]
id = "RUSTSEC-0000-0000"
package = "curve25519-dalek-ng"
date = "2025-06-27"
url = "https://rustsec.org/advisories/RUSTSEC-2024-0344"
references = ["https://github.com/dalek-cryptography/curve25519-dalek/pull/659"]
categories = ["crypto-failure"]
related = ["RUSTSEC-2024-0344"]

[versions]
patched = []
```

# Timing variability of RUSTSEC-2024-0344 also applicable to `curve25519-dalek-ng`

[`curve25519-dalek-ng`](https://crates.io/crates/curve25519-dalek-ng) is a fork of [`curve25519-dalek`](https://crates.io/crates/curve25519-dalek) that was created at a time when it was still vulnerable to the timing variability reported in [RUSTSEC-2024-0344](https://rustsec.org/advisories/RUSTSEC-2024-0344).

Timing variability of any kind is problematic when working with potentially secret values such as elliptic curve scalars, and such issues can potentially leak private keys and other secrets.

To patch the vulnerability, backports of
* [curve25519-dalek/pull/659](https://github.com/dalek-cryptography/curve25519-dalek/pull/659) and [curve25519-dalek/pull/661](https://github.com/dalek-cryptography/curve25519-dalek/pull/661), or the subsequent
* [curve25519-dalek/pull/662](https://github.com/dalek-cryptography/curve25519-dalek/pull/662), or the subsequent
* [curve25519-dalek/pull/665](https://github.com/dalek-cryptography/curve25519-dalek/pull/665)

are required for `curve25519-dalek-ng`.

A patch attempt exists with [zkcrypto/curve25519-dalek-ng/pull/25](https://github.com/zkcrypto/curve25519-dalek-ng/pull/25) since Aug 14, 2024, but it remains open and unanswered. To date, there is no patched version available.

Crates that use `curve25519-dalek-ng`'s `Scalar` for private key operations are also vulnerable. An example of such a crate is [`ed25519-consensus`](https://crates.io/crates/ed25519-consensus).