Hi, after installing 7zip on my Win7 x64 computer, I noticed that I now have CRC-32 and CRC-64 available to check files with. I would like to use these at work but I need to verify them against known CRC programs and files. Does any one know what the following parameters are that are used in each of these programs? Thanks, Jonathan
Polynominal
Initial CRC value
Type of algorithm, Direct no augmented zero bits or augmented zero bits
Value xor'd with final CRC value
Are data bytes reflected before processing (UART) or not
Is CRC reflected before final Xor
Is the data/msg stream reversed or not before processing
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, after installing 7zip on my Win7 x64 computer, I noticed that I now have CRC-32 and CRC-64 available to check files with. I would like to use these at work but I need to verify them against known CRC programs and files. Does any one know what the following parameters are that are used in each of these programs? Thanks, Jonathan
CRC-32 - same as ZIP, Gzip, xz.
CRC-64 - same as xz utils (wikipedia writes that it's ECMA-182).
So you can check any details in source code of zip/gzip/7z/xz.
And you can check exact digest values with sofware 7-Zip / xz utils / gzip / info-zip.
The CRC-64 parameters 7-Zip is using isn't ECMA - as per https://reveng.sourceforge.io/crc-catalogue/17plus.htm#crc.cat.crc-64-xz that misidentification often happens and it's actually the XZ variant. The CRC-32 parameters 7-Zip is using are the same as used by PKZIP and XZ - as per https://reveng.sourceforge.io/crc-catalogue/17plus.htm#crc.cat.crc-32-iso-hdlc the variant is also named ISO-HDLC.
I've been struggling with that too, as the correct CRC-64/ECMA-182 produces different results. https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Polynomial_representations_of_cyclic_redundancy_checks only distinguishes by polynomials as parameter, not others. And nobody corrects it, although the reference of https://en.wikipedia.org/wiki/XZ_Utils does not mention anything about CRC at all. But https://tukaani.org/xz/xz-file-format.txt clearly shows in its code that the initialization is
0xFFFFffffFFFFffff
, so it can't be ECMA.