
By: ProgrammerE
February 1, 2017
Super Fast Encryption (Linear Feedback Shift Register Sequences)

By: ProgrammerE
February 1, 2017

Come up with an IV (Initialization vector). The longer the IV, the more secure the transmission of the frame. The payoff is that longer IV’s are more time consuming. We then come up with a linear recurrence relation. If the IV has length k, the recurrence relation should describe the k + 1th bit in terms of a linear combination of the first to kth bits (Trappe & Washington, 2012).
E.g. IV = (1, 0, 0), gen(x_{k+1}) = x_{k} + x_{k-2} (mod 2). The resulting key extended using the linear recurrence is (1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, …). Notice that the pattern repeats after a period of 7. If the linear function is chosen well, the IV should generate a cycle of length approximately k^2. We then xor the generated key with our message to obtain our cypher text. Plaintext = (1, 1, 0, 0, 1, 0, 1, 0), key = (1, 0, 0, 1, 1, 1, 0, 1), so the cypher text is (0, 1, 0, 1, 0, 1, 1, 1). To decrypt our message, we just xor it again with the key.
Given the simplicity of the cryptographic function, we can implement this directly using hardware. This gives us a fast and relatively secure way to send information. However, this is not cryptographically secure if any plaintext is known. If we add the plaintext to the cipher text, we get back the key.
Remember the CIA Triad? Confidentiality, Integrity, and Availability are at odds with each other, and increased availability requires less security. While LFSRS are not perfect, they serve their purpose, and anyone inventing the next multiplayer shooter or video chat program should investigate the tradeoff between security and real-time communication and balance the two.
I hope you enjoyed this short but sweet article, more to come later
Regards,
ProgrammerE
References:
Trappe, W., & Washington, L. C. (2012). Introduction to Cryptography with Coding Theory. Upper Saddle River, New Jersey, United States of America: Pearson Education Inc. Retrieved January 26, 2016