- The code begins by loading a 64-bit random number as a session key into three mutually clock-controlled shift registers.
- The shift registers are then clocked based on the control bits.
- The three shift registers merge to form a 64-bit register that maintains the internal state of the cipher.
- Finally, a quick sort is performed on all produced internal states, which are then compressed and stored in a file.
- This code is useful for cryptography training but may not be suitable for real-world attacks.
- Do not run this code on any machine, as it may cause crashes due to the type of memory allocation used. However, you can modify the code to prevent memory failures. Keep in mind that the "KeyLSB_Low" and "KeyLSB_High" values should be adjusted based on the available memory space and your storage system.
- Please note that Linear Feedback Shift Registers (LFSR) are pseudorandom generators, meaning they can produce a sequence of numbers with a long period. However, in the case of a 64-bit LFSR, it cannot generate a sequence with a period of
$(2^{64})$ due to clock control limitations. - If you're looking for an encryption method that is computationally difficult to break, LFSR is a good option for digital systems. However, in analog environments or in novel computing architectures based on entropy or quantum principles, LFSR-based encryption can be relatively easy to intercept.
This code is based on publicly available scientific reports, such as:
Cryptanalysis of Three Mutually Clock-Controlled Stop/Go Shift Registers