Skip to content

Commit

Permalink
adding another ref to the dpa attack
Browse files Browse the repository at this point in the history
  • Loading branch information
kab-ph committed Apr 8, 2024
1 parent 6b3d1ad commit b9212a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dpa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ pub struct Dpa<T> {
}

/* This class implements the DPA algorithm shown in:
https://paulkocher.com/doc/DifferentialPowerAnalysis.pdf */
https://paulkocher.com/doc/DifferentialPowerAnalysis.pdf
https://web.mit.edu/6.857/OldStuff/Fall03/ref/kocher-DPATechInfo.pdf */

impl<T: Clone> Dpa<T> {
pub fn new(size: usize, guess_range: i32, f: fn(T, usize) -> usize) -> Self {
Self {
len_samples: size,
guess_range,
guess_range, //fixing clippy warning
sum_0: Array2::zeros((guess_range as usize, size)),
sum_1: Array2::zeros((guess_range as usize, size)),
count_0: Array1::zeros(guess_range as usize),
Expand Down

0 comments on commit b9212a2

Please sign in to comment.