From ecbfdbda7c4725c1d20f90b76465af6b52c43d06 Mon Sep 17 00:00:00 2001 From: programmingAthlete Date: Sat, 23 Mar 2024 18:34:28 +0100 Subject: [PATCH] Squashed commit of the following: commit 1cd7e303746ab320322b3eecc57267eaca51c487 Author: programmingAthlete Date: Sat Mar 23 18:33:26 2024 +0100 version commit 5f181930fe24df5d51554cbecb23e014171b2d86 Author: programmingAthlete Date: Sat Mar 23 18:32:37 2024 +0100 function hardcoded --- setup.py | 2 +- src/crypto_pkg/attacks/stream_ciphers/geffe_cipher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b1a9b41..c550ece 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -__version__ = "1.6.0" +__version__ = "1.6.1" with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() diff --git a/src/crypto_pkg/attacks/stream_ciphers/geffe_cipher.py b/src/crypto_pkg/attacks/stream_ciphers/geffe_cipher.py index 319ca83..dd76105 100644 --- a/src/crypto_pkg/attacks/stream_ciphers/geffe_cipher.py +++ b/src/crypto_pkg/attacks/stream_ciphers/geffe_cipher.py @@ -88,7 +88,7 @@ def try_guess_for_1(self, g, guess): def look_for_correlation(self, thresholds: Union[List[Tuple[ThresholdsOperator, float]], None]): - g = Geffe(self.n, self.all_taps, [1, 1, 0, 1, 0, 0, 0, 1]) + g = Geffe(self.n, self.all_taps, self.f) d = [self.try_guess(g=g, threshold=thresholds, guess=i) for i in range(self.max_iter)] key0 = [item[0][0] for item in d if item[0] is not None] key2 = [item[2][0] for item in d if item[2] is not None]