Zero-dependency Secp256k1 library in pure Rust

⚓ Rust    📅 2026-03-15    👤 surdeus    👁️ 3      

surdeus

Hey everyone,

I've been building cnfy — a suite of pure Rust libraries for Bitcoin cryptography with zero third-party dependencies. Everything from U256 arithmetic to secp256k1 is implemented from scratch.

A few key decisions I'd love feedback on:

  • No unsafe, no heap allocations — everything stack-based
  • Constant-time execution behind feature flags rather than on by default
  • One method per file with co-located tests (struct-per-directory pattern)

The codebase: https://codeberg.org/cnfy/cnfy-lib
Published crates: cnfy, cnfy-uint, cnfy-secp256k1

Still pre-1.0. Interested in feedback on the API design, the architecture, or anything that looks
off. Crypto review especially welcome.

Thanks!

1 post - 1 participant

Read full topic

🏷️ Rust_feed