pub trait WireLabel:
Clone
+ Debug
+ Default
+ HasModulus
+ 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, q: u16) -> Self;
fn rand_delta<R: CryptoRng>(rng: &mut R, q: u16) -> Self;
fn rand<R: CryptoRng>(rng: &mut R, q: u16) -> Self;
fn hash_to_mod(hash: U8x16, q: u16) -> Self;
// Provided methods
fn hash(&self, tweak: u128) -> U8x16 { ... }
fn constant<RNG: CryptoRng>(
x: u16,
q: u16,
delta: &Self,
rng: &mut RNG,
) -> (Self, Self) { ... }
}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, q: u16) -> Self
fn rand_delta<R: CryptoRng>(rng: &mut R, q: u16) -> Self
Sourcefn hash_to_mod(hash: U8x16, q: u16) -> Self
fn hash_to_mod(hash: U8x16, q: u16) -> Self
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".