Skip to main content

Decoding

Trait Decoding 

Source
pub trait Decoding<T = [u8]>
where T: ?Sized,
{ type Repr: Default + AsMut<T>; // Required method fn decode(buf: Self::Repr) -> Self; }
Expand description

The interface for all types that can be turned into verifier messages.

Required Associated Types§

Source

type Repr: Default + AsMut<T>

The output type (and length) expected by the duplex sponge.

§Example
let repr: ByteArray<4> = Default::default();
assert_eq!(repr.as_ref(), &[0u8; 4]);

Required Methods§

Source

fn decode(buf: Self::Repr) -> Self

The distribution-preserving map, that re-maps a squeezed output Decoding::Repr into a verifier message.

This map is not exactly a decoding function (e.g., it can be onto). What is demanded from this function is that it preserves the uniform distribution: if Decoding::Repr is distributed uniformly at random, the also the output of decode is so.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Decoding for u8

Source§

type Repr = ByteArray<{ core::mem::size_of::<$type>() }>

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for u16

Source§

type Repr = ByteArray<{ core::mem::size_of::<$type>() }>

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for u32

Source§

type Repr = ByteArray<{ core::mem::size_of::<$type>() }>

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for u64

Source§

type Repr = ByteArray<{ core::mem::size_of::<$type>() }>

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for u128

Source§

type Repr = ByteArray<{ core::mem::size_of::<$type>() }>

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for Scalar

Available on crate feature bls12_381 only.
Source§

type Repr = Array64

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for RistrettoPoint

Available on crate feature curve25519-dalek only.
Source§

type Repr = Array64

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for Scalar

Available on crate feature curve25519-dalek only.
Source§

type Repr = Array64

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for Scalar

Available on crate feature k256 only.
Source§

type Repr = Array64

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for Mersenne31

Available on crate feature p3-mersenne-31 only.
Source§

type Repr = [u8; 8]

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for Scalar

Available on crate feature p256 only.
Source§

type Repr = Array64

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for BabyBear

Available on crate feature p3-baby-bear only.
Source§

type Repr = [u8; 8]

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl Decoding for KoalaBear

Available on crate feature p3-koala-bear only.
Source§

type Repr = [u8; 8]

Source§

fn decode(buf: Self::Repr) -> Self

Source§

impl<C: Fp2Config> Decoding for Fp2<C>

Available on crate feature ark-ff only.
Source§

type Repr = DecodingFieldBuffer<QuadExtField<Fp2ConfigWrapper<C>>>

Source§

fn decode(repr: Self::Repr) -> Self

Source§

impl<C: Fp3Config> Decoding for Fp3<C>

Available on crate feature ark-ff only.
Source§

type Repr = DecodingFieldBuffer<CubicExtField<Fp3ConfigWrapper<C>>>

Source§

fn decode(repr: Self::Repr) -> Self

Source§

impl<C: Fp4Config> Decoding for Fp4<C>

Available on crate feature ark-ff only.
Source§

type Repr = DecodingFieldBuffer<QuadExtField<Fp4ConfigWrapper<C>>>

Source§

fn decode(repr: Self::Repr) -> Self

Source§

impl<C: Fp6Config> Decoding for Fp6<C>

Available on crate feature ark-ff only.
Source§

type Repr = DecodingFieldBuffer<CubicExtField<Fp6ConfigWrapper<C>>>

Source§

fn decode(repr: Self::Repr) -> Self

Source§

impl<C: Fp12Config> Decoding for Fp12<C>

Available on crate feature ark-ff only.
Source§

type Repr = DecodingFieldBuffer<QuadExtField<Fp12ConfigWrapper<C>>>

Source§

fn decode(repr: Self::Repr) -> Self

Source§

impl<C: FpConfig<N>, const N: usize> Decoding for Fp<C, N>

Available on crate feature ark-ff only.
Source§

type Repr = DecodingFieldBuffer<Fp<C, N>>

Source§

fn decode(repr: Self::Repr) -> Self

Source§

impl<const N: usize> Decoding for [u8; N]

Source§

type Repr = ByteArray<N>

Source§

fn decode(buf: Self::Repr) -> Self

Implementors§