is there a inverse polynomial for the CRC generator polynomial

Discussion in 'C Programming' started by Chen L., Jul 5, 2004.

  1. Chen L.

    Chen L. Guest

    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.
     
    Chen L., Jul 5, 2004
    #1
    1. Advertising

  2. Chen L.

    Jack Klein Guest

    On 4 Jul 2004 19:26:05 -0700, (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
    your code here and ask for help.

    --
    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/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Jul 5, 2004
    #2
    1. Advertising

  3. In article <> (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/
     
    Dik T. Winter, Jul 6, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jan Decaluwe

    Re: How to use easics crc generator?

    Jan Decaluwe, Jun 24, 2003, in forum: VHDL
    Replies:
    11
    Views:
    7,452
    OutputLogic
    Nov 26, 2010
  2. John Moore
    Replies:
    1
    Views:
    2,409
    Alan Coppola
    Jun 26, 2003
  3. Mamut

    crc-8 and crc-16 code...

    Mamut, Feb 21, 2007, in forum: C++
    Replies:
    5
    Views:
    4,061
    Victor Bazarov
    Feb 22, 2007
  4. `Zidane Tribal
    Replies:
    1
    Views:
    2,521
    Joe Smith
    Jul 28, 2007
  5. `Zidane Tribal
    Replies:
    3
    Views:
    259
    Sisyphus
    Jul 27, 2007
Loading...

Share This Page