Re: Another Dumb Idea for Debunking...
- From: "Bill Cox" <bill@xxxxxxxxxxxxx>
- Date: 31 Oct 2006 03:13:54 -0800
TC wrote:
- RC4 is a "stream cipher". With stream ciphers, you must never use the
same key more than once. Otherwise, you open yourself to a
devastatingly effective & simple "known plaintext" attack. One way to
avoid this problem is to use an initialization vector or IV. Google
"stream cipher" or "Initialization vector" for more information.
Done. I use a random 256-byte key for the first encryption, making
each encrypted output file unique.
- RC4 internally produces a sequence of pseudorandom numbers to perform
the encryption. The first few of those numbers sometimes exhibt
unhealthy correlations with the input key value. So, it is often
suggested to discard the first 256(?) pseudorandom numbers produced by
the cipher. You have to *reprogram it accordingly*. Obviously, the
receiver & transmitter must both agree on this change. It's no good if
one of them uses that change but the other one doesn't.
Done. I now throw away the first 256 bytes (both times).
I also tested that without my hack to the RC4 method, I get the same
result as RC4. Personally, I don't see any down-side to adding the
plaintext into the scrambling of the key. Seems to me, it can only be
good. What do you think?
Also, it sounds like just these simple steps are needed to make RC4
good enough for real use, without replacing the key very often. Do I
need to run it twice like this? There's not much down-side, since I'm
pretty sure it's still faster than the lzo compression.
Thanks -- Bill
.
- Follow-Ups:
- Re: Another Dumb Idea for Debunking...
- From: TC
- Re: Another Dumb Idea for Debunking...
- From: TC
- Re: Another Dumb Idea for Debunking...
- References:
- Another Dumb Idea for Debunking...
- From: Bill Cox
- Re: Another Dumb Idea for Debunking...
- From: Ben Rudiak-Gould
- Re: Another Dumb Idea for Debunking...
- From: Bill Cox
- Re: Another Dumb Idea for Debunking...
- From: TC
- Another Dumb Idea for Debunking...
- Prev by Date: Re: Another Dumb Idea for Debunking...
- Next by Date: Re: Another Dumb Idea for Debunking...
- Previous by thread: Re: Another Dumb Idea for Debunking...
- Next by thread: Re: Another Dumb Idea for Debunking...
- Index(es):
Relevant Pages
|