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 use winter_crypto::{Digest, ElementHasher, Hasher as HashFn};
 8pub use winter_math::{
 9    fields::{f64::BaseElement as Felt, QuadExtension},
10    log2, ExtensionOf, FieldElement, StarkField,
11};
12pub use winter_utils::{
13    collections::{BTreeMap, Vec},
14    string::String,
15    uninit_vector, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
16    SliceReader,
17};
18
19pub mod hash;
20pub mod merkle;
21
22// TYPE ALIASES
23// ================================================================================================
24
25pub type Word = [Felt; 4];
26
27// CONSTANTS
28// ================================================================================================
29
30/// Field element representing ZERO in the base field of the VM.
31pub const ZERO: Felt = Felt::ZERO;
32
33/// Field element representing ONE in the base field of the VM.
34pub const ONE: Felt = Felt::ONE;