Wireshark mailing list archives

Re: Calculating CRC5 of 11-bit data


From: Tomasz Moń <desowin () gmail com>
Date: Sat, 20 Jul 2019 05:43:03 +0200

On Sat, Jul 20, 2019 at 2:01 AM Ross Jacobs <rossbjacobs () gmail com> 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).
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: