The polynomials are represented in bitwise little endian: Bit 0 (least significant bit) represents the coefficient of \(x^0\), bit \(k\) represents the coefficient of \(x^k\), etc. The implementation is optimized for clarity, not for speed. Pick a characteristic polynomial of some degree \(n\), where each monomial coefficient is either 0 or 1 (so the coefficients are drawn from \(\text\) modulo the characteristic polynomial equals \(x^0\).įor each \(k\) such that \(k < n\) and \(k\) is a factor of \(2^n - 1\), \(x^k\) modulo the characteristic polynomial does not equal \(x^0\).įast skipping in \(Î�(\log k)\) time can be accomplished by exponentiation-by-squaring followed by a modulo after each square. Linear Feedback Shift Register (LFSR) Sequences. Its setup and operation are quite simple: To encrypt plaintext of length n, generate an n-bit sequence and XOR with the plaintext. Here we will focus on the Galois LFSR form, not the Fibonacci LFSR form. Proakis11 and then inputting this into the least significant bit (i.e.
The feedback is provided with XORing or XNORing the outputs of selected stages of the shift register which are referred as taps by John G. A linear feedback shift register (LFSR) is a mathematical device that can be used to generate pseudorandom numbers. 4.1 Linear Feedback Shift Register (LFSR) LFSR is a n-bit shift register with feedback to its input.