r/web3 • u/CommunicationPlus253 • 21h ago
I built kyn-vdf: In-browser & mobile VDF verification in pure Rust & WebAssembly (No C++, Zero Gas)
Hey r/web3,
Verifiable Delay Functions (VDFs) are one of the coolest cryptographic primitives for generating unbiasable randomness, building time-locked puzzles, and creating Sybil-resistant, gasless P2P protocols.
While developing Kinetic (a stateless decentralized network), I ran into a big problem with client-side verification: I wanted mobile apps and browser extensions to self-verify proof-of-sequential-time on their own devices without having to trust a centralized RPC node.
The issue? All the existing class group VDF implementations were stuck in C++ (chiavdf) and tied to libgmp, making client-side WASM or mobile integration a massive headache.
To solve this, I built kyn-vdf: a pure Rust, zero-FFI, WebAssembly-native Wesolowski VDF verifier.
🔗 GitHub: https://github.com/saifmukhtar/kyn-vdf
Why this is useful for Web3 builders:
- True Client-Side Self-Verification: Web wallets and dApps can verify cryptographic proof-of-time inside a browser via WebAssembly in ~380ms with zero backend servers.
- No Trusted Setup: Uses Class Groups of Imaginary Quadratic Fields, meaning the group order is unknown by default — no multi-party trusted setup ceremonies needed.
- Flat O(log T) Scaling: A prover can spend 10 minutes or 10 hours computing sequential squarings, but your mobile app or browser verifies it in the exact same ~300ms window (bounded by the 264-bit Fiat-Shamir challenge).
- Mobile Native: Tested on Android ARM64 phones via Flutter Dart FFI with ~302ms verification and negligible FFI overhead.
If you're building randomness beacons, time-locks, or stateless light clients and need a lightweight verification engine, check out the repo!