LFSR113 is a combined linear feedback shift register using four Tausworthe components with primitive trinomials. With a period of approximately 2^113, it provides excellent statistical quality for simulations and Monte Carlo methods. Widely used in GNU Scientific Library (GSL).
| Property | Value |
|---|---|
| Category | Random Number Generators |
| Sub-category | Tausworthe LFSR |
| Security status | 🎓 Educational Only |
| Complexity | Intermediate |
| Inventor | Pierre L’Ecuyer |
| Year | 1999 |
| Origin | 🇨🇦 Canada |
| Source | algorithms/random/lfsr113.js |
| Parameter | Supported values |
|---|---|
| Seed sizes | 1 byte (8 bits) to 16 bytes (128 bits) |
| Flag | Value |
|---|---|
IsDeterministic |
Yes |
IsCryptographicallySecure |
No |
Status: 🎓 Educational Only
No vulnerabilities are recorded for this implementation.
5 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — Seed (12345, 23456, 34567, 45678): First 5 outputs - verified against LFSR113 specification
| Field | Value |
|---|---|
seed |
0000303900005ba0000087070000b26e |
outputSize |
20 |
input |
null |
expected |
d6e2ee3420487a82b4b42f7b1ecb28ddf0404482 |
Vector 2 — Seed (987654321, 123456789, 362436069, 521288629): First 10 outputs - large seed values
| Field | Value |
|---|---|
seed |
3ade68b1075bcd15159a55e51f123bb5 |
outputSize |
40 |
input |
null |
expected |
35ffd4a6874afbbae88a2f023f7c813f 06e12e04a2527763564d45d7861c1ffb 6c1a069f197ee877 |
Vector 3 — Seed (2, 8, 16, 128): Minimal valid seed values - edge case test
| Field | Value |
|---|---|
seed |
00000002000000080000001000000080 |
outputSize |
20 |
input |
null |
expected |
00180820000419c8422006240082821431412e59 |
Vector 4 — Seed (1000000, 2000000, 3000000, 4000000): First 8 outputs - round seed values
| Field | Value |
|---|---|
seed |
000f4240001e8480002dc6c0003d0900 |
outputSize |
32 |
input |
null |
expected |
beb9746d080a61e0ae650dc53685fc3f1b0bc9a487caff3b45b7800e7e08d479 |
Vector 5 — Seed (12345, 23456, 34567, 45678): Outputs 11-15 - verifies long-term state progression
| Field | Value |
|---|---|
seed |
0000303900005ba0000087070000b26e |
outputSize |
20 |
skip |
10 |
input |
null |
expected |
f55194733f2f40acc83ad68ad2a5d8f01032c2db |