mithril_stm/circuits/halo2/
hash.rs

1//! Hash helpers and CPU hashing interface for the Halo2 prototype.
2
3pub use midnight_circuits::instructions::HashToCurveCPU;
4pub use midnight_circuits::instructions::hash::HashCPU;
5use midnight_circuits::{
6    ecc::hash_to_curve::HashToCurveGadget, ecc::native::EccChip, hash::poseidon::PoseidonChip,
7    types::AssignedNative,
8};
9
10use crate::circuits::halo2::types::{Jubjub, JubjubBase};
11
12pub type PoseidonHash = PoseidonChip<JubjubBase>;
13pub type JubjubHashToCurve = HashToCurveGadget<
14    JubjubBase,
15    Jubjub,
16    AssignedNative<JubjubBase>,
17    PoseidonChip<JubjubBase>,
18    EccChip<Jubjub>,
19>;