curve25519-dalek

Pure-Rust group arithmetic over Curve25519 and Ristretto255

Library
Cargo
v5.0.0
1,192stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
78/100Good
Development Activity72
Maintenance52
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture88
Code Quality90
Innovation80
Learning Curve50

curve25519-dalek is a pure-Rust implementation of group operations on the Curve25519 elliptic curve and its Ristretto255 prime-order group construction, providing constant-time scalar and point arithmetic as the low-level foundation other cryptographic protocols are built on. It’s the anchor crate of the dalek-cryptography monorepo, which also houses ed25519-dalek (EdDSA digital signatures) and x25519-dalek (Diffie-Hellman key exchange) as separate crates that depend on it, plus curve25519-dalek-derive, a small proc-macro helper crate used internally.

The library emphasizes side-channel resistance (constant-time operations to avoid timing attacks) and supports no_std environments, making it suitable for embedded and constrained targets in addition to standard server and client applications. With over 211 million cumulative downloads, it is one of the most widely depended-on cryptography primitives in the Rust ecosystem, underpinning higher-level protocols across TLS libraries, blockchain implementations, and messaging systems.

What You Get

  • Constant-time (timing-attack-resistant) scalar and point arithmetic over Curve25519 and the Ristretto255 prime-order group
  • Both Edwards-curve and Montgomery-curve point representations, covering the needs of EdDSA signatures and Diffie-Hellman key exchange respectively
  • no_std support for embedded and constrained environments alongside standard use
  • Multiple backend implementations (portable, SIMD-accelerated) selected via Cargo features for performance tuning per target
  • The foundation crate that ed25519-dalek and x25519-dalek build their higher-level protocol implementations on top of, all versioned and released together from the same workspace

Common Use Cases

  • Implementing custom cryptographic protocols (zero-knowledge proofs, ring signatures, threshold schemes) that need raw Ristretto255/Curve25519 group operations
  • Serving as a dependency for higher-level crates like ed25519-dalek and x25519-dalek rather than being used directly by most application code
  • Building blockchain or distributed-ledger primitives that use Ristretto255 for commitment schemes or aggregate signatures
  • Embedded/IoT cryptography where a no_std, side-channel-resistant elliptic-curve implementation is required

Under The Hood

Architecture - The repository is a Cargo workspace with four member crates: curve25519-dalek (this package — the core field/scalar/point arithmetic), ed25519-dalek (EdDSA built on top of the Edwards point type), x25519-dalek (Diffie-Hellman built on top of the Montgomery point type), and curve25519-dalek-derive (proc-macros used internally to generate repetitive arithmetic code). All four crates share one CI pipeline and are versioned independently but released from the same monorepo — the standalone dalek-cryptography/ed25519-dalek repository is archived with a notice pointing here, confirming this is the canonical, actively maintained location. Tech Stack - Rust edition 2024, MSRV 1.85.0, with no_std support built in via Cargo feature flags and multiple selectable arithmetic backends (a portable, safe backend and SIMD-accelerated backends) so consumers can trade off compile complexity for performance. Dual-licensed BSD-3-Clause (curve25519-dalek and ed25519/x25519-dalek) with the derive crate additionally offering Apache-2.0/MIT. Code Quality - The core crate alone spans roughly 34,600 lines of Rust across src/; correctness for elliptic-curve arithmetic is safety-critical, so the project maintains dedicated per-crate CI workflows (visible in the README’s per-crate CI badges) and a CONTRIBUTING.md with process expectations for a cryptography library where subtle arithmetic bugs have security consequences. Constant-time discipline (avoiding secret-dependent branches or memory accesses) is a first-class design constraint reflected throughout the codebase, not an afterthought. API Design - As a primitive-arithmetic library rather than a protocol library, the API surface (scalar/point types with arithmetic trait implementations) is intentionally low-level and unopinionated; most developers are expected to consume it transitively through ed25519-dalek or x25519-dalek rather than calling curve25519-dalek APIs directly, which keeps its own surface small and focused at the cost of a steeper learning curve for anyone building directly against it.

Used by 15 apps in this directory

TypeScript
79%
GPL 3.0

Bramble

Password Manager · Security · Authentication

381

Local-first, end-to-end encrypted password manager that syncs your vault directly between your own devices over a private peer-to-peer mesh — no server, no account, no cloud in the middle.

View details
75
Repo Health
84
Technical
72
Dependency
Built with
TypeScript79%
Updated 3 days ago
Rust
67%
Other

DefGuard

Security · Networking · Authentication

2,819

Self-hosted secure remote access that unifies WireGuard VPN, identity management, and connection-level MFA in one open-source platform.

View details
84
Repo Health
82
Technical
72
Dependency
Built with
Rust67%
TypeScript31%
Updated 3 days ago
Rust
99%
Other

Fluree DB

Databases

452

A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.

View details
87
Repo Health
74
Technical
66
Dependency
Built with
Rust99%
Updated yesterday
Rust
52%
Other

hoodik

File Storage · Security

1,468

Self-hosted, end-to-end encrypted cloud storage with browser-based encryption and S3-compatible storage support

View details
75
Repo Health
71
Technical
64
Dependency
Built with
Rust52%
TypeScript33%
Vue14%
Updated 1 weeks ago
Rust
52%
Other

hoodik

File Storage · Security

1,468

Self-hosted, end-to-end encrypted cloud storage with browser-based encryption and S3-compatible storage support

View details
75
Repo Health
71
Technical
64
Dependency
Built with
Rust52%
TypeScript33%
Vue14%
Updated 1 weeks ago
TypeScript
67%
MIT

Hoppscotch

Developer Tools

80,226

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
92
Repo Health
83
Technical
66
Dependency
Built with
TypeScript67%
Vue25%
Updated yesterday
TypeScript
67%
MIT

Hoppscotch

Developer Tools

80,226

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
92
Repo Health
83
Technical
66
Dependency
Built with
TypeScript67%
Vue25%
Updated yesterday
TypeScript
51%
Other

Jan

AI Assistants

44,366

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript51%
Rust46%
Updated 3 days ago
Rust
47%
MIT

Kuku

Note Taking

219

A local-first, open-source Markdown knowledge workspace for macOS — plain files, personal wiki and Second Brain workflows, AI-assisted diffs, and encrypted sync, built as an Obsidian alternative.

View details
81
Repo Health
67
Technical
67
Dependency
Built with
Rust47%
TypeScript40%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search