crcmod 1.7

CRC generator
crcmod is a Python module for creating functions computing the Cyclic Redundancy Check (CRC). Any generating polynomial producing 8, 16, 24, 32, or 64 bit CRCs is allowed. Generated functions can be used in Python or C/C++ source code can be generated.

Note: Includes version for Python 3.x

Note: If you are simply looking for something to compute a strong checksum (typically referred to as a message digest) over some data, I strongly suggest you use the md5 module. As shown in the timing study included in this package, the MD5 algorithm has about the same performance as a 32-bit CRC generated with this module. In addition, MD5 is a cryptographically strong message digest. As discussed in RFC 1321, the probability of having the same digest for two data sets is 2^-64 which is the same as a 64-bit CRC. A CRC can be fooled into generating the same value by simply adding any multiple of the generator polynomial to the original message. This is very difficult to do with the MD5 algorithm.

Main features:

  • Create Python functions for computing the CRC. If the optional extension module is installed, the calculations are preformed using fast C code.
  • Create instances of the Crc class that support the interface used by the md5 and sha modules in the Python standard library.
  • Generate C/C++ code that can be incorporated in another project.
  • Any generator polynomial producing 8, 16, 24, 32, or 64 bit CRCs is allowed.
  • Forward and bit-reverse algorithms are supported.

last updated on:
June 27th, 2010, 20:13 GMT
developed by:
Ray Buvel
license type:
MIT/X Consortium License 
ROOT \ Utilities


In a hurry? Add it to your Download Basket!

user rating



What's New in version 1.6
  • Added XOR out feature to allow creation of standard CRC algorithms
  • Added a database of pre-defined CRC algorithms
read full changelog

Add your review!