Trait ark_crypto_primitives::crh::TwoToOneCRH [−][src]
pub trait TwoToOneCRH { type Output: ToBytes + Clone + Eq + Debug + Hash + Default + CanonicalSerialize + CanonicalDeserialize; type Parameters: Clone + Default; const LEFT_INPUT_SIZE_BITS: usize; const RIGHT_INPUT_SIZE_BITS: usize; fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>; fn evaluate(
parameters: &Self::Parameters,
left_input: &[u8],
right_input: &[u8]
) -> Result<Self::Output, Error>; }
Associated Types
type Output: ToBytes + Clone + Eq + Debug + Hash + Default + CanonicalSerialize + CanonicalDeserialize
[src]type Parameters: Clone + Default
[src]Associated Constants
const LEFT_INPUT_SIZE_BITS: usize
[src]
const LEFT_INPUT_SIZE_BITS: usize
[src]The bit size of the left input.
const RIGHT_INPUT_SIZE_BITS: usize
[src]
const RIGHT_INPUT_SIZE_BITS: usize
[src]The bit size of the right input.
Required methods
Evaluates this CRH on the left and right inputs.
Panics
If left_input.len() != Self::LEFT_INPUT_SIZE_BITS
, or if
right_input.len() != Self::RIGHT_INPUT_SIZE_BITS
, then this method panics.
Implementors
impl<C: ProjectiveCurve, I: InjectiveMap<C>, W: Window> TwoToOneCRH for PedersenCRHCompressor<C, I, W>
[src]
impl<C: ProjectiveCurve, I: InjectiveMap<C>, W: Window> TwoToOneCRH for PedersenCRHCompressor<C, I, W>
[src]A simple implementation method: just concat the left input and right input together
evaluate
requires that left_input
and right_input
are of equal length.
type Parameters = Parameters<C>
impl<C: ProjectiveCurve, W: Window> TwoToOneCRH for ark_crypto_primitives::crh::pedersen::CRH<C, W>
[src]
impl<C: ProjectiveCurve, W: Window> TwoToOneCRH for ark_crypto_primitives::crh::pedersen::CRH<C, W>
[src]A simple implementation method: just concat the left input and right input together
evaluate
requires that left_input
and right_input
are of equal length.
type Parameters = Parameters<C>
impl<F: PrimeField, P: PoseidonRoundParams<F>> TwoToOneCRH for ark_crypto_primitives::crh::poseidon::CRH<F, P>
[src]
impl<F: PrimeField, P: PoseidonRoundParams<F>> TwoToOneCRH for ark_crypto_primitives::crh::poseidon::CRH<F, P>
[src]A simple implementation of TwoToOneCRH by asserting left and right input has same length and chain them together.
type Output = F
type Parameters = Poseidon<F, P>