[Botan-devel] Small file ciphering speed

Jack Lloyd lloyd at randombit.net
Fri Sep 26 14:15:49 EDT 2008

On Fri, Sep 26, 2008 at 04:46:20PM +0800, Mr Diggilin wrote:
> Missed a bit of info here...
> GCC version is 4.3-39.1, 32 bit processor.

This should be fine for Twofish, it is designed for modern 32-bit
processors. I also checked and compiled for 32-bit Pentium 4, Twofish
runs at 45 MiB/s on my 2.4 Core2 (vs 75 MiB/s compiled in 64-bit mode,
mostly due to the additional registers and better ABI on x86-64).

Scaling for lower clock speed and deducting a (IMO) conservative 40%
for uarch improvements, I would still expect you to get at least 25
MiB/s or so on this processor. I am definitely confused.

> As far as buffer vs byte, my reading from wxWidgets streams to Botan
> streams was loosely based on the >> operator for std streams to botan
> pipes. Implementation as follows:

I do not know wx* at all but this implementation seems totally
plausible, and 4K should be more than sufficient buffering for EAX to
be able to handle it well.


More information about the botan-devel mailing list