pub trait WireLabel<FF: FiniteField>:
Copy
+ Debug
+ Default
+ Add<Output = Self>
+ AddAssign
+ Sub<Output = Self>
+ SubAssign
+ Neg<Output = Self>
+ Mul<u16, Output = Self>
+ MulAssign<u16> {
// Required methods
fn to_repr(&self) -> U8x16;
fn color(&self) -> u16;
fn from_repr(inp: U8x16) -> Self;
fn rand_delta<R: CryptoRng>(rng: &mut R) -> Self;
fn rand<R: CryptoRng>(rng: &mut R) -> Self;
fn hash_to_mod(hash: U8x16) -> Self;
fn constant<RNG: CryptoRng>(
x: FF,
delta: &Self,
rng: &mut RNG,
) -> (Self, Self);
// Provided method
fn hash(&self, tweak: u128) -> U8x16 { ... }
}Expand description
A trait that defines a wirelabel as used in garbled circuits.
At its core, a WireLabel is a way of encoding values, and operating on
those encoded values.
Required Methods§
Sourcefn rand_delta<R: CryptoRng>(rng: &mut R) -> Self
fn rand_delta<R: CryptoRng>(rng: &mut R) -> Self
A random Δ WireLabel.
Sourcefn hash_to_mod(hash: U8x16) -> Self
fn hash_to_mod(hash: U8x16) -> Self
Converts a hashed block into a valid WireLabel.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".