From 4c8af9e1898066fe7998167fe1a545176f381776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCller?= Date: Wed, 27 Oct 2021 21:50:59 +0200 Subject: [PATCH] Adding hint where the stream cipher coefficients come from --- chapter_three/Stromchiffre.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chapter_three/Stromchiffre.py b/chapter_three/Stromchiffre.py index 324c6ee..5ca5f59 100644 --- a/chapter_three/Stromchiffre.py +++ b/chapter_three/Stromchiffre.py @@ -46,6 +46,8 @@ def decrypt_text(cipher_bits: str, coefficients: [int], key: [int]) -> str: def get_optimal_shift_register_coefficients(size: int) -> [int]: """ Returns a set of coefficients for a linear shift register with the given size that guarantees a maximum bit stream. + + The coefficients are taken from the following page: https://www.eng.auburn.edu/~strouce/class/elec6250/LFSRs.pdf :param size: The size of the linear shift register :return: The optimal coefficients """