Skip to content

Commit 6ccf041

Browse files
pks-tgitster
authored andcommitted
BreakingChanges: document upcoming change from "sha1" to "sha256"
Starting with 8e42eb0 (doc: sha256 is no longer experimental, 2023-07-31), the "sha256" object format is no longer considered to be experimental. Furthermore, the SHA-1 hash function is actively recommended against by for example NIST and FIPS 140-2, and attacks against it are becoming more practical both due to new weaknesses (SHAppening, SHAttered, Shambles) and due to the ever-increasing computing power. It is only a matter of time before it can be considered to be broken completely. Let's plan for this event by being active instead of waiting for it to happend and announce that the default object format is going to change from "sha1" to "sha256" with Git 3.0. All major Git implementations (libgit2, JGit, go-git) support the "sha256" object format and are thus prepared for this change. The most important missing piece in the puzzle is support in forges. But while GitLab recently gained experimental support for the "sha256" object format though, to the best of my knowledge GitHub doesn't support it yet. Ideally, announcing this upcoming change will encourage forges to start building that support. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 57ec925 commit 6ccf041

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Documentation/BreakingChanges.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,36 @@ be changed to or replaced in case the alternative was implemented already.
7070

7171
=== Changes
7272

73+
* The default hash function for new repositories will be changed from "sha1"
74+
to "sha256". SHA-1 has been deprecated by NIST in 2011 and is nowadays
75+
recommended against in FIPS 140-2 and similar certifications. Furthermore,
76+
there are practical attacks on SHA-1 that weaken its cryptographic properties:
77+
+
78+
** The SHAppening (2015). The first demonstration of a practical attack
79+
against SHA-1 with 2^57 operations.
80+
** SHAttered (2017). Generation of two valid PDF files with 2^63 operations.
81+
** Birthday-Near-Collision (2019). This attack allows for chosen prefix
82+
attacks with 2^68 operations.
83+
** Shambles (2020). This attack allows for chosen prefix attacks with 2^63
84+
operations.
85+
+
86+
While we have protections in place against known attacks, it is expected
87+
that more attacks against SHA-1 will be found by future research. Paired
88+
with the ever-growing capability of hardware, it is only a matter of time
89+
before SHA-1 will be considered broken completely. We want to be prepared
90+
and will thus change the default hash algorithm to "sha256" for newly
91+
initialized repositories.
92+
+
93+
An important requirement for this change is that the ecosystem is ready to
94+
support the "sha256" object format. This includes popular Git libraries,
95+
applications and forges.
96+
+
97+
There is no plan to deprecate the "sha1" object format at this point in time.
98+
+
99+
100+
101+
<CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.
102+
73103
=== Removals
74104

75105
== Superseded features that will not be deprecated

0 commit comments

Comments
 (0)