Expand description
§kyn-vdf
A pure Rust, WebAssembly-compatible implementation of Wesolowski Verifiable Delay Function (VDF) verification over Imaginary Quadratic Class Groups.
§Key Features
- Pure Rust / Zero FFI: No C/C++ compiler,
libgmp, or OS dependencies required. - WebAssembly Native: Compiles to
wasm32-unknown-unknownfor in-browser and mobile light client verification. - Shanks’ NUCOMP / NUDUPL: Sub-quadratic binary quadratic form composition and squaring with partial Euclidean reduction.
- Chia-Compatible: 100% test-vector compatible with the Chia Network VDF specification.
- $\mathcal{O}(\log T)$ Verification: Verification time is constant with respect to $T$ (bounded by the 264-bit Fiat-Shamir prime $B$, not the iteration count).
- No Panics: All fallible operations return
Result<_, KynVdfError>— safe for WASM and adversarial inputs.
§Quick Start
use kyn_vdf::verify_chia_vdf;
let is_valid = verify_chia_vdf(challenge, proof_bytes, 100_000, 1024)?;
assert!(is_valid);Re-exports§
pub use chia::create_discriminant;pub use chia::deserialize_form;pub use chia::get_b;pub use chia::hash_prime;pub use chia::is_probable_prime;pub use chia::serialize_form;pub use chia::verify_wesolowski;pub use chia::CompressedForm;pub use error::KynVdfError;pub use math::isqrt_fourth;pub use math::xgcd_partial;pub use math::Form;
Modules§
- chia
- Chia-compatible discriminant generation, BQFC form serialization, and Wesolowski VDF verification.
- error
- Error types for VDF verification and Class Group arithmetic.
- math
- Imaginary Quadratic Class Group arithmetic with Shanks’ NUCOMP and NUDUPL algorithms.
Structs§
- KynVdf
Verifier - Pure Rust Wesolowski VDF verifier.
Functions§
- verify_
chia_ vdf - Verifies a Chia-compatible Wesolowski VDF proof from raw byte slices.