# linear feedback shift register (cipher) (LFSR)

A Linear Feedback ShiftRegister (LFSR) is a shift register with linear feedback. The data signal is shifted one position further through the shift register with each clock pulse.

For the feedback mechanism, some outputs of the flip-flops are linked in an XOR gate whose output is fed to an input of a flip-flop. Linear feedback shift registers are ideal as random generators for generating statistical random numbers. The only signal they require is a clock signal.

Linear feedback shift registers are used to generate pseudorandom numbers, pseudorandom noise, and in fast counting circuits. For example, in synchronous current ciphers, the key current is generated by a Linear Feedback Shift Register (LFSR). The key current is calculated using a linear feedback function. Such a register consists of several logics that are set by an initialization vector, which is usually the secret key. The behavior of the registers is controlled by the clock signal. With each change of state of the clock signal the register content is advanced by one logic. With this procedure with each clock signal change a bit is generated as output signal.