emercoin / rc4ok

Improved RC4 PRNG and lock-free entropy pool
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

Missing mod 256 in rc4ok_prng. #1

Open JackZielke opened 1 month ago

JackZielke commented 1 month ago

On page 5 of RC4OK. An improvement of the RC4 stream cipher it says: j0 ← (j0 + S[i]) mod 256

Line 49 of rc4ok.c j32 = ((j32 << 1) | (j32 >> 31)) + x;

I had to remove mod 256 from my code to get matching output from the reference code.

maxihatop commented 4 weeks ago

Thanks for referencing. Code is correct, need to apply minor change into pre-print, we will do.

JackZielke commented 4 weeks ago

Wonderful!

maxihatop commented 2 weeks ago

We updated paper, see new version: https://ia.cr/2023/1486