Skip to main content

minroot_core/
lib.rs

1//! Pure Rust reference implementation of `MinRoot` VDF field arithmetic.
2//!
3//! Provides software-level implementations of the Pallas and Vesta
4//! prime field arithmetic, Montgomery form, redundant polynomial
5//! representation, and the `MinRoot` VDF algorithm itself.
6//!
7//! This crate has zero dependencies and serves two purposes:
8//!
9//! 1. **Reference model** for verifying hdl-cat hardware simulations.
10//! 2. **Domain types** shared across the categorical and HDL layers.
11//!
12//! # Examples
13//!
14//! Evaluate the `MinRoot` VDF for 10 iterations on Pallas:
15//!
16//! ```
17//! use minroot_core::field::{Curve, FieldElement};
18//! use minroot_core::minroot;
19//!
20//! let x = FieldElement::from_u64(3, Curve::Pallas);
21//! let y = FieldElement::from_u64(5, Curve::Pallas);
22//! let result = minroot::evaluate(x, y, 10);
23//! assert!(result.is_ok());
24//! ```
25
26pub mod error;
27pub mod field;
28pub mod minroot;
29pub mod montgomery;
30pub mod polynomial;