473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CRC32 residue

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?

Jul 19 '07 #1
1 4219
On Thu, 19 Jul 2007 08:30:59 -0700, in comp.lang.c ,
al**********@gmail.com wrote:
>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
Jul 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ricky Romaya | last post by:
Hi, I'm working on a file upload script. I need to calculate the CRC32 of the file(s) which are successfully uploaded. How can I do this? PHP only have CRC32 function for strings. However, the...
1
by: PaullyB | last post by:
Hi, I am attempting to convert the following code written in c to equivalent java code. This is the CRC32 algorithm used by a GPS received I am interfacing with. Unfortunately, the CRC32 class...
2
by: nobody | last post by:
1) Does anyone know if the CRC32 algorithm in binascii has a name? There seem to be a TON of different CRC32 methods; different polynomials, different byte orders, different seeds, some flip the...
6
by: Weiguang Shi | last post by:
Hi there, I'm thinking of using binascii.crc32 as a hash-function when I read in the reference http://www.python.org/doc/current/lib/module-binascii.html: crc32( data) Compute CRC-32, the...
14
by: Don | last post by:
Hi NG. Does anyone know of a place where I could download/get a C implementation of a CRC32 check. I would like a simple function that, for example, had a pointer to where the data to be CRC32...
9
by: UnixUser | last post by:
I am looking for some source code to run on Linux that will enable me to calculate and return a CRC32 value from a string of text. I have found one from snippets.org, but I cannot get it to...
6
by: Paul M. | last post by:
Hello, does anyone have either a User Function Library (or the source for one) to create a CRC32 checksum for a given string? I want to use the function in a crystal formula thus: formula =...
12
by: Larry Bates | last post by:
I'm trying to get the results of binascii.crc32 to match the results of another utility that produces 32 bit unsigned CRCs. binascii.crc32 returns results in the range of -2**31-1 and 2**21-1....
2
by: tlsk | last post by:
Hi I need to calculate the crc32 value for an unsigned array in C++.It goes like this.. unsigned char Myarray; //Myarray contains hex value ... b525b4d0ad533acee2d6a214453a279e Need to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.