## CRC Check Polynomial -> Byte presentation question

### CRC Check Polynomial -> Byte presentation question

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

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)