SHA-3 hash
Loading...
Searching...
No Matches
SHA-3 hash

High-performance implementation of SHA-3 hashing according to the FIPS 202 standard


๐Ÿ“ฆ Installation

Clone the repository:

git clone https://github.com/gdaneek/sha-3.git

Build the project using CMake:

mkdir build
cd build
cmake ..
cmake --build .

After building, the executables will be located in the build/ directory.


๐Ÿ› ๏ธ Program Usage

There are two ways to compute SHA-3 hashes:

1. Mode-Specific Executables

Use files named sha3_<mode> (where <mode> = 224, 256, 384, or 512) to compute the hash:

sha3_256 file.txt

This command computes the SHA-3 hash of file.txt using the 256-bit mode.


2. Unified Executable

Use the main executable sha3 and specify the mode as a command-line argument:

sha3 512 file.txt

This computes the SHA-3 hash of file.txt using the 512-bit mode.

‍Versions with the chunked_ prefix use an alternative file processing method, but produce the same results


๐Ÿง‘โ€๐Ÿ’ป Development

The implementation is provided as a C++ header-only library. To use it:

  1. Include the header file in your project:
#include "sha3.hpp"
Implementation of SHA-3 hash algo (all modes - 224, 384, 256 and 512)
  1. Make sure the compiler knows the path to the include/ directory of this repository.

๐Ÿ“š Explore usage examples and the programmer's guide for more information.


๐Ÿ“„ Documentation

Read the full documentation online at GitHub Pages.

Alternatively, generate the documentation locally with Doxygen:

doxygen doc/Doxyfile

The generated documentation will be available in the doc/code/ subfolder.


๐Ÿงช Benchmark

See **Manual benchmark** for performance testing instructions or results of automatic CI/CD benchmarking below

Github Actions benchmarking

‍Runs on ubuntu latest


๐Ÿ“œ License

Distributed under the MIT License. See [LICENSE](LICENSE) for details.