From owner-freebsd-arch@FreeBSD.ORG Fri Dec 10 09:08:04 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 6C77416A4CE; Fri, 10 Dec 2004 09:08:04 +0000 (GMT) Received: from pd4mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF0B143D72; Fri, 10 Dec 2004 09:08:03 +0000 (GMT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from pd4mr7so.prod.shaw.ca (pd4mr7so-qfe3.prod.shaw.ca [10.0.141.84])2004)) with ESMTP id <0I8I00JQU1DF5G60@l-daemon>; Fri, 10 Dec 2004 02:08:03 -0700 (MST) Received: from pn2ml7so.prod.shaw.ca ([10.0.121.151]) by pd4mr7so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I8I00CO71DF5CK0@pd4mr7so.prod.shaw.ca>; Fri, 10 Dec 2004 02:08:03 -0700 (MST) Received: from [192.168.0.60] (S0106006067227a4a.vc.shawcable.net [24.87.233.42])2003)) with ESMTP id <0I8I0097L1DE8J@l-daemon>; Fri, 10 Dec 2004 02:08:03 -0700 (MST) Date: Fri, 10 Dec 2004 01:08:02 -0800 From: Colin Percival In-reply-to: <200412100815.iBA8FTWw085726@grovel.grondar.org> To: Mark Murray Message-id: <41B96772.4010000@wadham.ox.ac.uk> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime References: <200412100815.iBA8FTWw085726@grovel.grondar.org> User-Agent: Mozilla Thunderbird 0.9 (X11/20041107) 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 09:08:04 -0000 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. Colin Percival