From owner-freebsd-arch@FreeBSD.ORG Sat Dec 11 20:19:12 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B275516A4CE for ; Sat, 11 Dec 2004 20:19:12 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 632E343D2F for ; Sat, 11 Dec 2004 20:19:12 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.13.1) with ESMTP id iBBKILqg037350; Sat, 11 Dec 2004 15:18:21 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.13.1/Submit) id iBBKILjD037349; Sat, 11 Dec 2004 15:18:21 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sat, 11 Dec 2004 15:18:21 -0500 From: David Schultz To: Colin Percival Message-ID: <20041211201821.GA37211@VARK.MIT.EDU> Mail-Followup-To: Colin Percival , freebsd-arch@FreeBSD.ORG References: <41B92CF3.2090302@wadham.ox.ac.uk> <20041211020518.GA74718@dragon.nuxi.com> <41BA6BDE.5070909@wadham.ox.ac.uk> <20041211035012.GB93068@dragon.nuxi.com> <41BA702C.3010909@wadham.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41BA702C.3010909@wadham.ox.ac.uk> cc: freebsd-arch@FreeBSD.ORG Subject: Re: Adding standalone RSA code X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2004 20:19:12 -0000 On Fri, Dec 10, 2004, Colin Percival wrote: > David O'Brien wrote: > >In other words, rather than create an RSA library that your code links > >against, just build .o's and list the .c's in your FreeBSD Update's > >Makefile. That way you can use this RSA code that you want to, but it > >isn't exposed as a consumable library in FreeBSD's {,/usr}/lib. > > Ah, now I understand. FreeBSD Update is a shell script, so I'd still need > to add an rsa-verify program into /usr/sbin, but I'm quite happy to have > it statically link my RSA code rather than installing a separate library, > if that's what people would prefer. Honestly, I thought that people would > complain if I did it that way. I think keeping the library ``private'' is a better way to do it. Despite OpenSSL's size, it is better documented, widely deployed, and somewhat more difficult for third parties to misuse. For instance, as we discussed privately, your RSA encryption routine is insecure unless the caller appropriately preprocesses the input with a random pad, and the documentation doesn't seem to mention this caveat. I'm sure *you* know how to use your library securely, but it could be dangerous to someone else. That said, it still puzzles me that you don't want to use OpenSSL's rsautl. FreeBSD users are *already* in trouble if there's a flaw in OpenSSL. If we have two cryptographic libraries, then people are in trouble if there's a bug in OpenSSL *or* there's a bug in your library. I understand that you are frustrated with OpenSSL, but it isn't clear that this is a battle you can win, short of reimplementing all of OpenSSL's functionality.