I am working on a hardware implementation of the SIMON cipher and the key expansion is based on GF(2). The original paper is here, https://eprint.iacr.org/2013/404 I have successfully created the hardware, but the fact that I cannot grasp the mathematics is bothersome.
The LFSR in the paper lists the initial condition as 00001 going right where 1 is the MSB.
$W = \left[ \begin{array}{ccccc} 0&1&0&0&0\\ 0&0&1&0&0\\ 1&0&0&1&0\\ 0&0&0&0&1\\ 1&0&0&0&0\end{array} \right]$
The matrix produces this bitstream w= 10000100101100111.... I can successfully create this bitstream in hardware, which I will detail below; however, my abstract algebra is not really good enough apparently. I even read a book, but now that I'm up on GF(2), I'm still not able to grasp how this bistream is mathematically created.
The LFSR in my implementation is initially loaded with 10000 in hardware, where 1 is the MSB. As far as the hardware, the state of my LFSR is follows where the MSB is the "bit" in the output stream follows.
count 5-bit
00 ---10000
01 ---00001
02 ---00010
03 ---00100
04 ---01001
05 ---10010
06 ---00101
07 ---01011
08 ---10110
09 ---01100
(down to 31)
The point is, I have successfully created the bitstream because I realized that the stream was just a 5-bit shift register with an XOR.
If anyone mathematician can bridge my gap between theory and reality, I would greatly appreciate it.
Of course, after writing this up, I came up with a resolution. Via Matlab:
The result is that the MSB matches the bitstream.