Re: What's wrong with this RC4?

> I was trying to write my own RC4 (or, to say, ARCFOUR) implementation and
> for almost a half of a day can do nothing with the following simple code:
Hi, I hope to can be useful to you with some links and advices: is IMHO well written and a good
starting point about RC4 basis, example code and general warnings about
RC4 issues; if you aim to understand RC4 or even build something
containing it, you should also carefully understand them. is an ARCFOUR implementation targheted to
be easy to uderstand and implement properly (ciphersaber
implementation, expecially ciphersaber2, also fixes some of RC4
issues), example code in many languages were available on but I cannot reach that URL since some
times. is one of
first posts revealing alleged RC4 code.
If you know Delphi/Pascal language family, you may (IMHO) find
interesting my page
with some FreePascal code about ARCFOUR and some modification in key
scheduling and in the cypher itself (experimental, passes randomness
tests, so they *probably* give random output as expected by a stream
cypher, but it's not enough to be confident for using it in non
experimental applications!) (btw, the code is not very simple as RC4
could be since my implementation is aimed to allow multiple stream
cyphers to run contemporary). The page itself contains other maybe
interesting links about RC4 and crypto.