Subject: Re: Java is really convenient. Re: Sun thinks about switching Java to S-expression syntax: Lava
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/02/20
Newsgroups: comp.lang.lisp
Message-ID: <7ambi2$76js4@fido.engr.sgi.com>
Raymond Toy  <toy@rtp.ericsson.se> wrote:
+---------------
| Doing GF(2) arithmetic is easy as Duane's code shows.  In fact rather
| than doing the mods, you could just use logxor and logand to implement 
| + and *.
| 
| GF(256) arithmetic is quite a bit different.  You can't use modulo
| arithmetic on integers.  You have to manipulate polynomials whose
| coefficients are from GF(2).  You can, represent the polynomials as
| bit-vectors or integers, however.
+---------------

If you represent them as integers, then you can use table-lookups for
multiplication & division [to multiply, look up the "logs" of the numbers,
add them mod 256, then look up the anti-log of the sum -- and you can even
avoid the "mod 256" if you make the anti-log table be 512 entries long],
and addition/subtraction is still just XOR.

So GF(256) can be done reasonably fast, even without 64 KB lookup tables...


-Rob

-----
Rob Warnock, 8L-855		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: 650-964-0811
Mountain View, CA  94043	PP-ASEL-IA