Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 2004 15:18:21 -0500
From:      David Schultz <das@FreeBSD.ORG>
To:        Colin Percival <colin.percival@wadham.ox.ac.uk>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Adding standalone RSA code
Message-ID:  <20041211201821.GA37211@VARK.MIT.EDU>
In-Reply-To: <41BA702C.3010909@wadham.ox.ac.uk>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041211201821.GA37211>