pub struct LinearDistinguisher {
pub mask: usize,
pub bias: f64,
pub mask_weight: u32,
pub nonlinearity: u64,
pub immunity_order: usize,
}Expand description
The linear-cryptanalytic profile of a Boolean combining/filter function, from its Walsh spectrum: the best linear approximation (the distinguisher), its nonlinearity, and its correlation-immunity order.
Fields§
§mask: usizeThe linear mask w of the best approximation z ≈ ⟨w, inputs⟩.
bias: f64The bias |Pr[C=⟨w,x⟩] − ½| of that approximation — the distinguishing advantage.
mask_weight: u32The Hamming weight of mask: how many registers the approximation combines (weight 1 = Rung E).
nonlinearity: u64Distance to the nearest affine function; maximal ⇒ bent ⇒ no exploitable linear approximation.
immunity_order: usizeThe correlation-immunity order — how many registers the first-order correlation attack must miss.
Trait Implementations§
Source§impl Clone for LinearDistinguisher
impl Clone for LinearDistinguisher
Source§fn clone(&self) -> LinearDistinguisher
fn clone(&self) -> LinearDistinguisher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearDistinguisher
impl Debug for LinearDistinguisher
Source§impl PartialEq for LinearDistinguisher
impl PartialEq for LinearDistinguisher
Source§fn eq(&self, other: &LinearDistinguisher) -> bool
fn eq(&self, other: &LinearDistinguisher) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LinearDistinguisher
Auto Trait Implementations§
impl Freeze for LinearDistinguisher
impl RefUnwindSafe for LinearDistinguisher
impl Send for LinearDistinguisher
impl Sync for LinearDistinguisher
impl Unpin for LinearDistinguisher
impl UnsafeUnpin for LinearDistinguisher
impl UnwindSafe for LinearDistinguisher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more