CRC32 residue

A

alivingstone

I'm working on an implementation of the CRC-32 algorithm
(poly=0x04C11DB7). I've got it working to the point where my results
match that of the website

http://www.zorc.breitbandkatze.de/crc.html

and my "check" string (ASCII "123456789") matches the result given in
Ross William's infamous paper

http://www.ross.net/crc/download/crc_v3.txt

My question is that I've read a few places that if the CRC is attached
to the original message and run through the CRC generator, the result
should be equal to a fixed value --- the 'residue'. For the CRC-32
implementation, I've found multiple places that this value should be
0xC704DD7B.

When I calculate a CRC for an arbitrary message using the web tool and
attach that result to the end of the original message and recalculate,
the result never comes out to the expected residue.

Example: using the first link, I leave all the settings alone and
input %31%32%33%34%35%36%37%38%39 in the data sequence window. The
result comes out as 0xCBF43926 (what Williams predicted). So then I
add the CRC to the end of the data sequence, leaving
%31%32%33%34%35%36%37%38%39%CB%F4%39%26. Both my program and the web
script return 0x3CC9742C.

What gives?
 
M

Mark McIntyre

On Thu, 19 Jul 2007 08:30:59 -0700, in comp.lang.c ,
I'm working on an implementation of the CRC-32 algorithm
(poly=0x04C11DB7). I've got it working to the point where my results
match that of the website

You're asking this in the wrong place. This is an algorithms question
not a C language one, and you probably want to ask in
comp.programming.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top