help-gsasl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU SASL code size


From: Simon Josefsson
Subject: GNU SASL code size
Date: Mon, 02 Nov 2009 16:40:38 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

FYI, I wanted to see how large GNU SASL is and made some experiments.
All were on a normal 32-bit x86 debian testing laptop.

ANONYMOUS, CRAM-MD5, DIGEST-MD5, EXTERNAL, GSSAPI, LOGIN, NTLM, PLAIN,
SCRAM-SHA-1, SECURID in both client & server mode was enabled in the
first build below.  The next builds were modified with the indicated
configure flags.

CFLAGS=-O2
200K    src/.libs/libgsasl.a
116K    src/.libs/libgsasl.so.7.7.0

CFLAGS=-O2 --disable-gssapi --without-stringprep --disable-ntlm
188K    src/.libs/libgsasl.a
108K    src/.libs/libgsasl.so.7.7.0

CFLAGS=-O2 --disable-gssapi --without-stringprep --disable-ntlm 
--disable-obsolete
172K    src/.libs/libgsasl.a
92K     src/.libs/libgsasl.so.7.7.0

CFLAGS=-O2 --disable-obsolete --disable-gssapi --without-stringprep 
--disable-ntlm
172K    src/.libs/libgsasl.a
92K     src/.libs/libgsasl.so.7.7.0

CFLAGS=-O2 --disable-obsolete --disable-server --disable-gssapi 
--without-stringprep --disable-ntlm
152K    src/.libs/libgsasl.a
84K     src/.libs/libgsasl.so.7.7.0

CFLAGS=-O2 --disable-obsolete --disable-digest-md5 --disable-scram-sha1 
--disable-server --disable-gssapi --without-stringprep --disable-ntlm
100K    src/.libs/libgsasl.a
60K     src/.libs/libgsasl.so.7.7.0

CFLAGS=-O2 --disable-obsolete --disable-securid --disable-anonymous 
--disable-external --disable-login --disable-digest-md5 --disable-scram-sha1 
--disable-server --disable-gssapi --without-stringprep --disable-ntlm
88K     src/.libs/libgsasl.a
56K     src/.libs/libgsasl.so.7.7.0

CFLAGS=-Os --disable-cram-md5 --disable-obsolete --disable-securid 
--disable-anonymous --disable-external --disable-login --disable-digest-md5 
--disable-scram-sha1 --disable-server --disable-gssapi --without-stringprep 
--disable-ntlm
76K     src/.libs/libgsasl.a
44K     src/.libs/libgsasl.so.7.7.0

At this point, the object size is as follows:

address@hidden:~/src/gsasl/lib master$ ls -rSl */.libs/*.o
-rw-r--r-- 1 jas jas  693 2009-11-02 16:35 gl/.libs/memxor.o
-rw-r--r-- 1 jas jas  701 2009-11-02 16:35 src/.libs/mechname.o
-rw-r--r-- 1 jas jas  980 2009-11-02 16:35 plain/.libs/mechinfo.o
-rw-r--r-- 1 jas jas  988 2009-11-02 16:35 src/.libs/callback.o
-rw-r--r-- 1 jas jas 1024 2009-11-02 16:35 src/.libs/free.o
-rw-r--r-- 1 jas jas 1040 2009-11-02 16:35 gl/.libs/asnprintf.o
-rw-r--r-- 1 jas jas 1088 2009-11-02 16:35 src/.libs/done.o
-rw-r--r-- 1 jas jas 1120 2009-11-02 16:35 src/.libs/register.o
-rw-r--r-- 1 jas jas 1148 2009-11-02 16:35 src/.libs/saslprep.o
-rw-r--r-- 1 jas jas 1180 2009-11-02 16:35 src/.libs/version.o
-rw-r--r-- 1 jas jas 1240 2009-11-02 16:35 src/.libs/base64.o
-rw-r--r-- 1 jas jas 1248 2009-11-02 16:35 src/.libs/supportp.o
-rw-r--r-- 1 jas jas 1292 2009-11-02 16:35 src/.libs/xcode.o
-rw-r--r-- 1 jas jas 1308 2009-11-02 16:35 plain/.libs/client.o
-rw-r--r-- 1 jas jas 1356 2009-11-02 16:35 src/.libs/xstep.o
-rw-r--r-- 1 jas jas 1360 2009-11-02 16:35 src/.libs/xfinish.o
-rw-r--r-- 1 jas jas 1416 2009-11-02 16:35 src/.libs/xstart.o
-rw-r--r-- 1 jas jas 1448 2009-11-02 16:35 src/.libs/suggest.o
-rw-r--r-- 1 jas jas 1504 2009-11-02 16:35 gl/.libs/gc-pbkdf2-sha1.o
-rw-r--r-- 1 jas jas 1528 2009-11-02 16:35 gl/.libs/hmac-md5.o
-rw-r--r-- 1 jas jas 1532 2009-11-02 16:35 gl/.libs/hmac-sha1.o
-rw-r--r-- 1 jas jas 1540 2009-11-02 16:35 src/.libs/init.o
-rw-r--r-- 1 jas jas 1596 2009-11-02 16:35 src/.libs/listmech.o
-rw-r--r-- 1 jas jas 1700 2009-11-02 16:35 src/.libs/md5pwd.o
-rw-r--r-- 1 jas jas 1788 2009-11-02 16:35 src/.libs/crypto.o
-rw-r--r-- 1 jas jas 2004 2009-11-02 16:35 gl/.libs/printf-args.o
-rw-r--r-- 1 jas jas 2532 2009-11-02 16:35 src/.libs/property.o
-rw-r--r-- 1 jas jas 3376 2009-11-02 16:35 gl/.libs/base64.o
-rw-r--r-- 1 jas jas 3460 2009-11-02 16:35 gl/.libs/printf-parse.o
-rw-r--r-- 1 jas jas 3836 2009-11-02 16:35 gl/.libs/gc-gnulib.o
-rw-r--r-- 1 jas jas 4636 2009-11-02 16:35 gl/.libs/md5.o
-rw-r--r-- 1 jas jas 4940 2009-11-02 16:35 gl/.libs/vasnprintf.o
-rw-r--r-- 1 jas jas 6512 2009-11-02 16:35 src/.libs/error.o
-rw-r--r-- 1 jas jas 8316 2009-11-02 16:35 gl/.libs/sha1.o
address@hidden:~/src/gsasl/lib master$ echo `ls -rSl */.libs/*.o|awk '{print $5 
" + "}'` 0|bc -l
71430
address@hidden:~/src/gsasl/lib master$ 

SHA-1 is the largest object, and it is not even used (only SCRAM-SHA-1
needs it) but the gsasl_sha1 interface uses it.  It is normally safely
avoided.

The next largest object is error.o which contains human readable error
descriptions.  If not needed, that can be removed too.

The third largest object is vasnprintf.o (related to printf-parse.o and
printf-args) and that is the printf code pulled in from gnulib.  It
works around bugs/limitations in my system's libc printf functions.  If
you have a working libc, it is not needed.

Then is md5.o which is similar to the SHA-1 code.

Now you are down to 41K libgsasl.a archive.

gc-gnulib.o contains generic crypto wrappers.  Some of the symbols
(i.e., encryption stuff) are not needed by most auth mechs.

base64.o is a base64 encoder/decoder, which you may not need.

Also not needed are other crypto stuff like hmac-*, gc-pbkdf2-sha1.

Note that this is for x86 object code, so any other platform will have
other numbers.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]