https://github.com/voldien/naive-crc-analysis
CRC Analysis Tool - Compute the probability of collision Empirically - Validates CRC strength
https://github.com/voldien/naive-crc-analysis
analysis-algorithms checksum checksum-validator cpp17 crc crc-calculation crc32 crc8
Last synced: 3 months ago
JSON representation
CRC Analysis Tool - Compute the probability of collision Empirically - Validates CRC strength
- Host: GitHub
- URL: https://github.com/voldien/naive-crc-analysis
- Owner: voldien
- License: mit
- Created: 2021-07-08T17:18:34.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-27T08:50:22.000Z (5 months ago)
- Last Synced: 2025-02-03T18:16:42.010Z (5 months ago)
- Topics: analysis-algorithms, checksum, checksum-validator, cpp17, crc, crc-calculation, crc32, crc8
- Language: C++
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Naive CRC Analysis Tool
[](https://github.com/voldien/naive-crc-analysis/actions/workflows/cmake.yml)
[](https://GitHub.com/voldien/naive-crc-analysis/releases/)
[](https://opensource.org/licenses/MIT)A simple program to test how various CRC error detection capabilities depending on how much error is introduced. The program will create an n-number of
messages and its respective error message with n number of bit errors. Afterward, compute the CRC for both the untouched message and the error message and check if they are not equal.
Because if equal, it means a collision has occurred, which would mean that the software using the CRC think it is a valid message.## Installation
First clone the project followed by updating the git submodules used in this project, which are required in order to compile the program.
```bash
git clone
cd
git submodule update --init --recursive
```Afterward, it is as simple as follow the following commands.
```bash
mkdir build && cd build
cmake ..
make
```The executable can be located in the bin directory as *CRCAnalysis*.
## Examples
```bash
CRCAnalysis --samples=100000000 --message-data-size=256 -b 1 --crc=xor8
``````bash
CRCAnalysis --samples=100000000 --message-data-size=256 --tasks=10000 -b 2 --crc=xor8
```The support command line options can be view with the following command.
```bash
CRCAnalysis --help
```An example output can be the following.
```bash
Naive CRC Analysis
A simple program for checking error detection
Usage:
CRCAnalysis [OPTION...]-v, --version Version information
-h, --help helper information.
-c, --crc arg CRC Algorithm (default: crc8)
-p, --message-data-size arg Size of each messages in bytes. (default: 5)
-e, --error-correction Perform Error Correction.
-s, --samples arg Samples (default: 1000000)
-t, --tasks arg Task (default: 2000)
-b, --nr-of-error-bits arg Number of bits error added to each message.
(default: 1)
-f, --forever Run it forever.
-l, --show-crc-list List of support CRC and Checksum Alg
-P, --error-probability arg Probability of adding error in data package.
(default: 1)