Skip to content

Commit 252d639

Browse files
stuartpbben
andauthored
Update book/07-git-tools/sections/revision-selection.asc
Co-authored-by: Ben Straub <[email protected]>
1 parent 11a5199 commit 252d639

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

book/07-git-tools/sections/revision-selection.asc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,13 @@ That's 1,200 times the number of grains of sand on the earth.
8282
8383
Here's an example to give you an idea of what it would take to get a SHA-1 collision.
8484
If all 6.5 billion humans on Earth were programming, and every second, each one was producing code that was the equivalent of the entire Linux kernel history (6.5 million Git objects) and pushing it into one enormous Git repository, it would take roughly 2 years until that repository contained enough objects to have a 50% probability of a single SHA-1 object collision.
85-
Thus, a SHA-1 collision is less likely than every member of your programming team being attacked and killed by wolves in unrelated incidents on the same night.
86-
87-
That being said, with hundreds and thousands of dollars' worth of computing power dedicated to the task, https://shattered.io/[two files with the same SHA-1 hash were produced in 2017]. Git has code https://github.com/git/git/blob/master/sha1dc/sha1.c[specifically to protect against this scenario].
85+
Thus, an organic SHA-1 collision is less likely than every member of your programming team being attacked and killed by wolves in unrelated incidents on the same night.
8886
87+
[NOTE]
88+
====
89+
There have been attempts to create a synthetic collision attack, including one documented at https://shattered.io/[].
90+
Git is moving towards using SHA256 as the default hashing algorithm, which is much more resilient to collision attacks, and has code in place to help mitigate this attack (although it cannot completely eliminate it).
91+
====
8992
====
9093

9194
[[_branch_references]]

0 commit comments

Comments
 (0)