CRC Check Polynomial -> Byte presentation question

CRC Check Polynomial -> Byte presentation question

Post by suzz » Tue, 18 Apr 2000 04:00:00



I have a check polynomial following:
p(x) = (x^16 + x^15 + X^2 + 1)`(X^16 + X^2 + x + 1)

( ` is dot however I can't express it in agent)

How can I convert it as DWORD form? (like 0xEDB88320...)

suzz


 
 
 

1. Need Help Dertermining Polynomial for CRC....IF this is a CRC

After much consideration Chris J. decided to share these wise words:

Sadly you posted multiple copies to different groups, at least sci.crypt
& comp.compression - where I'm cross-posting this reply.

For this kind of problem it usually helps if you say what type of device
you are communicating with.  The actual make & model wouldn't hurt
either.

I've got a little brute force tool too.  (I've done this before!  ;-) )

I have a method that works for all the example messages you posted.

CRC polynomial = 0x11021  

1. Initialise CRC to 0xffff

2. XOR data byte into *HIGH* byte of CRC

   so for data 0x49 the CRC is now b6ff

3. for a count of 8 (bits)
        if (CRC & 0x8000)
                CRC = (CRC << 1) XOR 0x1021
        else
                CRC = (CRC << 1)

4. repeat from 3 for all data bytes

5. You get the message CRC, in this case 0x4164

Hope this helps!

Tony
--
  "Enough of the James T. Kirk chit-chat", John Crichton. (Farscape)

2. New Mitsumi & DAK CD-ROM Drivers

3. >>>>> How can I check for a key pressed from my window?????????

4. Generic Conversion Package

5. Creating a macro to update a new row for a chart

6. Q: CRC-64 (or larger) generator polynomials?

7. New Win 2000 Server on a NT4 Domain

8. Need polynomial for CRC-128

9. CRC-32 Generator polynomials

10. seeking an 8-bit CRC polynomial

11. WANTED: 32-bit CRC polynomial/algorithm/source code

12. NEWBIE question : What is the length for efficient CRC checking ?