From owner-freebsd-arch@FreeBSD.ORG Fri Dec 10 13:09:11 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 F038F16A4CE; Fri, 10 Dec 2004 13:09:11 +0000 (GMT) Received: from smtpq3.home.nl (smtpq3.home.nl [213.51.128.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19B2143D48; Fri, 10 Dec 2004 13:09:11 +0000 (GMT) (envelope-from dodell@sitetronics.com) Received: from [213.51.128.135] (port=56487 helo=smtp4.home.nl) by smtpq3.home.nl with esmtp (Exim 4.30) id 1CckWE-0000FO-1w; Fri, 10 Dec 2004 14:09:10 +0100 Received: from cc740438-a.deven1.ov.home.nl ([82.75.136.183]:4445 helo=[192.168.1.42]) by smtp4.home.nl with esmtp (Exim 4.30) id 1CckWB-0000p1-10; Fri, 10 Dec 2004 14:09:07 +0100 Message-ID: <41B99FF4.2070703@sitetronics.com> Date: Fri, 10 Dec 2004 14:09:08 +0100 From: "Devon H. O'Dell" User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Murray References: <200412101014.iBAAEict086798@grovel.grondar.org> In-Reply-To: <200412101014.iBAAEict086798@grovel.grondar.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AtHome-MailScanner-Information: Please contact support@home.nl for more information X-AtHome-MailScanner: Found to be clean cc: Colin Percival 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: Fri, 10 Dec 2004 13:09:12 -0000 Mark Murray wrote: > Colin Percival writes: > >>Mark Murray wrote: >> >>>Colin Percival writes: >>> >>>>I was comparing /usr/lib/libcrypto.a (1.7 MB on my system) to the sum >>>>of the sizes of the object files built from my library code (38 kB). >>>> >>>>If you look at the number of lines of C files (counted using `wc -l` >>>>since I don't want to bother installing sloccount), my code is 1489 >>>>lines compared to openssl's 202982 lines. >>> >>>Do you have a version of your code linked against OpenSSL? What is the >>>size difference between a static link of your code vs a static link >>>against OpenSSL? >> >>I don't have a version using openssl, but my key generation program >>(statically linked against my crypto code) is 37kB, while a program >>which calls RSA_generate_key (statically linked against openssl) is >>240kB. So even under the most favourable conditions (adding overhead >>to my code but not to openssl) it's a size ratio of more than 6. > > > Hmm. > > I must profess to having a degree of discomfort with duplicated > functionality. > > 240k is not a big binary, and it sounds like your applet is one that > may get heavy use. Its not built for speed; how much of a problem is > this? If OpenSSL grows hardware BigNum support, your app will not > benefit; how will this affect the user? Is size really a concern? > I can't find a disk smaller than 10 GB at my local dealer. I use CompactFlash cards to run FreeBSD on some systems, and the smallest is 16MB. This would be a very welcomed library for such a system. A good few people are using solid-state disks for data storage in FreeBSD these days, especially those of us doing work on embedded systems. When you have several binaries linking against OpenSSL, that 240k can take up a lot of space, very quickly. > M > -- > Mark Murray > iumop ap!sdn w,I idlaH Hope I didn't sound callous; that's not my intention. Kind regards, Devon H. O'Dell