pub struct SboxProfile {
pub in_bits: usize,
pub out_bits: usize,
pub differential_uniformity: u32,
pub linearity: u64,
pub min_degree: usize,
pub is_affine: bool,
pub is_bijective: bool,
pub is_apn: bool,
}Expand description
The cryptographic structural profile of an S-box.
Fields§
§in_bits: usize§out_bits: usize§differential_uniformity: u32The maximum count #{x : S(x⊕a) ⊕ S(x) = b} over a≠0, b — differential-cryptanalysis resistance
(lower is stronger; 2 is the optimal APN bound).
linearity: u64maxₐ,_{b≠0} |Σₓ (−1)^{⟨b,S(x)⟩ ⊕ ⟨a,x⟩}| — linear-cryptanalysis resistance (lower is stronger).
min_degree: usizeThe minimum algebraic degree over the nonzero component functions.
is_affine: boolEvery component is affine — the trivially-broken S-box.
is_bijective: boolA permutation (n = m and injective).
is_apn: boolAlmost perfect nonlinear: differential uniformity 2, the optimal differential resistance.
Trait Implementations§
Source§impl Clone for SboxProfile
impl Clone for SboxProfile
Source§fn clone(&self) -> SboxProfile
fn clone(&self) -> SboxProfile
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 SboxProfile
impl Debug for SboxProfile
Source§impl PartialEq for SboxProfile
impl PartialEq for SboxProfile
Source§fn eq(&self, other: &SboxProfile) -> bool
fn eq(&self, other: &SboxProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SboxProfile
impl StructuralPartialEq for SboxProfile
Auto Trait Implementations§
impl Freeze for SboxProfile
impl RefUnwindSafe for SboxProfile
impl Send for SboxProfile
impl Sync for SboxProfile
impl Unpin for SboxProfile
impl UnsafeUnpin for SboxProfile
impl UnwindSafe for SboxProfile
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