Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Re: Encrypting Largish Files

by John M. Dlugosz (Monsignor)
on Sep 24, 2001 at 08:48 UTC ( #114249=note: print w/replies, xml ) Need Help??

in reply to Re: Encrypting Largish Files
in thread Encrypting Largish Files

The passphrase length in RC4/CyberSaber doesn't have anything to do with the final key length. In fact, RC4 doesn't really have a "key" in the obvious sence the way block ciphers do.

Rather, the internal state is an array of 256 bytes, one holding each value, that is shuffled into some permutation. The input letters of the passphrase control the shuffling details.

So, the actual "strength" of the cipher is that it has 256! possible states. So, the "key" is approximatly 1683 bits, since there are 2**1683 possible states for the cipher to be set-up into.

If you know something about how the passphrase is chosen, then an attacker can search far less than that many possibilities. E.g. with 96 ASCII chars and 8 char length, only 96**8 or 2**52 of the possible keys will ever be used. In order to say the system has an effective key size of 52 bits, the attacker would have to know that, and know which 2**52 keys are available. That's the case with "40 bit" SSL.


Replies are listed 'Best First'.
Re: Re: Re: Encrypting Largish Files
by filmo (Scribe) on Sep 26, 2001 at 21:06 UTC
    Just for clarification, could you explain your math. How do you get from 256 states to to 1683 bits as 256 * 8 = 2048?

    Also, when you say "only 96^8 or 2^52" how are these two equivalent as 96^8 = 7.21e15 and 2^52 = 4.5e15 or did you mean something different?

    I'm only asking because I'm just starting to learn about cryptography..

    As a side note, how long does it currently take to brute force your way through 4.5e15 keys using non-military strength computers. (assumes that hackers have only consumer to academic calibur machines.)?
    Filmo the Klown

      256! (factorial), not 256*8. Start with the list 0..255 and shuffle it. That list is 2048 bits long, but you will never have, for example, two bytes both containing 42. So the number of legal states is smaller than the number of states that this much memory can represent.

      7.21e15 vs 4.5e15 : within a factor of 2 (1 bit). Fractional bits don't count, so round down. 2^52 is a little small, but 2^53 is too large.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://114249]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2022-10-01 18:40 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (3 votes). Check out past polls.