I have a tutorial question which focuses on LFSRs and Berlekamp-Massey Algo (which is totally out of my syllabus). Please forgive me if my questions seem stupid.

I'm given these information:


My seed is 1100110001100101 (16 bits)

My key fragment is 101010001111001110000110111001101 (33 bits)

My cipher text is bb0000e911b4238a6ca3 (in hexadecimal)

Apply the Berlekamp-Massey algorithm on the key stream fragment you were given to obtain the feedback polynomial that generated the key. For full marks, you have to implement the algorithm yourself, attach key parts of the algorithm to the report as an appendix and describe briefly which bit of the implementation you found the most challenging. If you use someone else’s code or an online service you will not be awarded full marks; in this case make sure you acknowledge the source of the code or service you use.

I'm using an online calculator and my LFSR is x^16 + x^12 + x^3 + x^1 + 1. Which means that my tap positions are 1, 3, 12 and 16.

Question 6: Generate the full key stream in order to be able to decrypt the cipher text you intercepted (i.e. what you were given)

From this question, I have no idea what to do. I don't exactly understand how multiple taps work. I understand that with one tap position you are able to XOR and obtain last bit for every cycle. My fundamentals are weak, and most resources come with a difficult mathematical explanation which I cannot understand.

  • 1
    $\begingroup$ Possible duplicate of Decrypting Ciphertext with partial Key Fragment using LFSR and Berlekamp-Massey. If the answer does not satisfies you, let us know. $\endgroup$ – kelalaka Feb 12 '19 at 14:51
  • $\begingroup$ @kelalaka it is a duplicate, however, my output is this keystream : 11001100011001010110000110011101011110011101000101010001111001110000110111001101 \j  pliantext : i╣GàFE , and i've only replace the seed and cipher text. $\endgroup$ – Ken Feb 12 '19 at 15:12
  • $\begingroup$ Did you replaced the seed? Order is important. $\endgroup$ – kelalaka Feb 12 '19 at 15:17
  • $\begingroup$ @kelalaka let me double check my inputs. i replaced the seed and cipher text. my cipher text is in hexadecimal. hence, i have to convert it to binary myself. $\endgroup$ – Ken Feb 12 '19 at 15:21
  • 1
    $\begingroup$ @kelalaka thank you, something is wrong with my inputs. the code is working correctly. thank you for your help. $\endgroup$ – Ken Feb 12 '19 at 15:26