[Botan-devel] Small file ciphering speed

Jack Lloyd lloyd at randombit.net
Fri Sep 26 23:04:31 EDT 2008


On Sat, Sep 27, 2008 at 09:09:44AM +0800, Mr Diggilin wrote:
> I uninstalled the repository version of botan and recompiled and make
> installed botan 1.6.5 from source before running the following. I
> watched the compile process this time and noticed that several source
> files spit out a couple hundred warning lines each, all saying:
> "warning: integer constant is too large for 'long' type"
> 
> Could be normal, just thought I'd mention.

Yes this is normal. (It's a gcc weirdness)

> Also a little strangeness is that after make install, ./check can't find
> "libbotan-1.6.5.so". It installs to /usr/local/lib and apparently looks
> for it in /usr/lib, I copied it there manually and it worked ok.

try

$ export LD_LIBRARY_PATH=<full path to botan dir>

which will cause the dynamic linker to search that directory for
shared libs.

> I notice that twofish here is nearly three times faster, but I couldn't
> specify that it should use EAX, so I don't know how it should compare.

Yes, a deficiency of the benchmark prog (if you edit checks/algos.cpp
you can add it). Scaling as with AES-128 vs Twofish ECB, one would
expect Twofish/EAX at about 6.4 MiB/s on that machine. The numbers you
printed seem plausible, though somewhat surprisingly slow (you may
want to make sure your clock speed is actually increasing while you
are running this operation - maybe it stays throttled? I noticed in
your /proc/cpuinfo, your cores were running at 1 GHz)

> Taking note of this, I will be combining all the encrypted fields in the
> database into one and splitting them. Perhaps I will gain some speed
> like that, but that remains to be seen.

Definitely a tradeoff. It would depend on how often you sync. If you
often just want to update one record, having to reencrypt the entire
db seems pretty expensive.

-Jack



More information about the botan-devel mailing list