Linear feedback shift register cryptosystem class
Create a LFSR cipher.
INPUT: A polynomial and initial state of the LFSR.
Create a linear feedback shift cryptosystem.
INPUT: A string monoid over a binary alphabet.
OUTPUT:
EXAMPLES:
sage: E = LFSRCryptosystem(FiniteField(2))
sage: E
LFSR cryptosystem over Finite Field of size 2
TESTS:
sage: E = LFSRCryptosystem(FiniteField(2))
sage: E == loads(dumps(E))
True
TODO: Implement LFSR cryptosytem for arbitrary rings. The current implementation is limited to the finite field of 2 elements only because of the dependence on binary strings.
Shrinking generator cryptosystem class
Create a Shrinking generator cipher.
INPUT: A list or tuple consisting of two LFSR ciphers (e1,e2).
OUTPUT: The shrinking generator cipher with key stream generator e1 and decimating cipher e2.
Create a shrinking generator cryptosystem.
INPUT: A string monoid over a binary alphabet.
OUTPUT:
EXAMPLES:
sage: E = ShrinkingGeneratorCryptosystem()
sage: E
Shrinking generator cryptosystem over Finite Field of size 2