> -----Original Message-----
> From: Andy Polyakov [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 17, 2001 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Rijndael patch

> But in either case I really fail to see how the
> proposed implementation will be much faster than the one 
> already present

Performance aside for the moment, how about ease of maintenance?
I could be wrong here, but it seems that the new implementation
is quite a bit more readable and understandable (and thus
maintainable).  Also, there is the addition of support for OFB
and CFB.

> > Perhaps, I'll produce some actual numbers using OpenSSL and
> > both implementations to prove my case.
> 
> Note and respect that OpenSSL is cross-platform toolkit 
> meaning that we might face and resolve a trade-off.

Totally understood. OpenSSL should work well on all the
platforms it supports.  If compromise is necessary however,
shouldn't OpenSSL be tuned to the platform that is in (by
far) the widest use?

> If either src or dst are misaligned code bombs with bus error on all
> platforms, but IA-32. Well, it doesn't bomb on Alpha which handles
> misaligned access in trap handler, but as it's trap, the performance
> goes below any reasonable value which makes you wish badly it was
> aligned.

OK, the alignment issue should definitely be addressed.
32-bit accesses and manipulation (xors) greatly improve
the performance of the code over byte-wise access.  (SSE
accesses of 128-bit chunks do even better and that is
part of the reason the code is structured as it is)

It would be sad to limit the performance of the code
in the off case that unaligned data is used.  For the
block oriented modes, at least, I suspect the data is
almost always going to be 32-bit aligned.

There is however a compromise.  Alignment detection
would be easy to do, and then either the aligned or
unaligned code could be executed.  Would the development
team be willing to accept (correct) code that did this?

Given the likelihood that in the future AES will be
ubiquitous, I think this work is definitely worthwhile.
I for one would love to see OpenSSL have the fastest
(portable) AES implementation available.

-Andy
 

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to