Looking at the current source, there's a slight issue in RC4's code. In the
next() method:
...
t = S[i];
S[i] = S[j];
S[j] = t;
return S[(t+S[i])&255];
Since t is still S[i], that means the result is S[(S[i]+S[i])] - it should be
S[(S[j]+S[i])].
Alternatively using the cached value that's:
return S[(t+S[j])&255];
Original issue reported on code.google.com by virap...@gmail.com on 27 Nov 2011 at 6:55
Original issue reported on code.google.com by
virap...@gmail.com
on 27 Nov 2011 at 6:55