Tip5 hash (https://eprint.iacr.org/2023/107) implementation in C++
- CMake 3.15 or higher
- C++17 compliant compiler
- For testing: Internet connection (to fetch Google Test)
cmake -B build
cmake --build build
To run tests:
cd build && ctest --output-on-failure
BUILD_TESTING=ON/OFF
: Enable/disable building tests (default: ON)BUILD_SAMPLES=ON/OFF
: Enable/disable building sample applications (default: ON)
#include <tip5xx/tip5xx.hpp>
tip5xx::Tip5 processor;
processor.process("your input");
auto result = processor.result();
The sample application supports both pair and variable-length hashing modes:
# Pair mode with different number formats
./build/samples/tip5xx_sample 0x1EADB75F 0xC7FEBAB9 # hexadecimal (0x prefix)
./build/samples/tip5xx_sample 16909060 84281096 # decimal
./build/samples/tip5xx_sample 0100402404 0502060710 # octal (0 prefix)
# Variable-length mode with mixed formats
./build/samples/tip5xx_sample -m varlen 0x1EADB75F 16909060 0502060710
# Show help and options
./build/samples/tip5xx_sample --help
Options:
-m, --mode <mode>
: Hashing mode ('pair' or 'varlen')pair
: Takes exactly 2 numbers (default mode)varlen
: Takes 2 or more numbers
- Input values support multiple formats:
- Hexadecimal: Numbers with 0x prefix (e.g., 0x1EADB75F)
- Decimal: Plain numbers (e.g., 16909060)
- Octal: Numbers with leading 0 (e.g., 0100402404)
Note: Hex format requires the 0x prefix and even number of digits.
See the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request