I have programmed an alternating step generator in the following way:
- I have three LFSR. LFSR_1 is being clocked in every step.
- Every LFSR has an initialization vector.
- And we have a text to encrypt.
If the output of LFSR_1 is 1 :
- LFSR_2 is being clocked and calculates its new output. LSFR_3 is not being clocked.
- We build the sum of the output of LFSR_2 and LFSR_3 ("xor")-> sum23
- Then the sum23 is XORed with the 1. bit of the plaintext we have to encrypt and this is the first bit of cipher.
If the output of LFSR_1 is 0:
- LFSR_2 is not being clocked but stays the same.
- LFSR_3 is being clocked and calculates its output.
- We build the sum of the output of LFSR_2 and LFSR_3 ("xor")-> sum23
- Then the sum23 is XORed with the next bit of the plaintext we have to encrypt and this is the next bit for the cipher...
My question is: I have to decrypt the cipher to the plaintext again. But I don't know how to do that?