Behold: the world's first known chosen-prefix collision of widely used hash function.
Read the whole story
Read the whole story
git is a bit of a bad example, since it uses sha-1 to provide data integrity only in the absence of a malicious actor. If you allow a malicious actor to push to your git repository, you have other problems.
Git is distributed. From its point of view, there is no such thing as a "master" repository. While you may have a Git repo hosted somewhere that you run your CI/CD from, everyone who has cloned that repo has a copy of it, and Git doesn't know or care that your hosted repo is "better" than theirs.
So if an attacker (potentially in your organization) clones your repo, makes a bunch of changes to a low-level file, uses this exploit to hash it yielding the same SHA1 as the original, then distributes their repo as a "fork" of yours, or somehow causes your hosted repo to be replaced with theirs (through social engineering or sabotage--"hey guys, the hosted repo got deleted somehow, but no worries, I restored it from my local clone"), you would have no idea anything was amiss.
The way to secure commits in Git is to use commit signatures which use GPG and have been available since 2012.
Actually, let’s dump this whole thread since it is pretty lame because ...Your response is "the way to secure commits is blah blah blah". Don’t you get it? As secure as that commit is, the actual code is not secure in the repo. It can be modified ... undetectably.
If the attacker does not control the repository (as in can commit to it without needing to first commit to their local repository, then push it to a remote) then this is straight-up false. Pushing a commit that modifies an existing file without changing its hash will be ignored by the receiving (local in case of fetch, remote in case of push) repository. End of story.
If the attacker *does* control the repository, they can do all sorts of interesting things. They can offer a slightly different tarball for download than is in the repository, and which obviously bypasses the git commit hash issue entirely because the git tree is entirely uninvolved in that download. Perhaps this realization may be unsettling to the "grab random shit from github and paste it into the root shell" crowd, but, well, they have different and bigger problems.
Yes, in this particular instance they could also directly insert a commit with a hash collision into the repository. However, that, too, would be noticable to others who would interact with the source tree. A broken repository is ... well, that's about as undetectable as a punch to the face that breaks your nose.
Do me a favor: Go read https://stackoverflow.com/questions/939 ... -on-a-blob, which details what how commit/fetch/push operations react in the face of hash collisions. Once you do understand that, come back to us and tell us how you'd still get that modification in without subsequent committers running into an error message and thinking, "huh, that's odd".
Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
What engine is that?
BYOND
Contractual obligation or legacy code I imagine?
Open source contribution out of pure boredom. All attempts to rewrite the game in anything better have failed, this is jokingly called "the curse".
The data doesn't need to be visible in a PDF viewer. If the issue even comes up, then you must be arguing in a court of law. And asking to sign a file with garbage data appended to it could get the landlord in hot water even before trying to defraud the tenant, I'm guessing.Won't the fake lease agreement have garbage added at the end, making it easily identifiable?The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
No. Because PDF files may have blobs of unused or unshown data, and the researchers (or the landlord) could actually add unused garbage to both files (and probably did)
I don't want to say that the exploit is inconsequential. Just that it's not that trivial.
Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
Are you working on Fallout 76?
I recall some very old games that had static space allocated to store the list of Direct3D texture formats (this was back before you queried the presence of a particular format) that would crash if you exposed more formats than they expected (e.g. S3TC formats). Other games would render incorrectly, or crash, if the formats were not in the exact same order 3dfx exposed the formats.Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
So you're working in 2003?
Feels like it, I guess. I mean, the engine was originally for Windows 95 (it's obviously been updated alot since then)
The data doesn't need to be visible in a PDF viewer. If the issue even comes up, then you must be arguing in a court of law. And asking to sign a file with garbage data appended to it could get the landlord in hot water even before trying to defraud the tenant, I'm guessing.Won't the fake lease agreement have garbage added at the end, making it easily identifiable?The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
No. Because PDF files may have blobs of unused or unshown data, and the researchers (or the landlord) could actually add unused garbage to both files (and probably did)
I don't want to say that the exploit is inconsequential. Just that it's not that trivial.
Actually, pretty much any PDF file on your machine will have some garbage/ unseen info. It's not unusual, many vendors like to add their own mark ("created with <awesome tool> from <awesome company>"). You could add a image and just never reference it (or reference an updated version of it - yes, you can do that), or use a image format that allow you to put extra data in itself. It's pretty much impossible to look at a PDF file and determine what is usefull info, what is garbage, and what is just random metadata.
Open a PDF on notepad++ and see it for yourself if a judge would be able to understand what is usefull info. I can't (easily and in a reasonable amount of time), and I devoured the PDF especification a few years back to implement PAdES (PDF signatures in a more advanced format than SHA-1) for my previous organization.
Of course, all these attacks are POCs now, and we've started using SHA256 well before SHA-1 became compromised, so hopefully this won't be a problem when the price is finally low enough to carry real world attacks.
Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
So you're working in 2003?
I'm beginning to think Scott Aaronson (not a cryptographer, but a computational complexity expert) was right when he asked a while back (can't find the quote): why, given that we have accumulating evidence that this kind of weakness is not uncommon in cryptographic algorithms, we continue to use key lengths that are short enough that some simple polynomial speedup in cracking can suddenly break them.
These are exponential algorithms, and these weaknesses are statistical, so why can't we make exponential behavior our friend by just adding a much bigger key-length buffer, like a factor of 10, which would push the behavior so far out the exponential curve that no polynomial-time improvement is going to do any good? Sure, everything runs quite a bit slower, but fuck that, it's time to stop constantly setting our constants just out of range of anticipated attacks, given that significant speedups both of hardware and algorithms are expected.
We now have actual data points indicating that key lengths have been too conservative, and it's time to respond scientifically by sucking it up and bumping key lengths way up. We have the technology, and we had it even when SHA-1 came out; multiplying a constant by 5-10 is easy and likely to work unless the algorithm is so broken that the exponential behavior itself has been reduced to polynomial time, which I don't think has been the case in these situations.
Like many things on the internet, the large players have a fair bit of weight. A 100ms delay to run longer lengths or 1 second taken to digitally sign a document isn't a huge deal to a user. But if you're a large player with high throughput a factor of 10 increase becomes a discussion about the hundreds or thousands of new servers you're buying. It's a hard sell if there isn't any short term issues.
The amount of TLS cipher suites isn't an issue. In fact including so many in the TLS 1.2 spec is seen as a big mistake. The fewer the better, so long as they are well chosen and has at least one alternative that works substantially differently. That's why TLS 1.3 essentially only has the following:How does this effect (or does it at all) TLS cipher suites? I know SSL Labs has started marking anything with CBC as weak although scores aren't negatively impacted yet. Does this mean anything ending in SHA (1, not 384 or 256) should be disabled asap?
If so, TLS 1.2 is rapidly running out of usable suites in IIS. Omitting the CBCs, we only have TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. It doesn't look like MS is in any hurry to add TLS 1.3 support, either. Server 2019 doesn't even have it.
Duke Nukem Forever.Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
Are you working on Fallout 76?
git is a bit of a bad example, since it uses sha-1 to provide data integrity only in the absence of a malicious actor. If you allow a malicious actor to push to your git repository, you have other problems.
Git is distributed. From its point of view, there is no such thing as a "master" repository. While you may have a Git repo hosted somewhere that you run your CI/CD from, everyone who has cloned that repo has a copy of it, and Git doesn't know or care that your hosted repo is "better" than theirs.
So if an attacker (potentially in your organization) clones your repo, makes a bunch of changes to a low-level file, uses this exploit to hash it yielding the same SHA1 as the original, then distributes their repo as a "fork" of yours, or somehow causes your hosted repo to be replaced with theirs (through social engineering or sabotage--"hey guys, we're doing some updates to the hosted git repo that will cause some downtime; if you need to, you can clone from my repo instead"), you would have no idea anything was amiss.
Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
So you're working in 2003?
Hi. This may be hard to believe, but I am from the future. We just entered the year 2020. I know right about now you must be thinking that GW is the worst President ever, and the war in Iraq is ill-advised. But I'm about to tell you just a little bit about our current President. You might want to sit down...
Dr. Emmett Brown : If we could somehow harness this lightning... channel it into the flux capacitor... it just might work. Next Saturday night, we're sending you back to the future!
Marty: Uh, Doc? That's back to 2020? OK, timeout! Tell you what, I think this time I like it right here, staying right here in 2003!
Was true in 2003 but for years sha-256 is slightly faster than sha-1!I'm beginning to think Scott Aaronson (not a cryptographer, but a computational complexity expert) was right when he asked a while back (can't find the quote): why, given that we have accumulating evidence that this kind of weakness is not uncommon in cryptographic algorithms, we continue to use key lengths that are short enough that some simple polynomial speedup in cracking can suddenly break them.
These are exponential algorithms, and these weaknesses are statistical, so why can't we make exponential behavior our friend by just adding a much bigger key-length buffer, like a factor of 10, which would push the behavior so far out the exponential curve that no polynomial-time improvement is going to do any good? Sure, everything runs quite a bit slower, but fuck that, it's time to stop constantly setting our constants just out of range of anticipated attacks, given that significant speedups both of hardware and algorithms are expected.
We now have actual data points indicating that key lengths have been too conservative, and it's time to respond scientifically by sucking it up and bumping key lengths way up. We have the technology, and we had it even when SHA-1 came out; multiplying a constant by 5-10 is easy and likely to work unless the algorithm is so broken that the exponential behavior itself has been reduced to polynomial time, which I don't think has been the case in these situations.
Like many things on the internet, the large players have a fair bit of weight. A 100ms delay to run longer lengths or 1 second taken to digitally sign a document isn't a huge deal to a user. But if you're a large player with high throughput a factor of 10 increase becomes a discussion about the hundreds or thousands of new servers you're buying. It's a hard sell if there isn't any short term issues.
Not sure how this matters. First, digital signatures should have no validity between a consumer and a corporate entity for a long list of reasons for any contract of significant complication or amount of money (total value in 5 or more figures). There is no way for a normal consumer to know a "safe" digital contract from an "unsafe" one. Second, none of the methods currently in use for "digital signatures" or digital contracts are remotely close to the standard of a PGP signature in cryptography or document integrity.Won't the fake lease agreement have garbage added at the end, making it easily identifiable?The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
Not sure how this matters. First, digital signatures should have no validity between a consumer and a corporate entity for a long list of reasons for any contract of significant complication or amount of money (total value in 5 or more figures). Second, none of the methods currently in use for "digital signatures" or digital contracts are remotely close to the standard of a PGP signature in cryptography or document integrity.Won't the fake lease agreement have garbage added at the end, making it easily identifiable?The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
Sure, I renewed my apartment via Docusign, which is meaningless as Docusign merely acts as a clearinghouse for PDFs and fake signatures I "approve" added to the PDFs. I keep my own copy of the PDF as well as screen captures of key areas, but frankly nothing will protect me from a fake PDF being submitted by the landlord. There is no legal standard applied for establishing my identity, authorization, or authenticity when signing such effectively fake documents. Doing the Docusign garbage is just a checkbox in the process.
tl;dr: "You'll be able to replace files with identical hash codes, even on on trees with lots of committers, and nobody will notice" is a Holywood plot. On repositories with multiple collaborators, there are significant limitations on the viability of that attack, and on a genuinely popular one you would be found out rather quick.
So, back to my original question: does this effect the cipher suites mentioned, and should they be disabled in favor of the GCM ciphers sooner rather than later?The amount of TLS cipher suites isn't an issue. In fact including so many in the TLS 1.2 spec is seen as a big mistake. The fewer the better, so long as they are well chosen and has at least one alternative that works substantially differently. That's why TLS 1.3 essentially only has the following:How does this effect (or does it at all) TLS cipher suites? I know SSL Labs has started marking anything with CBC as weak although scores aren't negatively impacted yet. Does this mean anything ending in SHA (1, not 384 or 256) should be disabled asap?
If so, TLS 1.2 is rapidly running out of usable suites in IIS. Omitting the CBCs, we only have TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. It doesn't look like MS is in any hurry to add TLS 1.3 support, either. Server 2019 doesn't even have it.
Cipher suite: AES_GCM, AES_CCM, ChaCha20-Poly1305
Key exchange: DHE-RSA, ECDHE-RSA, ECDHE-ECDSA
Data integrity: AEAD
No, a notary checks your driver's license or similar to establish your identity by known, approved legal methods. Further a notary signs their own name and stamp, a named individual, as bond of authenticity against the signatures on the document.Not sure how this matters. First, digital signatures should have no validity between a consumer and a corporate entity for a long list of reasons for any contract of significant complication or amount of money (total value in 5 or more figures). Second, none of the methods currently in use for "digital signatures" or digital contracts are remotely close to the standard of a PGP signature in cryptography or document integrity.Won't the fake lease agreement have garbage added at the end, making it easily identifiable?The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
Sure, I renewed my apartment via Docusign, which is meaningless as Docusign merely acts as a clearinghouse for PDFs and fake signatures I "approve" added to the PDFs. I keep my own copy of the PDF as well as screen captures of key areas, but frankly nothing will protect me from a fake PDF being submitted by the landlord. There is no legal standard applied for establishing my identity, authorization, or authenticity when signing such effectively fake documents. Doing the Docusign garbage is just a checkbox in the process.
And further to this... ALWAYS keep your digital copy. So if the landlord says "but you signed this" you can respond with "no, I signed THIS." Since the hashes also match on yours, it would then go to court if the manager didn't back down. And since it costs $120,000 PER DOCUMENT to do this, the manager would have to be making more of a profit off of this than that -- significantly more, since you've still got the original document that throws it into question.
And as you point out, this is moot, because real world signing authorities like Docusign don't even use proper validation like this. They're essentially nothing more than a digital notary.
How does this effect (or does it at all) TLS cipher suites? I know SSL Labs has started marking anything with CBC as weak although scores aren't negatively impacted yet. Does this mean anything ending in SHA (1, not 384 or 256) should be disabled asap?
If so, TLS 1.2 is rapidly running out of usable suites in IIS. Omitting the CBCs, we only have TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. It doesn't look like MS is in any hurry to add TLS 1.3 support, either. Server 2019 doesn't even have it.
There are a lot of subtleties to how Git handles SHA1 hash that it's hard to make a simplistic statement that "it's fine".git is a bit of a bad example, since it uses sha-1 to provide data integrity only in the absence of a malicious actor. If you allow a malicious actor to push to your git repository, you have other problems.
Yes, ultimately git should move to another hash, but it just isn't in the same category of urgency as digital signatures are.
There're also low and very low power devices to consider. Going from 0.1 to 1.0 seconds on a server means Google needs a bigger data center. If it needs 10 seconds instead of 1 on your phone that's going to be somewhat annoying (and remember even if you've got the latest flagship phone people on tight budgets might be using something 10-50x slower). Below phones you've embedded devices running on AA/AAA batteries or even coin cells. Especially in the latter even a few extra seconds of wakeup time a day will result in a significant degradation of service.
Those factors are considered heavily when choosing new crypto algorithms/key sizes just as much as guesses about how hard it might be to break in the future are.
It's amazing how many people mistake an implementation detail for a security feature (git using sha1 for its content addressable file system) and seem to rely on it for their security.git is a bit of a bad example, since it uses sha-1 to provide data integrity only in the absence of a malicious actor. If you allow a malicious actor to push to your git repository, you have other problems.
Git is distributed. From its point of view, there is no such thing as a "master" repository. While you may have a Git repo hosted somewhere that you run your CI/CD from, everyone who has cloned that repo has a copy of it, and Git doesn't know or care that your hosted repo is "better" than theirs.
So if an attacker (potentially in your organization) clones your repo, makes a bunch of changes to a low-level file, uses this exploit to hash it yielding the same SHA1 as the original, then distributes their repo as a "fork" of yours, or somehow causes your hosted repo to be replaced with theirs (through social engineering or sabotage--"hey guys, the hosted repo got deleted somehow, but no worries, I restored it from my local clone"), you would have no idea anything was amiss.
The way to secure commits in Git is to use commit signatures which use GPG and have been available since 2012.
I have no idea what you mean with "cross-repo caching" but what will happen if you push back to the original repo is that git will see that there were no changes and simply ignore your modified file because the hashes match.Imagine an open-sourced Git hosting service like GitHub or BitBucket. Let's say you clone a repo, make some malicious hard-to-detect changes to a file that results in the same hash, and then push the changes. If GitHub doesn't handle cross-repo caching properly, it's already conceivable that you can silently replace the old file with the new malicious file.
So again not a problem with git but a purely theoretical problem in one UI. As soon as you try to merge the malicious file with the same hash into the repo nothing will happen - see above.Or, imagine if you manage to submit a pull-request or make a dev branch into the repo, now suddenly, GitHub or the Git hosting service could be confused, because the way the URL is structured allows you basically do https://github.com/<user>/<repo>/commit/<hash>, so if you can get the <hash> part to collide weird things may happen.
Meanwhile, I'm stuck coding in a game engine which JUST added a sha1 function in a NEW BETA.
Said game engine uses Internet Explorer for UIs, so I shouldn't be shocked.
What engine is that?
BYOND
Contractual obligation or legacy code I imagine?
Open source contribution out of pure boredom. All attempts to rewrite the game in anything better have failed, this is jokingly called "the curse".
git is a bit of a bad example, since it uses sha-1 to provide data integrity only in the absence of a malicious actor. If you allow a malicious actor to push to your git repository, you have other problems.
Git is distributed. From its point of view, there is no such thing as a "master" repository. While you may have a Git repo hosted somewhere that you run your CI/CD from, everyone who has cloned that repo has a copy of it, and Git doesn't know or care that your hosted repo is "better" than theirs.
So if an attacker (potentially in your organization) clones your repo, makes a bunch of changes to a low-level file, uses this exploit to hash it yielding the same SHA1 as the original, then distributes their repo as a "fork" of yours, or somehow causes your hosted repo to be replaced with theirs (through social engineering or sabotage--"hey guys, the hosted repo got deleted somehow, but no worries, I restored it from my local clone"), you would have no idea anything was amiss.
The way to secure commits in Git is to use commit signatures which use GPG and have been available since 2012.
Was true in 2003 but for years sha-256 is slightly faster than sha-1!I'm beginning to think Scott Aaronson (not a cryptographer, but a computational complexity expert) was right when he asked a while back (can't find the quote): why, given that we have accumulating evidence that this kind of weakness is not uncommon in cryptographic algorithms, we continue to use key lengths that are short enough that some simple polynomial speedup in cracking can suddenly break them.
These are exponential algorithms, and these weaknesses are statistical, so why can't we make exponential behavior our friend by just adding a much bigger key-length buffer, like a factor of 10, which would push the behavior so far out the exponential curve that no polynomial-time improvement is going to do any good? Sure, everything runs quite a bit slower, but fuck that, it's time to stop constantly setting our constants just out of range of anticipated attacks, given that significant speedups both of hardware and algorithms are expected.
We now have actual data points indicating that key lengths have been too conservative, and it's time to respond scientifically by sucking it up and bumping key lengths way up. We have the technology, and we had it even when SHA-1 came out; multiplying a constant by 5-10 is easy and likely to work unless the algorithm is so broken that the exponential behavior itself has been reduced to polynomial time, which I don't think has been the case in these situations.
Like many things on the internet, the large players have a fair bit of weight. A 100ms delay to run longer lengths or 1 second taken to digitally sign a document isn't a huge deal to a user. But if you're a large player with high throughput a factor of 10 increase becomes a discussion about the hundreds or thousands of new servers you're buying. It's a hard sell if there isn't any short term issues.
$ openssl speed sha1 sha256
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sha1 82401.77k 222859.52k 514273.96k 752517.74k 728271.55k
sha256 57963.06k 167342.95k 300917.33k 419013.97k 410446.51k
When you're viewing the PDF in an actual viewer it all seems legit.Won't the fake lease agreement have garbage added at the end, making it easily identifiable?The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
I'm guessing here, but presumably, the garbage need not be visible in the actual PDF? And you could start out from the lease agreement with the higher rent, and fiddle the agreement with the lower rent until its hash is identical?
I have no idea what you mean with "cross-repo caching" but what will happen if you push back to the original repo is that git will see that there were no changes and simply ignore your modified file because the hashes match.Imagine an open-sourced Git hosting service like GitHub or BitBucket. Let's say you clone a repo, make some malicious hard-to-detect changes to a file that results in the same hash, and then push the changes. If GitHub doesn't handle cross-repo caching properly, it's already conceivable that you can silently replace the old file with the new malicious file.
Now you can obviously create your own repo with the malicious code and get people to come from there, but taking code from am untrusted source is a bad idea anyhow. The only thing this really does is that people can't rely on comparing hashes to be sure the two repos are identical. But then that's a really weird use case anyhow.
So again not a problem with git but a purely theoretical problem in one UI. As soon as you try to merge the malicious file with the same hash into the repo nothing will happen - see above.Or, imagine if you manage to submit a pull-request or make a dev branch into the repo, now suddenly, GitHub or the Git hosting service could be confused, because the way the URL is structured allows you basically do https://github.com/<user>/<repo>/commit/<hash>, so if you can get the <hash> part to collide weird things may happen.
SHA-1 is an implementation detail. With git as with every other software the age old "only use code from a trusted source" still applies. Hell, if a malicious actor can merge commits into a repository there are much, much easier ways to introduce security problems.
Was true in 2003 but for years sha-256 is slightly faster than sha-1!I'm beginning to think Scott Aaronson (not a cryptographer, but a computational complexity expert) was right when he asked a while back (can't find the quote): why, given that we have accumulating evidence that this kind of weakness is not uncommon in cryptographic algorithms, we continue to use key lengths that are short enough that some simple polynomial speedup in cracking can suddenly break them.
These are exponential algorithms, and these weaknesses are statistical, so why can't we make exponential behavior our friend by just adding a much bigger key-length buffer, like a factor of 10, which would push the behavior so far out the exponential curve that no polynomial-time improvement is going to do any good? Sure, everything runs quite a bit slower, but fuck that, it's time to stop constantly setting our constants just out of range of anticipated attacks, given that significant speedups both of hardware and algorithms are expected.
We now have actual data points indicating that key lengths have been too conservative, and it's time to respond scientifically by sucking it up and bumping key lengths way up. We have the technology, and we had it even when SHA-1 came out; multiplying a constant by 5-10 is easy and likely to work unless the algorithm is so broken that the exponential behavior itself has been reduced to polynomial time, which I don't think has been the case in these situations.
Like many things on the internet, the large players have a fair bit of weight. A 100ms delay to run longer lengths or 1 second taken to digitally sign a document isn't a huge deal to a user. But if you're a large player with high throughput a factor of 10 increase becomes a discussion about the hundreds or thousands of new servers you're buying. It's a hard sell if there isn't any short term issues.
That's a machine/situation/application specific statement. Certainly, it's not true on my box with openssl.
Code:$ openssl speed sha1 sha256 The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes sha1 82401.77k 222859.52k 514273.96k 752517.74k 728271.55k sha256 57963.06k 167342.95k 300917.33k 419013.97k 410446.51k
The difference is pretty small on my ThreadRipper 3960X in Ubuntu running on Windows 10:Was true in 2003 but for years sha-256 is slightly faster than sha-1!I'm beginning to think Scott Aaronson (not a cryptographer, but a computational complexity expert) was right when he asked a while back (can't find the quote): why, given that we have accumulating evidence that this kind of weakness is not uncommon in cryptographic algorithms, we continue to use key lengths that are short enough that some simple polynomial speedup in cracking can suddenly break them.
These are exponential algorithms, and these weaknesses are statistical, so why can't we make exponential behavior our friend by just adding a much bigger key-length buffer, like a factor of 10, which would push the behavior so far out the exponential curve that no polynomial-time improvement is going to do any good? Sure, everything runs quite a bit slower, but fuck that, it's time to stop constantly setting our constants just out of range of anticipated attacks, given that significant speedups both of hardware and algorithms are expected.
We now have actual data points indicating that key lengths have been too conservative, and it's time to respond scientifically by sucking it up and bumping key lengths way up. We have the technology, and we had it even when SHA-1 came out; multiplying a constant by 5-10 is easy and likely to work unless the algorithm is so broken that the exponential behavior itself has been reduced to polynomial time, which I don't think has been the case in these situations.
Like many things on the internet, the large players have a fair bit of weight. A 100ms delay to run longer lengths or 1 second taken to digitally sign a document isn't a huge deal to a user. But if you're a large player with high throughput a factor of 10 increase becomes a discussion about the hundreds or thousands of new servers you're buying. It's a hard sell if there isn't any short term issues.
That's a machine/situation/application specific statement. Certainly, it's not true on my box with openssl.
Code:$ openssl speed sha1 sha256 The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes sha1 82401.77k 222859.52k 514273.96k 752517.74k 728271.55k sha256 57963.06k 167342.95k 300917.33k 419013.97k 410446.51k
$ openssl speed sha1 sha256
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
sha1 297560.03k 755899.09k 1541911.98k 2077562.54k 2310995.97k
sha256 285384.49k 694133.01k 1431843.58k 1940314.79k 2165383.17k
Of those, the RSA ones are ... iffy, as everything with RSA is. TLS 1.2 still used old-fashioned padding. So you're actually down to two: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.How does this effect (or does it at all) TLS cipher suites? I know SSL Labs has started marking anything with CBC as weak although scores aren't negatively impacted yet. Does this mean anything ending in SHA (1, not 384 or 256) should be disabled asap?
If so, TLS 1.2 is rapidly running out of usable suites in IIS. Omitting the CBCs, we only have TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. It doesn't look like MS is in any hurry to add TLS 1.3 support, either. Server 2019 doesn't even have it.
The researchers behind it said it could allow a landlord to draft two rental agreements with colliding hashes. The landlord could get a tenant to digitally sign one document offering a low rental price and later claim the tenant signed the agreement for the lease agreeing to a much higher price.
What do the researchers have against landlords?
You've been a homeowner for long enough now for the scarring to have faded, I take it? ;-)
It's amazing how many people mistake an implementation detail for a security feature (git using sha1 for its content addressable file system) and seem to rely on it for their security.git is a bit of a bad example, since it uses sha-1 to provide data integrity only in the absence of a malicious actor. If you allow a malicious actor to push to your git repository, you have other problems.
Git is distributed. From its point of view, there is no such thing as a "master" repository. While you may have a Git repo hosted somewhere that you run your CI/CD from, everyone who has cloned that repo has a copy of it, and Git doesn't know or care that your hosted repo is "better" than theirs.
So if an attacker (potentially in your organization) clones your repo, makes a bunch of changes to a low-level file, uses this exploit to hash it yielding the same SHA1 as the original, then distributes their repo as a "fork" of yours, or somehow causes your hosted repo to be replaced with theirs (through social engineering or sabotage--"hey guys, the hosted repo got deleted somehow, but no worries, I restored it from my local clone"), you would have no idea anything was amiss.
The way to secure commits in Git is to use commit signatures which use GPG and have been available since 2012.
And with amazing I mean very, very concerning.
Reordering does not do anything useful - if someone is trying to MITM you and wants to force you to a lower strength cipher, they'll just advertise that they support only the weak one. Anything that you don't really trust should not be on the list.Of those, the RSA ones are ... iffy, as everything with RSA is. TLS 1.2 still used old-fashioned padding. So you're actually down to two: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.How does this effect (or does it at all) TLS cipher suites? I know SSL Labs has started marking anything with CBC as weak although scores aren't negatively impacted yet. Does this mean anything ending in SHA (1, not 384 or 256) should be disabled asap?
If so, TLS 1.2 is rapidly running out of usable suites in IIS. Omitting the CBCs, we only have TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. It doesn't look like MS is in any hurry to add TLS 1.3 support, either. Server 2019 doesn't even have it.
Thanks, I've altered my cipher suite order to put those first followed by the RSA GCM ciphers, then the CBC ciphers (ECDSA SHA384/256, then RSA SHA384/256), and disabled the SHA1 ciphers altogether.