[2192] in cryptography@c2.net mail archive

home help back first fref pref prev next nref lref last post

crypto on MMX

daemon@ATHENA.MIT.EDU (Phil Karn)
Wed Feb 25 23:28:09 1998

Date: Wed, 25 Feb 1998 19:53:58 -0800 (PST)
From: Phil Karn <karn@qualcomm.com>
To: cryptography@c2.net
Cc: karn@qualcomm.com

Has anyone looked at the utility of the Intel MMX instruction set for
fast encryption implementations? Has anyone written code?

For those unfamiliar with MMX, it's a SIMD integer vector processing
add-on designed primarily for digital signal processing. It uses the
existing floating point registers, so there is no additional state to
save when task switching.

MMX uses the 64-bit floating point registers as vectors capable of
holding eight bytes, four 16-bit words or two 32-bit words. The
operations are the ones you'd find in a DSP: basic ALU plus
multiply-accumulate. There's also a "saturating arithmetic" option to
prevent wrap-around on overflow.

My own thinking is that the MMX instruction set is not particularly
well suited to DES, where most of the work is in dissecting bit
fields, shifting them around and doing many small table lookups. But
it might be quite useful in a fast IDEA implementation, where the
basic operations are arithmetic: addition, XOR and multiplication. It
might also help in the modmult primitive in most public key ciphers.

Comments?

Phil


home help back first fref pref prev next nref lref last post