An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# Naive CRC Analysis Tool

[![crc-collision-anlysis](https://github.com/voldien/naive-crc-analysis/actions/workflows/cmake.yml/badge.svg)](https://github.com/voldien/naive-crc-analysis/actions/workflows/cmake.yml)
[![GitHub release](https://img.shields.io/github/release/voldien/naive-crc-analysis.svg)](https://GitHub.com/voldien/naive-crc-analysis/releases/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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)