Claus-Justus Heine (claus@momo.math.rwth-aachen.de)
18 Jun 1998 15:07:25 +0200
Claus-Justus Heine <claus@momo.math.rwth-aachen.de> writes:
> Claus-Justus Heine <claus@momo.math.rwth-aachen.de> writes:
>
> > Mmmh. Well. Actually: it should work to use gzip's way of computing
> > things, and then multiply the resulting CRC by x^15 and take the
> > remainder mod x^16.
>
> The three lines above are complete nonsense. I'm sorry.
Ok, next attempt. Of course, reverting the order of powers in a
polynomial ring IS an isomorphism. And the connection between the two
point of views (i.e. LSB is the highest power of x <-> MSB is the
highest power of x) w.r.t. to computing a CRC sum really is only a
matter of reverting the order of bits. I.e. a generating polynomial
0x1021 (that is x^0 + x^5 + x^12 + x^16) where the LSB corresponds to
the coefficient of x^0, generates the same CRC values as the bit
reverted polynomial 0x8408 (which also is x^0 + x^5 + x^12 + x^16),
only that the order of bits in the resulting CRC sums is reverted
(w.r.t. to the other point of view).
The included sample program below computes both case for some 32 byte
sample input streams.
Compile with gcc -o crc crc.c
and run with
crc 0x8408
or
crc reverse 0x1021
to get the result the bpck tape drive uses.
Cheers
Claus
Claus-Justus Heine
claus@momo.math.rwth-aachen.de
http://www-math.math.rwth-aachen.de/~LBFM/claus
PGP Public Key:
http://www-math.math.rwth-aachen.de/~LBFM/claus/claus-public-key.asc
Ftape - the Linux Floppy Tape Project
WWW : http://www-math.math.rwth-aachen.de/~LBFM/claus/ftape
Mailing-list: linux-tape@vger.rutgers.edu
This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:52 EST