From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jerome Baum <jerome@jeromebaum.com>, git@vger.kernel.org
Subject: Re: Hash algorithm choice
Date: Sun, 09 Aug 2009 11:03:08 -0700 [thread overview]
Message-ID: <7vljls986b.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.2.01.0908091038300.3288@localhost.localdomain> (Linus Torvalds's message of "Sun\, 9 Aug 2009 10\:46\:25 -0700 \(PDT\)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> If youlimit the hash size to 20 bytes, there are almost no changes
> necessary.
>
> You'd need to hijack the 'SHA1_Init/SHA1_Update/SHA1_Final' functions, of
> course, and you'd likely want to rename them (and eventually a lot of
> other functions too), but that renaming is mechanical and isn't even
> needed for proper working.
>
> Now, if you would ever want to extend the _size_ of the hash, that's a
> much much bigger problem, but if you're ok with just changing the hash and
> then truncating the result to 20 bytes (ie kind of like sha-512-160), or
> you're ok with limiting yourself to 20-byte hashes like REIPMD-160, the
> size of the changes should be minimal.
Just in case Jerome really wants to go further, "almost no changes" and
"minimal" refers to the fact that we have a few hard-coded hash values
known to the code, such as the object name for an empty blob and an empty
tree.
next prev parent reply other threads:[~2009-08-09 18:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <f448a46a0908090907v68542e4dw1f1c4f610cb46ca2@mail.gmail.com>
2009-08-09 16:17 ` Hash algorithm choice Jerome Baum
2009-08-09 17:46 ` Linus Torvalds
2009-08-09 18:03 ` Junio C Hamano [this message]
2009-08-09 18:16 ` Sverre Rabbelier
2009-08-09 18:35 ` Linus Torvalds
2009-08-09 18:33 ` Linus Torvalds
2009-08-09 17:49 ` Johannes Schindelin
2009-08-09 18:44 ` Matthieu Moy
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=7vljls986b.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jerome@jeromebaum.com \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox