Velocity Reviews > is there a inverse polynomial for the CRC generator polynomial

is there a inverse polynomial for the CRC generator polynomial

Chen L.
Guest
Posts: n/a

 07-05-2004
Hi all,

If I have a 32-bit data M, and the CRC genrator polynomial G(x),which
power is 32, then I can get the CRC checkword R by the following
algorithm:
X^32*M(x) = Q(x)G(x) + R(x),
But how is the inversed process, if I have get the R(x), is there a
inverse polynomial to generator the M(x)?

Another example is that I have a 32-bit data sequence D0,D1,D2,D3,
with the G(x), I can get the CRC checkword. If have known the
D1,D2,D3,CRC, how to define D0, if the quotient Q(x) could be defined
by some way.

Thanks a lot.

Chen L.

Jack Klein
Guest
Posts: n/a

 07-05-2004
On 4 Jul 2004 19:26:05 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Chen L.) wrote in
comp.lang.c:

> Hi all,
>
> If I have a 32-bit data M, and the CRC genrator polynomial G(x),which
> power is 32, then I can get the CRC checkword R by the following
> algorithm:
> X^32*M(x) = Q(x)G(x) + R(x),
> But how is the inversed process, if I have get the R(x), is there a
> inverse polynomial to generator the M(x)?
>
> Another example is that I have a 32-bit data sequence D0,D1,D2,D3,
> with the G(x), I can get the CRC checkword. If have known the
> D1,D2,D3,CRC, how to define D0, if the quotient Q(x) could be defined
> by some way.
>
>
> Thanks a lot.
>
> Chen L.

First your question has nothing at all to do with the C language, in
fact does not even mention it at all. You are asking about an
algorithm, for which you should try news:comp.programming. Off the
top of my head, I am not sure what you want to do is possible or not.

Once you have selected an algorithm, assuming there is one that can do
what you want, if you have trouble implementing it in standard C, post

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html

Dik T. Winter
Guest
Posts: n/a

 07-06-2004
In article <(E-Mail Removed) > (E-Mail Removed) (Chen L.) writes:
> If I have a 32-bit data M, and the CRC genrator polynomial G(x),which
> power is 32, then I can get the CRC checkword R by the following
> algorithm:
> X^32*M(x) = Q(x)G(x) + R(x),
> But how is the inversed process, if I have get the R(x), is there a
> inverse polynomial to generator the M(x)?

Not a C question, but a mathematics question. And the answer is, off-hand,
yes. Set x = 2, we get the equation 2^32.M = Q.G + R, with known G and R.
Or more simple, Q.G = -R mod (2^32). Because of the choice of G, it is
invertable in the ring mod (2^32), and so we get a solution for Q, and
also of M. So find the inverse of G mod (2^32) and you are done.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/