Is CRC32 additive?
问题 On several places I've read that crc32 is additive and so: CRC(A xor B) = CRC(A) xor CRC(B). The above statement was disproven by the following code I wrote: import zlib def crc32(data): return zlib.crc32(data) & 0xffffffff print crc32(chr(ord("A") ^ ord("B"))) print crc32("A") ^ crc32("B") Program output: 1259060791 2567524794 Could someone provide a proper code proving this theory or point me where I've failed? 回答1: CRC is additive in the mathematical sense since the CRC hash is just a