tag:blogger.com,1999:blog-4401555280825766585.post2312351473058742581..comments2023-07-21T04:50:56.062-04:00Comments on Life of a Computer Scientist: Evaluating RC4 as pseudo-random number generatorLikai Liuhttp://www.blogger.com/profile/06372207357661600589noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-4401555280825766585.post-25968160308818384382014-08-11T02:28:46.533-04:002014-08-11T02:28:46.533-04:00You're probably using an incorrect RC4 impleme...You're probably using an incorrect RC4 implementation. I was able to get similar statistics only when I wrote "S[S[i] + S[j]]" instead of "S[(S[i] + S[j]) & 0xFF]", which would overrun the state buffer in C, and cause it to read random memory (leading to lots of 0 outputs)<br /><br />http://ideone.com/uE8LHNLymiahttps://www.blogger.com/profile/09771627367105519987noreply@blogger.com