Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement AES operations for leakage model definition #19

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benches/cpa.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use muscat::distinguishers::cpa::{self, Cpa, CpaProcessor};
use muscat::distinguishers::cpa_normal;
use muscat::leakage::{hw, sbox};
use muscat::leakage_model::{aes::sbox, hw};
use ndarray::{Array2, ArrayView1, Axis};
use ndarray_rand::rand::{rngs::StdRng, SeedableRng};
use ndarray_rand::rand_distr::Uniform;
Expand Down
2 changes: 1 addition & 1 deletion benches/dpa.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use muscat::distinguishers::dpa::{dpa, Dpa, DpaProcessor};
use muscat::leakage::sbox;
use muscat::leakage_model::aes::sbox;
use ndarray::{Array1, Array2, ArrayView1};
use ndarray_rand::rand::{rngs::StdRng, SeedableRng};
use ndarray_rand::rand_distr::Uniform;
Expand Down
2 changes: 1 addition & 1 deletion examples/cpa.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use indicatif::ProgressIterator;
use muscat::distinguishers::cpa_normal::CpaProcessor;
use muscat::leakage::{hw, sbox};
use muscat::leakage_model::{aes::sbox, hw};
use muscat::util::{progress_bar, read_array2_from_npy_file, save_array2};
use ndarray::*;
use ndarray_npy::write_npy;
Expand Down
2 changes: 1 addition & 1 deletion examples/cpa_partioned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use indicatif::ProgressIterator;
use muscat::distinguishers::cpa::CpaProcessor;
use muscat::leakage::{hw, sbox};
use muscat::leakage_model::{aes::sbox, hw};
use muscat::util::{progress_bar, read_array2_from_npy_file, save_array};
use rayon::prelude::{ParallelBridge, ParallelIterator};

Expand Down
2 changes: 1 addition & 1 deletion examples/dpa.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use indicatif::ProgressIterator;
use muscat::distinguishers::dpa::DpaProcessor;
use muscat::leakage::sbox;
use muscat::leakage_model::aes::sbox;
use muscat::util::read_array2_from_npy_file;
use ndarray::{s, Array1};
use rayon::iter::{ParallelBridge, ParallelIterator};
Expand Down
2 changes: 1 addition & 1 deletion examples/rank.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use indicatif::ProgressIterator;
use muscat::distinguishers::cpa::CpaProcessor;
use muscat::leakage::{hw, sbox};
use muscat::leakage_model::{aes::sbox, hw};
use muscat::util::{progress_bar, read_array2_from_npy_file, save_array};
use ndarray::s;
use rayon::prelude::{ParallelBridge, ParallelIterator};
Expand Down
2 changes: 1 addition & 1 deletion src/distinguishers/cpa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{iter::zip, ops::Add};
/// # Examples
/// ```
/// use muscat::distinguishers::cpa::cpa;
/// use muscat::leakage::sbox;
/// use muscat::leakage_model::aes::sbox;
/// use ndarray::array;
///
/// let traces = array![
Expand Down
2 changes: 1 addition & 1 deletion src/distinguishers/cpa_normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::distinguishers::cpa::Cpa;
/// # Examples
/// ```
/// use muscat::distinguishers::cpa_normal::cpa;
/// use muscat::leakage::sbox;
/// use muscat::leakage_model::aes::sbox;
/// use ndarray::array;
///
/// let traces = array![
Expand Down
2 changes: 1 addition & 1 deletion src/distinguishers/dpa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::util::{argmax_by, argsort_by, max_per_row};
/// # Examples
/// ```
/// use muscat::distinguishers::dpa::dpa;
/// use muscat::leakage::sbox;
/// use muscat::leakage_model::aes::sbox;
/// use ndarray::{array, Array1};
///
/// let traces = array![
Expand Down
32 changes: 0 additions & 32 deletions src/leakage.rs

This file was deleted.

Loading