[][src]Trait r1cs::CompressionFunction

pub trait CompressionFunction<F: Field> {
    fn compress(
        &self,
        builder: &mut GadgetBuilder<F>,
        x: &Expression<F>,
        y: &Expression<F>
    ) -> Expression<F>; fn compress_evaluate(&self, x: &Element<F>, y: &Element<F>) -> Element<F> { ... } }

A function which compresses two field elements into one, and is intended to be one-way.

Required methods

fn compress(
    &self,
    builder: &mut GadgetBuilder<F>,
    x: &Expression<F>,
    y: &Expression<F>
) -> Expression<F>

Compress two field elements into one.

Loading content...

Provided methods

fn compress_evaluate(&self, x: &Element<F>, y: &Element<F>) -> Element<F>

Like compress, but actually evaluates the compression function rather than just adding it to a GadgetBuilder.

Loading content...

Implementors

impl<F: Field, BC: BlockCipher<F>> CompressionFunction<F> for DaviesMeyer<F, BC>[src]

Loading content...