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: [++] Re: Steal their thunder (was Re: Alpha window of opportunity?) Date: 1998/06/11 Message-ID: <357F877C.3E4B362@hda.hydro.com>#1/1 X-Deja-AN: 361624875 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> <357E3248.BFEC13E3@hda.hydro.com> <357F7842.3A27C0C9@shore.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Hydro Newsgroups: comp.arch,comp.sys.dec Russell Sasamori wrote: > > >especially if you also have a popcount > I think Alpha has an instruction that counts the number of ones. > > > temp = lfsr & feedback_mask; > > feedback_term = parity(temp); // # define parity(x) (popcount(x) & 1) > > lfsr = (lfsr << 1) | feedback_term; > > I visualized the circuit in my head but could not figure out what > it is doing in terms of polynomial algebra. OTOH this I can understand: > > if(LFSR & 0x8000000000000000) > lfsr=(lfsr<<1)^POLYNOMIAL; > else > lfsr=(lfsr<<1); That isn't a LFSR, it is instead the traditional way to implement CRC! > >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. > > I agree. Cryptography is one of the fields where you can get a lot > of mileage out of building a dedicated hardware. > > >The Motorola altivec in-register > What is altivec? Motorola's 128-bit wide (extended) MMX/VIS style vector processing extension. > >However, most (all?) other crypto algorithms are block algorithms, > What do you mean by block? > Do you mean as in "block error correcting code" where the elements > of the group are a^1, a^2, ... a^n? No, as in the algorithm is defined as working on BLOCK bits simultaneously, i.e. using IDEA you have to pad the input data until it is a multiple of 128 bits long. Similarly, DES works on 64-bit blocks, by doing 16 iterations of data-dependent bit permuations within that block, before going on to the next 64-bit block. A LFSR can work one bit at a time, and every bit is dependent upon all preceeding bits. Terje -- - Using self-discipline, see http://www.eiffel.com/discipline "almost all programming can be viewed as an exercise in caching"