[Botan-devel] Small file ciphering speed
mr.diggilin at gmail.com
Fri Sep 26 21:09:44 EDT 2008
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.
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.
On Fri, 2008-09-26 at 14:18 -0400, Jack Lloyd wrote:
> Can you run `make check` and then
> ./check --validate
> (just to make sure everything is OK)
"All tests passed!"
> ./check "--bench-algo=AES-128,Twofish,Serpent,SHA-160,AES-128/EAX,CMAC(AES-128)"
> (which maybe will give a hint as to what is going on)
AES-128: 15.38 Mbytes/sec
Twofish: 14.69 Mbytes/sec
Serpent: 11.19 Mbytes/sec
SHA-160: 50.31 Mbytes/sec
AES-128/EAX: 6.71 Mbytes/sec
CMAC(AES-128): 15.83 Mbytes/sec
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.
> Keep in mind that EAX does have a significant amount of fixed
> per-message overhead (in terms of dealing with the MAC computation,
> padding, etc) in addition to the normal processing, of 4 block
> encryptions (plus other function call overhead, etc). So very small
> (especially <1 block) messages take a huge cost for that, because it
> doubles or triples the total number of block cipher operations needed
> per message. (Versus even a 4 block/64 byte message, where the
> per-message overhead drops to only 1/3 of the total encryptions
> needed; at 512 bytes == 32 blocks, EAX per-message overhead is only
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.
Thanks again for your help, I'll see what I come up with
More information about the botan-devel