[Botan-devel] Small file ciphering speed
mr.diggilin at gmail.com
Fri Sep 26 04:46:20 EDT 2008
On Thu, 2008-09-25 at 13:20 -0400, Jack Lloyd wrote:
> > Note that that speed
> > is measuring nothing but start_msg() to end_msg().
> > As for raw cipher speed not including initialization in this case...
> > Encryption: 671 ms
> > Decrypt/compare: 701 ms
> > A bit of calculation guesstimates that at a bit less than 1mbps.
> Are you buffering inputs to Pipe? Byte-at-a-time vs page-at-a-time can
> easily cause an order of magnitude difference.
> Also: is this processor 32 or 64 bit? Which version of GCC are you
> using? Can you send the contents of /proc/cpuinfo?
Missed a bit of info here...
GCC version is 4.3-39.1, 32 bit processor.
I will note clearly here that 1mbps is the speed I estimated that got
when I ran your test case. I no longer believe this to be accurate, I
probably didn't get the right number of bytes of input. As you can see
in my previous letter, it's about 2 megabytes per second.
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:
wxInputStream& operator>>(wxInputStream& stream, Pipe& pipe)
//using the botan buffer size of, if I recall, 4096 bytes
int StreamLength = stream.GetSize() - stream.TellI();
while(StreamLength > 0)
StreamLength -= stream.LastRead();
More information about the botan-devel