Let me see if I understand the security of this algorithm correctly.
It relies on the fact that there's no S
i+1 that satisfies S
i+1 XOR (S
i+1 >> 1) = S
i XOR w
1 is this right? So I want to make a proof of that.
- w
0 and w
1 are L-bit numbers with an odd number of different bits. S
0 and therefore 1, 2, etc are L-bit too.
- XOR is a commutative and associative operation so that makes some of the math easier. The >> is a right shift except it also rotates the bits from the end to the beginning. (XOR is 0 if bits are the same, 1 if they are different)
- S
0 is the initial state.
So that means S
1 = S
0 XOR (S
0 >> 1) XOR w
0, S
2 = S
1 XOR (S
1 >> 1) XOR w
0, and so on.
In other words we are trying to prove
Si XOR (Si >> 1) XOR w
0 XOR ([
Si XOR (Si >> 1) XOR w0] >> 1) != S
i XOR w
1 .
Which is just
(Si >> 1) XOR w
0 XOR ([
Si XOR (Si >> 1) XOR w0] >> 1) != w
1=
(Si >> 1) XOR ([
Si XOR (Si >> 1) XOR w0] >> 1) != w
1 XOR w
0So we know that w
1 XOR w
0 = A is going to have an odd number of 1 bits.
And now I'm unable to simplify this further because while I know
regular shifts are distributive, and can be distributed over XORs,
cyclic shifts can't AFAIK unless there's away to simplify that C function in that Wikipedia link for cyclic shift.
Let me take another statement from the paper that is S
0 looks something like
000011111. Then S
0 >> 1 will be
100001111 (7 positions with different bits) XORing those two makes
011101111. This does correspond to the property mentioned in your paper that XOR of two numbers with N different positions will make a number with an 1s. But I'm unsure how to prove this for all numbers (or if someone has already done this). But at least I verified something from this part myself.