git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Thomas Ackermann via GitGitGadget" <gitgitgadget@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Thomas Ackermann" <th.acker@arcor.de>
Subject: Re: [PATCH v2 5/6] doc hash-function-transition: move rationale upwards
Date: Tue, 02 Feb 2021 11:54:20 -0800	[thread overview]
Message-ID: <xmqqbld2gs9f.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <711a37969b6f51922c12555534d9c4634cde6021.1612282749.git.gitgitgadget@gmail.com> (Thomas Ackermann via GitGitGadget's message of "Tue, 02 Feb 2021 16:19:08 +0000")

"Thomas Ackermann via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Thomas Ackermann <th.acker@arcor.de>
>
> Move rationale for new hash function to beginning of document
> so that it appears before the concrete move to SHA-256 is described.
>
> Remove details about SHA-1 weaknesses. Instead add references
> to the details of how the new hash function was chosen.
>
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
>  .../technical/hash-function-transition.txt    | 62 +++++--------------
>  1 file changed, 16 insertions(+), 46 deletions(-)

Hmph, this might turn out to be a bit more controversial than its
worth.  I'd summon/cc a few people from the original discussion.

> -Over time some flaws in SHA-1 have been discovered by security
> -researchers. On 23 February 2017 the SHAttered attack
> -(https://shattered.io) demonstrated a practical SHA-1 hash collision.
> +Over time some flaws in SHA-1 have been discovered by security researchers.
>  
>  Git v2.13.0 and later subsequently moved to a hardened SHA-1
> -implementation by default, which isn't vulnerable to the SHAttered
> -attack.
> +implementation by default, but SHA-1 is still believed to be weak.

Even if we've hardended against one particular form of attack, we
still have incentive to switch away from SHA-1.  It is unclear why
we just do not add ", but ..." to the original and instead remove
the half-sentence about sha1dc.

> @@ -57,6 +47,19 @@ SHA-1 still possesses the other properties such as fast object lookup
>  and safe error checking, but other hash functions are equally suitable
>  that are believed to be cryptographically secure.
>  
> +Choice of Hash
> +--------------
> +There were several contenders for a successor hash to SHA-1, including
> +SHA-256, SHA-512/256, SHA-256x16, K12, and BLAKE2bp-256.
> +
> +In late 2018 the project picked SHA-256 as its successor hash.
> +
> +See 0ed8d8da374 (doc hash-function-transition: pick SHA-256 as
> +NewHash, 2018-08-04) and numerous mailing list threads at the time,
> +particularly the one starting at
> +https://lore.kernel.org/git/20180609224913.GC38834@genre.crustytoothpaste.net/
> +for more information.

I personally think this is referring too much to external document
for typical readers, and lost too much relative to the original.  I
do not mind losing the history of how we reached the conclusion that
SHA-1 is no longer viable at all, but I am not sure if we want to
lose the list of criteria we used when choosing (i.e. stronger than
SHA-1, 256-bit, quality implementations, etc.) from this section.

> -The hash to replace this hardened SHA-1 should be stronger than SHA-1
> -was: we would like it to be trustworthy and useful in practice for at
> -least 10 years.
> -
> -Some other relevant properties:
> -
> -1. A 256-bit hash (long enough to match common security practice; not
> -   excessively long to hurt performance and disk usage).
> -
> -2. High quality implementations should be widely available (e.g., in
> -   OpenSSL and Apple CommonCrypto).
> -
> -3. The hash function's properties should match Git's needs (e.g. Git
> -   requires collision and 2nd preimage resistance and does not require
> -   length extension resistance).
> -
> -4. As a tiebreaker, the hash should be fast to compute (fortunately
> -   many contenders are faster than SHA-1).

  reply	other threads:[~2021-02-02 19:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <pull.858.git.1612093734.gitgitgadget@gmail.com>
     [not found] ` <3efe3392e9de6d4446665a8e6ae5a06b86bdccae.1612093734.git.gitgitgadget@gmail.com>
2021-01-31 20:23   ` [PATCH 1/6] doc hash-function-transition: fix asciidoc output Ævar Arnfjörð Bjarmason
     [not found] ` <62ca087d4ebaa5f3a7efba6a2865e89284fcd98d.1612093734.git.gitgitgadget@gmail.com>
2021-01-31 20:24   ` [PATCH 2/6] doc hash-function-transition: use SHA-1 and SHA-256 consistently Ævar Arnfjörð Bjarmason
     [not found] ` <d4abf1cf78e2e59e49b81bd458d85848bd3d7ff3.1612093734.git.gitgitgadget@gmail.com>
2021-01-31 20:25   ` [PATCH 4/6] doc hash-function-transition: use https links consistently Ævar Arnfjörð Bjarmason
     [not found] ` <2cdb0f8e2edc4416c5dfb88722aa05be35afba7d.1612093734.git.gitgitgadget@gmail.com>
2021-01-31 20:37   ` [PATCH 5/6] doc hash-function-transition: move rationale upwards Ævar Arnfjörð Bjarmason
2021-02-02 16:19 ` [PATCH v2 0/6] doc: improvements for hash-function-transition Thomas Ackermann via GitGitGadget
2021-02-02 16:19   ` [PATCH v2 1/6] doc hash-function-transition: fix asciidoc output Thomas Ackermann via GitGitGadget
2021-02-02 16:19   ` [PATCH v2 2/6] doc hash-function-transition: use SHA-1 and SHA-256 consistently Thomas Ackermann via GitGitGadget
2021-02-02 19:39     ` Junio C Hamano
2021-02-02 23:19       ` Junio C Hamano
2021-02-02 16:19   ` [PATCH v2 3/6] doc hash-function-transition: use upper case consistently Thomas Ackermann via GitGitGadget
2021-02-02 16:19   ` [PATCH v2 4/6] doc hash-function-transition: fix incomplete sentence Thomas Ackermann via GitGitGadget
2021-02-02 16:19   ` [PATCH v2 5/6] doc hash-function-transition: move rationale upwards Thomas Ackermann via GitGitGadget
2021-02-02 19:54     ` Junio C Hamano [this message]
2021-02-02 23:23       ` brian m. carlson
2021-02-02 16:19   ` [PATCH v2 6/6] doc: use https links Thomas Ackermann via GitGitGadget
2021-02-02 19:57   ` [PATCH v2 0/6] doc: improvements for hash-function-transition Junio C Hamano
2021-02-05 18:22   ` [PATCH v3 " Thomas Ackermann via GitGitGadget
2021-02-05 18:22     ` [PATCH v3 1/6] doc hash-function-transition: fix asciidoc output Thomas Ackermann via GitGitGadget
2021-02-05 18:22     ` [PATCH v3 2/6] doc hash-function-transition: use SHA-1 and SHA-256 consistently Thomas Ackermann via GitGitGadget
2021-02-05 18:22     ` [PATCH v3 3/6] doc hash-function-transition: use upper case consistently Thomas Ackermann via GitGitGadget
2021-02-05 18:22     ` [PATCH v3 4/6] doc hash-function-transition: fix incomplete sentence Thomas Ackermann via GitGitGadget
2021-02-05 18:22     ` [PATCH v3 5/6] doc hash-function-transition: move rationale upwards Thomas Ackermann via GitGitGadget
2021-02-05 20:48       ` Ævar Arnfjörð Bjarmason
2021-02-05 21:49         ` Junio C Hamano
2021-02-05 18:22     ` [PATCH v3 6/6] doc: use https links Thomas Ackermann via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbld2gs9f.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=th.acker@arcor.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).