[][src]Trait gridiron::digits::constant_time_primitives::ConstantSwap

pub trait ConstantSwap {
    fn swap_if(&mut self, other: &mut Self, swap: ConstantBool<u32>);
}

Values which support swapping the values in place.

Required methods

fn swap_if(&mut self, other: &mut Self, swap: ConstantBool<u32>)

Swapping the values if the swap was true. Note that this should be done in a constant time way to support constant time algorithms.

Loading content...

Implementors

impl ConstantSwap for Fp256[src]

fn swap_if(&mut self, other: &mut Fp256, swap: ConstantBool<u32>)[src]

Swaps this with other if the value was true

impl ConstantSwap for gridiron::fp_256::Monty[src]

fn swap_if(&mut self, other: &mut Monty, swap: ConstantBool<u32>)[src]

Swaps this with other if the value was true

impl ConstantSwap for Fp480[src]

fn swap_if(&mut self, other: &mut Fp480, swap: ConstantBool<u32>)[src]

Swaps this with other if the value was true

impl ConstantSwap for gridiron::fp_480::Monty[src]

fn swap_if(&mut self, other: &mut Monty, swap: ConstantBool<u32>)[src]

Swaps this with other if the value was true

Loading content...