From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4226 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: [Feature Request] SHA-1 HMAC Date: Thu, 14 Nov 2013 00:30:43 -0600 Message-ID: <1384410643.1974.269@driftwood> References: <20131025160006.GL20515@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1384410653 13306 80.91.229.3 (14 Nov 2013 06:30:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Nov 2013 06:30:53 +0000 (UTC) Cc: musl@lists.openwall.com To: musl@lists.openwall.com Original-X-From: musl-return-4230-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 14 07:31:00 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VgqSB-0006bv-MW for gllmg-musl@plane.gmane.org; Thu, 14 Nov 2013 07:30:59 +0100 Original-Received: (qmail 5208 invoked by uid 550); 14 Nov 2013 06:30:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5200 invoked from network); 14 Nov 2013 06:30:57 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:subject:to:cc:in-reply-to:message-id :mime-version:content-type:content-disposition :content-transfer-encoding; bh=CzFFCIGJS9H/nNb25upnIlS1rtG1QdMFQB+HU2OGChQ=; b=KZzTYB5aTWj4PbMg+VGit86Oqoh4+k6t37qspsf97mwFKIWON8fDPxDVRkoYD6fB5+ ZciYiwYmCJQS1R+XSr/gB4E9qZ0g90w3xusZrocpDw4AzUByvWNwrnSAz7N+cDihPRAO VkBNUJPAq9FF1yrwSZyPRtTKkbn7cqVkDFq2sk5kpj98hvdvw09oKUnqYmhuK7epuOnL H6UzZI59kbX+nSKKvPqMH/pZ/qyFo9XxyETDWWYsq4JY8psEAKk4sQg0WTqURNPIpHdG jS3mTTIKYoXc67pgC8T6RHZcKLXLz3CBOwgt8NL5W3PwEhFeyVBJh/GpTboqwL/YL49S zIDA== X-Gm-Message-State: ALoCoQl34Iyhk7ymrUF3X881P0sJdx+9J0BMZxupxhXDi5qpX+3FRS639pDx7Gsf5r16aYDKfwJN X-Received: by 10.60.98.69 with SMTP id eg5mr33348281oeb.42.1384410644869; Wed, 13 Nov 2013 22:30:44 -0800 (PST) In-Reply-To: <20131025160006.GL20515@brightrain.aerifal.cx> (from dalias@aerifal.cx on Fri Oct 25 11:00:06 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:4226 Archived-At: On 10/25/2013 11:00:06 AM, Rich Felker wrote: > It sounds like what you're asking for is the addition of a new > interface with no existing precedent, in which case, libc is really > not the appropriate place for it. However, I think you can implement > SHA-1 in just a few lines of code and include it with your project > rather than depending on large libraries. Busybox has a very light, > simple implementation you could copy; it's under GPLv2, but the code > is by Rob Landley and I imagine he would relicense it under BSD/MIT > for you if you need a less restrictive license. The original code it > was based on was public domain, so you could also just go back to > that. See libbb/hash_md5_sha.c in the Busybox source for details. I'm way way behind on email, but the toybox implementation of md5/sha1 =20 is essentially public domain (BSD license without any "copy this =20 license into your derivatives" clause). I've been pushing code into =20 busybox for years, but I wrote this is the first place for toybox, and =20 they replaced their old version with mine because mine's simpler, and =20 implements both sha1 and md5sum in the same file: http://landley.net/hg/toybox/file/tip/toys/lsb/md5sum.c FYI. (And if you didn't have the reply-to: header in the list, the original =20 poster would have been cc'd on my reply all. Oh well.) Rob=