Re: Two questions about USB CRC



Let's go back to the first topic.
As you say, the shift register is preloaded with
0s and then encode 00000000 00000000 000000001,
the same answer is got as encoding 00000001.

But even if the shift register is preloaded
with 1s and then encode
00000000 00000000 00000000 00000000 000000001,
the same answer is got as encoding 000000001,
because the period of the CRC5 shift register
(x^5+x^2+1) is 32.

Are you sure? Have you tried it? I've not tried it,
I don't have time just now, but the word "because"
in that sentence I think is not warranted. Every
time you shift out a one you XOR the magic polynomial
code. That does not necessarily mean that after 32
shifts you again end up with all ones.

But regardless, there are only a limited number of
bits in the CRC, and if you allow any input, some
inputs will generate the same CRC. You can only
protect against small changes in inputs of similar
size. For the context of USB this is all you need.
.



Relevant Pages

  • Re: Two questions about USB CRC
    ... at the end could have the same encoding results. ... You don't compute the CRC of only the payload and then ... If on transmission there are trailing 0s (after the ... the shift register is preloaded with 0s ...
    (sci.math)
  • Re: Two questions about USB CRC
    ... the same answer is got as encoding 00000001. ... with 1s and then encode ... because the period of the CRC5 shift register ... inputs will generate the same CRC. ...
    (sci.math)
  • Re: CRC Polynomial
    ... >> are LSB): does anyone know why? ... The output of the shift register becomes the ... > serial bit sequence transmitted onto the LAN. ... Sending the CRC from MSB ...
    (comp.dcom.lans.ethernet)
  • Re: Fast CRC calculations
    ... Fastest is by a hardware shift register, clock and XOR gates, by far the ... All CRCs' of a specific code length are computationally equivalent using ... You are missing some factors, code length, word length, CRC length. ...
    (sci.math)
  • CRC hardware vs software implementation!!
    ... I want to compare between CRC in hardware(using shift register & ... X-OR's) and software(ploynomial & checksum) implementation by giving an ...
    (comp.lang.verilog)

Quantcast