[2200] in cryptography@c2.net mail archive

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

Re: crypto on MMX

daemon@ATHENA.MIT.EDU (Mike Rosing)
Thu Feb 26 11:59:16 1998

Date: Thu, 26 Feb 1998 09:25:51 -0600 (CST)
From: Mike Rosing <cryptech@Mcs.Net>
cc: cryptography@c2.net
In-Reply-To: <199802260353.TAA13011@servo.qualcomm.com>


On Wed, 25 Feb 1998, Phil Karn wrote:

> 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?
> 

Why such expensive processors?  Lots of cheap processors will give you
more bang for the buck.  A good comparison is $/MIPS.  I think you'll
find that the $20 integer DSP's will give you more over all thruput.
For example, shifting is implemented as hardware on all DSP's and the
shift time is independent of the number of bits to shift.  On the Intel
or PowerPC chips the shift time is dependent on the number of bits. So
yes, the expensive chips are faster per clock, but they do less per clock
too.  

Plus, DSP's are already designed to be put into multiprocessing
environments.  The DSP's are $0.25/MIPs, the MMX is over $1/MIP and
is hard to work with.  For a real demonstration, I think cheaper makes
a more powerful point.

Patience, persistence, truth,
Dr. mike



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