I built a zero-dependency ECDSA engine in Rust to learn discrete math

⚓ Rust    📅 2026-04-03    👤 surdeus    👁️ 5      

surdeus

Hey everyone, I`m a physicist transitioning from Python to Rust. To learn the language, I built a Bitcoin/EVM ECDSA engine from scratch (no_std).

Disclaimer: Yes, I know the golden rule: "Don't roll your own crypto". This is strictly an educational project to learn Rust and understand the actual physics of Layer 0 blockchains, not a production library for holding billions.

I am relatively new to Web3 and have never even written a Solidity smart contract. My background is in physics and math, and I usually build Web2 projects in Python and JS. But recently, I took a freelance gig to write a trading bot for Polymarket, and I got completely nerd-sniped by blockchain tech.I played around a bit with Zero-Knowledge Proofs in Circom (writing some simple Poseidon hash commitments/nullifiers), but I wanted to understand the absolute bottom layer. So, to build my portfolio and learn Rust, I decided to build a blockchain from scratch.Step 1: Build the core secp256k1 ECDSA signature engine.Constraints: Pure Rust, no_std + alloc, and zero external crypto dependencies.Along the way, I realized how incredibly fragile—and beautiful—cryptographic math is.

The Request:Since Rust is still very new to me, I am looking for a harsh code review. Please roast my Rust idioms, my memory management, or my math. What am I still missing in the architecture?Here is the repo: GitHub - itsyourdecide/Digital-Signature-ECDSA: Digital signature in Rust from scratch without using libraries · GitHub
Thanks!

1 post - 1 participant

Read full topic

🏷️ Rust_feed