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
 bitvectors or integers, however.
+
If you represent them as integers, then you can use tablelookups for
multiplication & division [to multiply, look up the "logs" of the numbers,
add them mod 256, then look up the antilog of the sum  and you can even
avoid the "mod 256" if you make the antilog 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, 8L855 rpw3@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 6509331673
2011 N. Shoreline Blvd. FAX: 6509640811
Mountain View, CA 94043 PPASELIA