Struct dusk_hades::strategies::gadget::GadgetStrategy [−][src]
Implements a Hades252 strategy for Variable as input values.
Requires a reference to a ConstraintSystem.
Fields
cs: &'a mut StandardComposerA reference to the constraint system used by the gadgets
Implementations
impl<'a> GadgetStrategy<'a>[src]
pub fn new(cs: &'a mut StandardComposer) -> Self[src]
Constructs a new GadgetStrategy with the constraint system.
pub fn hades_gadget(composer: &'a mut StandardComposer, x: &mut [Variable])[src]
Perform the hades permutation on a plonk circuit
Trait Implementations
impl<'a> Strategy<Variable> for GadgetStrategy<'a>[src]
fn add_round_key<'b, I>(&mut self, constants: &mut I, words: &mut [Variable]) where
I: Iterator<Item = &'b BlsScalar>, [src]
I: Iterator<Item = &'b BlsScalar>,
fn quintic_s_box(&mut self, value: &mut Variable)[src]
fn mul_matrix<'b, I>(&mut self, constants: &mut I, values: &mut [Variable]) where
I: Iterator<Item = &'b BlsScalar>, [src]
I: Iterator<Item = &'b BlsScalar>,
Adds a constraint for each matrix coefficient multiplication
fn next_c<'b, I>(constants: &mut I) -> BlsScalar where
I: Iterator<Item = &'b BlsScalar>, [src]
I: Iterator<Item = &'b BlsScalar>,
fn apply_partial_round<'b, I>(&mut self, constants: &mut I, words: &mut [T]) where
I: Iterator<Item = &'b BlsScalar>, [src]
I: Iterator<Item = &'b BlsScalar>,
fn apply_full_round<'a, I>(&mut self, constants: &mut I, words: &mut [T]) where
I: Iterator<Item = &'a BlsScalar>, [src]
I: Iterator<Item = &'a BlsScalar>,
fn perm(&mut self, data: &mut [T])[src]
fn rounds() -> usize[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for GadgetStrategy<'a>[src]
impl<'a> Send for GadgetStrategy<'a>[src]
impl<'a> Sync for GadgetStrategy<'a>[src]
impl<'a> Unpin for GadgetStrategy<'a>[src]
impl<'a> !UnwindSafe for GadgetStrategy<'a>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,