Skip to content

Commit

Permalink
remove logger for correlation power analysis on one byte
Browse files Browse the repository at this point in the history
  • Loading branch information
programmingAthlete committed Dec 24, 2023
1 parent 186d9b5 commit 430f48c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

__version__ = "1.4.11"
__version__ = "1.5.0"

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def compute_c(self, predicted_currents: np.ndarray, byte_position: int, save: bo
np.save(f"matrices/matrix_{byte_position}.npy", np.array(c))
return c

@set_level(logger=log)

def attack_byte(self, byte_position: int = 0, plot: bool = False,
store: bool = True, re_calculate: bool = False, _verbose: bool = False) -> Tuple[int, np.ndarray]:
"""
Expand Down
10 changes: 5 additions & 5 deletions src/crypto_pkg/clis/attacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ def attack_correlation_power_analysis(
store=False,
re_calculate=True, _verbose=verbose)
print(f"Key byte found: {hex(key_byte[1])[2:]}")
return
key = attack.attack_full_key(store_correlation_matrices=False, re_calculate_correlation_matrices=False,
show_plot_correlations=False, _verbose=verbose)
print("Key Found")
print(key)
else:
key = attack.attack_full_key(store_correlation_matrices=False, re_calculate_correlation_matrices=False,
show_plot_correlations=False, _verbose=verbose)
print("Key Found")
print(key)
os.remove(filename)
Binary file removed test_file.pickle
Binary file not shown.

0 comments on commit 430f48c

Please sign in to comment.