From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,d5991e208f8d5b5b X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,19ab04458779b99e X-Google-Attributes: gid1164f8,public From: Terje Mathisen Subject: [++] Re: Steal their thunder (was Re: Alpha window of opportunity?) Date: 1998/06/10 Message-ID: <357E3248.BFEC13E3@hda.hydro.com>#1/1 X-Deja-AN: 361287461 Content-Transfer-Encoding: 7bit References: <6l5gh1$vjc$1@piglet.cc.uic.edu> <35787CE8.51BF357E@videotron.ca> <6la6kf$ljm@crl3.crl.com> <357E265D.D42F5D98@shore.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Hydro Newsgroups: comp.arch,comp.sys.dec Russell Sasamori wrote: > > > the conclusion seems to be that 128-bits are useful for > > some multimedia stuff (AltiVec should demonstrate that), > > and some crypto work seems to be a lot faster with them. > > George: > > How would cryptography benefit from wider registers and ALU's? > I thought the most frequently performed operations were emulating LFSR's so I Using wide LFSR's is a valid way to perform "hard" crypto, and it's currently being used (AFAIK) by the Norwegian military. If you have a 128-bit LFSR, then having 128-bit registers makes it fairly simple to do the feedback, especially if you also have a popcount (or just a parity!) instruction: temp = lfsr & feedback_mask; feedback_term = parity(temp); // # define parity(x) (popcount(x) & 1) lfsr = (lfsr << 1) | feedback_term; This would generate about 3-5 instructions, depending on the cpu architecture, and a maximum throughput of about 2 cycles/iteration (due to serial dependencies). On a 500MHz cpu, this would enable up to about 30+ MB/s, still far below what a cheap FPGA should do with no (very low) host cpu overhead. It would probably be faster though to use a few tables to perform this algorithm on some number of bits simultaneously, even though you would need quite a bit of table space. The Motorola altivec in-register table lookups might be useful in this application? However, most (all?) other crypto algorithms are block algorithms, working on some number of bits in each fixed block, and 128 happens to be a very common block size currently. > cannot imagine how having a 128-bit ALU can present such a big benefit over a > 64-bit ALU, for example. (Unless the the ALU was custom-designed to do > cryptography work). It would not give any big benefit, just make it quicker to do all blockwide operations. If the algorithm is memory bandwidth limited (not too likely for hard crypto?), then having a wide memory interface to a narrover cpu would do just as well. Terje -- - Using self-discipline, see http://www.eiffel.com/discipline "almost all programming can be viewed as an exercise in caching"