Sie sind auf Seite 1von 3

Introduction

A linear feedback shift register (LFSR) is


a shift register whose input bit is a linear
function of its previous state. The only linear
function of single bits is xor, thus it is a shift
register whose input bit is driven by the
exclusive-or (xor) of some bits of the overall
shift register value. 5-bit LFSR

The initial value of the LFSR is called the This has taps at stages 1 and 4 with XOR

seed, and because the operation of the feedback. Here, the LS bit of the shift

register is deterministic, the stream of values register is, by convention, shown at the left

produced by the register is completely hand side of the shift register, with output

determined by its current (or previous) state. being taken from the MS bit at the right

Likewise, because the register has a finite hand side. It will produce a pseudorandom

number of possible states, it must eventually sequence of length 2n-1 states (where n is the

enter a repeating cycle. However, an LFSR number of stages) if the LFSR is of maximal

with a well-chosen feedback function can length. The sequence will then repeat from

produce a sequence of bits which appears the initial state for as long as the LFSR is

random and which has a very long cycle. clocked.

A n-bit LFSR is a n-bit length shift register Applications


with feedback to its input. The feedback is
LFSRs can be implemented in hardware,
formed by XORing or XNORing the outputs
and this makes them useful in applications
of selected stages of the shift register -
that require very fast generation of a pseudo-
referred to as 'taps' - and then inputting this
random sequence, such as direct-sequence
to the least significant bit (stage 0). Each
spread spectrum radio. LFSRs have also
stage has a common clock. The 'linear' part
been used for generating an approximation
of the term 'LFSR' derives from the fact that
of white noise in various programmable
XOR and XNOR are linear functions. An
sound generators.
example of a 5-bit LFSR is shown below:
The Global Positioning System uses an example, given a stretch of known plaintext
LFSR to rapidly transmit a sequence that and corresponding ciphertext, an attacker
indicates high-precision relative time can intercept and recover a stretch of LFSR
offsets. output stream used in the system described,
and from that stretch of the output stream
Uses as counters can construct an LFSR of minimal size that
simulates the intended receiver. This LFSR
The repeating sequence of states of an LFSR
can then be fed the intercepted stretch of
allows it to be used as a clock divider, or as
output stream to recover the remaining
a counter when a non-binary sequence is
plaintext.
acceptable as is often the case where
computer index or framing locations need to Three general methods are employed to
be machine-readable. LFSR counters have reduce this problem in LFSR-based stream
simpler feedback logic than natural binary ciphers:
counters or Gray code counters, and
therefore can operate at higher clock rates.  Non-linear combination of several

However it is necessary to ensure that the bits from the LFSR state.

LFSR never enters an all-zeros state, for  Non-linear combination of the output

example by presetting it at start-up to any bits of two or more LFSRs.

other state in the sequence.  Irregular clocking of the LFSR, as in


the alternating step generator.
Uses in cryptography
Uses in digital broadcasting and
LFSRs have long been used as pseudo- communications
random number generators for use in stream
ciphers (especially in military To prevent short repeating sequences (e.g.,
cryptography), due to the ease of runs of 0's or 1's) from forming spectral
construction from simple electro-mechanical lines that may complicate symbol tracking at
or electronic circuits, long periods, and very the receiver or interfere with other
uniformly distributed output streams. transmissions, linear feedback registers are
However, an LFSR is a linear system, often used to "randomize" the transmitted bit
leading to fairly easy cryptanalysis. For stream. This randomization is removed at
the receiver after demodulation. When the Other digital communications systems using
LFSR runs at the same rate as the LFSRs:
transmitted symbol stream, this technique is
 IBS (INTELSAT business service)
referred to as scrambling. When the LFSR
 IDR (Intermediate Data Rate service)
runs considerably faster than the symbol
 SDI (Serial Digital Interface
stream, expanding the bandwidth of the
transmission)
transmitted signal, this is direct-sequence
 Data transfer over PSTN (according
spread spectrum.
to the ITU-T V-series
Digital broadcasting systems that use linear recommendations)
feedback registers:  CDMA (Code Division Multiple
Access) cellular telephony
 ATSC Standards (digital TV
 100BASE-T2 "fast" Ethernet
transmission system – North
scrambles bits using an LFSR
America)
 1000BASE-T Ethernet, the most
 DAB (Digital Audio Broadcasting
common form of Gigabit Ethernet,
system – for radio)
scrambles bits using an LFSR
 DVB-T (digital TV transmission
 PCI Express 3.0
system – Europe, Australia, parts of
 USB 3.0
Asia)
 IEEE 802.11a scrambles bits using
 NICAM (digital audio system for
an LFSR
television)

Das könnte Ihnen auch gefallen