mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 00:51:29 +01:00
feat: add serialization to RpoRandomCoin
This commit is contained in:
committed by
Bobbin Threadbare
parent
36d3b8dc46
commit
8f92f44a55
@@ -2,17 +2,18 @@
|
||||
|
||||
pub use winter_crypto::{RandomCoin, RandomCoinError};
|
||||
|
||||
use crate::{Felt, Word, ZERO};
|
||||
use crate::{Felt, FieldElement, StarkField, Word, ZERO};
|
||||
|
||||
mod rpo;
|
||||
pub use rpo::RpoRandomCoin;
|
||||
|
||||
/// Pseudo-random element generator.
|
||||
///
|
||||
/// An instance can be used to draw, uniformly at random, basefield elements as well as `Word`s.
|
||||
/// An instance can be used to draw, uniformly at random, base field elements as well as [Word]s.
|
||||
pub trait FeltRng {
|
||||
/// Draw, uniformly at random, a basefield element.
|
||||
/// Draw, uniformly at random, a base field element.
|
||||
fn draw_element(&mut self) -> Felt;
|
||||
|
||||
/// Draw, uniformly at random, a `Word`.
|
||||
/// Draw, uniformly at random, a [Word].
|
||||
fn draw_word(&mut self) -> Word;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user