Brute-forcing CRC parameters
C++ Roff Perl CMake Shell
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit behind nitram2342:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
tests Merge branch 'master' of in… Apr 11, 2017
.travis.yml Travis does not like boost-timer, removed for now. Can do a manual in… Sep 10, 2016
CMakeLists.txt added 'install' target Apr 10, 2017
LICENSE_1_0.txt minimal fix Apr 11, 2017
ThreadPool.h Merge branch 'master' of in… Apr 11, 2017
bruteforce-crc.hpp version info added Apr 11, 2017
crc.hpp comment adjusted Mar 16, 2017 Supprt to define search space - will enable jobs to be split across m… Sep 11, 2016

These files are part of a CRC parameter brute-forcing tool. Please have a look at

Author: Martin Schobert


This code is published under the Boost Software Licence.


  • Cmake
  • Boost
    • boost_program_options
    • boost_system
    • boost_regex
    • boost_thread

$ sudo apt-get install cmake libboost-program-options-dev libboost-system-dev libboost-regex-dev
libboost-thread-dev libboost-test-dev libboost-filesystem-dev


> cmake .

Check for errors and install missing dependencies.

> make

Build bruteforce-crc and ./bin/test*

> make test

Run tests (can take a long time)


in general, you may use the bruteforcer from the directory where you compiled the code. If you like to install the bruteforcer into your system, you may run the 'install' target:

> sudo make install


Minimum input:

./bruteforce-crc --file [filename] --width [crc-width] --offs-crc [offset to start of crc] --start [start of data] --end [end of data]

Input file is an ASCII representation of a binary string, for example:


In this example the CRC is 10 bits long and starts at bit 49:


The command line for this example would be:

./buteforce-crc --file data.txt --width 10 --offs-crc 49 --start 0 --end 49

Options List [* Required]:

  --file arg                   * File containing messages
  --width arg                  * CRC width
  --offs-crc arg               * CRC's offset
  --start arg                  * Calculate CRC from this offset
  --end arg                    * Calculate CRC up to this offset (not included)
  --output arg                 Output file for matched crc settings
  --verbose arg                Enable verbose output
  --poly arg                   Truncated polynomial (default: bruteforced)
  --poly-start arg             Start of polynomial search space (default: 0)
  --poly-end arg               End of polynomial search space (default (2^width - 1))
  --threads arg                Number of threads (default: 4)
  --initial arg                Set intial value (default: 0)
  --probe-initial arg          Bruteforce the intial, overrides initial (default: true)
  --final-xor arg              Final xor (default: 0)
  --probe-final-xor arg        Bruteforce the final-xor, overrides final-xor (default: false)
  --probe-reflected-input arg  Probe for reflect input (default: false)
  --probe-reflected-output arg Probe for reflect remainder output (default: false)