Shrinking generator
In cryptography, the shrinking generator is a form of pseudorandom number generator intended to be used in a stream cipher.[src] It was published in Crypto 1993 by Don Coppersmith, Hugo Krawczyk and Yishay Mansour.[src] The shrinking generator uses two linear-feedback shift registers.[src] One, called the sequence, generates output bits, while the other, called the sequence, controls their output.[src] Both and are clocked; if the bit is 1, then the bit is output; if the bit is 0, the bit is discarded, nothing is output, and the registers are clocked again.[src] This has the disadvantage that the generator's output rate varies irregularly, and in a way that hints at the state of S; this problem can be overcome by buffering the output.[src] The random sequence generated by LFSR can not guarantee the unpredictability in secure system and various methods have been proposed to improve its randomness Despite this simplicity, there are currently no known attacks better than exhaustive search when the feedback polynomials are secret.[src] If the feedback polynomials are known, however, the best known attack requires less than • bits of output.[src] A variant is the self-shrinking generator.[src]
In cryptography, the shrinking generator is a form of pseudorandom number generator intended to be used in a stream cipher.[src] It was published in Crypto 1993 by Don Coppersmith, Hugo Krawczyk and Yishay Mansour.[src] The shrinking generator uses two linear-feedback shift registers.[src] One, called the sequence, generates output bits, while the other, called the sequence, controls their output.[src] Both and are clocked; if the bit is 1, then the bit is output; if the bit is 0, the bit is discarded, nothing is output, and the registers are clocked again.[src] This has the disadvantage that the generator's output rate varies irregularly, and in a way that hints at the state of S; this problem can be overcome by buffering the output.[src] The random sequence generated by LFSR can not guarantee the unpredictability in secure system and various methods have been proposed to improve its randomness Despite this simplicity, there are currently no known attacks better than exhaustive search when the feedback polynomials are secret.[src] If the feedback polynomials are known, however, the best known attack requires less than • bits of output.[src] A variant is the self-shrinking generator.[src] ==An implementation in Python== This example uses two Galois LFRSs to produce the output pseudorandom bitstream.[src] The Python code can be used to encrypt and decrypt a file or any bytestream.[src] !/usr/bin/env python3 import sys ---------------------------------------------------------------------------- Crypto4o functions start here ---------------------------------------------------------------------------- class GLFSR: """Galois linear-feedback shift register.""" def __init__(self, polynom, initial_value): print "Using polynom 0x%X, initial value: 0x%X." % (polynom, initial_value) self.polynom = polynom | 1 self.data = initial_value tmp = polynom self.mask = 1 while tmp != 0: if tmp & self.mask != 0: tmp ^= self.mask if tmp == 0: break self.mask ==See also== FISH, an (insecure) stream cipher based on the shrinking generator principle Alternating step generator, a similar stream cipher ==References==[src]
21 sentences · 21 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Shrinking generator." encyclopegia.org, 2025, https://encyclopegia.org/wiki/shrinking-generator. Accessed 25 November 2026.
Chicago
"Shrinking generator." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/shrinking-generator.
APA
encyclopegia.org. (2025). Shrinking generator. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/shrinking-generator
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| publication date | 1993 | Wikipedia |