unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: "Jeffrey C. Ollie" <jeff@ocjtech.us>,
	Not Much Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] Use libgcrypt for hashing.
Date: Fri, 27 Nov 2009 22:22:01 -0800	[thread overview]
Message-ID: <87zl67rwxi.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <1259378883-9181-1-git-send-email-jeff@ocjtech.us>

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

On Fri, 27 Nov 2009 21:28:03 -0600, "Jeffrey C. Ollie" <jeff@ocjtech.us> wrote:
> Instead of including a private implementation of the SHA1 hash, use
> libgcrypt.  This means less code of our own to maintain and it will be
> easier to switch to a different hash function like SHA256.

I don't believe we have a significant code-maintenance burden with
libsha1.c. And as for different hash functions, the only use of sha-1 in
notmuch is as a fallback in the case of a message not including a
Message-ID header.

So I don't see it as important at all to try to remove this code.

> libgcrypt was chosen because it has a fairly simple API, it's well
> tested (it's used in gnutls and gnupg2), and it's licensed under the
> LGPL.

What might make more sense is an option to compile against an existing
library (if present) but not to introduce an error in the build if the
library is not present, (in which case just build the builtin libsha1.c
code).

But if that wouldn't solve the problem you were trying to solve, (to
actually remove libsha1.c), then maybe we don't need to do anything for
now?

-Carl

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2009-11-28  6:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-28  3:28 [PATCH] Use libgcrypt for hashing Jeffrey C. Ollie
2009-11-28  3:31 ` Mikhail Gusarov
2009-11-28  3:59   ` Ingmar Vanhassel
2009-11-28  5:43     ` Jeffrey Ollie
2009-11-28  5:52       ` Alexander Botero-Lowry
2009-11-28  5:41   ` Jeffrey Ollie
2009-11-28  6:43     ` Carl Worth
2009-11-28  7:38       ` Jeffrey Ollie
2009-11-28  6:23   ` Carl Worth
2009-11-28  6:22 ` Carl Worth [this message]
2010-01-08 20:43   ` micah anderson
2010-01-14 22:16     ` Carl Worth

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87zl67rwxi.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=jeff@ocjtech.us \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).