K

LFSR Calculator

Linear feedback shift register (LFSR)

Client-side computation for analysis, verification, and learning. Do not paste production secrets into untrusted sites; prefer local tooling for key material.

Educational / engineering use. RSA mode uses tiny primes for illustration only—not for real key generation.

Register width (bits)
Initial state (hex)
Tap mask (hex)
Bits to clock out

Add LFSR Calculator Free On Your Website

Paste this HTML on your site.

What is LFSR Calculator?

A Linear Feedback Shift Register generates pseudo-random binary sequences by shifting bits and feeding back XOR'd outputs into the register. Used in stream ciphers, CRC generation, and hardware testing.

LFSR Formula

bn=c1b(n1)c2b(n2)...ckb(nk)b_n = c1·b_(n−1) ⊕ c2·b_(n−2) ⊕ ... ⊕ ck·b_(n−k)

Where c_i are feedback coefficients (0 or 1) and b_n is the output bit at step n.

LFSR Step-by-Step

  1. Select register size and tap positions.
  2. Enter initial seed state.
  3. Compute feedback bit using XOR taps.
  4. Shift register and insert feedback bit.
  5. Repeat for required sequence length.

LFSR Worked Example

Giventapsatpositions[4,3]andinitialstate1011:Given taps at positions [4, 3] and initial state 1011:

Step 1: b5 = b4 XOR b3 = 1 XOR 0 = 1

Step 2: b6 = b5 XOR b4 = 1 XOR 1 = 0

Step 3: Continue shifting and feedback.

Output sequence example: 1011 -> 1101 -> 0110 -> 1011 ... (repeating).

Where LFSR Calculator Is Applied

  • Stream ciphers (A5/1 in GSM mobile encryption)
  • Wi-Fi scrambling (802.11 physical layer)
  • CRC generation in Ethernet and USB
  • Hardware built-in self-test (BIST) in chips
  • Pseudo-random number generation in embedded systems
  • Digital TV signal scrambling (DVB standard)

Related Cryptography Calculators

Explore similar calculators to streamline your workflow.

View all
Calculator By Adil Balti, Content Proofread and Verify by Muhammad Kumail & Gulzar Abbas.

About Calculators.is

At Calculators.is our sole focus is to provide 100% accurate, fast, comprehensive, convenient, easy-to-use free online calculators to everyone to use without spending a single $ on any online Calculators.

All the calculators on our website are designed and developed by our own team, and each one is put through strict, comprehensive testing before being made live on our website.

About, Founder and calculator.is.