From owner-cvs-all@FreeBSD.ORG Wed Mar 9 20:22:31 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1010F16A4CE; Wed, 9 Mar 2005 20:22:31 +0000 (GMT) Received: from saturn.criticalmagic.com (saturn.criticalmagic.com [64.74.124.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCFBB43D31; Wed, 9 Mar 2005 20:22:30 +0000 (GMT) (envelope-from rcoleman@criticalmagic.com) Received: from [10.40.30.162] (delta.ciphertrust.com [216.235.158.34]) by saturn.criticalmagic.com (Postfix) with ESMTP id 279F13BD10; Wed, 9 Mar 2005 15:22:30 -0500 (EST) Message-ID: <422F5B36.5090400@criticalmagic.com> Date: Wed, 09 Mar 2005 15:23:18 -0500 From: Richard Coleman Organization: Critical Magic User-Agent: Mozilla Thunderbird 1.0 (X11/20041230) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Colin Percival References: <200503091923.j29JN4Ti063868@repoman.freebsd.org> <422F50A6.907@criticalmagic.com> <422F55C6.3000207@freebsd.org> In-Reply-To: <422F55C6.3000207@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libmd Makefile sha256.3 sha256.h sha256c.c shadriver.c src/sbin/md5 Makefile md5.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 20:22:31 -0000 Colin Percival wrote: >>Is there a reason that there are multiple versions of >>md5/sha1/sha256/etc in the source tree? > > As far as I could tell, we didn't have sha256 in the tree until I added > it. As for md5 and sha1, it's useful to have a minimalist libmd for > applications which don't require the bloated monst^W^W^W OpenSSL, and > these are small enough that a bit of duplication really doesn't matter. There are versions of sha256, sha384, and sha512 in sys/crypto/sha2. I know that both the /dev/random code and (I think) GBDE are using those versions. But I understand what you are saying about openssl being so large. But openssl seems to be the only place in the tree that has assembly language versions of those routines. It's too bad there is not an easy way to leverage these versions everywhere. I understand that these hashes are relatively small (although sha256/512 is much bigger than md5), so this duplication is not a big deal. But I suspect that the next generation of hashes will be much more complicated. Now that sha1 is busted, there should be a flurry of new hashes in the next year. Just a random thought. But I'm glad to see sha256 added to libmd anyways. It may be useful to add sha384 and sha512 as well. Richard Coleman rcoleman@criticalmagic.com