This repo contains pure-Rust crates for elliptic curve cryptography:
| Crate | Description | Crates.io | Docs | CI |
|---|---|---|---|---|
curve25519‑dalek |
A library for arithmetic over the Curve25519 and Ristretto elliptic curves and their associated scalars. | |||
ed25519‑dalek |
An implementation of the EdDSA digital signature scheme over Curve25519. | |||
x25519‑dalek |
An implementation of elliptic curve Diffie-Hellman key exchange over Curve25519. |
There is also the curve25519-dalek-derive crate, which is just a helper crate with some macros that make curve25519-dalek easier to write.
Please see CONTRIBUTING.md.
We follow the Rust Code of Conduct, with the following additional clauses:
- We respect the rights to privacy and anonymity for contributors and people in the community. If someone wishes to contribute under a pseudonym different to their primary identity, that wish is to be respected by all contributors.
This repo is based on the signal-curve25519-4.1.3 tag of https://github.com/signalapp/curve25519-dalek, with these changes:
- removed all crates besides
curve25519-dalek - removed all backends except for
serial/u64 - commented out unit tests
- removed most CI workflows
- Install Rust: https://rust-lang.org/learn/get-started/
- Download and unzip a verus binary from https://github.com/verus-lang/verus/releases/tag/release%2F0.2025.11.23.41c5885. It's important to use exactly this version
- The unzipped verus folder will contains a file called
verusand a file calledcargo-verus. Run these commands:
cd ~/.cargo/bin
ln -s /path/to/cargo-verus
ln -s /path/to/verus- If you're on a Mac, the first time you run
cargo verus verifyinside dalek-lite, you may be prompted to approve the unknown applications:cargo-verus,verus, andz3. See https://support.apple.com/en-gb/guide/mac-help/mh40616/mac. - Success looks like:
cd dalek-lite
cargo verus verify
... (many warnings)
verification results:: 313 verified, 0 errors
warning: `curve25519-dalek` (lib) generated 43 warnings (19 duplicates)
Finished `dev` profile [optimized + debuginfo] target(s) in 8.99s
cargo install --git https://github.com/Beneficial-AI-Foundation/verusfmt --rev 025d10eeb5a98052dcb7f262e5d0102d23996809This is a version of verusfmt patched to support more Rust syntax.
See https://github.com/verus-lang/verusfmt?tab=readme-ov-file#installing-and-using-verusfmt for usage. In particular, if you want to format all Rust files, run
find . -name "*.rs" -type f | xargs -P 0 -n 1 verusfmtbacon verus will show the live verification status as you make edits and save files,
and it will put error messages at the top.
Install bacon from https://github.com/Canop/bacon
