Adding hint where the stream cipher coefficients come from

This commit is contained in:
Patrick Müller 2021-10-27 21:50:59 +02:00
parent 087a01cd3d
commit 4c8af9e189
1 changed files with 2 additions and 0 deletions

View File

@ -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
"""