Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Implications Of The Recent Hash Function Attacks

Posted by timothy on Wed Sep 01, 2004 12:40 PM
from the some-but-not-all dept.
An anonymous reader writes "Cryptography Research has issued a Q&A that explains the security implications of the hash function collision attacks recently announced at CRYPTO 2004. Apparently the consequences can be catastrophic for certain kinds of code signing and digital signatures, but MD5 sums for checking binaries are (mostly) OK. While the speculation that SHA-1 is about to fail seems to be overblown, updating the many legacy systems and protocols that rely on MD5 is going to be a massive undertaking."
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • This is what I've been saying! (Score:5, Insightful)

    by Dthoma (593797) on Wednesday September 01 2004, @12:45PM (#10130499)
    (Last Journal: Saturday February 15 2003, @10:04AM)
    "While the speculation that SHA-1 is about to fail seems to be overblown, updating the many legacy systems and protocols that rely on MD5 is going to be a massive undertaking."

    Any time I've tried to point this out, I've been shouted down by hysterical people (such as relex) squawking that because it may be possible to generate two messages with the same MD5 hash, SHA-1 is automatically broken. Um, no. They're two totally different algorithms. Use some common sense, people. I'm as cautious as the next person but screaming about how "all hash algos are insecure" is hyperbole at its worst.
  • Idiot Question (Score:5, Insightful)

    by OverlordQ (264228) * on Wednesday September 01 2004, @12:45PM (#10130503)
    (Last Journal: Thursday February 15 2007, @08:00PM)
    Say I have program A that I distributed and I supply the md5/sha1 sum to insure it's 'validity'. From what I read you can get two bitstreams to produce the same sum, ok that was expected. But what I dont get is this still doesn't allow somebody to arbitrarily pick whatever sum they want for their code right? I mean still the chances of somebody writing some trojan'd program and magically somehow getting the sum's to match is extreemly small and/or really computationally expensive. If they were that smart, wouldn't they be working for one of the TLA's (Three letter Acronyms) already?
    • Re:Idiot Question (Score:4, Informative)

      But what I dont get is this still doesn't allow somebody to arbitrarily pick whatever sum they want for their code right? I mean still the chances of somebody writing some trojan'd program and magically somehow getting the sum's to match is extreemly small and/or really computationally expensive.

      Right. The breaks that were announced of the variety: "Here are two totally contrived documents that hash to the same value (which I can't control)." The attack does not allow someone to "hit" a desired hash value. So for the use you described, MD5 is still OK (so far).
      [ Parent ]
    • Re:Idiot Question (Score:5, Interesting)

      by ponds (728911) on Wednesday September 01 2004, @12:51PM (#10130565)
      In many situations any data inconsistancy can cause catastrophe. When distributing binaries it isn't that big of a deal, however there are other applications of hashing algorithms.

      Think about forensics: Someone gets arrested, computer confiscated. The first thing that happens is a hash checksum is ran of the disk, then a disk image is made, then the image checksum is verified to make sure that it is the same as the original disk. If the checksum of the original disk ever changes, the evidence is useless. When there are collisions in the algorithm, the checksum cannot prove, beyond a reasonable doubt, that the data has not been tampered with. Especially when the hashing algorithm is ran on 20 or more gigabytes of data, which is the typical case in forensics.
      [ Parent ]
      • Re:Idiot Question by EvilIdler (Score:2) Wednesday September 01 2004, @01:03PM
      • Re:Idiot Question by tzanger (Score:1) Wednesday September 01 2004, @01:05PM
      • Re:Idiot Question by gordyf (Score:3) Wednesday September 01 2004, @01:08PM
        • Re:Idiot Question (Score:4, Insightful)

          by Brandybuck (704397) on Wednesday September 01 2004, @02:07PM (#10131318)
          (http://www.usermode.org/ | Last Journal: Tuesday April 17 2007, @09:13PM)
          Correct me if I'm wrong, but isn't it still just as difficult to create a collision with a *known* message, as it was before this "attack" was discovered? In other words, there's no feasible way for a crooked forensics technician to alter the data. And even if it were practical to create a collision with a known message, the result of this on a harddrive is not going to be data that looks like it came from a harddrive. Rather, it's going to look like data that came from a random number generator.

          Hmmm, I guess that's one thing a crooked cop could do. He could make it look like the entire disk is encrypted. In France that's enough to convict your Grandmother with...
          [ Parent ]
      • Re:Idiot Question by david duncan scott (Score:2) Wednesday September 01 2004, @01:09PM
      • Re:Idiot Question by PCM2 (Score:2) Wednesday September 01 2004, @01:11PM
      • Re:Idiot Question (Score:4, Informative)

        by ajna (151852) on Wednesday September 01 2004, @01:12PM (#10130780)
        (http://toshiclark.com/ | Last Journal: Saturday January 29 2005, @02:06AM)
        Hash functions map a bigger space (unbounded strings, for example) to a smaller space (64 bits, perhaps), so collisions are inevitable. The linked article is not significant because it points out that MD-5 has collisions, since this is trivially true as I've attempted to make clear. It's significant because researchers have found a way to find multiple inputs which both hash to the same value. Since they have not found out how to create an input string that hashes to a value of their choice (preimage problem) MD-5 is not fundamentally broken.

        "When there are collisions in the algorithm, the checksum cannot prove, beyond a reasonable doubt, that the data has not been tampered with." This preceding sentence demonstrates a remarkable lack of understanding about hash functions. Collisions are inevitable, see above. How hash functions work is by making the hash values unpredictable and spread out evenly over the space of the hash values, given random input. Read up: http://www.cs.sunysb.edu/~skiena/214/lectures/lect 21/lect21.html or by googling for "hash functions collisions probablility".
        [ Parent ]
      • Re:Idiot Question by Grond_the_Hammer (Score:2) Wednesday September 01 2004, @01:20PM
      • Re:Idiot Question by cft_128 (Score:2) Wednesday September 01 2004, @01:35PM
      • Re:Idiot Question by pclminion (Score:2) Wednesday September 01 2004, @05:02PM
      • Re:Idiot Question by RWerp (Score:1) Wednesday September 01 2004, @05:15PM
      • Re:Idiot Question by rsmith-mac (Score:3) Wednesday September 01 2004, @05:28PM
      • Re:Idiot Question (Score:5, Informative)

        by ponds (728911) on Wednesday September 01 2004, @01:11PM (#10130767)
        "Wouldn't just turning on the computer affect the checksum of the entire disc if just a single file was accessed, thereby changing its last accessed date, or if a single temp file was modified?"

        Correct, usually what happens when a computer is confiscated is this:

        1.) Power is removed. IE, plug pulled on desktop or battery removed on laptop. If you turn the power off, APM or ACPI will kick in and write to the disk.

        2.) Disk is removed and a chain of custody form is written.

        3.) Disk is checksummed and imaged, either using a standard computer or a forensics machine that is designed to image disks. The disk does not have to be mounted to do this, you can get a raw dd without mounting a disk and without accessing any files.

        4.) Forensic analysis is performed on images, usually on copies of the images. When evidence is found, the checksum is checked again to make sure that this image is the same as what was on the disk.
        [ Parent ]
      • Re:Idiot Question by qwijibo (Score:1) Wednesday September 01 2004, @01:13PM
      • Re:Idiot Question by LurkerXXX (Score:2) Wednesday September 01 2004, @02:09PM
      • 1 reply beneath your current threshold.
    • Re:Idiot Question (Score:5, Informative)

      by Westley (99238) on Wednesday September 01 2004, @12:51PM (#10130575)
      (http://www.pobox.com/~skeet/)
      I *think* this is the difference the article talked about between a preimage attack and a collision attack. An attacker still can't find a message (program, whatever) that produces the same hashcode as your one - but they *can* produce two messages which produce the same hashcode as each other. One of those may be perfectly acceptable, the other not - but once a user/system/whatever has accepted (or signed) the first one, they've effectively signed the second one.

      That's only my impression based on the article, and I wouldn't like to swear to it - but it does make a certain amount of sense.
      [ Parent ]
    • Re:Idiot Question by Vexler (Score:2) Wednesday September 01 2004, @12:52PM
    • Re:Idiot Question by merlin_jim (Score:2) Wednesday September 01 2004, @12:54PM
    • Re:Idiot Question by hsoft (Score:1) Wednesday September 01 2004, @12:57PM
    • Re:Idiot Question (Score:5, Informative)

      by WolfWithoutAClause (162946) on Wednesday September 01 2004, @01:13PM (#10130790)
      (http://slashdot.org/)
      But what I dont get is this still doesn't allow somebody to arbitrarily pick whatever sum they want for their code right?

      It's based on the birthday party paradox.

      For two randomly chosen hashes, the chances of them being the same is 1/p where p is the maximum size of the hash.

      However, if you pick n hashes at random, then the chance that any two of them match is approximately n^2/2p, since any one of the 'n' could match with any other of the 'n'.

      So if p is 1/(2^160) and you generate 2^80 hashes of random (or partly random) data, then theres about a probability of 1 that two of them match each other. 2^80 is still a big number, but they've managed to reduce it further with some clever tricks, and modern processors can do billions of operations per second.

      So, if you write two programs one evil, one good, and then add 2^80 different random fillers on the end of each, chances are, two of the good/bads will have the same hash.

      But the chances of any of the bads matching a given hash that somebody hands you is only 2^80/2^160 which is 1/2^80- much too small.

      [ Parent ]
    • Re:Idiot Question by scruffy (Score:2) Wednesday September 01 2004, @01:32PM
    • Birthday Attacks by Bob 4knee (Score:1) Wednesday September 01 2004, @01:47PM
    • implications largely academic (for now) by kirkjobsluder (Score:2) Wednesday September 01 2004, @02:44PM
    • Shyster Lawyer Scam by CustomDesigned (Score:2) Wednesday September 01 2004, @10:08PM
    • 1 reply beneath your current threshold.
  • New methods needed? (Score:3, Insightful)

    by scumbucket (680352) on Wednesday September 01 2004, @12:46PM (#10130511)
    In the wake of stories like this is this a message that we need more secure forms of encryption than we already have? RSA is great so far, but how long until 1024 is broken? Or any other schemes, like the MD5 hashing that's used for digital signatures?

    Keeping ahead of the crackers is a big concern not only for security of transactions, but for personal privacy as well.

    • Re:New methods needed? (Score:5, Insightful)

      by merlin_jim (302773) <<moc.tlupatarts> <ta> <nekcarCcM.semaJ>> on Wednesday September 01 2004, @12:59PM (#10130649)
      The question isn't how long until its broken... the question is how long until its broken for cheap.

      RSA-512 was already broken. It took a major portion of the world's computing resources for several years. You're not really in danger that your wife is going to find out about your girlfriend. Or that your state is gonna find out about your cocaine habit.

      If you're using RSA-512 you just might be on the cusp of being in danger of the government, having caught you and trying you for terrorism, is able to decode your e-mail enough in the six months before your trial to convict you.

      See its all about level of effort. How long till RSA-512 can be broken by anyone in a few minutes?

      Well 40-bit SSL was supposedly bulletproof when it was introduced. My P4 1.8 can decode SSL messages in about 10 seconds. So RSA-512 should be good for another 3-5 years.

      Honestly; always use the maximum number of bits. If your data is important enough to encrypt, its important enough to encrypt right.
      [ Parent ]
      • Re:New methods needed? by gordyf (Score:3) Wednesday September 01 2004, @01:15PM
      • Re:New methods needed? (Score:5, Informative)

        by Meostro (788797) * on Wednesday September 01 2004, @01:35PM (#10130989)
        (http://www.dullsville.com/ | Last Journal: Wednesday December 22 2004, @11:41AM)
        Slight correction: AFAIK RSA-512 was not broken, it was brute-forced. There is a huge difference between the two.

        Breaking a combination lock is figuring out that you can hear the tumblers go *click* when you hit the right number. It will take you twenty seconds and five tries to get the right combination.

        Brute-Forcing a combination lock is trying every combination from 00-00-00 through 99-99-99 until you get the right one. You will get the right combination, it will just take you long enough that someone will notice you.

        Just to give you back a little bit of a warm-fuzzy feeling about RSA strength, realize that every bit added doubles the brute-force keyspace. So if you can brute-force 40-bit SSL in 10 seconds, you can do 41-bit SSL in 20 seconds, but it'll take 98 billion-billion years for the same computer to do 128-bit SSL.

        For the combo lock analogy, it would be adding on another number to guess, a 4 number lock instead of 3, which would give you 100x as much work (original amount of work to get numbers A-B-C with D=00, then lather, rinse, repeat until D=99). If the combo lock were truly broken instead, it would take you about a minute and seven tries, instead of 100x as long.
        [ Parent ]
    • Re:New methods needed? by cft_128 (Score:2) Wednesday September 01 2004, @01:39PM
    • Re:New methods needed? by ajayvb (Score:1) Wednesday September 01 2004, @03:36PM
  • by stonebeat.org (562495) on Wednesday September 01 2004, @12:49PM (#10130545)
    (http://validate.sf.net/)
    For example, a devastating attack would be one that enabled adversaries to obtain a legitimate server certificate with a collision to one containing a wildcard for the domain name and an expiration date far in the future.

    quick questions:
    1) Don't the browser check for wildcard domain names in the certificates???
    2) If not, why not???
  • Ok... (Score:3, Insightful)

    by doublebackslash (702979) <doubleNObackSPAMslash@gmail.com> on Wednesday September 01 2004, @12:51PM (#10130560)
    (Last Journal: Thursday November 06 2003, @02:21AM)
    Use both!
    You say its easier than ever to find the soloution to each one of these hashes, so just use em both. I really think that the number of collisions that occur similtaniously are a bit fewer and farther between. I think that will be secure until we find a better and decently fast hash.
    • Re:Ok... by psmears (Score:1) Wednesday September 01 2004, @01:03PM
      • Re:Ok... by YoJ (Score:3) Wednesday September 01 2004, @01:53PM
    • 1 reply beneath your current threshold.
  • How about this... (Score:4, Interesting)

    by Millennium (2451) on Wednesday September 01 2004, @12:58PM (#10130642)
    (http://slashdot.org/)
    Has a collision been found yet concerning data which has both the same MD5 sum and the same SHA-1 sum?

    It would seem as though even if SHA-1 were to fail, the two algorithms used together could bolster each other security-wise. This slows things down, of course, but would it not suffice for the time being?
    • Re:How about this... (Score:5, Informative)

      by merlin_jim (302773) <<moc.tlupatarts> <ta> <nekcarCcM.semaJ>> on Wednesday September 01 2004, @01:01PM (#10130673)
      FTA...

      SSL3.0/TLS does use both, and is therefore immune to this attack.

      Also FTA, SHA-1 is still believed to be secure, and Cryptography Researchers does not believe it is in danger to this same attack.
      [ Parent ]
    • Re:How about this... (Score:5, Informative)

      by Anonymous Coward on Wednesday September 01 2004, @01:38PM (#10131008)
      It would seem as though even if SHA-1 were to fail, the two algorithms used together could bolster each other security-wise. This slows things down, of course, but would it not suffice for the time being?

      Using two hashes in conjunction does not work as well as you would expect it to work. There are at least half a dozen posters here proposing this idea, so I will try to explain in some detail why it does not work.

      In general an n-bit hash can be collided in 2^(n/2) time using the birthday paradox attack. When you concactenate two hashes of lengths n and m bits, you get a hash of length n+m bits. However, this (n+m)-bit hash can in fact be collided in m*2^(n/2) + 2^(m/2) time (assuming n is greater than or equal to m). This is only slightly more effort than it takes to collide both hashes separately. In the case of SHA-1 and MD5, n is 160 and m is 128, so colliding both hashes would take 128*2^80 + 2^64 = 2^87.00000017 effort versus 2^80 effort for SHA-1 alone.

      It must be especially stressed that m*2^(n/2) + 2^(m/2) is considerably smaller than the attack time of 2^((n+m)/2) which you would normally expect from a well designed hash having n+m output bits.

      So how does the attack on two hashes work, you ask? It exploits a curious property of the birthday attack which says that generating a multicollision (three or more messages all with the same hash) by brute force takes only marginally more effort than generating a single collision. Specifically, generating a 2^(m/2) way multicollision takes only m/2 times as much effort as generating a single collision. So what you do to collide two hash functions is: you generate a huge multicollision in the first hash function, and then from that set you look randomly for a pair that collides the second function. It seems very counterintuitive, but the point is you can break the hash functions one by one instead of having to break both of them at once. Strength in numbers doesn't apply here.

      If one of the hash functions (say MD5) has a better than brute force attack, then that can be used to speed up the attack against both hash functions by the same factor. The only uncertainty is if both of the hash functions have better than brute force attacks; in this case it would depend on the particulars of the attacks as to whether one can make them interact in such a way as to break both. However, no matter what, the idea of concactenating two hash functions has such low security compared to designing a good hash function of the same length from scratch that it is unlikely that this concept will ever be useful from a pure cryptography standpoint.

      For more information on multicollisions and attacking concactenated hash functions, see A. Joux "Multicollisions in Iterated Hash Functions", Proceedings of Crypto 2004, LNCS 3152.

      [ Parent ]
    • Re:How about this... by Anonymous Coward (Score:1) Wednesday September 01 2004, @01:52PM
  • to protect binaries (Score:2, Interesting)

    by Anonymous Coward on Wednesday September 01 2004, @01:04PM (#10130702)
    it would be better to post both the MD5 hash _and_ the SHA-1 sum. What's the chance of 2 different binaries having the same MD5 and the same SHA-1 at the same time??

    Artaxerxes
    • 1 reply beneath your current threshold.
  • Another writeup on this (Score:2, Informative)

    by Anonymous Coward on Wednesday September 01 2004, @01:09PM (#10130745)
    Is here [pantsfactory.org].
  • by rewt66 (738525) on Wednesday September 01 2004, @01:16PM (#10130811)
    The world is going to end! Giant asteroids will destroy all life on earth!

    Oops, wrong article. Um... The world is going to end! Global warming... um, well... the Patriot Act... umm...

    Well, it's not that bad. Somebody might be able to flip four very carefully selected bits in a file, and still produce the same MD5 hash. This could let me, for example, create an executable that had a normal, benign behaviour, and an evil trojan behaviour, and have one of the bits that I flip change a conditional so that the trojan behaviour was activated. (Note that open source tends to be immune to this kind of nonsense, since in the source code, the actual trojan part - not the conditional that activates it, but the actual evil payload - tends to stick out like a sore thumb.)

    Note well that this does not let me create an evil version of somebody else's file. It only lets me create two closely related files, one of which differs by four bits from the other. I have to be able to construct the benign file in such a way that I can turn it into an evil file by changing four bits. And it can't be just any four bits, either; it's a very specific four bits.

    So this isn't the end of the world. What it means is that you can't quite trust MD5 to guarantee that you got exactly, bit-for-bit, what you think you got.

    But really, this new situation isn't much worse than what we had before. I mean, I could simply have the evil behaviour activated by the date, or by the IP address of the installed machine, or whatever, and get somebody else (who never saw the evil part run) to state that the program did what it was supposed to. Having an MD5 hash doesn't guarantee that the program isn't evil. Bottom line: don't run code written by bad people, whether it has a valid MD5 or not. (I know, I know. How do you tell who the bad people are? That's a hard question, but my point is that a valid MD5 has never told you whether the authors were bad people or not.)
    • by Isao (153092) on Wednesday September 01 2004, @01:35PM (#10130983)
      What it means is that you can't quite trust MD5 to guarantee that you got exactly, bit-for-bit, what you think you got.

      You never could. It merely said that it was unlikely for you to be getting something else. The difficulty of arranging such a situation just got easier. Not easy. Not trivial. Just easier. Probably by the same factor it got easier over the past four years due to Moore's law increases. Eventually this will become a real issue, and we should be prepared for that, much the same way we don't use plain DES any more.

      [ Parent ]
    • Re:Summary for those too lazy to read it by 1000StonedMonkeys (Score:2) Wednesday September 01 2004, @03:26PM
    • 1 reply beneath your current threshold.
  • by d41d8cd98f00b204e980 (808839) on Wednesday September 01 2004, @01:16PM (#10130813)
    A bad day for me.
  • How to Expoit (Score:3, Informative)

    So as I understand it, from read many of the above comments, the exploint is as thus.

    I write 2 programs, lets call one "Cool Whizzy Must Have Util" and the other "Soul Sucking Destruction" and I tweak and tweak one of the binaries so that they have the same checksum.

    Then I release the first one, everybody is eventually using it.

    So then on my servers, I replace the first one with the 2nd one.

    Gotcha!

    Is that the danger here?

    • Re:How to Expoit by phats garage (Score:1) Wednesday September 01 2004, @01:36PM
      • Re:How to Exploit by notthepainter (Score:1) Wednesday September 01 2004, @01:54PM
      • Re:How to Expoit by phats garage (Score:1) Thursday September 02 2004, @12:15PM
        • 1 reply beneath your current threshold.
      • 1 reply beneath your current threshold.
  • Access (Score:2, Funny)

    by lateralus_1024 (583730) <mattbaha AT gmail DOT com> on Wednesday September 01 2004, @01:21PM (#10130853)
    Yes but what does this mean to me, "Mr.MSAccess Guru/Administrator"?

    Microsoft certification available upon request.
  • Frequently questioned answers (Score:5, Informative)

    by Anonymous Coward on Wednesday September 01 2004, @01:30PM (#10130939)
    "SHA1 is a totally different algorithm, so it's still perfectly safe."

    Yes and no. MD5 collisions are not SHA1 collisions, and the attack that generated the MD5 collisions doesn't seem to be applicable to SHA1, or its authors would have published collisions on SHA1. The published collisions on several other algorithms: HAVAL-128, MD4, and RIPEMD. They also say that their method will work against SHA0. All these hash functions share similar design principles. It seems highly probable that the MD5 attack will have at least some applicability to SHA1 even though it isn't directly an attack against SHA1. Also, other researchers have published results against SHA1. In particular, Biham and Chen con produce collisions on reduced versions of SHA1 with up to about 40 rounds (the full hash function has 80). That isn't a break of the full hash function, and there's no guaranteed it can be extended to more rounds, but it looks worrisome.

    "This attack produces two messages with the same hash, no guarantee what that hash would be, instead of one message with a chosen desired hash, so it isn't a threat to real systems."

    That's just stupid. "No practically-findable collisions" is one of the design requirements for a secure hash function. Protocols using secure hash functions are based on the assumption that the functions used are secure hash functions. If your hash function doesn't guarantee collision resistence, then your protocols must be assumed to be broken unless you can go back and prove, for every protocol, "This one is still secure even if we use something that is not a real secure hash function."

    One way a hash collision could be useful, for instance, would be against some signature schemes where the secret key is revealed if you ever sign an identical message more than once. People who use those schemes are careful to avoid signing the same message twice... but if you had two different messages and they had the same hash, it's quite possible to imagine that you could be tricked into signing the same hash more than once (because people sign hashes, not actual messages) and making trouble for yourself. Similarly, if you use hash output for initialization vectors in cipher modes that use those, the result could be encrypting two messages with the same keystream, which means an attacker can probably recover both messages (and then use them as stepping-stones to breaking the rest of your system).

    Also, a fast way of finding collisions may well be extensible to a somewhat-slower, but still faster-than-brute-force, way of finding the preimages that you think an attacker really wants.

    "This attack depends on the messages having a special form; they don't look like real plaintext, so it isn't a threat to real systems."

    One of the conditions for a secure cryptographic system is that you don't depend on the plaintext having (or NOT having) a specific form. If your system doesn't work regardless of the content of the data I put through it, then I will punt on your system, and recommend to my clients some other system that will actually work. It's also not clear that the attack on MD5 really does require a specific form... those strings look randomly-generated to me, even though the XOR difference of them clearly is not. Maybe with just a little more work they can produce collisions of two meaningful and interesting strings with opposite meanings.

    "All hash functions have collisions, so it was bound to happen and isn't a threat."

    The important question is whether people can actually find collisions. With a good hash function, collisions should be rare enough that nobody has any reasonable chance of finding them on purpose any time soon. Wang, Feng, Lai, and Yu can find collisions on MD5 deliberately, with practical amounts of computer power. They have done this more than once, and have at least outlined a plausible theoretical explanation of how they can do it. That means MD5 does not provide the guarantees that a secure hash function must
    • Re:Frequently questioned answers by ahsile (Score:1) Wednesday September 01 2004, @01:38PM
    • Re:Frequently questioned answers (Score:4, Informative)

      by Idarubicin (579475) <allsquiet@@@hotmail...com> on Wednesday September 01 2004, @02:53PM (#10131767)
      (Last Journal: Sunday June 08 2003, @10:05PM)
      Wang, Feng, Lai, and Yu can find collisions on MD5 deliberately, with practical amounts of computer power. They have done this more than once, and have at least outlined a plausible theoretical explanation of how they can do it. That means MD5 does not provide the guarantees that a secure hash function must provide; MD5 is not a secure hash function.

      It depends on how you define 'secure' and for what purposes you intend to use MD5. For a lot of cases, MD5 is still 'secure'.

      Wang et al. have demonstrated that they can generate collisions in a reasonable period of time. They have not demonstrated that they can generate a collision for a given hash--a so-called preimage attack.

      In other words, it is possible to produce two files full of junk that have the same MD5 hash. It's not possible (yet) to produce a file that has the same MD5 hash as a Linux kernel. It's not possible to create Trojan malware that shares an MD5 hash with a useful application. For most of us, that still counts as 'secure'.

      [ Parent ]
      • 1 reply beneath your current threshold.
    • Re:Frequently questioned answers by anakog (Score:2) Wednesday September 01 2004, @06:25PM
      • 1 reply beneath your current threshold.
    • Re:Frequently questioned answers by julesh (Score:2) Friday September 03 2004, @02:26PM
  • The next hash (Score:3, Interesting)

    by augustz (18082) on Wednesday September 01 2004, @01:34PM (#10130977)
    (http://augustz.com/)
    The work that went into putting together AES was really fantastic.

    I'm just looking forward to a similar effort around an advanced hashing standard.

    Where would an effort like this form?
  • by tstoneman (589372) on Wednesday September 01 2004, @01:35PM (#10130982)
    I thought the original post on slashdot said something about finding a collision with MD5 using a simplified version or different initialization numbers or something like that.

    Is tried-and-true MD5 broken?
  • Our Goverment is on the ball (Score:2, Funny)

    by Lieutenant_Dan (583843) on Wednesday September 01 2004, @01:35PM (#10130988)
    (http://www.business.com/ | Last Journal: Saturday September 06 2003, @06:05PM)
    Upon hearing these news, Tom Ridge raised the level of alert to "Amber".

    At least this time he had something a tad more substantial to instill fear in the hearts of all patriotic Americans such as myself.

    Thank you Department of Homeland Defense! I sleep so much better at night!
  • Real scoop (Score:4, Interesting)

    by Anonymous Coward on Wednesday September 01 2004, @01:38PM (#10131010)
    I wasn't there this year. A friend told me that the embarrassing thing was that the Chinese paper was REJECTED from the conference. They presented their results at the rump session. Other non-Asian researchers with hash collisions got papers in the conference. This doesn't help one's faith in academia, does it, when one of the most important developments at a conference is rejected by the program committee. There is a growing rift between Asian research and Western research. The Asian side has much lower standards, but also has some good results. Sometimes good Asian papers end up being rejected by association with so many mediocre Asian papers.

    Posted anonymously to avoid offending any of my colleagues.

    • Re:Real scoop (Score:4, Informative)

      by randombit (87792) on Wednesday September 01 2004, @03:22PM (#10132044)
      (http://www.randombit.net/)
      I wasn't there this year. A friend told me that the embarrassing thing was that the Chinese paper was REJECTED from the conference. They presented their results at the rump session.

      Of course, it would have helped the paper's chances of being accepted if:

      a) They had actually presented the methods they used

      and/or

      b) The results had been correct. Initially, they were not finding collisions for MD5, but what they *thought* was MD5 (due to a translation error).

      So what the reviewers read was a claimed attack on MD5, with no details, and their examples did not work. If I were reviewing that paper, I would have rejected it too. They didn't correct the paper until (IIRC) the day before the rump session.
      [ Parent ]
    • Re:Real scoop by jeif1k (Score:1) Wednesday September 01 2004, @03:38PM
    • 2 replies beneath your current threshold.
  • by Anonymous Coward on Wednesday September 01 2004, @01:46PM (#10131106)
    More info on the implications at Educated Guesswork [rtfm.com]. (It isn't my work, so anonymously it is.)
  • by poot_rootbeer (188613) on Wednesday September 01 2004, @01:57PM (#10131221)

    ROT-13 is completely invulnerable to hash collisions; no two non-identical inputs will ever result in identical outputs!

    I recommend that everybody replace their existing encryption systems with ROT-13 immediately.

    -Cbbg
  • Link to the MD5 Paper (Score:2, Informative)

    by xxxJonBoyxxx (565205) on Wednesday September 01 2004, @02:15PM (#10131386)
    http://eprint.iacr.org/2004/199.pdf
  • The example in the Q&A [cryptography.com] had two messages...
    I, Bob, agree to pay Charlie $ 5000.00 on 4/12/2005.
    ...and...
    I, Bob, agree to pay Charlie $18542841.54 on 9/27/2012.
    MD5 on the first one is...
    4d4f44971dc6b71171c01abf5cbc7593
    ...and on the second one is...
    269a931c35a592458ad96e768e5f9d37
    Was the example supposed to result in an identical MD5 output or not? They look different to me. I want to see this work for myself. Any working examples?
  • p2p consequence (Score:1)

    by alexislashdot (808899) on Wednesday September 01 2004, @02:41PM (#10131635)
    This would allow labels to insert broken music/video content into p2p networks without the network being able to defend. They can take a pirated file, change it a little and add it back to the p2p network. The MD5 is the same but the file may be unplayable.
    • 1 reply beneath your current threshold.
  • The attack does matter. (Score:4, Informative)

    by Chandon Seldon (43083) on Wednesday September 01 2004, @03:11PM (#10131922)
    (http://www.ferrus.net/)
    With a collision attack, you can perform an attack that matters - here's an example:

    Imagine that Microsoft won't sign any audio drivers for Windows XP that allow raw audio data to be output to disk. Also imagine that you are the driver release engineer at Creative (Sound Blaster division) and you want to release a driver that can do that.

    What you do is build both drivers (one that Microsoft will sign, and one that you want to release with the "unacceptable" feature) with a large static data buffer that isn't used in the binary. You then try to modify both buffers in such a way as the two files will have the same hash (doesn't matter what hash, just that it's the same). This will take about 2^40 worth of work for MD5 instead of the 2^64 that it should take because of this security issue.

    Once you've created your two binaries with the same hash, you send the acceptable binary to Microsoft and they sign it. Then, in the release section of your website you post the other binary with the signature you got from Microsoft... and the signature verifys just like they signed it.

    There is also a break in the digital check situation, *if* the digital check protocal has random padding (many do) *and* the payee generates the check (also possible).
  • by Hoch (603322) <hochhech&yahoo,com> on Wednesday September 01 2004, @03:20PM (#10132027)
    I don't think people realize how complicated it would be to brute force one of these algorithms. Lets take one that has a 160 bit hash. This means that you would find a collision in ~2^80 tries, right? Wrong, this assumption requires that you store each of the hashes you receive in the brute force attack. This would amount to 2^80 x 160 bits, or 21990232555520 terrabytes. It is clearly not feasible to store that much. A 128 bit hash would find a collision in ~2^64 tries and would need 2^64 x 128 bits or 268435456 terrabytes of storage! Lets see someone distribute that.
  • Weird results (Score:2, Interesting)

    by Lisper (461847) on Wednesday September 01 2004, @03:31PM (#10132151)
    On a lark I decided to run the purported collisions in the paper through MD5 to verify the claim, and I got a weird result. The two examples given are indeed collisions, but the hash is not what the paper says it is. The paper says that the hashes for the two examples are supposed to be:

    9603161f f41fc7ef 9f65ffbc a30f9dbf

    and

    8d5e7019 6324c015 715d6b58 61804e08

    but the hashes I get are:

    74BE7342 8C5BDB65 9BE40E00 CF6AE31C

    and

    BC5E1391 D31E52F3 D41CBE8C 05D7DBC1

    I'm using the MD5 library built in to Darwin (OS X) and I've verified that it passes the standard MD5 test suite in RFC 1321.
  • by Reteo Varala (743) <reteo@hot p o p .com> on Wednesday September 01 2004, @04:13PM (#10132572)
    (http://www.phoenix.edu/)
    What if some attacker gets ahold of a Linux MD5 /etc/passwd file? That would likely now be enough to get access to the computers...

    I hope the distros migrate to sha-1 for their default authentication mechanisms...
  • by Spoing (152917) on Wednesday September 01 2004, @04:19PM (#10132628)
    (http://slashdot.org/)
    Maybe you do this too?

    To check a file manually, I should do the following;

    Check the MD5sum against a known good source.

    Check the GPG signature of that source.

    Check the file size (might be harder to fake an MD5 for files of the same size?)

    What I actually do most of the time is quite a bit is different;

    Check the first and last few characters in the MD5sum against what is posted on the web/FTP site.

    To get a complete MD5 collision is currently something the NSA might be able to do (paranoia hat not on). To get a look-alike that matches part of the original MD5 (just the part I tend to check) should be possible.

    (Forging the original MD5 is probably the easiest thing to do since the GPG signature is rarely provided and if it is is probably rarely checked.)

  • Stored Passwords (Score:2)

    by boatboy (549643) on Wednesday September 01 2004, @04:45PM (#10132899)
    (http://www.danielroot.com/)
    A common security system practice, especially in web development, is to use MD5 to hash users' passwords and store them in a database. When the user enters their password for access, it is hashed and checked against the db. This means you can check passwords without having to store it plain-text anywhere.

    My understanding is that this problem in MD5 means it is slightly easier to take an MD5 hash (if the database were stolen, for example), and find a password that will generate the same hash, and thus allow access. Is this correct? What are some developers doing out there to address this issue in their security systems? Is it really an issue in this scenario?
  • I, for one... (Score:1)

    by RWerp (798951) on Wednesday September 01 2004, @05:03PM (#10133106)
    welcome our new bluefish password hashes.
  • Q: What is the difference between SHA-0 and SHA-1? Is SHA-0 widely used?

    A: SHA-0 was initially proposed in FIPS 180 (May 1993) as hashing standard by the U.S. government, but was replaced by SHA-1 in FIPS 180-1 (April 1995). SHA-1 adds an additional circular shift operation that appears to have been specifically intended to address the weaknesses found in SHA-0. SHA-0 is not widely used and should not be used in new systems.

    This indicates that the US Govt had already shown SHA-0 was weak by 1995. I dimly recall there was a similar involvement in RSA or DES, where a weakness was avoided by the US govt requesting a (at the time) seemingly irrelevant change to the algorythm.

  • by Deliveranc3 (629997) on Thursday September 02 2004, @04:06AM (#10136687)
    (Last Journal: Sunday November 06 2005, @02:43AM)
    Can they now use this to break bittorrent?

    Would seem to me the server could have a secret hash code and use it on data that turned out to be invalid and ban based on it but more security is always a pain in the ass...

    Anyone seen any evidence of this or heard anything about it happening in the future?
  • Re:gentleMEN (Score:3, Informative)

    by ponds (728911) on Wednesday September 01 2004, @12:45PM (#10130500)
    Yes, too bad ECC is not a hashing algorithm and has absolutely nothing to do with this, or else we'd be set.
    [ Parent ]
    • Re:gentleMEN by merlin_jim (Score:3) Wednesday September 01 2004, @12:49PM
      • Re:gentleMEN by Rightcoast (Score:2) Wednesday September 01 2004, @01:05PM
        • Re:gentleMEN by Anonymous Coward (Score:1) Wednesday September 01 2004, @01:41PM
        • Re:gentleMEN by shish (Score:2) Wednesday September 01 2004, @03:16PM
        • 1 reply beneath your current threshold.
      • Re:gentleMEN (Score:5, Informative)

        by Zeinfeld (263942) on Wednesday September 01 2004, @01:21PM (#10130857)
        (http://dotfuturemanifesto.blogspot.com/)
        And too bad that ECC is a) not provably secure and b) is rumored to have been broken already. And according to Denis Hastert George Soros is 'rumoured' to be a drugs dealler, Brittney Spears is rumoured to be a virgin and George W. Bush is 'rumoured' to have been an AWOL coke head during Vietnam, not a sissy getting three purple hearts.

        Some forms of ECC have been 'broken', Len Adlemann (A of RSA) showed that ECC in dimensions higher than 2 was no more secure. He has been working on some further attacks and thinks that ECC as a whole might be vulnerable.

        I don't like ECC for two reasons. The first is that ECC is a very new field of mathematics, new results come regularly. It is entirely possible that someone would find an efficient means of transforming ECC problems into discrete math problems and come up with a solution.

        The other reason is that ECC is patented up the wazoo. The most efficient ways of using ECC are patented and if you can't use them there is no efficiency advantage over RSA in a discrete field so why bother?

        The hash algorithm thing is massively overblown. MD5 was already toast. SHA1 was due to be withdrawn in 2010 in any case and has already been superceded by SHA-256 and SHA-512. New versions of DSA for the larger hash sizes are also due.

        It remains to be seen whether the construction of SHA-256 needs to be adjusted in the light of the MD5 results. It may well be that it shares the same vulnerability as SHA-1 and we should forget about the new hash functions and move straight to something else. Alternatively all might be right with the world. We do not know yet.

        A lot of people are suggesting a competition similar to the AES competition for a new digest algorithm. There is already something underway for stream ciphers. This seems like a good plan, not least since the cryptographers seemed to have fun with the last one.

        [ Parent ]
        • Re:gentleMEN by clap_hands (Score:1) Wednesday September 01 2004, @06:37PM
        • 2 replies beneath your current threshold.
  • Re:The cycle repeats (Score:5, Insightful)

    by rewt66 (738525) on Wednesday September 01 2004, @12:55PM (#10130613)
    This isn't "a faster computer". This is "a better technique" or "a deeper understanding" - much more dangerous.
    [ Parent ]
    • Re:The cycle repeats by ahsile (Score:1) Wednesday September 01 2004, @01:23PM
    • Re:The cycle repeats (Score:4, Insightful)

      by Zocalo (252965) on Wednesday September 01 2004, @01:25PM (#10130892)
      (http://www.zocalo.uk.com/)
      Exactly. With crypto, it's often that little bit of extra insight or improved technique which can bring the entire thing crashing down. As an example, take Charles Babbage's (yes, that one) breaking of what up until then had been the presumed unbreakable Vigenere cipher. The observation Babbage made was that certain sequences of letters might recur in the ciphered text, and the insight was that these might be the same plaintext letters encrypted against the same cipher sequence. From this small foothold, Babbage was able to ascertain the length of the keyword used to drive the encryption and from there break the complexity down into a limited number of substitution ciphers which are much easier to tackle.

      While it's still not certain whether a similar jump might be made in the case of the MD5 and SHA-1 hashing algorithms, you can bet that a lot of crypto people are looking. What's that OSS saying about many eyes making flaws shallow again? Even if there is a fatal flaw though, I doubt it's not going to be the show stopper for hashes some people seem to think; you just use more of them. RPM supports DSA, SHA1, MD5 *and* GPG checksums for example, even if all four algorithms were broken, I doubt there is a method for generating an equivalent file that matches all four checksums at the same time.

      [ Parent ]
  • Re:really now (Score:2)

    by phaze3000 (204500) on Wednesday September 01 2004, @01:53PM (#10131188)
    (http://cisco-configs.com/)
    Well, personally I'm more of a skunk fan, but Abraxas [abraxas.tv] in Amsterdam does a superb hash [wikipedia.org] milkshake.
    [ Parent ]
  • Well duh... (Score:1)

    by Phishcast (673016) on Wednesday September 01 2004, @03:48PM (#10132294)
    Thanks for pointing out the obvious...Wait, what now?
    [ Parent ]
  • by pclminion (145572) on Wednesday September 01 2004, @04:40PM (#10132833)
    In this case, wouldn't it be easy for anyone with access to the passwd file to generate passwords that match the hashes (collisions) allowing them to login to accounts which were previously thought secure?

    No. The new technique allows you to construct two pieces of data which have the same hash. It doesn't allow you to construct a piece of data which matches a given hash. This was explicitly spelled out in the Q&A document.

    Also, MD5 password hashes are salted. This means that, although you could potentially find a collision with the hash in the password file, the colliding data almost certainly would not have the same salt, and therefore would not be accepted as a valid password.

    Furthermore, think about it. If you had access to the password hashes, you would be root, and could just 'su' to the user account in question anyway.

    Now, suppose that your goal was to guess the password and hope that the user uses the same password on other machines -- i.e., you want to boost yourself to other hosts. But you're still SOL, because the MD5 password hashes are salted. Therefore, you must recompute the equivalent password on the other hosts, even if the user used the same password on those hosts.

    As the Q&A document explained, the ability to produce colliding hashes makes MD5 unsuitable for some tasks. Protecting UNIX logins is not one of the ways in which its use has been compromised.

    [ Parent ]
  • 12 replies beneath your current threshold.