curve25519-dalek

Pure-Rust group arithmetic over Curve25519 and Ristretto255

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

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
69 /100 Good
Development Activity 52
Maintenance 36
Community 88
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
77 /100 Good
Architecture 88
Code Quality 90
Innovation 80
Learning Curve 50

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 19 apps in this directory

TypeScript
80%
GPL 3.0

Bramble

Authentication · Password Manager · Security

441

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
77
Repo Health
84
Technical
69
Dependency
Built with
TypeScript 80%
Updated 1 weeks ago
Rust
67%
Other

DefGuard

Authentication · Networking · Security

2,882

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

View details
86
Repo Health
82
Technical
71
Dependency
Built with
Rust 67%
TypeScript 30%
Updated 1 weeks ago
Rust
99%
Other

Fluree DB

Databases

475

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
65
Dependency
Built with
Rust 99%
Updated 6 days ago
Rust
51%
Other

hoodik

File Storage · Security

1,539

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

View details
77
Repo Health
71
Technical
63
Dependency
Built with
Rust 51%
TypeScript 34%
Vue 14%
Updated 1 weeks ago
Rust
51%
Other

hoodik

File Storage · Security

1,539

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

View details
77
Repo Health
71
Technical
63
Dependency
Built with
Rust 51%
TypeScript 34%
Vue 14%
Updated 1 weeks ago
TypeScript
68%
MIT

Hoppscotch

Developer Tools

80,676

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

View details
91
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 68%
Vue 24%
Updated 1 weeks ago
TypeScript
68%
MIT

Hoppscotch

Developer Tools

80,676

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

View details
91
Repo Health
83
Technical
62
Dependency
Built with
TypeScript 68%
Vue 24%
Updated 1 weeks ago
Rust
56%
Other

Jan

AI Assistants

45,052

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

View details
90
Repo Health
81
Technical
65
Dependency
Built with
Rust 56%
TypeScript 40%
Updated 6 days ago
TypeScript
44%
MIT

Kuku

Note Taking

230

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
77
Repo Health
67
Technical
67
Dependency
Built with
TypeScript 44%
Rust 41%
Updated 1 weeks ago

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