Wireshark-dev: Re: [Wireshark-dev] Calculating CRC5 of 11-bit data
From: Tomasz Moń <desowin@xxxxxxxxx>
Date: Sat, 20 Jul 2019 05:43:03 +0200
On Sat, Jul 20, 2019 at 2:01 AM Ross Jacobs <rossbjacobs@xxxxxxxxx> wrote:
> My vote is for table lookup along a one-byte boundary as all of the existing CRC checkers in /wsutil currently use one. Notice how in our CRC16 and CRC32 implementations, we bitshift by 8 and 24 respectively. It should be possible to compute any CRC along a one-byte boundary. This article goes over how to implement non-CRC8 algorithms to do just that with a table lookup.
>
> PyCRC was used to generate Wireshark's CRC6, CRC7, and CRC11 algorithms. You may want to take a look at it and see if it can help here. In this case, width=5 and poly=0x05 (assuming CRC5/USB found here).

I understand that the *one-byte boundary* refers to the input data.
And thus it applies only to the second approach I have mentioned (to
compute CRC on the message and messages' CRC5 = 2 bytes).