# Understanding LFSRs and Berlekamp-Massey Algorithm [duplicate]

This question already has an answer here:

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:

{"lfsr":{"seed":"1100110001100101"},"keyFragment":"101010001111001110000110111001101","cipherText":"bb0000e911b4238a6ca3"}

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.

## marked as duplicate by kelalaka, Ella Rose♦Feb 12 at 16:29

• @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. – Ken Feb 12 at 15:12