Slashdot Mirror


Debunking a Bogus Encryption Statement?

deviantphil asks: "Recently, a coworker tried to assert that encrypting a file twice with a 64 bit algorithm is equivalent to encrypting it once with a 128 bit algorithm. I know enough about encryption to know that isn't true, but I am having difficulties explaining why and how. Doesn't each pass of the encryption create a separate file header which makes this assertion untrue? Can anyone point me to references that would better help me explain this?" What other laughable claims have you heard attributed to encryption, and how were you able to properly lay them to rest?

215 comments

  1. Meet in the middle attack by dtfinch · · Score: 5, Informative

    http://en.wikipedia.org/wiki/Meet-in-the-middle_at tack

    That's why we have triple-DES instead of double-DES.

    1. Re:Meet in the middle attack by Anonymous Coward · · Score: 0

      Thanks for that. If I met you in a bar, I would give you a drink.

    2. Re:Meet in the middle attack by TheSHAD0W · · Score: 2, Informative

      Even if DES is tripled rather than doubled for their "128-bit crypto", I still don't like it much. The block size is still 64-bit, which means 2^64 possible combinations versus the 2^128 for ideal 128-bit. I say ideal, because typically attackers find ways of reducing the effective number of possible combinations for an algorithm. Original DES has been reduced significantly, so triple-DES was designed to improve it, and do so using the same encryption hardware. But while triple-DES may be closer to the ideal 64-bit, even a non-ideal 128-bit algorithm should exceed that number of effective bits.

    3. Re:Meet in the middle attack by swillden · · Score: 4, Insightful

      The block size is still 64-bit, which means 2^64 possible combinations versus the 2^128 for ideal 128-bit.

      When talking about block ciphers, block size and key size are separate things. Generally, if you say algorithm X is an n-bit cipher, you're talking about key size, not block size. Given use of good block chaining modes, ciphers with larger block sizes don't really offer significant additional security.

      typically attackers find ways of reducing the effective number of possible combinations for an algorithm. Original DES has been reduced significantly, so triple-DES was designed to improve it

      Original DES hasn't really been reduced significantly. There are attacks which reduce the computational complexity to, IIRC ~41 bits, but at the expense of requiring impractical space. All in all, DES as stood up extremely well and its practical strength hasn't been significantly reduced by 30+ years of scrutiny.

      The problem 3DES was created to address was a deliberate limitation of the design: The small keyspace. The strongest variant of Lucifer (the original IBM cipher which became DES), used a 128-bit key, but the NSA deliberately had it reduced to a 56-bit key, presumably because they thought they could break the cipher with the smaller key size, but it was still secure enough against others. Advances in computation technology, of course, have put a brute force search of a 56-bit keyspace within reach of run-of-the-mill desktop computers. 3DES addresses this by increasing the effective keyspace to 112 bits.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    4. Re:Meet in the middle attack by eddeye · · Score: 4, Informative

      It's even worse if your cipher of permutations forms a group. In that case, for any two ENC keys k1 and k2, there exists a third ENC k3 such that ENC_k2 (ENC_k1 (x)) = ENC_k3 (x). In other words you can find a third key that produces the same permutation as the composition of keys 1 and 2. This means that breaking a double-encryption (or triple, quadruple, etc) is no harder than breaking a single encryption: the resulting permutation can always be described by a single key.

      That's why 3DES uses EDE instead of EEE. While DES doesn't form a group, it does have some group-like structures which reduce the workload quite a bit. This doesn't apply to all ciphers btw; there are many more possible 64-bit permutations than 64-bit keys, so compositions can fall well outside those covered by keyspace.

      I think this is covered in chapter 7 of the Handbook of Applied Cryptography.

      --
      Democracy is two wolves and a sheep voting on lunch.
    5. Re:Meet in the middle attack by Mr+Z · · Score: 1

      And here I thought EDE mode was there so that you could do single-DES and triple-DES with the same hardware--just set all three keys equal and the first E and D cancel in the EDE structure.

      --Joe
    6. Re:Meet in the middle attack by Marxist+Hacker+42 · · Score: 1

      The problem with this being that the theory starts with: Assume the attacker knows a set of plaintext and ciphertext: P and C. At which point, why bother continuing to work? You already know the Plaintext. Since just about any system I've ever heard of makes use of single-use keys, usually the idea in cryptography is that you have Ciphertext C and need to solve for plaintext P.

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    7. Re:Meet in the middle attack by dgatwood · · Score: 2, Informative

      Known plaintext attacks are a common method for breaking crypto. For session keys for stream encryption, yes, a key is only used once. For other things like PK crypto, though, the key persists.

      As for why this is interesting, you know a piece of plaintext and a piece of encrypted text. That doesn't mean that you necessarily know the plaintext you're trying to decrypt (though you might know some of it).

      Case 1: You know a portion of the plaintext. For example, you might know that the beginning of an email message sent by a particular mail client always begins with a particular field, e.g. "X-Mailer: My Favorite Mail Client" or something. At this point, you have a number of bytes of known plaintext for a message, and when you get the encrypted text, you -may- know the encrypted version of those same bytes (assuming the particular encryption algorithm doesn't shift bytes around to make this more difficult). If there are known plaintext attacks on the cipher, this information may be enough to help you significantly reduce the potential search space for a key search.

      Case 2: Alternately, you may not have partial plaintext on the message you are trying to decrypt, but instead may have received an encrypted version of a different message along with its plaintext. For example, if you are spying on another country, you might receive the encrypted data continuously, and might be able to get a spy to obtain occasional pieces of plaintext, and you might be able to match these using time stamps or similar. Again, if you use a known plaintext attack, this may help you reduce the search space for keys that can decrypt this message, which will get you closer to being able to decrypt other messages sent with the same key.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    8. Re:Meet in the middle attack by gd23ka · · Score: 1

      It's pretty simple, take DES for example. ECB "Electronic Codebook Mode" DES maps 64 bits of plaintext onto 64 bits of ciphertext using
      a given key. Running the resulting ciphertext again through DES maps those 64 bits of ciphertext to a 64 bits of final cipher text,
      However, there's also a single key that maps those 64 bits of plaintext directly in one go to the 64 bits of FINAL ciphertext but
      you don't now what is.

      FC = DESECB(DESECB(P,K1),K2) = DESECB(P,Kunknown)

      Of course there is a slight chance that I'm mistaken here but then IANAC where C is in the set of {Cryptographer, Cryptanalyst}.

    9. Re:Meet in the middle attack by pegr · · Score: 1

      And here I thought EDE mode was there so that you could do single-DES and triple-DES with the same hardware--just set all three keys equal and the first E and D cancel in the EDE structure.
       
      Come on, where's his funny mod? :)

  2. Your keyspace wouldn't be that much bigger by Profane+MuthaFucka · · Score: 5, Insightful

    Seems like encrypting twice with a 64-bit key just means that instead of breaking a 64-bit key once, you have to do it twice. That's like using a 65-bit key, instead of a 64-bit key. Every bit doubles your keyspace.

    Plus, you have to realize that the amount of time needed to brute force a single key of a certain size goes up non-linearly with each additional bit. If you just double the number of times you encrypt, you're pretty much just increasing the effort to brute force the thing linearly.

    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    1. Re:Your keyspace wouldn't be that much bigger by sr180 · · Score: 5, Funny

      Think of it as this: If you encrypt something as rot-13 twice, does it become any more secure?

      --
      In Soviet Russia the insensitive clod is YOU!
    2. Re:Your keyspace wouldn't be that much bigger by Anonymous Coward · · Score: 0

      Rot-13 is a transformation. It hardly qualifies as encryption.

    3. Re:Your keyspace wouldn't be that much bigger by Jeff+DeMaagd · · Score: 2, Insightful

      A better illustration is to ask them if they want two ten dollar bills or one one hundred dollar bill? Both of them will get you two zeros, but obviously where those zeros are makes a big difference in the value of the number.

    4. Re:Your keyspace wouldn't be that much bigger by TCM · · Score: 3, Informative
      Seems like encrypting twice with a 64-bit key just means that instead of breaking a 64-bit key once, you have to do it twice.
      I think there's more to this problem than you realize at first. Bruteforce relies on the ability to identify when you have successfully broken the cipher text. If you encrypt random data and then try to bruteforce it, how will you know at the first layer that you have successfully broken it? It's not like some magic bit is telling you whether the key was correct or not. If you decrypt with the wrong key, you just get (truly random?) garbled data.

      Wouldn't you have to do the "inner" 64bit bruteforce procedure for each possible key of the "outer" 64bit keyspace, thus making it 128bit again? I'm feeling the effective key strength is somewhere between 64bit and 128bit, certainly more than 65bit, but not really 128bit.

      IANAC(ryptologist).
      --
      Of course it runs NetBSD. BTC: 1NT7QvbetmANwaMzhpVL6
    5. Re:Your keyspace wouldn't be that much bigger by Anonymous Coward · · Score: 1, Funny

      Yeah genius, how about asking them to give *you* either two tens or a hundred. Trust me, it works out better that way.

    6. Re:Your keyspace wouldn't be that much bigger by SCPRedMage · · Score: 1

      Mod parent "-1, missed the joke".

      --
      My sig can beat up your sig.
    7. Re:Your keyspace wouldn't be that much bigger by Kadin2048 · · Score: 5, Insightful

      I think a big part of that comes down to the file headers and how you actually implement the cryptographic algorithms into a system.

      If you take a plaintext file and encrypt it into a file which has headers ("BEGIN ENCRYPTED CONTENT---"), and then encrypt the result again, assuming the attacker knows how you did it and that the intermediate file has plaintext headers, then they'll know the moment they broke the first 64-bit encryption layer. So in this example, you're basically at 65 bits.

      Now if you don't include any headers, so that there's no terribly good way to determine whether you've gotten the right key or not, as you're brute-forcing the first layer, then I think you're right -- the strength of the overall system is somewhere in a grey area between 65 and 128 bits.

      If someone was just thinking that they could use a file-encryption utility twice (which produces output files that have plaintext headers) and double the keyspace, they are dead wrong.

      --
      "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
    8. Re:Your keyspace wouldn't be that much bigger by swillden · · Score: 5, Informative

      Wouldn't you have to do the "inner" 64bit bruteforce procedure for each possible key of the "outer" 64bit keyspace, thus making it 128bit again?

      No, you do a meet-in-the-middle attack, which is basically 2^64 in complexity if you're using two 2^64 keys.

      There are some optimizations that can be done, but the basic idea is this: You start with one ciphertext block and its corresponding known plaintext. Then you encrypt the plaintext with all 2^64 possible keys and store the results (with some indexes to make it easy to search for a particular block). Then you decrypt the ciphertext with all 2^64 possible keys, looking each result up. When you find a match, you have found the pair of 64-bit keys that turns that plaintext into that ciphertext. So to search the entire space, you have to do 2^64+2^64 = 2^65 trial operations. On average, you only have to search half of the second keyspace, so the complexity of the search is 2^64+2^63 = 2^64 (plus the huge storage cost).

      Triple encryption is also weakened by a meet-in-the-middle attack. Using three 64-bit keys, it would be nice to think you have a 192-bit key. But a meet-in-the-middle requires encrypting with all 64-bit keys for the first step, and decryption with all 128-bit keys for the second step, giving an effective strenth of 2^64+2^127 = 2^127 (plus the huge storage cost).

      Finally, keep in mind that DES keys aren't 64 bits. They're 56 bits. So 3DES has a brute force search computational complexity of 111 bits, on average.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    9. Re:Your keyspace wouldn't be that much bigger by igb · · Score: 2, Informative
      Yes, but rot-N forms a group under composition (ie there exists a Z such that rot-X followed by rot-Y is equivalent to rot-Z). DES, for example, has been shown not to form a group, so there is no single key equivalent to the use of two distinct keys.

      ian

    10. Re:Your keyspace wouldn't be that much bigger by zippthorne · · Score: 1

      Except it wasn't a joke. It was an analogy. It happens that it used a particularly popular slashdot meme generally regard as jocular, but the post itself wasn't primarily a joke.

      And if it was intended as such, it was a very sloppy attempt at humor.

      --
      Can you be Even More Awesome?!
    11. Re:Your keyspace wouldn't be that much bigger by Odin_Tiger · · Score: 1

      If you rot-13'd something twice, wouldn't that effectively bring it back to it's original state?

      --
      Unpleasantries.
    12. Re:Your keyspace wouldn't be that much bigger by mgblst · · Score: 4, Funny

      Do you hear whoosh sound? It is as if something just went flying over your head.

    13. Re:Your keyspace wouldn't be that much bigger by darkonc · · Score: 1
      You can explain it easier in the context of dropping the key size by a big -- for example, encrypting twice with 8 bit keys.

      If you encrypt twice with 8 bit keys, then you have to decrypt twice with 8 bit keys, then for each encryption, you have 256 possible keys... This means that across the two decryptions, you have to make a total of 512 guesses.

      If, on the other hand, you have a single 16 bit key, then you have 64K possible guesses.

      Now, one of the things that this presumes is that, when you find the first key, you can actually verify that you've gotten a 'hit'. Unfortunately, this is often possible to do -- especially if the encapsulated encryption has any sort of recognizable header information on it.

      This explanation also ignores the possiblity that the product function of the two encryptions colapses into a function with less than 64K possible keys.

      --
      Sometimes boldness is in fashion. Sometimes only the brave will be bold.
    14. Re:Your keyspace wouldn't be that much bigger by Lord+Bitman · · Score: 1

      or you could be a moron, either one.

      --
      -- 'The' Lord and Master Bitman On High, Master Of All
    15. Re:Your keyspace wouldn't be that much bigger by julesh · · Score: 1

      I think there's more to this problem than you realize at first. Bruteforce relies on the ability to identify when you have successfully broken the cipher text.

      We're probably talking consumer encryption software here. Many such programs (most?) include a hash of the encrypted data so that they can verify that decryption was successful, or at least some other mechanism that allows them to prompt for an alternative key if the one specified didn't work. Even if there are multiple possible keys that won't produce a failure (as would happen if (e.g.) the program used a simple 8-bit checksum, which would usually provide the required property of popping up a dialog box on an incorrect key), it still dramatically reduces the search space. Maybe you're looking at 2^80 or so.

    16. Re:Your keyspace wouldn't be that much bigger by Anonymous Coward · · Score: 0

      HAHAHAHA

      Now that's funny, Lord Shitman calling someone else a moron. I'm surprised he stopped getting his crusty asshole pounded long enough to type that.

      www.the-h(omo).net

    17. Re:Your keyspace wouldn't be that much bigger by Jim+Hall · · Score: 2, Funny

      Absolutely! That's why I double-rot13 all my emails before sending them! :-)

    18. Re:Your keyspace wouldn't be that much bigger by CastrTroy · · Score: 1

      I'm pretty sure that every encryption algorithm requires a checksum or hash of the data to ensure that the correct key was provided. Otherwise, you'd have a huge usability problem. Accidentally using the wrong key would still lead to data, but the user would have to identify why the data was not what they expected. Was it the wrong key? Was the file corrupted? Is there bad memory on the system, causing data to get corrupted?

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    19. Re:Your keyspace wouldn't be that much bigger by IsThisNickTaken · · Score: 1

      Be careful, people have figured out how to crack the double-rot13. To be safe I have switched over the quad-rot13...

    20. Re:Your keyspace wouldn't be that much bigger by tomhudson · · Score: 1

      Here's one with a HUGE key space - and much more difficult to break.

      "cat /dev/urandom > file_you_want_encrypted.doc"

      And for the best effect, you can let this run all night. Ignore the "disk full" message. Its a feature, not a bug.

      Pretty much guaranteed nobody else will be able to read your original contents when its finished.

    21. Re:Your keyspace wouldn't be that much bigger by jlcooke · · Score: 1

      If you're using a cipher that is weak to known plaintext attacks, you have other issues. The above argument doesn't hold, sorry.

    22. Re:Your keyspace wouldn't be that much bigger by Bertie · · Score: 1

      No flies on you, eh?

    23. Re:Your keyspace wouldn't be that much bigger by Kadin2048 · · Score: 1

      I'm not talking about a known-plaintext attack on the cipher itself. (Although if you knew that the input into the second (the "outer") cipher contained headers, you could use this as part of a known-plaintext attack, but that's not what I was discussing.)

      Rather I was just saying that if you have file headers on the intermediate file, then it becomes quite easy to figure out when you've brute-forced the outer layer of encryption. Without these headers, it's much harder to tell when you've gotten the correct key to the outer layer, and are looking at the ciphertext of the second layer, instead of random garbage.

      In the worst-case scenario, you would have to try every possible key of the first layer of encryption, and then try every key of the second (inner) layer of encryption against every possible result from the first. This would double the effective keyspace of the system, to 128 bits (assuming two 64-bit ciphers).

      In the best-case, you will know immediately when you see the file headers when the outer layer of encryption is broken, so you'll only have to exhaust that 64-bit keyspace, and then do it again on the inner layer. This yields a "65-bit" equivalence.

      The attack is brute-force keyspace exhaustion either way; my comment said nothing about any strength or weakness of the cryptographic algorithm. In fact it rather assumed that a known-plaintext attack wouldn't work, because if it did, then you probably wouldn't have to do through keyspace exhaustion.

      Hope this makes things clearer.

      --
      "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
    24. Re:Your keyspace wouldn't be that much bigger by mrsbrisby · · Score: 1
      Seems like encrypting twice with a 64-bit key just means that instead of breaking a 64-bit key once, you have to do it twice. That's like using a 65-bit key, instead of a 64-bit key. Every bit doubles your keyspace.
      Ideally, yes, but it depends on the cipher, and the implementation.

      The cipher may form a group, where a single 64-bit key will decode the double-encrypted ciphertext to the original plaintext, so instead of having one key twice, you really have two keys that will decrypt.

      The implementation may leak information about encrypted data- lots of "pluggable" crypto systems leave a header that describes what cipher, keylength, and perhaps a magic string used for quickly checking valid keys, which- while they may not reduce the complexity by much, knowing that they are in the ciphertext itself may help launch an attack.
    25. Re:Your keyspace wouldn't be that much bigger by poot_rootbeer · · Score: 1

      2^64+2^64 = 2^65

      This equation is the key.

      2^64 + 2^64 = 2^65
      2^64 * 2^64 = 2^128

    26. Re:Your keyspace wouldn't be that much bigger by xmodem_and_rommon · · Score: 1

      or you could just encrypt the hash as well (with the same key). If the decrypted data matches the decrypted hash, key was correct. otherwise, it probably wasn't. Obviously you'd want to apply some variations of this to speed things up (eg: only has the first 128KB or so, and include the hash at the start. That way you can determine if the key was correct and only have to decrypt 128KB + a hash - not the whole file)

    27. Re:Your keyspace wouldn't be that much bigger by Anonymous Coward · · Score: 0
      "cat /dev/urandom > file_you_want_encrypted.doc"



      If you do this then anyone can read your file, provided they too have /dev/urandom on their system. All they have to do is read through /dev/urandom until your file appears. It will, eventually...

    28. Re:Your keyspace wouldn't be that much bigger by dreddnott · · Score: 0

      Is that you, Psychego?

      --
      I may make you feel, but I can't make you think.
    29. Re:Your keyspace wouldn't be that much bigger by swillden · · Score: 1

      Right, and if it weren't for the meet-in-the-middle attack, using two 64-bit keys would give you a keyspace with 2^64*2^64=2^128 elements.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    30. Re:Your keyspace wouldn't be that much bigger by Anonymous Coward · · Score: 0

      They all shit and left.

    31. Re:Your keyspace wouldn't be that much bigger by tomhudson · · Score: 1

      Good point. Let's patent it.

    32. Re:Your keyspace wouldn't be that much bigger by njdj · · Score: 1

      No, you do a meet-in-the-middle attack, which is basically 2^64 in complexity if you're using two 2^64 keys. There are some optimizations that can be done, but the basic idea is this: You start with one ciphertext block and its corresponding known plaintext.

      Huh? The plaintext is not known. If it were, there'd be nothing to do.

      Possibly you are thinking of a known-plaintext attack aimed at recovering the keys. That's not the problem being discussed.

    33. Re:Your keyspace wouldn't be that much bigger by swillden · · Score: 1

      The plaintext is not known. If it were, there'd be nothing to do.

      Some plaintext is nearly *always* known. The point is to use what you know to recover the key so you can get the rest.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  3. Easy by suricatta · · Score: 3, Insightful

    Each bit doubles the strength

    1. Re:Easy by flyboy974 · · Score: 1

      While each bit does double the protection, the biggest protection is knowing what algorytm somebody used.

      If I was to encrypt a file once with 64bit, I would have 2^64. Now, if the intruding party did not know that I encrypted the file a second time, they would then have to try to brute force again with an additional 64 bits. Therefor, I would really have 2^64 * 2^64, or 2^4096. The file is absolutely useless unless both sets are compromised.

      We are not talking about a single additional bit here. We are talking about two seperate uncompromised keys in a file format which is completely unknown! So it wouldn't just double the encryption cost, because frankly any encryption algorytm doesn't mean that if you encode a file once, and then encode it again, you can decode it by adding a single bit to the key. Duh. You have to completely decrypt the first encrypted byte set into the again encrypted format. Thus there is 64 bits of primary encryption, and 64 bits of additional encryption.

      So, even if you brute forced the first 64 bits, you get to do it again, thus you are really trying to brute force 2^128. Although that assumes that both keys are at the extream ends of the brute force.

    2. Re:Easy by flyboy974 · · Score: 1

      Yes, I messed up on the ^4096. It's ^128, which is still really strong. I even corrected myself later, but, I forgot to change the top to the post!

  4. While you're at it... by unitron · · Score: 3, Funny

    While you're double super secret encrypting that file why not keep compressing and re-compressing it until you have it down to 1 bit as well? :-)

    --

    I see even classic Slashdot is now pretty much unusable on dial up anymore.

    1. Re:While you're at it... by QuantumG · · Score: 3, Funny

      Bruce Schneier can compress arbitary random data... with his fists.

      --
      How we know is more important than what we know.
    2. Re:While you're at it... by RuBLed · · Score: 2, Funny

      but Chuck Norris can roundhouse kick that compressed data back into its' raw format.

    3. Re:While you're at it... by QuantumG · · Score: 4, Funny

      Geologists recently discovered that "earthquakes" are nothing more than Bruce Schneier and Chuck Norris communicating via a roundhouse kick-based cryptosystem.

      --
      How we know is more important than what we know.
    4. Re:While you're at it... by Psiven · · Score: 0

      Rofl

    5. Re:While you're at it... by Patrik_AKA_RedX · · Score: 1

      I use that technique all the time.
      Here I got some intresting downloads for you:
      My whole collection of the latest movies: '1'
      All microsoft programs: '0'
      A working beta of Duke4Ever: '0'
      ISO's of the 20 best games of 2005 and 2006: '1'
      Every MP3 you could find on the net: '1'
      pron: 12.250.000 images, 512.054 movies: '0'

      I'll upload the decompress util as soon as I got that last bug out of it. But you could finish the downloads in the mean time.

    6. Re:While you're at it... by megaditto · · Score: 1

      This works like so:

      1) Find an OTP that XORs your data to all 1's
      2) XOR date and the OTP
      3) Compress the resulting file
      4) Report the resulting compression size on slashdot
      __

      Tis not enough to succeed. Others must fail.

      --
      Obama likes poor people so much, he wants to make more of them.
    7. Re:While you're at it... by bensch128 · · Score: 1

      But that still takes up 33 bits. 32 bits to specify how many ones you have (i assume data size 4GB)
      and 1 bit to indicate it exists.

      That's too big!!

      Ben

    8. Re:While you're at it... by Anonymous Coward · · Score: 1, Funny

      you win at the internet.

      -j

    9. Re:While you're at it... by Anonymous Coward · · Score: 0

      well, compressing 4294967296 bits into into 33 bits is a start!

      keep trying.

  5. It's like this.. by BigZaphod · · Score: 1

    Encrypting a single document multiple times in that way is like using a piece of duct-tape to keep a box closed. Putting another strip of duct-tape directly over the top of the previous strip does not make the box any harder to open.

    Of course this is just an analogy from a non-expert... Use at your own risk. :-)

    1. Re:It's like this.. by AP2k · · Score: 0

      At some point so mant strips of duct tape are going to hold down the box lid due to sheer mass.

    2. Re:It's like this.. by BigZaphod · · Score: 1

      At some point so mant strips of duct tape are going to hold down the box lid due to sheer mass.

      True, but in the end you could just pry the whole mess off with a crowbar or something. It's only as strong as the glue on the bottom piece.

  6. Debunking this claim by jordandeamattson · · Score: 4, Informative

    The length of the key (64-bits, 128-bits) at a simple level describes the complexity or "hardness" of the encryption. Enrcypting with a 64-bit key will give you one level of "hardness" and 128-bit will give you another, greater, level of hardness.

    If you encrypt twice with a 64-bit key you will just be taking a plain text file and encrypting it and then taking your encrypted file and encrypting it once again. To break encryption on this file, getting access to the plain text, you would need to break 64-bit encryption twice.

    While this would be more of a challenge than breaking 64-bit standalone encryption, it wouldn't be equivalent to the security of a 128-bit key. The difficulty of breaking 128-bit encryption isn't 2 times 64-bit encryption. It is actually greater - I can't quantify it without additonal research, hopefully someone who can recall it off the top of their head can chime in with the details.

    Now, breaking a doubly encrypted file would present some interesting challenges. The most obvious is that your plaintext for the first layer of encryption is anything but plaintext. Confirming that one set of encrypted text is right one vs. some other set of encrypted text would definitely be a challenge. It would make it difficult to determine if you had found the right key to decrypt your first layer of encryption.

    As an aside, I do remember reading about code systems where double encryption acutally made the result encryption less secure. I don't remember the details, but now my brain is itching and I will have to do some research. Thanks!

    Yours,

    Jordan

    1. Re:Debunking this claim by ydra2 · · Score: 1

      "As an aside, I do remember reading about code systems where double encryption acutally made the result encryption less secure. I don't remember the details, but now my brain is itching and I will have to do some research."

      I've had good results double encrytpting with the XOR method. ROT13 is another good candidate for double encrytpion.... Doggonit! Somebody got my root password again! I'm not settling for anything less than quadruple encrytpion from now on.

    2. Re:Debunking this claim by Capt'n+Hector · · Score: 1
      As an aside, I do remember reading about code systems where double encryption acutally made the result encryption less secure. I don't remember the details, but now my brain is itching and I will have to do some research. Thanks!

      Rot-13 comes to mind...

      --
      Quid festinatio swallonis est aetherfuga inonusti?
      Africus aut Europaeus?
    3. Re:Debunking this claim by pizpot · · Score: 1

      Answering in a forum is something to do only when you know the answer. But don't dis Jordan, he did make 2 new good points.

    4. Re:Debunking this claim by budgenator · · Score: 1

      I remember that there was an system that was faulty and with some keys double encryption would result in the file being decrypted, but I can't remember which system it was.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    5. Re:Debunking this claim by jordandeamattson · · Score: 1

      Hey Ydra -

      I agree that XOR and ROT13 are encryption systems which end up decrypting the cipher text when re-encrypted. But I will be honest that I wasn't thinking of them, but rather of "real" encryption systems (i.e. more robust), when I thought about systems where double encryption could lead to the cipher text being less secure than it was with one level of encryption.

      I think the get mistake which spawned this discussion is that people tend to think of encryption as "lock boxes" for information. In the real world, if I put something in a safe and then put that safe in another safe, my stuff is twice as secure. But the analogy breaks down and I am not twice as safe.

      Yours,

      Jordan

    6. Re:Debunking this claim by Coryoth · · Score: 4, Insightful
      As an aside, I do remember reading about code systems where double encryption acutally made the result encryption less secure. I don't remember the details, but now my brain is itching and I will have to do some research.


      It isn't very common for the resulting encryption to be less secure, but "no appreciable improvement" is certainly very possible.

      With block ciphers you can run into the issue that if the cipher scheme forms a group (as some do) then even if you use 2 different keys for each encryption round, there will be a single third key that provides identical encryption: an attacker never needs to break your two keys, they can simply find the single third key that is equivalent to your double encipherment. Depite encrypting twice with two different keys the result is no more secure than encrypting once. For a simple example of this, consider a ROT encryption scheme - if you encrypt a message with ROT9 then ROT12 that is just equivalent to ROT21, so instead of trying to find the two keys 9 and 12, the attacker can just solve the ROT21 problem (the worst case, of course, is if your combination of keys gives the identity element such as ROT9 and ROT17, or ROT13 twice, in which case you end up with an unencrypted document).

      Even if that's not the case you can still get caught with a meet-in-the-middle approach if the attacker has some known plaintext (that is, they have some plaintext with the corresponding encrypted text and are attempting to extract your key) which does pretty much what it says, encrypting one way and decrypting the other to meet in the middle. Using such a scheme you can extract the keys with only marginally more effort than for single encryption.
    7. Re:Debunking this claim by kjs3 · · Score: 1
      Answering in a forum is something to do only when you know the answer.

      Replying to an answer in a forum is something to do only when you know the answer and the other guy doesn't. I actually do know the answer, but didn't feel the need to spoonfeed the D&H article to educate you and Jordan. You could go look it up, and find out what a Meet-in-the-Middle attack is, maybe look at subsequent research, understand how the math actually works, and understand why Jordan doesn't know what he's talking about. Hell, if you actually did your research, you could even have a snappy comeback ("yeah, but the hash table you'd need to assemble for the attack to work in practice is impractially large! Got you you smarmy bastard!"). If you two can't do your homework, why should I do it for you.

      But don't dis Jordan, he did make 2 new good points.

      No, he did't. See above.

    8. Re:Debunking this claim by snowgirl · · Score: 1

      As an aside, I do remember reading about code systems where double encryption acutally made the result encryption less secure. I don't remember the details, but now my brain is itching and I will have to do some research. Thanks!

      The trivial example of this is ROT-13. When performing the encryption a second time, it will actually unencrypt the text itself.

      If the encryption is a simple XOR of any key size length, then a double encrypt will actually not increase the complexity to break it at all, as if you had a plaintext value P, then xor it with K_1, then xor it with K_2, then you have only simply xor'ed it with (K_1 xor K_2) so definitely don't use any sort of mathematical operation that is commutative.

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    9. Re:Debunking this claim by xsonofagunx · · Score: 2, Informative

      Going purely by the numbers, I believe that the possible combinations for a 128-bit security system would be 3.4028236692093846346337460743177 * 10^38

      On the contrast, a 64-bit encryption scheme leaves you with 18,446,744,073,709,551,616. Done twice, that means it's 36,893,488,147,419,103,232 which is still far less than 128-bit encryption. I may be doing my calculations wrong (big numbers are scary...) but I think the difference between brute-force cracking a 128-bit key and two 64-bit keys is 340,282,366,920,938,463,426,481,119,284,349,108,22 4 - so a 128-bit key has that many more possible keys than even using two separate keys and encrypting twice with 64-bit encryption.

      The thing that some people don't realize here, is (unless the encryption system has a known weak spot) you would have to brute-force 2^64 level-1-keys, and then (this is the scary part) you would have to try each of the 2^64 level-2-keys on each of the outputs from 2^64 level-1-key trials. So maybe it's not as far from a 128-bit key as one would think, but ONLY provided that the only way of attacking it was brute-force.

    10. Re:Debunking this claim by ScrappyLaptop · · Score: 1

      Rebuting the reply to an answer in a forum is something to do only when..oh, never mind.

    11. Re:Debunking this claim by Anonymous Coward · · Score: 0

      I dunno if I'm being unduly thick here, but it seems simple to me:

      If double-encrypting with 64 bits is twice as hard to break (since you have to break it twice), and if that's equivalent to a 65 bit key (assuming brute force and the worst possible luck on the attacker's part - having to walk through all the different possible keys) then it's phenomenally harder to break a 128-bit key

      1 more bit gives a difficulty of (2^1) * (2^64) which equals 2 * (2^64) or 2^65

      then isn't brute-forcing 128-bit encryption 2^64 times more difficult - i.e. (2^64) * (2^64) or 2^128?

      These are big numbers and big differences.

      Got my prize money ready? King Carlos can keep the medal...

    12. Re:Debunking this claim by swillden · · Score: 1

      The difficulty of breaking 128-bit encryption isn't 2 times 64-bit encryption. It is actually greater - I can't quantify it without additonal research, hopefully someone who can recall it off the top of their head can chime in with the details.

      The difficulty of a brute force search is directly proportional to the number of keys to be searched. So 2^128 is how many times bigger than 2^64? It's 2^64 times bigger, so a 128-bit keyspace is 2^64 times harder to search than a 64-bit keyspace.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    13. Re:Debunking this claim by goonies · · Score: 1
      As an aside, I do remember reading about code systems where double encryption acutally made the result encryption less secure. I don't remember the details, but now my brain is itching and I will have to do some research. Thanks!
      This reminds me a bit of the reflector in the german WW2 enigma machine: With the exception of the early models A and B, the last rotor is followed by a reflector (German: Umkehrwalze), a patented feature distinctive of the Enigma family amongst the various rotor machines designed in the period. The reflector connects outputs of the last rotor up in pairs, redirecting current back through the rotors by a different route. The reflector ensures that Enigma is self-reciprocal: conveniently, encryption is the same as decryption. However, the reflector also gives Enigma the property that no letter can encrypt to itself. This was a severe conceptual flaw and a cryptological mistake subsequently exploited by codebreakers.
      --
      .sigh
    14. Re:Debunking this claim by ajs318 · · Score: 2, Interesting

      The problem with simple ROT and EOR cipher schemes is that, for any K1(x) and K2(x) there exists a K3(x) such that K3(x) = K2(K1(x)). So encrypting something twice (first with K1 and then encrypting the ciphertext with K2) is really only the same as encrypting it once with a different key.

      Example: K1(x) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ onto DEFGHIJKLMNOPQRSTUVWXYZABC.
      K2(x) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ onto LMNOPQRSTUVWXYZABCDEFGHIJK.
      K2(K1(x)) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ onto OPQRSTUVWXYZABCDEFGHIJKLMN.

      But notice that this mapping is of the same kind. Therefore, the double encryption operation is exactly equivalent to a single encryption operation: an attacker need never actually discover K1 or K2 to break the combined cipher. Notice also that this does not depend on K2(K1(x)) == K1(K2(x)): it holds also for simple random alphabet scrambling {i.e. the generalised set of all 26! 1:1 mappings of the alphabet}.

      Example: K3(x) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ => NXZGMRALUCFWHTYDKVEQSBIJOP.
      K4(x) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ => DLYHSVWXGMREKTJUZBIOANQCFP.
      K4(K3(x)) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ => TCPWKBDEAYVQXOFHRNSZILGMJU {a mapping of the same kind}
      but K3(K4(x)) maps ABCDEFGHIJKLMNOPQRSTUVWXYZ => GWOLEBIJAHVMFQCSPXUYNTKZRD {a different mapping but still of the same kind}.

      I believe {I cannot think of, but would love to see, a counterexample} this can be generalised to any set of simple one-to-one mappings where the sets of permitted values at the input and output are equivalent: Km(Km-1(.....K2(K1(x)).....)) == Kn(x).

      --
      Je fume. Tu fumes. Nous fûmes!
    15. Re:Debunking this claim by 1arkhaine · · Score: 1

      I think this post is buried too far down, but thanks for taking the time to type it out. I found it interesting.

    16. Re:Debunking this claim by rnelsonee · · Score: 1

      On the 'Security Now!' podcast I listen to, the expert guy mentioned that although in theory each bit added to a key would double the effectiveness of it, it only adds about 9% to the difficulty due to the algorithms used. So a 128-bit key is about 1.09^64 = 248 times harder to break then a 64-bit key.

    17. Re:Debunking this claim by Sam+Nitzberg · · Score: 1

      The basis for double-encryption to be (potentially, depending on algorithm, keyspace, rotations / transformations applied, etc...) is that some of the transformations may be undone by the second application of the encryption algorithm.

    18. Re:Debunking this claim by Sam+Nitzberg · · Score: 1

      There is some information here : http://davesource.com/Fringe/Fringe/Hacking/Crypto graphy/Encryption_Class/class1
      for more information, google on 2DES and weaknesses.

    19. Re:Debunking this claim by merlin_jim · · Score: 1

      The problem with simple ROT and EOR cipher schemes is that, for any K1(x) and K2(x) there exists a K3(x) such that K3(x) = K2(K1(x)).

      Well that, and the output is not statistically random...

      BTW, did you mean XOR?

      --
      I am disrespectful to dirt! Can you see that I am serious?!
    20. Re:Debunking this claim by ajs318 · · Score: 1

      No, I meant EOR. I learnt on 6502, not Z80 :)

      --
      Je fume. Tu fumes. Nous fûmes!
    21. Re:Debunking this claim by Anonymous Coward · · Score: 1, Insightful

      2DES is not worse than DES.

      Suppose 2DES is more than trivially easier to crack than DES. This means it is less work to crack something encrypted with 2DES than with DES. Take something DES-encrypted. Generate a random key and encrypt the ciphertext with it. Congratulations. Now you've got some 2DES ciphertext. Apply 2DES crack to the result. This is only trivially more difficult than if it had been 2DES in the first place. Contradiction; the premise is false. QED. (Latin for "Suck it, bitch.")

  7. no by crankshot999 · · Score: 0

    If you encrypt a file and then encrypt the encrypted file all that has to be done is crack 2 layers of the same type of encryption. Try it on a file ive tried it before.

    1. Re:no by robo_mojo · · Score: 1

      On second thought, encrypting a message >1 times may not make it any more secure than encrypting it once. Depending on the encryption scheme, you may just be adding keys together.

  8. Think about it as number of possibilities by Phantombrain · · Score: 5, Informative

    I'm going to think of it as if you were trying to bruteforce it.
    If you have 64 bits, that is 1.84467441 × 10^19 (2^64), meaning maximum that many tries to break the first layer of encryption. The second layer is the same number, meaning to break it would mean a maximum of 3.68934881 × 10^19 attempts.
    With 128 bit encryption, there are 3.40282367 × 10^38 (2^128) different possibilities, MUCh more than the double 64 bit encryption.

    Obviously people don't usually bruteforce encrypted files, but you can see there are much more possiblities for 128 bit encryption than with double 64 bit.

    --
    echo YOUR_OPINION > /dev/null
    1. Re:Think about it as number of possibilities by tmjr3353 · · Score: 1

      Just thinking about a problem an above poster supposed (since we're talking about brute forcing here) -- how can I discern when I've properly gotten from the second created cypher to the first? The deciphered text will still appear as gibberish. The only way I can know*** that I've correctly gotten the keys is to go both levels down to the original plaintext. Now, think about the numbers you've already brought up -- if I need to have both keys to know I've gotten the solution, then I am left with a total of 3.40282367 × 10^38 possible combinations -- the same number of possibilities present in an 128 bit key. ***It's entirely possible that I'm wrong and there is some way to know that I've gotten the proper second ciphered text. If so, I'd appreciate it if someone would be kind enough to enlighten me. :)

    2. Re:Think about it as number of possibilities by tkw954 · · Score: 3, Interesting
      If you have 64 bits, that is 1.84467441 × 10^19 (2^64), meaning maximum that many tries to break the first layer of encryption. The second layer is the same number, meaning to break it would mean a maximum of 3.68934881 × 10^19 attempts.

      This assumes that you can determine when you break the first layer of encryption, i.e. it won't work if the encrypted string is not distinguishable from noise. If this is not true, you must try each possible 64 bit second key for each 64 bit first key, for a maximum of 2^64*2^64=2^128 different keys, which would be equivalent to brute-forcing one 128 bit key.

    3. Re:Think about it as number of possibilities by budgenator · · Score: 1

      I'm no cryptographer but it seems to me that there are infinite possible encryption systems, keys and key length combinations, so any time you would double encrypt a file, there should be an equivalent system and key that would encrypt the file the same way in one pass, therefore you you should be able to break the encryption in one pass without the intermediate step. I would expect that double encrypting at 64 bit strength would be equivelent to single encrytion at 65 bit strength, and these strenghts are only suitable for diversions these days.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    4. Re:Think about it as number of possibilities by jchernia · · Score: 1

      If you know the algorithm, then you can view the double encryption as a single function - f(f(x))-> g(x).
      g(x) will be admittedly more complex than f(x), but it will still require only 2^64 brute force attempts.

      If you don't know the algorithm, then how are you brute forcing in the first place?

    5. Re:Think about it as number of possibilities by jimicus · · Score: 1

      Obviously people don't usually bruteforce encrypted files

      Depends if you consider rubber hose cryptanalysis to be an application of brute force ;)

    6. Re:Think about it as number of possibilities by ajs318 · · Score: 1

      That depends.

      Encryption and decryption are just mathematical functions. Let F(K,x) be a generalised function describing the encryption algorithm, where K is the key and x is the plaintext. We can collapse this to a simpler function K(x). Let K'(x) represent F'(K,x) i.e. the inverse of K(x).

      Now your double encryption is something like K2(K1(x)). But this is still just some function of x. It's possible {maybe not necessarily certain, depending upon the algorithm employed} that there exists K3 such that F(K3,x) == K2(K1(x)); in other words, the combined encryption is equivalent to an encryption operation using the same algorithm but some third key K3, which is in the same keyspace as K1 and K2. If this is the case, then our attacker need only discover K'3(x), which will crop up anyway among the possibilities in a brute-force attack. So for at least some encryption algorithms, there is no additional security to be had by doubly encrypting.

      --
      Je fume. Tu fumes. Nous fûmes!
    7. Re:Think about it as number of possibilities by julesh · · Score: 1

      Yes, but note that the article poster was on the right track: it comes down to file headers. Almost all consumer-grade encryption software adds headers to its encrypted output so that it can tell if it has decrypted it successfully afterwards. If this is the case, it really does break down to 2^65 (or something not a huge amount larger) because you can usually tell when your first bruteforce has succeeded.

    8. Re:Think about it as number of possibilities by Klingensor · · Score: 1

      I encrypt my stuff with XOR against a one-time random file. Then I use plain 'ol DES. Now you know the algorithm. Come on, get my stuff.

    9. Re:Think about it as number of possibilities by Bazman · · Score: 1

      Obviously, because 2^64 keys would take 584 years to cover with a computer doing 1 billion keys per second.

      2^128 keys would take 10,000 billion years if you had a billion computers doing 1 billion keys per second.

  9. Bad math by Dan+East · · Score: 5, Funny

    Your both wrong. Encrypting twice at 64 bit is like 64*64=4096 bit encryption. Personally, I like to encrypt 7 times at 2 bit encryption for 128 bit strength. If its something I really want to keep secret, I encrypt four times at 128 bit for 268435456 bit encryption. However, don't make the mistake I made once of encrypting 128 times at 1 bit. Because that is just 1^128, which yields nothing more than 1 bit encryption.

    In case anyone is wondering, I'm hoping some DRM coder will gain valuable insight from this post.

    Dan East

    --
    Better known as 318230.
    1. Re:Bad math by thefirelane · · Score: 4, Insightful

      In case anyone missed it though, there was a good insight in that humor: a clear way of expressing the answer to the posed question:

      If two 64 bit encryptions equals one 128 bit, then 128 one-bit encryptions should also.

      This means the file would have a password of either 1 or 0 ... you would be prompted for this password, and if you got it wrong, you could try again. Obviously you'd get it on the second try. You could repeat this 128 times, and that would be the total of all protection. Naturally, this means the most number of guesses you'd need to make is 256.

      After thinking about it that way, it becomes quite clear: 128 bit encryption obviously requires more than 128 guesses to get the right key. As another poster pointed out, two 64 bit passes equals 65 bit encryption.

    2. Re:Bad math by G-funk · · Score: 1

      Well, two 64bit runs is 128 bit encryption in that there are 2^128 different possible keys. But it's only as useful as 65 bit encryption because you only need to guess one half at a time. Its just so pantently stupid that it really took some work for me to wrap my head around a "for-dummies" explanation... Which I was promptly beaten to of course :)

      --
      Send lawyers, guns, and money!
    3. Re:Bad math by Miffe · · Score: 2, Funny
      Naturally, this means the most number of guesses you'd need to make is 256.
      Well, you only have to guess 255, since the last one wont really be a guess. =)
    4. Re:Bad math by Anonymous Coward · · Score: 1, Insightful

      Unless said one-bit decypter doesn't tell/know when its right or not.

      So, in your above scenerio, you enter 0 and get, say, 'g6bSyfS5d...' while 1 gives '3SEgvu6yt...'. Which one is correct and to be decoded with your second (1-bit) key and which one is garbage. If you don't know you'd have to try both. Giving you 4 possible results after your second key, all of which look like encrypted garble awaiting your third key...

      So you actually can get a 128-bit key. Coming up with a strong 128-step 1-bit encryption algorithm is a different matter, but 2-pass 64-bit encryption algorithms are not uncommon (some programs use different algorithms for each step, so if a major flaw is discovered in one, the file still has the protection of the other).

    5. Re:Bad math by Anonymous Coward · · Score: 0

      That's why you do the last decryption in the series first. Then you'll know immediately.

    6. Re:Bad math by merlin_jim · · Score: 1

      Wow that may in fact be the absolute clearest I've ever heard anyone convey that idea ever.

      Kudos to both of you (clicking fans link now lol)

      --
      I am disrespectful to dirt! Can you see that I am serious?!
  10. no by robo_mojo · · Score: 1

    Encrypting a message twice with 64-bit encryption only makes the message twice as hard to crack. Encrypting a message with 128-bit encryption instead makes it 2^64 times as hard to crack. So your friend's conclusion is off by a large factor.

  11. Get a book on cryptography by cunkel · · Score: 5, Informative
    Well, one common way to dispel a myth is to find an authoritative source on the subject that explains why the myth is untrue. Perhaps a book on cryptography would be helpful, for example:
    • Applied Cryptography: Protocols, Algorithms, and Source Code in C by Bruce Schneier
    • Handbook of Applied Cryptography by Alfred J. Menezes et al.
    Either one will explain such things as why double-DES is not twice as strong as DES and common pitfalls in thought and design of cryptographic systems.
    1. Re:Get a book on cryptography by mgblst · · Score: 2, Insightful

      Well, while reading these books may work for this particular problem, it is not always the case that books answer simple problems like this.

      For most questions, you can read as many books as you want, but if the question is simple but stupid, you often won't find the answer.

      In these cases, you often need to find someone who is very knowledgeable in the subject, or ask slashdot.

      Anybody who has studies an of-campus course will realise the value of being able to ask stupid questions, and talk to knowledgeable people.

    2. Re:Get a book on cryptography by i41 · · Score: 1

      That's by far the best answer in this whole thread, you really deserve a reward. Here's a picture of ten dollars.

    3. Re:Get a book on cryptography by WuphonsReach · · Score: 1

      I'd recommend the newer Practical Cryptography (by Niels Ferguson and Bruce Schneier) over Applied Cryptography. The forward is an interesting read and highlights some of the problems with the Applied Cryptography text (and focus of the earlier book). Applied Cryptography is probably better if you're going to write the encryption algorithms yourself.

      Practical Cryptography is written with a bit more hindsight because of watching all the sub-standard encryption systems that have appeared over the last decade because folks think encryption is "magic" that solves all ills. There's a few pages where the authors basically say "well, we thought it was a good recommendation at the time, but we didn't fully account for the human factor".

      --
      Wolde you bothe eate your cake, and have your cake?
  12. Snake oil FAQ by Chuck+Chunder · · Score: 4, Interesting

    Is a good place to start if you want to protect yourself against people hawking dodgy crypto.

    I used to work at a small company where a guy came in and was trying to get us involved with some dodgy "crypto" product. Management were quite taken with it (he could talk and even had a patent!) but technically it was a load of horse shit with some pretty multicolour diagrams. That FAQ helped me crystalise my objections and the guy was given the heave ho before the company did anything embarrassing.

    --
    Boffoonery - downloadable Comedy Benefit for Bletchley Park
    1. Re:Snake oil FAQ by Anonymous Coward · · Score: 0
      I used to work for a company That shall remain nameless that encrypted their administrative password for their enterprise products with Base64 encoding.

      Well, at least it wasn't plaintext like it was in the previous versions.

  13. same or different keys? by robo_mojo · · Score: 1

    I wonder if he goes through the trouble of making up two different keys or just uses the same key twice.

  14. Simple counterexample for your co-worker by metamatic · · Score: 2, Insightful

    Consider the (naive and insecure) XOR encryption.

    Take your file, encrypt it with a 16 bit number.

    Take the result, and encrypt it again with a different 16 bit number.

    Now, how many possible keys do you have to go through to get back the original data?

    (Hint: Try single decryption using key3 = key1 XOR key2.)

    This counterexample invalidates the claim that encrypting twice with an N-bit key is equivalent to encrypting with a 2N-bit key. It also demonstrates the worst possible case, that encrypting twice may be no more secure than encrypting once.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:Simple counterexample for your co-worker by moyix · · Score: 1

      This actually raises a question to which I don't know the answer: if you take a fairly standard symmetric cypher, say DES, and two keys K1 and K2, does there always exist a key K3 such that E_K1(E_K2(Message)) == E_K3(Message) ? This is not actually an obvious thing to prove, and I have a feeling it may vary from cipher to cipher.

      Any crypto experts want to weigh in?

    2. Re:Simple counterexample for your co-worker by Anonymous Coward · · Score: 0

      This doesn't invalidate the general claim. For a general encryption function, applying two keys one after another is not all that different from applying a key twice as long with the sole exception of the meet-in-the-middle attack which FP mentioned.

      It is also untrue that in the general case your double-encrypted document only takes twice as long to break, because there is no way of verifying that the first encryption was the correct one. Unless you have access to a cyphertext and corresponding plaintext, the general solution is at best O(2^2n) time where n is the key length. In the particular case in which an attacker has a cyphertext-plaintext pair to work with, it takes only O(2^n+1) time to find the keys. Many people have said this holds in the general case, which is simply not true.

    3. Re:Simple counterexample for your co-worker by pclminion · · Score: 4, Informative

      This actually raises a question to which I don't know the answer: if you take a fairly standard symmetric cypher, say DES, and two keys K1 and K2, does there always exist a key K3 such that E_K1(E_K2(Message)) == E_K3(Message) ?

      No, this is not always the case. For DES it is certainly NOT the case. The terminology you are looking for is "idempotent cipher." A cipher is idempotent if it obeys the equation you stated -- i.e., for any key pair K1,K2, there is a K3 such that E_K2(E_K1(x))=E_K3(x). DES is NOT an idempotent cipher.

      These questions only seem deep to non-crypto-experts (no offense to you intended) -- and it was certainly accounted for in the design of DES (along with features which harden it against differential cryptanalysis, a technique that wasn't even publically known outside the NSA at the time -- the people who work on these things are far from stupid)

    4. Re:Simple counterexample for your co-worker by moyix · · Score: 1

      No offense taken! I've only had a semester's worth of crypto education, roughly enough to make sure I know that the subject is subtle enough that I should consult someone actually skilled in the area before talking out of my ass :) Thanks for the reply.

    5. Re:Simple counterexample for your co-worker by Anonymous Coward · · Score: 0
      "idempotent cipher."

      On the outside chance that anyone cares, idempotent means "same strength".

    6. Re:Simple counterexample for your co-worker by tonigonenstein · · Score: 1

      Your terminology is incorrect. An idempotent cipher is one for which forall K, E_K(E_K(M)) = E_K(M). For exemple E_K(M) := M xor K is idempotent. I don't know the conventional term for a cipher satisfying the condition you consider, but you could say that it is closed under composition.

      --
      The sooner you fall behind, the more time you have to catch up.
    7. Re:Simple counterexample for your co-worker by metamatic · · Score: 1
      This doesn't invalidate the general claim.

      Actually, a single counterexample does invalidate a general claim. That's the point.

      What you mean is that there may exist ciphers where encrypting twice does increase security. That's a much less general claim than the one the original poster was seeking to invalidate.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  15. XOR by jours · · Score: 1

    > What other laughable claims have you heard attributed to encryption, and how were you able to properly lay them to rest?

    Well, after all these years I'm still shocked at how often I hear someone refer to "XOR encryption". As for laying them to rest though, you really shouldn't have to. I can come up with thousands of ways to mangle data and claim it's encrypted...but the burden would be on me to prove that any of the methods were reasonable encryption. In my opinion you're probably best to just avoid conversations like this because you're certainly not going to make any headway with someone who knows so little about the field.

    --
    This sig intentionally left blank.
    1. Re:XOR by Anonymous Coward · · Score: 0

      XOR is a valid encryption method. The only caveat is that you need to be using a one-time pad, with all the difficulties that entails.

    2. Re:XOR by jd · · Score: 1
      A lot of encryption schemes use XOR, some use XOR exclusively (which makes sense, as it is an exclusive or, after all), but you are correct that XOR is not an encryption method per-se. It is a mathematical operation that can be used to encrypt, but that is all.


      It is arguable that if you had a one-time pad system (which is provably totally secure so long as the key is secure and used no more than once) where each bit/byte of the message was XORed with a totally random bit/byte from start to finish and where (since it's a one-time pad) the total input stream for the message was less than or equal to the length of the random pad it was XORed with, that you could refer to this as "encryption by means of XOR". It is also entirely reasonable, particularly if the phrase is an accepted shorthand amongst a particular group, for this to be shortened to "XOR encryption", although that is not strictly correct. Shorthand rarely is.


      Newcomers to encryption may misunderstand such shorthand, or may misunderstand the OTP methodology, or may have examined very common encryption algorithms on the Internet and developed the term themselves on the basis of what they see. Such newcomers deserve commendation for being observent enough to get to that point in the first place, then forwarded to the information needed to complete their understanding. DON'T tell me you've never misused terminology in a subject you were new to, and DON'T tell me you wouldn't profit in such cases by getting forwarded to the necessary information.


      So we've experts using shortcuts and confused newcomers, are there other categories? Well, yes, there are the idiots. There are a lot of these, as can be seen from the very large number of methods marked as fatally flawed on the block crypto lounge and hash function lounge. And those only list the better algorithms. The number of unlisted (even if open source) algorithms is an order or two magnitude greater, but nobody bothers to look at them beyond the most trivial of analysis because it's so obvious that the approach is utterly flawed from beginning to end.


      Unfortunately, a lot of idiots get to produce professional crypto products (the Quartz public-key system is one example) so it's not even possible to go by appearances.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    3. Re:XOR by Maximum+Prophet · · Score: 1

      The former Soviets got caught with their pants down when they reused OTPads after a year. I sure their reasoning (or lack thereof) went something like this. "OTP is provably unbreakable, therefor no-one would waste time breaking it, so since no-one is trying to break our codes, we can re-use the OTPs" Unfortunatly for them, the British had been recording their stuff for over a year, and were able to trivially break their encryptions.

      At least one American Admiral has reused OTPs. It's easy to call these people idiots, but since cryptographers don't tend to have aircraft carriers and nuclear weapons, those things tend to be administered by people who aren't cryptographers.

      Interestingly OTP are known to be unbreakable, but when the big boys use OTP they still put random garbage in front and behind the real message, "Just in Case" (tm). It's also important to send the same amount of traffic every day at the same times, 24/7, 365 days/year lest that your opponent find out that something is afoot by an increase in transmissions.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
  16. Like matricies? by Anonymous Coward · · Score: 0

    Wouldn't this be like matrix multiplication? One can multiply any set of same dimensional matricies and have a single matrix at the end. Thus you can provide translations and rotations to a large set of points using this final matrix instead of applying each matrix to each point.

    I do not know, but I would suspect that for double encryption by a 64 bit key could be decrypted by a single key different from each of the original keys.

  17. Mod parent up by Anonymous Coward · · Score: 0

    This is right on the money, and far more correct than pretty much everything else I've seen posted here. It's even a first post! What's not to love?

  18. Meet in the middle attack by dido · · Score: 1

    There's a reason why triple encryption is used rather than double encryption. There's a technique known as the Meet-in-the-middle attack which, by trading off storage space for time, you can break a double encryption with two independent keys using only twice the time needed for single encryption, meaning that using two independent 64-bit keys would only require 2^65 work, rather than 2^128 as one might expect. That's the reason why you never hear of "double DES" but rather Triple DES with independent keys.

    --
    Qu'on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.
  19. easy solution by ceejayoz · · Score: 1

    Ask him if encrypting something with a 1 bit key 128 times is equally secure.

    1. Re:easy solution by Anonymous Coward · · Score: 0

      2^128 Vs. 2^128?

    2. Re:easy solution by Daniel+Wood · · Score: 1

      No, 2*128 Vs. 2^128

  20. Simple for this - hard in general by Bender0x7D1 · · Score: 3, Informative

    In this case, you can simply refer to the meet-in-the-middle attack as mentioned by dtfinch.

    However, in the general case of debunking bogus encryption statements, it can be quite difficult. Why? Because encryption is hard, hard, hard, hard stuff. I've taken a graduate course in cryptography and all it did was reinforce how easy it is to make a mistake.

    The only encryption scheme I know of that is provably unbreakable is the one-time pad. However, proper implementaion of that is a pain. Is AES secure? We don't know. We think it is, but there are researchers looking for weaknesses because we don't know for sure. It is possible, (however unlikely), that someone will develop an attack tomorrow sending everyone scrambling for a new encryption algorithm.

    --
    Reading code is like reading the dictionary - you have to read half of it before you can go back and understand it.
    1. Re:Simple for this - hard in general by SanityInAnarchy · · Score: 1
      It is possible, (however unlikely), that someone will develop an attack tomorrow sending everyone scrambling for a new encryption algorithm.

      That's why we have other crypto algorithms ready. I use Blowfish for my VPN connections.

      --
      Don't thank God, thank a doctor!
  21. The only thing I can think of... by Duhavid · · Score: 1

    Is to show how two rounds of the Caeser Shift
    Is exactly equivilent to 1 round of the same, with a different key,
    and no harder to crack. In fact, if your key is the same length as
    your alphabet, it would be the plaintext again.

    --
    emt 377 emt 4
  22. Group theory by coyote-san · · Score: 4, Informative

    Let me see if I can explain this in a few paragraphs....

    A single encryption key defines a one-to-one mapping between each plaintext block and ciphertext block. (In ECB (electronic codebook) mode, but the chained block encoding follows a similar analysis.) It has to be bidirectional so that the decryption is unique.

    This means that, AT A MAXIMUM, your meaningful keyspace can be no larger than the 2^(number of bits in block). In practice it takes a lot of hard work to ensure that you have 2^(number of bits in key) distinct and non-trivial mappings, and ideally for any arbitrary plaintext and ciphertext block you can guarantee that there is a unique key that will produce that result. However it's easy to screw up and only have, e.g., 2^40 actual encryptions even though you have a keysize of 64 or even 128 bits.

    Double encryption also defines a one-to-one mapping between each plaintext block and ciphertext block... but you have the same blocksize. If the keys form a "group", then any double encryption will be equivalent to a single encryption with a different key. In fact any N-encryptions will be equavalent to encyrption with a single different key. Some combinations will leave you with no encryption. (XOR encryption is a trivial example of this -- you'll get no encryption whenever you have an even number of encryptions.)

    Worse, your keys may not form a group because there's some property that gets cancelled out in a double encryption. E.g., maybe something drops out each time both keys have a '1' in the same spot. In this case double encryption would be significantly weaker than single encryption.

    Triple-DES encryption is an oddball since it isn't (or wasn't) known whether DES keys form a group. Remember that a DES key is only 56 bits, but a DES cipherblock is 64 bits -- you know that can't get every possible mapping between plaintext and ciphertext by running through the keyspace.

    Hence 3DES. However 3DES isn't simply encryption three times, e.g., the form we studied in my grad class used two (not three) 56-bit keys, in an EDE pattern. That is, you encrypt with the first key, then DECRYPT with the second key, then encrypt with the first key again. I didn't follow all of the reasoning but I seem to recall it was because of some property of the S and P boxes.

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    1. Re:Group theory by Beryllium+Sphere(tm) · · Score: 2, Interesting

      >it isn't (or wasn't) known whether DES keys form a group.

      Wasn't, although the result came very late in the history of DES:

      K.W. Campbell and M.J. Wiener, DES is not a group, Advances in Cryptology - Crypto '92, Springer-Verlag (1993), 512-520.

      Beep! Retrieval complete.

    2. Re:Group theory by swillden · · Score: 1

      However 3DES isn't simply encryption three times, e.g., the form we studied in my grad class used two (not three) 56-bit keys, in an EDE pattern. That is, you encrypt with the first key, then DECRYPT with the second key, then encrypt with the first key again. I didn't follow all of the reasoning but I seem to recall it was because of some property of the S and P boxes.

      The reason I learned is much more prosaic: With the EDE pattern, you can implement single DES simply by using the same key for both halves. That way you can build 3DES hardware that can also do 1DES operations, just by feeding it a 'symmetrical' key. No need for separate 1DES hardware, or for a 3DES/1DES switch.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  23. Possibly not as bunk as you think... by inio · · Score: 2, Insightful

    ... as long as the keys for each pass are different and there's no header.

    A good encryption scheme doesn't have any header, for exactly this reason. It reads in n words and writes out n words and that's that. So if your coworker is doing:

    C = E_K2(E_K1(P))

    there are indeed 128 bits of information required to decrypt the document. Given given a plaintext+cyphertext pair a meet-in-the-middle attack might be possible, but the search space is still on the order of 2^128 (cryptanalysis could probably reduce this some). Given plaintext+intermediate+cyphertext, it's down to 2^64, because each half could be cracked separately.

    With a good encryption algorithm the first pass ( E_K1(P) ) generates something approaching line noise - close enough so that there's no statistical way to tell real random bits from encrypted data (many RNGs now use encryption routines to boost incoming entropy). There is no structure, there is no header, and there is no way to verify that it's an encrypted anything. It might as well be a bunch of random bits. Given the cyphertext, your total search space to find the plaintext is still 2^64 * 2^64 = 2^128 sets of keys because there's no way to tell that the first round was performed correctly - it will always just be random bits.

    Now, if there IS a header added you're back to n*2^64. For example, the software compresses (and thus adds a header to) the data before encrypting it. Given the cyphertext you can search for keys that decrypt to have a valid header, and then search for keys that produce reasonable english text from those outputs.

    1. Re:Possibly not as bunk as you think... by Coryoth · · Score: 2
      Given given a plaintext+cyphertext pair a meet-in-the-middle attack might be possible, but the search space is still on the order of 2^128 (cryptanalysis could probably reduce this some).


      Mounting a known-plaintext attack (plaintext + ciphertext pair) using meet-in-the-middle on something encrypted twice with two different 64 bit keys requires only 2^65 trials. It's a time memory trade off, so it is a little memory expensive, but it's well short of the 2^128 trials you claim.

      What you need is two ciphertexts (potentially just two blocks from an encrypted message) C1 and C2, plus two corresponding plaintexts P1 and P2 such that C1 = E_K1(E_K2(P1)) and C2 = E_K1(E_K2(P2)). For each possible key K you compute E_K(P1) and store all the results in memory. Then you compute D_K(C_1) for each possible K, and look up to see if it matches any of your stored results. If it's in there then try encrypting P2 with the two keys you've found. If that gives you C2 then you've (with very high probability, but technically some uncertainty) got the right keys. All up that takes at most 2 searches through the key space, or 2*2^64 = 2^65.
    2. Re:Possibly not as bunk as you think... by merlin_jim · · Score: 1

      given a plaintext+cyphertext pair a meet-in-the-middle attack might be possible, but the search space is still on the order of 2^128

      As has been mentioned elsewhere in this thread, two 2^64 search spaces take approximately the same amount of time as one 2^65 search space, which is what you're talking about in a meet-in-the-middle attack... with a known p/c pair

      --
      I am disrespectful to dirt! Can you see that I am serious?!
  24. Somebody rode the short yellow bus... by gru3hunt3r · · Score: 1

    Is everybody here retarded?

    Okay so a 64 bit key has 18446744073709551616 possible combinations (2 ^ 64).
    A 128 bit key has (2 ^ 128) has roughly 3,402,823,669,209,384,634,633,746,074,317,700,000, 000
    combinations

    encrypting a 64 bit file TWICE means you get
    2^64 * 2 = or 36893488147419103232
    Effectively -- 65 bit encryption.

    Albiet this is dramatically oversimplifying the type of attacks, etc. I feel dumber for even reading this question.

    1. Re:Somebody rode the short yellow bus... by QuasiEvil · · Score: 1

      >Is everybody here retarded?

      Ummm, I think the answer is rather obvious... I'm posting on /., aren't I?

  25. Intuition doesn't work well in crypto by billstewart · · Score: 3, Insightful
    Any sentence beginning with Seems like encrypting twice is likely to be doomed to bogosity, unless there's a later clause in it like but that's not what really happens. Crypto not only depends on a lot of deep math, it also depends on a lot of cryptographers spending time following bits around to see where they go and how to break them.

    Sometimes things do what your mathematical intuition tells you, if you're mature enough in the field to have a solid intuition, but often they don't. Problems can be very hard if looked at from one direction and very easy (or at least less hard) when looked at from another direction, and a cryptographer's job is to make sure they've checked out _all_ the directions because it only takes one weak one to break something. NP-complete problems are especially that way - they're potentially useful for crypto because there's one easy direction if you know the key, but many problems can't be transformed in a way that you can use the easy path and the attacker's stuck on the hard paths.

    But even the bit-twiddly algorithms, like most hash functions or the S-box building blocks inside Feistel-structured algorithms, can often be cracked by people examining them closely enough to find conditions under which they can deduce bits. For instance, MD5 is pretty much busted these days.

    And both mathematical crypto and bit-twiddly crypto has to worry about Moore's Law and brute force - some algorithms scale well, so you can double the strength of an N-bit key by adding 1 bit or maybe logN bits, while others don't, or they form groups so that encrypting a message multiple times with an N-bit key still only gives you N bits of strength (leaving aside pathological cases like rot13.)

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  26. Yeah, right, "D. East" by NotQuiteReal · · Score: 1
    Sure, just take "Dan East" and shorten to the more common "DEAST" and you get a simple 5 letter name!

    Well, we all know that 2^5 = 32.

    So, if we take your slashdot userid of 318230 and multiply by 32 we get 10,183,360 (you can stop checking the math after this).

    So, take 10,183,360 and re-write as 10 18 33 60 and then translate those four characters into "WEST" and it is perfectly clear that he is one of them!

    I don't have to spell it out! Mr. East is leading you the wrong way, because you are getting too close!

    --
    This issue is a bit more complicated than you think.
  27. Complications... by The+Grey+Ghost · · Score: 1

    As with any simple question, there's not a truly correct straightforward answer. First off, encryption strength is not just about the number of bits. A larger keyspace is preferably to ward off brute force attacks, but no system has eliminated the risk of a skilled and determined cryptanalyst.

    Once you've established that bits aren't the only answer, start poking holes. For example, a guessable header produced by the first round of encryption would be known plaintext to work against the second round. As mentioned by others, the cipher itself may be vulnerable to an algebraic attack. Certain types of ciphers operate in such a way that the second round only changes the key needed to obtain the original plaintext C(k2,C(k1,P)) = C(k3,P)

    Start poking holes in their knowledge of cryptanalysis.. that's the key to the argument.

  28. Look at the HAC by petard · · Score: 3, Informative

    The Handbook of Applied Cryptography is an excellent book and is now available online for free. If you passed a couple college calculus courses, the material should be very accessible to you. In general, it's an excellent source of facts and analysis to debunk incorrect statements about cryptography.

    In particular, the part that answers you question is found in Chapter 7 (block ciphers). The justification for fact 7.33 explains why, if you can store 2^64 blocks of ciphertext, you can break double 64-bit encryption in 2^64 operations.

    If your coworker is not capable of understanding the math behind this reasoning, he really should not be making decisions about encryption :-).

    (Note: I'm not witholding the justification in this post simply to be obtuse. It's too much of a pain to format it reasonably in this input box... you'll just have to refer to the PDF.)

    --
    .sig: file not found
  29. Well, duh, so... by Anonymous Coward · · Score: 0

    "So the algorithm's Open Source, right?
    Doesn't that mean that we don't have to protect the keys?"

    This in reference to a 3DES application...

  30. I'm right and I know it by SanityInAnarchy · · Score: 2, Interesting

    This is how I usually end this kind of conversation -- I go over their head. If I know more than they do about the subject, I speak jargon until their eyes glaze over, and then say something to the effect of "Do you really want to know why you're wrong, or will you take my word for it?" I'm a good enough teacher to back that up if they really do want to know. Or sometimes I start from the other end -- if I have a good enough analogy ready, I can start with that -- the money one is a good analogy for the crypto (Would you rather give me two $10 bills or one $100 bill? Would you let me settle a $100 debt with you by giving you two $10 bills?)

    The other method of going over their head is to cite someone -- not always even a specific person -- who is smarter than both of us. So for crypto algorithms, I can ask them, "If it was really that easy, don't you think someone else would've thought of it by now? Why do you think we invent wholly new algorithms for 128 bits?"

    And if both of those fail, the final method of going over their head is to cite specific sources and papers, and invite them to actually disprove what's said there (without really having to understand it yourself) if they really think they're right.

    All of these, of course, are when I knwo I'm right. Quite often, I really don't know, and I stay humble there. But when I know I'm right, it's usually much more important to hit them over the head with one of the above than to try to explain why I'm right. After all, you don't have to know why a car is safer than open air for a lightning storm, you just have to do it. It's not important that someone understand why not to just double-encrypt with 64-bits, it's just important that they not do it.

    --
    Don't thank God, thank a doctor!
  31. Example: Ont-time pad by gweihir · · Score: 1

    The basic problem is that if you do E_KB(E_KA(plain_text)), there may be a key C with

      E_KC (plaintext) = E_KB(E_KA(plain_text))

    If you just encrypt 64 bit with an one-time pad (trivial example), then this is obvious:

      C = A XOR B

    I.e. with one-time pad you gain exactly no security at all.

    For many ciphers, a key C may not exist, but even if it does not exist, an attack on E_KB(E_KA(plain_text)) may be just as easy as on a single key. What is worse is that for some ciphers (e.g. DES) it is not known whether double encryption with two different keys is more secure or not, and how much it is more secure.. Until this is known for a cipher, it has to be assumed that encryption of each block with two keys is not more secure than single encryption.

    However there are ways to make a cipher more secure if you have more key material. For example you can use one part as the key and one part as the IV for CBC. Or you can split the message, and encrypt each part with a different key. That gives the attacker a bit less material to work with. Or you can use the keys with different ciphers and stack those on top of each other. If the ciphers are used in stream mode, then the result is provably as secure as the strongest one.

    You can also mix in any extra key material as additional data blocks, e.g. in CBC. This again makes a ciphertext-only attack much harder.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  32. An analogy... by spongeboy · · Score: 1

    Okay, lets play a game. Get your boss to write down 2 letters. You and your coworker have to guess the 2 letters.

    You can guess the letters one at a time (i.e. "is the first letter 'a'?").

    Your coworker has to guess the letters two at time (i.e. "is the phrase 'aa'?")

    Generally speaking, who wins?

    1. Re:An analogy... by amliebsch · · Score: 1

      You can guess the letters one at a time (i.e. "is the first letter 'a'?"). Your coworker has to guess the letters two at time (i.e. "is the phrase 'aa'?") Generally speaking, who wins?

      To make this analogy work, the answer to the first person would have to be "MAYBE" every time they asked, because there's no intrinsic way to know when you've guessed the key to unencrypt pseudorandom ciphertext - it looks just like all the other pseudorandom data that invalid keys would generate.

      --
      If you don't know where you are going, you will wind up somewhere else.
  33. And encrypting 8 times with a 8 bits key ? by file-exists-p · · Score: 1

    See the subject.

  34. Encryption not like matricies... by slew · · Score: 1

    Actually, people that develop ciphers go out of their way to make sure the scrambling algorithms they use are not groups, or fields or other simple to analyze mathematical abstract algebraic construct like matrices. If a cipher was a group or a matrix, then repeated operations wouldn't be very secure (e.g., 3des would be pretty must just des with an alternate set of keys) just like a sequence of matrix operations can be replaced by a composite matrix.

    Of course a cipher being a mapping function that maps it's input set to an equivalently sized output set will generate a high-dimensional permutation group, but that's subtly (but significantly) different than being a group or matrix...

  35. The most simple way of explaining this. by AlphaWolf_HK · · Score: 1

    Think of encryption as having a bunch of switches which can be off or on lined up in a sequence. In order to break the encryption, you have to somehow be able to guess the exact position of each and every one of these switches. In the case of 64-bit encryption, you have 64 of those on or off switches. In the case of 128-bit encryption, you have 128.

    For those who aren't mathematically inclined, what you effectively have is 2 as your base number (on is one, off is another one, thus two total positions for each switch) and the total number of switches is your exponent (remember from 8th grade math, 2^3 = 2*2*2, if you had three switches that is.) If you are still lost, put it this way: 64-bit encryption is 2^64 different possibilities, and 128-bit encryption is 2^128 different possibilities. Thus 128-bit encryption is 18,446,744,073,709,551,616 times stronger than 64-bit encryption.

    If you encrypt in 64-bit, and then encrypt it in 64-bit again, you only double the strength as you are basically adding 2^64 plus 2^64, which equals 2^65, or 65-bit encryption effectively. Whereas 2^128 on the other hand, is actually 2^64 times 2^64. So if your friend wanted to achieve 128-bit encryption this way, he would effectively have to encrypt that 64-bit file 64 times, not just two times.

    Now 2^64 may sound like a pretty big number, but with computers being as fast as they are today, we always can factor (or in laymens terms, "brute force") the encryption keys in order to figure out what that switch sequence would be at a pretty fast rate, so that number isn't really that large in the grand scheme of things. However, if it is 2^64 times that amount, then that number suddenly becomes much much larger, and thus takes exponentionally longer for an everyday home computer or even a cluster of computers to break.

    To cryptography know-it-alls: I know, this is an oversimplified explanation, but it completely answers the full scope of his question, so spare me of the "but you forgot this" or "you can break some encryption without factoring" replies.

    --
    Careful with names containing L slashdot.org/~AiphaWolf_HK slashdot.org/~AlphaWoif_HK slashdot.org/~AiphaWoif_HK
  36. Now, that's a really BAD MATH by Gadzinka · · Score: 3, Informative
    If two 64 bit encryptions equals one 128 bit, then 128 one-bit encryptions should also. This means the file would have a password of either 1 or 0 ... you would be prompted for this password, and if you got it wrong, you could try again. Obviously you'd get it on the second try. You could repeat this 128 times, and that would be the total of all protection. Naturally, this means the most number of guesses you'd need to make is 256.

    And how do you know, that you guessed right at every step? No, really. Good crypto doesn't let you distinguish from decryption with good or bad key, other than the content of the plaintext. And since the plaintext in this case is crypted text for another step, you have no chance of finding out, if it's right. So in reality, you have to check key 0 and 1 in first step, 0,1 for 0 from first step and 0,1 for 1 from first step etc...

    Do the math wise ass, complexity of brute-forcing 128 1-bit passes is the same as complexity of brute-forcing single 128-bit pass -- 2^128

    Robert
    --
    Bastard Operator From 193.219.28.162
    1. Re:Now, that's a really BAD MATH by Anonymous Coward · · Score: 0

      Only one problem with that: exactly what kind of data transformation can you do with one bit? My guess is you can only do one of two things on the bit level: leave it alone or take the 1s complement. After encrypting it with that scheme for 128 iterations, you're still left with one of two strings: the original or the 1s complement. If it's the original, you don't have to do a thing. You know that's what was encrypted. Otherwise, all you need to do is apply the encryption method once more. So in fact, on the worst case, all you need to do is make one decision: is this what the original data should look like, or do I need to 1s complement it?

    2. Re:Now, that's a really BAD MATH by merlin_jim · · Score: 1

      Do the math wise ass, complexity of brute-forcing 128 1-bit passes is the same as complexity of brute-forcing single 128-bit pass -- 2^128

      Assuming its a non-grouping encryption for a 1-bit key. Grouping is a property of an algorithm f() that tests whether f(f(p, k1), k2) == f(p, k3). If its true, then any double-encrypted message from that algorithm will have a third key to singly-decrypt the same message. DES was vulnerable to such a scheme until the S-boxes were modified to do key-dependant bit reordering...

      I can't think of many algorithms that would satisfy that criteria! In which case, you simply guess 0 for an even number of keys values 1 and 1 for an odd number, and you're done.

      Even if it is non-grouping, you're still likely talking about significantly less horsepower to break than a true 128-bit key, due to optimisations like meet-in-the-middle attacks...

      --
      I am disrespectful to dirt! Can you see that I am serious?!
  37. linear vs. non-linear by Shirloki · · Score: 1

    I'm a casual observer in this field, so someone correct me if need be.

    Typically, with encryption, the time required to brute-force attack is exponential to the number of bits. So:

    let n = the number of bits in the encryption key

    let t = time required to crack said encryption

    and a = an arbitrary constant

    typically t is proportional to 2^n.

    So, when you encrypt with a 128-bit key, t = a * 2^128

    But if you use a 64-bit key twice, then t = 2a * 2^64 = a * 2^65 since all you have to do is crack a 64-bit key, then crack another.

    As you can see, using two passes with a 64-bit key is 2^63 times worse than just using a 128-bit key once.

    1. Re:linear vs. non-linear by J3r3miah · · Score: 1

      this is why i like slashdot.. you coworker is correct !

      you are assuming that, once you crack the first 64bit key, you know you have cracked it.. whereas in reality, there might be no indication whatsoever because your plain text is encrypted with the second key.

      in practical brute forcing, 2^128 = 2^64(2^64)

      to visualize this, 2^128 is 128 bits, that you have to brute force thru

      now 2^64(2^64) [assume k1(k2)] is 64bits and then another 64bits. you will only know the result after having both k1 & k2 correctly. which means you will need to cycle thru all possible k1 & k2 simultaneously. k1 != k2 in most cases, which when needs to be cracked together is 128bit search space!

      even in the case where k1 = k2, you still don't know if the brute force is successful till you have tried all possible combinations for k1 = k2 and applied them simultaneously. that is 2^64.

      from wikipedia: "In general TDES with three different keys (3TDES) has a key length of 168 bits" (each DES key is 56bits)

      --
      God is real unless declared as int
    2. Re:linear vs. non-linear by topham · · Score: 1

      http://en.wikipedia.org/wiki/Triple_DES
      You missed some key points:

      In general TDES with three different keys (3TDES) has a key length of 168 bits: three 56-bit DES keys (with parity bits 3TDES has the total storage length of 192 bits), but due to the meet-in-the-middle attack the effective security it provides is only 112 bits. A variant, called two-key TDES (2TDES), uses k1 = k3, thus reducing the key size to 112 bits and the storage length to 128 bits. However, this mode is susceptible to certain chosen-plaintext or known-plaintext attacks [2] [3] and thus it is officially [4] designated to have only 80-bits of security.

  38. This is just so wrong by eyal · · Score: 1
    If you have a block size of N bits, then there are 2^N possible plaintext/ciphertext blocks, but there are factorial(2^N) possible keys. Think of each key as a permutation of the blocks (which is actually what it is).

    Out of those factorial(2^N) keys, only a very very very very very few are actually used, since the key size is nowhere near that large. In AES, for example, the block size is 128 bits, but the largest key size is 256 bits, even though the number of possible keys is 128!. This means that given a random plaintext/ciphertext block, it's actually very improbable that you'd find a key to generate that result.

    The only reason that double encryption doesn't provide "double security", is that a meet-in-the-middle attack is possible (see other comments for more details), and that kind of attack only takes twice the time (on average) than a brute force attack on a single key. 3DES provides more security than regular DES, since a meet-in-the-middle attack on 3DES makes its security roughly equivilant to using a 112 bit key (56*2), and that's still too large to be practically broken by brute force alone.

  39. Wrong. by cr0z01d · · Score: 1

    A block cipher uses a key to map plaintext blocks to ciphertext blocks. Given 2^N plaintext blocks and 2^N ciphertext blocks, the number of possible encryptions are 2^N!, not 2^N. This is a staggering difference in magnitude.

    For example, the maximum keysize of a 128 bit block cipher is about 10^22 bits.

  40. No it's not -- if there's no known plain text by Nicolas+MONNET · · Score: 1

    If there is no known plain text in the second pass of the encryption, how do you know you've broken the first pass?

    In effect, if there's no fixed header, no way to quickly distinguish a random putative clear text from rubbish added in between the two encryption phase, then in effect a brute force attack would take 2^64*2^64 steps, that's to say 2^128 ...

    1. Re:No it's not -- if there's no known plain text by Profane+MuthaFucka · · Score: 1

      You're looking for something that encrypts on one side to the same thing that decrypts on the other. You meet in the middle.

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    2. Re:No it's not -- if there's no known plain text by Anonymous Coward · · Score: 0

      Hope you've got a few million exofucktons of storage.

  41. It's a new cypher. Remember what Friedman said. by Animats · · Score: 1

    Encrypting something twice is effectively creating a new cypher system. Always remember Friedman's remark, "No new cypher is worth looking at unless it comes from someone who has already broken a very difficult one."

    (If you don't know who William Friedman was, you probably shouldn't be designing cyphers.)

  42. let's put it this way by m874t232 · · Score: 1

    No, it's not "equivalent", but he is closer to the truth than you are and something like this is widely used in practice. Look for "Triple DES" on Wikipedia for a longer description of the consequences of encrypting multiple times with the same algorithm.

  43. 64 + 64 = 65 by tonigonenstein · · Score: 1

    To crack the first pass you have to find a key among 2^64 possibilities. Then you do the same search for the second pass. So your search space is 2^64 + 2^64 = 2^65. Hence encrypting twice with a 64 bits key is the same as encrypting once with a 65 bits key.

    --
    The sooner you fall behind, the more time you have to catch up.
    1. Re:64 + 64 = 65 by stray · · Score: 1

      > To crack the first pass you have to find a key among 2^64 possibilities.
      > Then you do the same search for the second pass.

      Okay, I understand this argument I think. However, you say you crack the
      cyphertext in two passes. Now, what I don't get is: how do you know which of
      the 2^64 results from the first bruteforce run is the right one to feed
      into the second run? If there is now header, all 2^64 results look like
      garbage, no? Wouldn't I need to run ALL results through the second round?

      Please enlighten me :-)
      stray

  44. Simple analogy. by rew · · Score: 1

    There are a bunch of technical explanations here. Let me make a simple analogy.

    If you have a lock on your door, which has only 100 different keys, a thief could take 100 keys along, and break in. Suppose you find this "100 keys" too easy, and install a second (100-key) lock.

    There are now 10000 combinations of key1 and key2.

    Do you expect the next thief to take along 10000 keyrings, each keyring having two keys one for the first lock, one for the second lock, or does he come in with 200 keys?

    In the mechanical world, you would have to make a locking mechanism such that you cannot test the validity of either key without the other key being correct. The same goes in cryptography. This is not simple.

    In practise it's easy to say: There are so many combinations to try. But the smart guys try to find ways not to have to try all of them, and in cryptography, it is difficult to devise schemes that actually succeed in preventing the bad guys in doing just that.

  45. DMCA by jibjibjib · · Score: 1

    Isn't this discussion of exploitable weaknesses in encryption technology in violation of the DMCA?

  46. DES design issues by billstewart · · Score: 4, Interesting

    The general opinion about why NSA pushed DES to be 56 bits instead of 128 bits is that "differential cryptography" attacks weaken it to about 55 bits anyway, so in fact you're not losing anything, and the 56-bit version was more compact and easier to implement in hardware. Searching a 56-bit keyspace isn't exactly in the reach of run-of-the-mill computers - you need a whole bunch of them working together to get any speed. On the other hand, Gilmore's custom DES cracker and the distributed crack are *so* 1998. I don't know how much ASIC technology has improved since then - Pentium IIs were up to 400 MHz, compared to ~3 GHz for a typical Intel desktop today, and memory prices and performance have also improved significantly, so maybe you could use 1/10 as many machines.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
    1. Re:DES design issues by swillden · · Score: 2, Interesting

      The general opinion about why NSA pushed DES to be 56 bits instead of 128 bits is that "differential cryptography" attacks weaken it to about 55 bits anyway

      Interesting. That's an idea I haven't read anywhere. Do you have a reference? Your explanation is at odds with my understanding of the timeline. As I understand it, Lucifer was vulnerable to differential cryptanalysis, but IBM independently discovered the technique during the design process of the final version, which used a smaller key size per NSA request. The IBM guys then build differential cryptanalysis resistance into their design criteria for the S boxes, which didn't prevent the NSA from specifying different S box values anyway (strengthening it against linear cryptanalysis, IIRC).

      Searching a 56-bit keyspace isn't exactly in the reach of run-of-the-mill computers

      Sure it is, it just takes a lot of them. Not an infeasible number, though, which is the point.

      Gilmore's custom DES cracker and the distributed crack are *so* 1998.

      Actually, I think the custom DES cracker is more like 1970, though it would have cost a great deal more than the $250K the EFF spent. Diffie and Hellman estimated that such a machine could be built for $20M in 1977. I think it is very likely that the NSA built and operated such a machine during that timeframe.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    2. Re:DES design issues by WuphonsReach · · Score: 4, Informative

      10x improvement over the last 10 years is about right (give or take 2 years).

      A Celeron 566MHz has a memory bandwidth around 150-175MB/s. An Athlon64 3200+ has a memory bandwidth around 1600MB/s. (Approximate numbers, with all sorts of undocumented assumptions.) So it's a pretty good bet that modern single-core CPUs are at least 10x as fast as the ones from 8-10 years ago.

      Of course, now we have things like dual/quad CPU machines with 2-4 cores per machine... so we could up that number to 150x as fast as a machine from 8-10 years ago. So instead of 3000 machines, we might only need 20-30.

      --
      Wolde you bothe eate your cake, and have your cake?
    3. Re:DES design issues by mustafap · · Score: 1

      General purpose CPU's are not the ideal tool for brute force attacks on DES; there is a great book called 'cracking DES' that demonstrates an FPGA solution that is much more efficient, buck for buck. And watt for watt.

      Not sure of it's effectiveness against triple DES though. Maybe ask Xilinx who has bought a few 10's of millions of FPGAs in the last 10 years ;o)

      --
      Open Source Drum Kit, LPLC deve board - mjhdesigns.com
    4. Re:DES design issues by swillden · · Score: 1

      Not sure of it's effectiveness against triple DES though.

      Well, since 3DES requires 72,057,594,037,927,936 times more computation to brute force than DES, you'd need 72 quadrillion times as many FPGAs, or FPGAs that are 72 quadrillion times faster, or some combination of quantity and speed increases that gives you the equivalent. Oh, and you'd also need almost 600 petabytes of storage for the intermediate table, and you'd have to include the time required to do 36 quadrillion random-access lookups in that table, on top of the time required to do the 2,596,148,429,267,413,886,322,842,202,537,984 encryption operations.

      3DES is safe for a while :-)

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  47. Ask questions---lots of questions. by Dwonis · · Score: 1

    "Recently, a coworker tried to assert that encrypting a file twice with a 64 bit algorithm is equivalent to encrypting it once with a 128 bit algorithm. I know enough about encryption to know that isn't true, but I am having difficulties explaining why and how. Doesn't each pass of the encryption create a separate file header which makes this assertion untrue? Can anyone point me to references that would better help me explain this?"

    First of all, what is a '64-bit encryption algorithm'? Is this a symmetric or asymmetric algorithm? Is it a block or stream cipher? Are you talking about block or key sizes? What specific algorithm are you referring to?

    We can't analyze anything if all we're given are vague generalizations like "a 64-bit algorithm" and "a 128-bit algorithm". Some symmetric ciphers gain security under functional composition. We know that DES is one such cipher, since it has been shown that DES is not a group. However, it is not true in general that symmetric ciphers gain security under composition. For example, no matter how many times you encrypt something using a Caesar cipher (a generalization of ROT-13), there will always be a single key that decodes the resulting ciphertext. Ask your coworker to show that the specific algorithm you're discussing is not a group. If he can't, then what reason do you have to believe that you gain any security through what he proposes?

    The second problem here is that your coworker seems to think that the onus is on you to prove that a given system is insecure. Every time an expert invents a new cryptosystem, there is a good chance that the system will be insecure; It is a near-certainty that any cryptosystem your coworker comes up with will be insecure. Bruce Schneier brought up this topic again in this month's Crypto-Gram :

    Anyone can invent a security system that he himself cannot break. I've said this so often that Cory Doctorow has named it "Schneier's Law": When someone hands you a security system and says, "I believe this is secure," the first thing you have to ask is, "Who the hell are you?" Show me what you've broken to demonstrate that your assertion of the system's security means something.

    Thirdly, even if your coworker's new cipher design---and that's what it is---miraculously has the security properties that he thinks it does, is that enough? If you're using 128-bit keys in a symmetric cipher, you're only getting 64 bits of security, thanks to the "Birthday Paradox". If you want an attacker to have to perform 2^128 steps to brute-force your key, then you should be using 256-bit keys anyway. Justin Troutman explains this in more detail in his two-part series, "Ideal-to-Realized Security Assurance In Cryptographic Keys".

    Finally, all this talk about composing cipher primitives might well be irrelevant. What is this cipher being used for? Disk-based encryption, for example, has vastly different requirements than a typical secure channel. (See New Methods in Hard Disk Encryption for a discussion of some of the issues associated with hard disk encryption.) What mode of operation are you using? What are you using for authentication? How much information does your cryptosystem leak? How are you negotiating what protocol you're using? To what extent is your protocol switch vulnerable to a chosen protocol attack? What about implementation issues?

    I suggest that your coworker read the first two chapters

    1. Re:Ask questions---lots of questions. by Anonymous Coward · · Score: 0

      Are you suggesting that say DES has only 28-bit security ? The birthday paradox applies to hashes where you only have to generate N/2 hashes to create a collision. I find Troutman's article quite misleading. If you need a secure 128-bit symmetric encryption algorithm you pick 128-bit AES, not 256. If you need a hash then you pick SHA-256.

  48. Easy - but wrong... by billstewart · · Score: 3, Interesting

    I hope you were suggesting the "Each bit doubles the strength" as one of the bogus assertions, not one of the true ones. For some kinds of algorithms, against some kinds of attacks, it's true. For algorithms like RSA and Diffie-Hellman that have some special properties to the keys, doubling the strength may require adding LogN bits. Some algorithms don't have variable-sized keys, and some of those that do aren't very good at using them - they're as strong as they are, and piling stuff on doesn't change the weaknesses, like rot-26. Some algorithms are groups - combining R rounds of N-bit keys just gets you the equivalent of one round with a different N-bit key.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  49. enough analogies by Anonymous Coward · · Score: 1, Interesting

    enough analogies already. it seems like most of the people who say "it's just like if". don't trust the people who make analogies, trust the people who can explain the answer in the terms of the question. also, don't listen to some who says that the "simple answer is", and then writes 8 paragraphs.

    simple answer is that your friend is not entirely wrong. everyone here using the 64+64=65 is wrong unless they mention that that only occurs in some cases where a thing called a "meet in the middle attack" can be used. if that attack can't be used, or the person trying to crack your password doesn't have on the order of 10^19 bytes of storage available (i know hard drives are cheap, but c'mon now), then due to the fact that you don't get a green light that says, you cracked the first of the two keys, now crack the second one, encrypting twice does more than double the number of keys you have to try. but then you get into group theory, which affects us in the same way as if i said, take the number 42, then add a random number between one and ten to it, and then add another number between one and ten to it. I don't have to guess both of the numbers (100 possible combinations), I'd just have to guess the sum of those two numbers (20 possible combinations). Similar things happen when you encrypt twice using two different keys that are in a group, that is i don't have to guess both the keys, as there'd be another key that would be equivalent to encrypting with the two keys. it's more complicated than that, but on the same vein, and you can look it up if you're interested.

    ummmmm, i mean, it's like if you have a bunch of switches, and pools of lava, and each switch makes a tiger appear from a door and then 64+64=65.

    cheers.

    1. Re:enough analogies by Anonymous Coward · · Score: 0

      "I don't have to guess both of the numbers (100 possible combinations), I'd just have to guess the sum of those two numbers (20 possible combinations). "

      Wrong. There'd be 19 possible combinations. The smallest combination would be 1+1 = 2, largest would be 10+10 = 20.

  50. Also, 64-bit is Extra Wimpy by billstewart · · Score: 1
    DES was really strong for an algorithm with a 56-bit key, and was really just fine for the 1970s, though by 1998 DES-crackers had become affordable. Most 128-bit algorithms that people use are reasonable high quality as well.

    But 64 bits? There are a few algorithms that have variable key lengths that work at that size (RC5 is pretty strong), and then there's DES where you're counting the 8 parity bits as part of your keylength, but most of the 64-bit algorithms I've seen were things people hacked together to deal with US export laws. One choice was RC-4 - it's a reasonable algorithm, and scales well, but there are things you're not supposed to do with it, and PPTP and WEP went out and did them. It's not as weak as 40-bit crypto, but it's still weak.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  51. AES by bLanark · · Score: 1

    Why dick around with your own encryption: use AES. Then you can tell your customers that you are using the standard suggested by the US government. There are free implementations available in many languages. You will be doing the best thing for your team and your company.

    If you are worried about CPU, memory, etc, remind yourself that the criteria for selecting the AES algorithm included CPU usage, memory usage, and the ability to be implemented on silicon.

    --
    Note to ACs: I won't mod you up, even if you are being funny or insightful. So take a chance! It's not real life!
  52. Randomly select a cryptograpic system by rivalgangs · · Score: 1

    If you "randomly" select a cryptographic system for each stage of the process then you can increase the security of the system. You have to include the systems and in what order they were used in the key. Its down side is that if the number of crytographic systems are not to a power of 2 you are wasting space in you key. On the plus side you remove the problems of each cryptosystem. The attackers knowledge is reduced (depending on your PRNG) and as it doesnt rely on one cryptographic system for its security if the attacker knows an exploit for a system it will reduce the security but should not remove the security completely.

  53. Briefcases by ajs318 · · Score: 3, Insightful

    You can buy a briefcase with two separate, three-digit combination locks in any stationery store, and it won't cost you a lot of money. Invest in one as a "prop" for this demonstration. Have your co-worker set a combination for the left-hand lock and a different combination for the right-hand lock, lock the case and spin the wheels randomly. Now, there are 1000 possible combinations for the LH lock and 1000 possible combinations for the RH lock, giving you 1000000 possible combinations. If you can try one combination a second, it could take you up to 9 months to get into the case. Right? {If your co-worker actually believes this, perhaps it would be simplest just to have them put to S-L-E-E-P}.

    Once you have cracked the left-hand lock {which will take at most 1000 tries - 17 minutes} you are free to concentrate on the RH lock {which also will take at most 1000 tries}. You don't have to try anymore combinations on the LH lock. So you can open the briefcase in a maximum of 2000 tries, or just over half an hour. The key fact that makes this possible is that the two locks are independent: you can undo one while the other remains fastened. The combined keyspace is then the sum, not the product,of the two keyspaces.

    If the encryption operation adds a predictable header to the ciphertext {for example, BEGIN OPHIOL ENCRYPTED MESSAGE} {and most of them do} then you have something to look for that will let you know when you have cracked the first layer of encryption -- in effect, popped open the left-hand lock.

    --
    Je fume. Tu fumes. Nous fûmes!
  54. Laughable claims by Anonymous Coward · · Score: 0

    What other laughable claims have you heard attributed to encryption

    99% of the responses to this article.

    A given 64-bit cipher might be 128-bit strong when doubled. Or it might be a little bit more strong. Or it might be no stronger. Or it might be less strong. There are simple examples for each case (one-time pad has the first property; DES has the second; using the same key twice has the third; ROT-13 has the last).

    The initial statement is certainly wrong in the general case but it's hardly laughable, especially compared to several people's efforts here to show that it is wrong in every case.

  55. The answer is... by Anonymous Coward · · Score: 0

    "What other laughable claims have you heard attributed to encryption, and how were you able to properly lay them to rest?"

    Simple, I watched Swordfish and learned everything I needed to know about encryption.

  56. One-time pads by thethibs · · Score: 1

    "The only encryption scheme I know of that is provably unbreakable is the one-time pad."

    A curious thing about that: In theory, the one-time pad is provably unbreakable. In practice, no specific implementation of a one-time pad is provably unbreakable. The problem is that there is no provably unpredictable source of data for the pad.

    In this sense, cryptography is remarkably tidy science; a claim that a particular system, even a one-time pad, provides a particular level of security cannot be proven—only falsified. Our confidence in any particular system is based on it having survived cryptanalysis by many experts, at which time we accept the claim as a usable theory—not as proven.

    --
    I'm a Programmer. That's one level above Software Engineer and one level below Engineer.
    1. Re:One-time pads by spaceyhackerlady · · Score: 1
      A curious thing about that: In theory, the one-time pad is provably unbreakable. In practice, no specific implementation of a one-time pad is provably unbreakable. The problem is that there is no provably unpredictable source of data for the pad.

      Let's be careful with terminology here.

      When a one-time pad cipher is said to be unbreakable, what it means is that without access to the key, an enemy cryptanalyst cannot determine the plaintext with any probability greater than a random selection from all possible plaintext messages.

      People who actually use one-time pad encryption use radioactive decay and similar processes to generate their key material. These really are random, since you cannot predict when a nucleus is going to blow apart, or which one it will be. How would you break that?

      All decrypts of one-time pad encryption (e.g. Venona) have been the result of agents getting careless and misusing their pads. When they do that the encryption is no longer random.

      ...laura

    2. Re:One-time pads by thethibs · · Score: 1

      Sorry Laura—Maybe you or I today can't predict when a nucleus is going to blow apart, but that doesn't mean it's forever unpredictable, and I certainly can't prove that my bitstream generator doesn't have something in the design or the particle source that makes the generated stream partially or completely predictable with a suitable amount of effort and data. The best I can say is that no one has found a weakness in it.

      Our experience with radioactive decay strongly suggests that it's unpredictable, but there's no proof of it.

      This is why I described cryptography as tidy science: Any claims of security can't be proven—only falsified.

      --Marc

      --
      I'm a Programmer. That's one level above Software Engineer and one level below Engineer.
    3. Re:One-time pads by mbone · · Score: 1

      The Russian / Verona one time pads were generated by Secretaries typing on typewriters, and so were not entirely random. For example, the British found that a number on the pad from the range [1-5] was more than 50% likely to be followed by one from the range [6-0]. I wonder if there were not more breaks in these codes than have been reported.

  57. Contextual decryption by jd · · Score: 1
    The idea that one can obtain information indirectly (messages before/after the encrypted message, the length of message, timing, etc) has been around for some time and is generally accepted as valid. It's one reason I don't altogether trust websites that use SSL only for specific information, as then it's trivial to figure out the format of that information and some of the characteristics, which must surely weaken the protection. The speed penalty of just encrypting everything would likely be less than the cost penalty of compromised security, particularly for some of the major vendors.


    My father worked in military communications just prior to the Turkish invasion of Cyprus. Based on the few comments he has made on the subject - and it's harder to get information from him than from a Microsoft manual - the British used one-time pads on tape. Both tapes would be generated in parallel, one would then be delivered by courier, and each tape would have enough garbage at the front to guarantee the tapes were synchronised. (They could not be aligned simply on the Nth word on the tape, the tape machines themselves had to be configured to work at identical speeds, as there was no clock to synchronise with and it was intended to work on a lossy network.) Once the tapes were used, they were suppsed to be destroyed, though it wasn't completely clear to me if that always happened.


    This was only one of several cipher machines they used, but my impression was that the bulk of encrypted information went via one-time pads despite the problems with getting the tapes to the other person and despite the enormous overheads of retuning everything in the system.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  58. mod parent up by Anonymous Coward · · Score: 0

    And all other posts down.

  59. Easy. by Geoffreyerffoeg · · Score: 1

    64 bits is really 2^64 possible keys. 128 bits is 2^128 possible keys. Double-64 bits is, at best, 2*2^64 = 2^65 = 65-bit encryption. (And often is just 64.)

    Use a traditional Vigenère cipher (basically a Caesar cipher with words instead) to see what happens. First with a 6-character key:

      I H A V E B A B Y F O R M U L A
    +G W B U S H G W B U S H G W B U
    =O D B P W I G X Z Z G Y S Q M U


    Then with two 3-character keys:

      I H A V E B A B Y F O R M U L A
    +T S A T S A T S A T S A T S A T
    =B Z A O W B T T Y Y G R F M L T
    +C I A C I A C I A C I A C I A C
    =D H A Q E B V B Y A O R H U L V


    Note that in effect your key is still 3 characters. You can decode this in one pass using TSA + CIA = VAA:

      D H A Q E B V B Y A O R H U L V
    -V I A V I A V I A V I A V I A V
    =I H A V E B A B Y F O R M U L A


    And as somebody else said, 128 1-bit encryptions is nowhere near one 128-bit encryption.

  60. Easier by nacturation · · Score: 1

    Even easier: if performing two 64-bit encryptions is the same as one 128-bit encryption, are you saying that performing a 1-bit encryption 128 times is just as secure?

    --
    Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  61. The 1. Obvious thing... by ratatask · · Score: 1

    THe first obvious thing is that with a brute force attack you have
    to check 2^128 keys if you got a 128 bit key.
    For two 64 bit keys, you need to check 2^64 + 2^64 keys.
    That's a hell of a lot less than 2^128.

    (there's other more valid reasons as to why it's weaker:)

  62. DES is not a group? by Anonymous Coward · · Score: 0

    I think you'll find that DES is a group, which is why in 3DES the second round of encryption is run backwards (it's actually decryption under a different key). 3DES works like this:

    Round 1: Encrypt under key 1

    Round 2: Decrypt under key 2

    Round 3: Encrypt under key 3

    The total strength is roughly 3*56 bits (slightly less, IIRC).

    That's the more secure and more expensive 3 key option. The 2 key option uses this:

    Round 1: Encrypt under key 1

    Round 2: Decrypt under key 2

    Round 3: Encrypt under key 1

    The total strength is roughly 2*56 bits (slightly less, IIRC).

    The reason round 2 uses decryption is that DES is a group: If one were to do the following...

    Round 1: Encrypt under key 1

    Round 2: Encrypt under key 2

    Round 3: Encrypt under key 3

    Round 4: Encrypt under key 1

    Round 5: Encrypt under key 2

    Round 6: Encrypt under key 3 ...etc... ...total strength would always be 56 bits, precisely because DES is a group, as noted by AP.

    myvirtualid acting as an AC

    1. Re:DES is not a group? by Anonymous Coward · · Score: 0

      Mod me down - spoke too soon... ...it's the meet in the middle attack that 3DES protects against, not group (since DES was proved to not be a group in 1991). So EEE 3DES would have been fine, and EDE 3DES was chosen (apparently) to simplify DES interop.

      So, yeah, oops, mea culpa, mod me down, post was bogus....

      myvirtualid, who now wishes he hadn't been quite so quick to sign with his real ID....

  63. Is that even remotely practical? by mbessey · · Score: 1

    From the Wikipedia article:
    If the keysize is n, this attack uses only 2^(n + 1) encryptions (and O(2^n) space) in contrast to the naive attack, which needs 2^2n encryptions (but only O(1) space).

    So for a 64-bit key and 64-bit block size, you'd need about 2^64 * 8 bytes of storage, which is 148 Billion Gigabytes. I doubt you could find any off-the-shelf storage solution you could use for that.

    OR am I missing something in my calculation?

    1. Re:Is that even remotely practical? by EndlessNameless · · Score: 1

      Yes, you're missing something. Specifically, a correct conversion factor. It's 2^64 / 8 bytes of storage, which is about 2 billion GB. Since I can get a 750 GB HD for $400 (new Seagate drve from newegg.com), I can therefore get ~2.2 billion GB for $1.2 million. And this is as an average Joe customer with no access to volume or channel pricing.

      While this doesn't include the cost of SATA controllers or anything else you'd need to be able to search through that amount of data, it does show that the barrier is much lower than you might think. (I'm thinking Google's hierarchical searching algorithm would be best for this application... they did publish a paper about it... Google it if you're interested.)

      For a large corporation, a crime syndicate, or a government agency, this is well within the realm of possibility. Especially since most 64-bit algorithms provide less than 64 bits of effective strength once they're attacked by experts. Hence the move to 128-bit and 256-bit keys for symmetrical algorithms. Since doubling the key length squares the number of possible values of the key, the search domain becomes impossibly large. Barring vulnerabilities in the algorithm, a 256-bit encryption scheme cannot be bruteforced by any presently conceivable computer technology.

      --

      ---
      According to the latest ruleset, this post should be modded as Vorpal Flamebait +5.
    2. Re:Is that even remotely practical? by Anonymous Coward · · Score: 0

      I forgot to add:

      Encryption research often involves custom-built CPUs. By supporting a few key instructions in hardware, it is possible to get 2x-10x performance relative to a technologically-comparable, off-the-shelf CPU. So the computation may also take considerably less time than you might expect. Furthermore, a bruteforce attack is very easy to scale by running it in parallel. As big as that key domain seems when you think of it, it is very little in practical terms to a determined and moderately resourceful attacker. This isn't one of those U.S.-government-only kind of thing anymore.

      Now, at the 128-bit key length, it's a different story.

    3. Re:Is that even remotely practical? by dtfinch · · Score: 1

      With half the ram, it'll just take twice as long, etc. It'll take up to (2^64)*(number of blocks + 1) encryptions. You can probably pull it off in 2^96 encryptions (checking 2^64 keys against 2^32 blocks of 32gb), which is a lot better than 2^128, but just as impractical today.

  64. You don't need that much storage by Paul+Crowley · · Score: 1

    See "Parallel Collision Search with Cryptanalytic Applications" by Michael Weiner and Paul C Van Oorschot - you can get away with far less storage by iterating the key -> ciphertext map.

    1. Re:You don't need that much storage by petard · · Score: 1

      Spot on. I was only thinking about time cost and not really considering storage cost. The paper you reference, for those interested in trading some of the storage cost I cite for some additioinal time cost, is available here.

      --
      .sig: file not found
    2. Re:You don't need that much storage by Paul+Crowley · · Score: 1
  65. Bicyle locks by jgoemat · · Score: 1

    Reminds me of the old cylinder bicycle locks. I had one with four spinners on it, but my friend broke it in a couple minutes. The problem was that when you got one number right, you could feel that the cable moved a little differently so you knew it was correct.

    1. Re:Bicyle locks by ajs318 · · Score: 2, Insightful

      That's a potential problem with any mechanical combination lock: if the turny bit of the mechanism isn't properly decoupled from the locky bit, then you can identify a partial solution and so decrease the search space. But if it is too well decoupled, then the lock will give false positives or false negatives. Some of those cheap briefcase locks are actually quite poorly decoupled: you can feel just a little bit more movement when any one of the wheels is "solved". {Which is why that episode of Only Fools and Horses was a bit unrealistic.} Even although this can take more than a second a try, just getting the search down from 1000 tries to 30 tries is a good improvement in its own right.

      --
      Je fume. Tu fumes. Nous fûmes!
  66. I heard this one on the need for encryption by dilvish_the_damned · · Score: 1

    What other laughable claims have you heard attributed to encryption,

    That a product does not need ssh when telnet can only be enabled by a super_secret web get.
    I had no usefull response. It was laughable, but I wasn't laughing. Luckily, the things I said were not really intelligible.

    --
    I think you underestimate just how much I just dont care.
  67. Hashes by Anonymous Coward · · Score: 0
    What other laughable claims have you heard attributed to encryption, and how were you able to properly lay them to rest?
    One that comes up a lot(on Slashdot as well as other places) is the use of MD5(broken) and SHA1(weekened) together to effectively create a 288-bit secure hash.
  68. I think you've got the math wrong, actually by mbessey · · Score: 2, Interesting

    Let's make sure we're on the same page. In order to perform the "meet in the middle" attack, you first need to have a known Plaintext and Ciphertext pair, P and C. In our example, we'll assume these are 64 bit blocks, or 8 bytes. We're also assuming that the keys are 64 bits.

    For each possible 64-bit key K, you need to generate and store Ek(P) in a table. It's the size of that table I was trying to calculate. So that's 8 bytes * 2^64 keys, which is 147,573,952,589,676,412,928. That sure looks like 147 Billion Billion to me.

    In any case, even using your figure of 2.2 Billion GB, you've still got the number of drives very wrong. When you divide 2.2 Billion by 750, you get 2.9 million drives required. First of all, that's probably larger than the total production run of those drives. Second, it's much more like $1.1 Billion, rather than $1.2 Million, in cost.

    I don't think hard drives are going to be the way to go. A decent tape library can hold 500 Terabytes or so, so you'd only need to buy (and power, and house) a mere 300,000 of those to hold the whole table.

  69. Because 2 * 2^64 2^128 by jayegirl · · Score: 1

    Isn't this obvious?

  70. Re:Because 2 * 2^64 is much less than 2^128 by jayegirl · · Score: 1

    Stupid comment poster ate my <<...

  71. Do The Math by Anonymous Coward · · Score: 0

    $ bc
    bc 1.06
    Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
    This is free software with ABSOLUTELY NO WARRANTY.
    For details type `warranty'.
    2 * 2^64
    36893488147419103232
    2^128
    340282366920938463463374607431768211456

    Enough said.

  72. Encryption - Meh! It's all about trust.... by queenb**ch · · Score: 1

    The biggest issue is how much you trust your people. Since most corporations pretty much poop on their employees, it's no wonder that they're running scared. They lay people off just so that some upper managment dufus can be sure to get his bonus this quarter. They cut wages on the rank & file so that the CEO can keep his Manhattan penthouse. In a corporate culture like this, it's no wonder that the rank and file feels very little loyalty to the employer. The employer has absolutely none for them.

    Axiom #1 - There is no such thing as unbreakable security.
    Axiom #2 - Where there is a will, there is a way.

    Myth #1 - Encrypted email is secure.

    Phooey! Once it's sent, it's in the receivers hands. They can do what they want with it, including forward it on, after it's decrypted.

    Myth #2 - Our can't have the data compromised. We don't allow print outs, etc.

    HAH! If you can display the data on a screen, you are hackable. It's lo-tech, but it works. I can always take a photograph of the data. If nothing else, we can thank the guys that brought us camera phones.

    Myth #3 - Our -bit encryption is good enough.

    Ummm....have you guys seen what you can do with a beowulf cluster? It really isn't that hard and doesn't take all that much time. Plus there are some good how-to documents on the 'net. Besides that, a lot of the security of the encryption depends on the algorythm used. If that's faulty, it may take five minutes instead of five weeks.

    Myth #4 - Encrypting everything will solve our security problems.

    Really??? Let's see...you want to encrypt everything. Nifty... If all you data is encrypted and no one can read it, your employees can't do their jobs. If they can't work, we may as well send them home. Without the employees, we don't need the managers either so we may as well just shut the doors. What??? Oh, you *do* want them to have access. Well, then what's to stop them from doing something untoward with the unencrypted information. Why is that important? Well, most compromises are from within not without.

    I can't even begin to think of all the completely retarded statements I've heard come out of some PHB who thinks that he understands encryption and data security. In the end, it all still boils down to the people. Do you trust your employees or not? Have your management policies pooped on them too many times or not?

    2 cents,

    Queen B

    --
    HDGary secures my bank :/
  73. It all depends on the encryption algorithm by Christopher+B.+Brown · · Score: 1
    If composition of the encryption algorithm with itself represents a group, then encrypting multiple times is simply equivalent to encrypting once, using a different key.

    You can pretty easily see this with linear congruential methods; it's harder to prove this sort of thing for the common encryption algorithms.

    The whole reason why people adopted 3DES, which is a three-time superencryption application of DES, is that DES is not a group for multiple applications, meaning that you do get "more encryption" when you apply it multiple times.

    We don't know what algorithm was being used in the original poster's situation, so we have no idea whether multiple applications of the algorithm do any extra good or not.

    If it "is a group," then multiple applications are completely worthless. If it isn't, then multiple applications might be hoped to provide some additional strength, but we don't know offhand whether an extra 64 bits of key provides 1 bit worth of extra protection, or if it provides a full 64 bit improvement.

    --
    If you're not part of the solution, you're part of the precipitate.
  74. Simple math... 2x 64 bit encryption = 65 bit key by Fallen+Kell · · Score: 1

    And that is an at most case scenario. It is simple math.

    64 bit key 2^64= 18446744073709551616 combinations.

    2 64 bit keys have then have 2 x 64 bit keys 2*2^64= 36893488147419103232
    2*2^64 = 2^65 = 65 bit key.

    And that explaination does not even go at all into the issues with different encryption algorithms, collision based attacks, or lookup table attacks, it is from a purely numbers only approach dealing with brute force only attacks. You would need to encrypt the file 64 times for her to have an equivelant(sp?) to a 128 bit key.

    --
    We were all warned a long time ago that MS products sucked, remember the Magic 8 Ball said, "Outlook not so good"