arnaucube
arnaucube/miden-cryptoPublic Self-hosted repository
miden-crypto/src/lib.rs
src/lib.rsRaw
 1#![cfg_attr(not(feature = "std"), no_std)]
 2
 3#[cfg(not(feature = "std"))]
 4#[cfg_attr(test, macro_use)]
 5extern crate alloc;
 6
 7pub mod hash;
 8pub mod merkle;
 9
10// RE-EXPORTS
11// ================================================================================================
12
13pub use winter_math::{fields::f64::BaseElement as Felt, FieldElement, StarkField};
14
15pub mod utils {
16    pub use winter_utils::{
17        collections, string, uninit_vector, ByteReader, ByteWriter, Deserializable,
18        DeserializationError, Serializable, SliceReader,
19    };
20}
21
22// TYPE ALIASES
23// ================================================================================================
24
25/// A group of four field elements in the Miden base field.
26pub type Word = [Felt; 4];
27
28// CONSTANTS
29// ================================================================================================
30
31/// Field element representing ZERO in the Miden base filed.
32pub const ZERO: Felt = Felt::ZERO;
33
34/// Field element representing ONE in the Miden base filed.
35pub const ONE: Felt = Felt::ONE;