All of lore.kernel.org
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC PATCH 0/2] alternate hash test
Date: Sun, 28 Jan 2018 19:16:06 +0000	[thread overview]
Message-ID: <20180128191605.GI431130@genre.crustytoothpaste.net> (raw)
In-Reply-To: <CACBZZX4TRuPV8j9XV=8gAMirQNTpEJBO8bmE9KBnnmoJ7b_m1g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

On Sun, Jan 28, 2018 at 07:58:10PM +0100, Ævar Arnfjörð Bjarmason wrote:
> On Sun, Jan 28, 2018 at 6:06 PM, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> If the goal is to smoke out hardcoded SHA1s in tests, isn't it easier
> to instrument SHA-1 (e.g. our blk_sha1 copy, or our wrappers) to
> pretend that whenever we ask for the hash for STRING to pretend we
> asked for SOME_PREFIX + STRING?
> 
> Such an approach would have the advantage of being more portable
> (easier to run these mock test), and also that if we ever move to
> NewHash we could still test for this, we'd just always set the prefix
> to compilation time(), and could thus guarantee that the hashes would
> change every time git was built.

That's certainly a possibility.  We could simply call the update
function from the init function and prepend a NUL byte or something like
that, which would definitely produce different results.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]

  reply	other threads:[~2018-01-28 19:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 17:06 [RFC PATCH 0/2] alternate hash test brian m. carlson
2018-01-28 17:06 ` [RFC PATCH 1/2] Base test implementation for short BLAKE2b support brian m. carlson
2018-01-28 17:06 ` [RFC PATCH 2/2] Switch default hash algorithm to short BLAKE2b for testing brian m. carlson
2018-01-28 18:32 ` [RFC PATCH 0/2] alternate hash test SZEDER Gábor
2018-01-28 18:58 ` Ævar Arnfjörð Bjarmason
2018-01-28 19:16   ` brian m. carlson [this message]
2018-01-30 21:09 ` Junio C Hamano
2018-01-31  1:04 ` Stefan Beller
2018-02-01  1:25   ` brian m. carlson

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=20180128191605.GI431130@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.