pub struct CorrelationAttack {
pub register_len: usize,
pub init_state: Vec<bool>,
pub agreement: f64,
pub bias: f64,
pub samples: usize,
}Expand description
The certified result of a correlation attack on one target LFSR: the recovered initial state and the
statistical edge it carries. The init_state is a re-checkable witness — regenerate the LFSR from it
and it reproduces the register the keystream leaks.
Fields§
§register_len: usizeThe register length L (= taps.len()).
init_state: Vec<bool>The recovered initial state — the L-bit LFSR seed that best correlates with the keystream.
agreement: f64Pr[z = a] over the sample — the correlation p (or 1 − p if the leak is anti-correlated).
bias: f64|agreement − ½| — the statistical edge; compare against spurious_bias_floor.
samples: usizeThe number of keystream bits scored, n.
Trait Implementations§
Source§impl Clone for CorrelationAttack
impl Clone for CorrelationAttack
Source§fn clone(&self) -> CorrelationAttack
fn clone(&self) -> CorrelationAttack
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 CorrelationAttack
impl Debug for CorrelationAttack
Source§impl PartialEq for CorrelationAttack
impl PartialEq for CorrelationAttack
Source§fn eq(&self, other: &CorrelationAttack) -> bool
fn eq(&self, other: &CorrelationAttack) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CorrelationAttack
Auto Trait Implementations§
impl Freeze for CorrelationAttack
impl RefUnwindSafe for CorrelationAttack
impl Send for CorrelationAttack
impl Sync for CorrelationAttack
impl Unpin for CorrelationAttack
impl UnsafeUnpin for CorrelationAttack
impl UnwindSafe for CorrelationAttack
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