0

In fact I have more than just the one question as I try to better understand the whole topic. for a CTF challenge I am currently reading up on LSFR. The code the challenge provides as an example is a 5bit lsfr and it generates from its bit sequences a 32byte long key (8bit to one byte and this 32 times). So the first and last byte of the key are the same for this particular 5bit case as after 2^5-1 iterations the whole sequence repeats. Also if I understand the whole logic behind LSFR right I can produce 2^5-1 unique keys only for the 5bit version. (starting with one particular seed e.g. s=1). Also I can have 2^5 different initial seeds. According to my tests this will not produce additional 31 unique 32 byte keys but only the same keys but in a shifted sequence. ok, so here the questions I have.

a) are the above statements as written correct or did I miss something ?

b) if above is correct then I can get up to 255 unique keys if using as minimum a 8bit_lsfr (2^8-1). right ?

c) I will always get a max of 255 unique keys even if I increase the bits of the lsfr as I can only have 255 unique bytes and the byte sequence will repeat. is that correct ?

d) So it doesnt make sense to increase the bits beyond 8 bits or is there another benefit for this particular case that I dont see ?

Thanks for any help in better understanding this in advance. Best Zaphoxx

Zapho Oxx
  • 275
  • 1
  • 16
  • 1
    Stackoverflow is for programming questions, so this question is off-topic here. It might be on-topic in our [crypto](https://crypto.stackexchange.com/) site. An n-bit register can hold 2^n distinct values. Therefore it can produce 2^n distinct sequences of n-bit values, no matter what the feedback is, since the first element of each sequence will be different. Now as to the rest of your questions you'll need to carefully think about how to define terms like "unique", etc. first. – President James K. Polk May 15 '18 at 15:11
  • ok, thanks for your response. I will move it to the crypto site. best – Zapho Oxx May 15 '18 at 15:25

0 Answers0