From owner-freebsd-hackers Sat Dec 15 9:13: 3 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail2.mediadesign.nl (md2.mediadesign.nl [212.19.205.67]) by hub.freebsd.org (Postfix) with SMTP id D036D37B41B for ; Sat, 15 Dec 2001 09:12:59 -0800 (PST) Received: (qmail 23418 invoked by uid 1002); 15 Dec 2001 17:12:53 -0000 From: "Alson van der Meulen" Date: Sat, 15 Dec 2001 18:12:53 +0100 To: freebsd-hackers@freebsd.org Subject: Re: sha1 program Message-ID: <20011215181253.U10171@md2.mediadesign.nl> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20011215062918.F74051-400000@siteintegrity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Dec 15, 2001 at 11:58:14AM +0000, Dominic Marks wrote: > On Saturday 15 December 2001 11:34 am, Mike Wiacek wrote: > > We currently have a MD5 driver, but no SHA1 driver, even though > > we have SHA1 as part of libmd. So I took md5.c from > > /usr/src/sbin/md5 and made sha1.c as well as a respective man page. > > Attached is the source file, the manual page for it, as well as a > > makefile. > > > > Hope this is useful and makes its way into the tree. Md5 has some > > questionable attacks against it, and Schneier claims that > > sha is resillient to such attacks. > > > > mike > > Why not have one program for all the supported hash algorithms as > opposed to individual ones for each (md5, sha1) ? > > You could use something like: > > > hash -a md5 /some/file > > hash -a sha1 /some/other/file It's called openssl. openssl dgst -md5 openssl dgst -sha1 ... You could write a wrapper for this, or just type the 14 extra characters ;) HTH, Alson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message