In fact, I have more than one question. For a CTF challenge, I am currently reading up on LFSRs. The code the challenge provides as an example is a 5-bit LFSR, and it generates from its bit sequences a 32-byte key (8-bit to one byte and this 32 times). So the first and last bytes of the key are the same for this particular 5-bit case as after $2^5-1$ iterations, the whole sequence repeats. Also, if I understand the whole logic behind a LSFR right, I can produce $2^5-1$ unique keys only for the 5-bit version. (starting with one particular seed, e.g., $s=1$). Also, I can have $2^5$ different initial seeds. So, according to my tests, this will not produce an additional 31 unique 32-byte keys but only duplicate keys in a shifted sequence.
Questions:
a) are the above statements as written correct, or did I miss something?
b) if the above is correct, then I can get up to 255 unique keys if using, as a minimum, an 8-bit LFSR ($2^8-1$). Right?
c) I will always get a max of 255 unique keys even if I increase the bits of the LFSR as I can only have 255 unique bytes, and the byte sequence will repeat. Is that correct?
d) So it doesn't make sense to increase the bits beyond 8 bits, or is there another benefit for this particular case that I don't see?
Edit:
Clarifying what I meant with unique 32-byte key: when I generate multiple 32-byte keys from an LFSR, I save the generated keys in a list, and each key appears only once in that list. I thought that when running an n-bit LFSR, the maximum number of 'unique' keys would be 255, but that might not be true, and I'll need to recheck that. Maybe someone can clarify this.