Thus spake "Richard Levitte - VMS Whacker" <[EMAIL PROTECTED]>
> lee_dilkie> (the other thing to remember is that CTR can be used with
> lee_dilkie> any block cipher, it's not limited to AES)
>
> Absolutely.  However, since it's currently very obviously an
> experimental field, and it was originally requested for AES, that's
> where we currently have it.  Of course, if we had general mode
> implementation instead of having them implemented with each algorithm,
> things would be easier.  Unfortunately, we get bit by performance hits
> if we do that (I think it was Steve who said he'd experimented with
> things like that some time ago).

I tested a bunch of different mode implementations, yes.  Since some
libcrypto ciphers implement the round function directly inside the mode
loops (e.g. IDEA), there is no way to generalize modes and maintain
performance.  Others, such as AES, issue a function call and could be
generalized, but the extra cost of calling a function pointer (vs a real
function) is enough to outweigh the code savings.

FWIW, the performance gains of switching from __stdcall to __fastcall is
staggering (at least on x86); that alone blows away all the experimentation
I did with MMX and SSE extensions, hand-tuned ASM, etc.  When I saw that, I
gave up on any further algorithm improvements, though I'm sure there's still
small improvements to be made here and there.

S

Stephen Sprunk         "God does not play dice."  --Albert Einstein
CCIE #3723         "God is an inveterate gambler, and He throws the
K5SSS        dice at every possible opportunity." --Stephen Hawking

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

Reply via email to