Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Here is more information since I am not sure what to change in what you have given above to accomodate for it. I will be using this LFSR to encrypt text. This text will be encoded over $Z_128$ (assuming a change is needed for this?) and the LFSR will need to work with the binary representation of the text. (which I think is ok already)
Thanks for pointing me into the correct direction with Module. Could you check my edit and tell me if it is the way others would expect the function to look.