Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Calculating CRC5 of 11-bit data

From: Tomasz Moń <desowin@xxxxxxxxx>
Date: Sun, 21 Jul 2019 07:37:48 +0200
On Sat, Jul 20, 2019 at 8:42 PM John Sullivan <jsethdev@xxxxxxxxxxxxxx> wrote:
> One of the properties of LFSRs is that a 1 bit in the input toggles a
> completely predictable set of register bits *at any point in the
> future*. This isn't often useful for most CRC caculations on variable
> sized input, as the cost of working out which those bits are vastly
> outweighs most other methods.

This is very interesting property! Thanks John!

> But here we have a fixed 11 bit input

I am sorry, but I have completely missed out there there are two
places where CRC5 is calculated:
* In SETUP, OUT, IN, PING and SOF the CRC5 is calculated on 11 bits
* In SPLIT the CRC5 is calculated on 19 bits

> static const char ival = 0x08;

This looks like swapped bit order to me. The CRC5 value for 11-bits of
0 is 0x02.