pub enum Mutation {
BitFlip {
target: Target,
col: usize,
row: usize,
mask: u128,
},
OutOfBounds {
target: Target,
col: usize,
row: usize,
value: u128,
},
FlipSelector {
target: Target,
col: usize,
row: usize,
},
SwapRows {
target: Target,
row_a: usize,
row_b: usize,
},
SwapColumns {
target: Target,
cols: Vec<usize>,
row_a: usize,
row_b: usize,
},
DuplicateRow {
target: Target,
src_row: usize,
dst_row: usize,
},
CopyColumns {
target: Target,
cols: Vec<usize>,
src_row: usize,
dst_row: usize,
},
ColumnUniformWrite {
target: Target,
col: usize,
value: u128,
},
RowSegmentZero {
target: Target,
rows: Vec<usize>,
cols: Vec<usize>,
},
MonotonicReplace {
target: Target,
col: usize,
base: u128,
step: u128,
},
Compound(Vec<Mutation>),
}Expand description
A trace tamper. Clone + Debug are
required for proptest shrinking output.
Variants§
BitFlip
XOR mask (truncated to column width)
into a single cell.
OutOfBounds
Inject a value the AIR packing accepts but range-checks must reject.
FlipSelector
Toggle a Bit cell. Targets
must be Bit-typed columns.
SwapRows
Swap every column between two rows.
SwapColumns
Dispatch-swap primitive:
rearrange data while leaving the columns
outside cols (selectors, RAM bindings)
in place.
DuplicateRow
Char-2 duplication:
copy every column of src_row onto dst_row.
CopyColumns
ColumnUniformWrite
Overwrite every row of col with the
same value (truncated to column width).
Catches “column should be non-trivial
somewhere” gaps the row-local AIR misses.
RowSegmentZero
Zero every cell in the cross product
of rows and cols. Catches padding-
block forgeries and trace-tail filler.
MonotonicReplace
Replace col with base + i * step
at row i (truncated to column width).
Catches CLK rewinds, address-sorted-
permutation forgeries, monotonic-counter
bypasses.
Compound(Vec<Mutation>)
Apply mutations as one tamper. Enables coordinated cross-trace (chiplet + main) attacks the per-table checks alone cannot catch.
Implementations§
Trait Implementations§
impl Eq for Mutation
impl StructuralPartialEq for Mutation
Auto Trait Implementations§
impl Freeze for Mutation
impl RefUnwindSafe for Mutation
impl Send for Mutation
impl Sync for Mutation
impl Unpin for Mutation
impl UnsafeUnpin for Mutation
impl UnwindSafe for Mutation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.