Skip to content

maxirmx/tip5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build-and-test codecov

tip5xx

Tip5 hash (https://eprint.iacr.org/2023/107) implementation in C++

Requirements

  • CMake 3.15 or higher
  • C++17 compliant compiler
  • For testing: Internet connection (to fetch Google Test)

Building

cmake -B build
cmake --build build

To run tests:

cd build && ctest --output-on-failure

Build Options

  • BUILD_TESTING=ON/OFF: Enable/disable building tests (default: ON)
  • BUILD_SAMPLES=ON/OFF: Enable/disable building sample applications (default: ON)

Usage

As a Library

#include <tip5xx/tip5xx.hpp>

tip5xx::Tip5 processor;
processor.process("your input");
auto result = processor.result();

Sample Application

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.

License

See the LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

About

Tip5 hash algorithm implementation in C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published