pub struct SboxSpectra {
pub in_bits: usize,
pub out_bits: usize,
pub differential_spectrum: Vec<(u32, usize)>,
pub walsh_spectrum: Vec<(u64, usize)>,
}Expand description
The affine-invariant spectra of an S-box: the fingerprints for classification up to affine equivalence.
Fields§
§in_bits: usize§out_bits: usize§differential_spectrum: Vec<(u32, usize)>The differential spectrum: the multiset of DDT entries #{x : S(x⊕a)⊕S(x)=b} over a≠0, as
(value → count) sorted. Invariant under any affine change of input or output coordinates.
walsh_spectrum: Vec<(u64, usize)>The linear (Walsh) spectrum: the multiset of amplitudes |Σₓ(−1)^{⟨b,S(x)⟩⊕⟨a,x⟩}| over a, b≠0.
Trait Implementations§
Source§impl Clone for SboxSpectra
impl Clone for SboxSpectra
Source§fn clone(&self) -> SboxSpectra
fn clone(&self) -> SboxSpectra
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 SboxSpectra
impl Debug for SboxSpectra
Source§impl PartialEq for SboxSpectra
impl PartialEq for SboxSpectra
Source§fn eq(&self, other: &SboxSpectra) -> bool
fn eq(&self, other: &SboxSpectra) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SboxSpectra
impl StructuralPartialEq for SboxSpectra
Auto Trait Implementations§
impl Freeze for SboxSpectra
impl RefUnwindSafe for SboxSpectra
impl Send for SboxSpectra
impl Sync for SboxSpectra
impl Unpin for SboxSpectra
impl UnsafeUnpin for SboxSpectra
impl UnwindSafe for SboxSpectra
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