1 unstable release
0.1.0 | Apr 22, 2022 |
---|
#1768 in Cryptography
8KB
133 lines
compute crcs using the ccitt polynomial efficiently without tables
P(x) = x16 + x12 + x**5 + 1
MSB polynomial: 0x8810 MSB polynomial (with explicit 1): 0x1021
https://users.ece.cmu.edu/~koopman/crc/c16/0x8810.txt
The method used is described in a few places:
- Greg Cook provides some commented 6502 asm
- Jon Buller describes how to determine it through automated symbolic calculation and provides some 8051 asm
- adapted by others into C
- the same method is used in avr-libc's
_crc_ccitt_update
function.