feat: move RpoRandomCoin and define Rng trait

nits: minor

chore: update log and readme
This commit is contained in:
Al-Kindi-0
2023-12-18 12:30:37 +01:00
committed by Bobbin Threadbare
parent 7e13346e04
commit 36d3b8dc46
4 changed files with 211 additions and 1 deletions

View File

@@ -1,3 +1,18 @@
//! Pseudo-random element generation.
pub use winter_crypto::{RandomCoin, RandomCoinError};
use crate::{Felt, Word, ZERO};
mod rpo;
/// Pseudo-random element generator.
///
/// An instance can be used to draw, uniformly at random, basefield elements as well as `Word`s.
pub trait FeltRng {
/// Draw, uniformly at random, a basefield element.
fn draw_element(&mut self) -> Felt;
/// Draw, uniformly at random, a `Word`.
fn draw_word(&mut self) -> Word;
}