{"id":28443941,"url":"https://github.com/maxirmx/tip5","last_synced_at":"2025-06-29T14:31:19.105Z","repository":{"id":280594895,"uuid":"942497218","full_name":"maxirmx/tip5","owner":"maxirmx","description":"Tip5 hash algorithm implementation in C++","archived":false,"fork":false,"pushed_at":"2025-03-25T22:16:29.000Z","size":175,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T08:09:15.063Z","etag":null,"topics":["cryptography","cxx","hash","tip5"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxirmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T07:40:51.000Z","updated_at":"2025-03-26T20:33:26.000Z","dependencies_parsed_at":"2025-03-04T09:29:13.527Z","dependency_job_id":"28c955c1-ab1f-4179-b718-e2f0a91dfb4d","html_url":"https://github.com/maxirmx/tip5","commit_stats":null,"previous_names":["maxirmx/tip5"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxirmx/tip5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxirmx%2Ftip5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxirmx%2Ftip5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxirmx%2Ftip5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxirmx%2Ftip5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxirmx","download_url":"https://codeload.github.com/maxirmx/tip5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxirmx%2Ftip5/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262608652,"owners_count":23336548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","cxx","hash","tip5"],"created_at":"2025-06-06T08:09:15.004Z","updated_at":"2025-06-29T14:31:19.057Z","avatar_url":"https://github.com/maxirmx.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build-and-test](https://github.com/maxirmx/tip5/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/maxirmx/tip5/actions/workflows/build-and-test.yml)\n[![codecov](https://codecov.io/gh/maxirmx/tip5/graph/badge.svg?token=R7ie8bhkCG)](https://codecov.io/gh/maxirmx/tip5)\n\n# tip5xx\n\nTip5 hash (https://eprint.iacr.org/2023/107) implementation in C++\n\n## Requirements\n\n### C++ Implementation\n- CMake 3.15 or higher\n- C++17 compliant compiler\n- For testing: Internet connection (to fetch Google Test and CLI11)\n\n### Rust Sample\n- Rust 1.85 or higher\n- Internet connection (to fetch dependencies)\n\n## Building\n\n### C++ Implementation\n```bash\ncmake -B build\ncmake --build build\n```\n\nTo run tests:\n```bash\ncd build \u0026\u0026 ctest --output-on-failure\n```\n\n### Rust Implementation\n```bash\ncd samples/tip5-rust\ncargo build\n```\n\n## Build Options\n\n### CMake Options\n- `BUILD_TESTING=ON/OFF`: Enable/disable building tests (default: ON)\n- `BUILD_SAMPLES=ON/OFF`: Enable/disable building sample applications (default: ON)\n- `ENABLE_COVERAGE=ON/OFF`: Enable code coverage reporting (default: OFF)\n- `ENABLE_SANITIZER=ON/OFF`: Enable Address Sanitizer (default: OFF)\n\n## Usage\n\n### As a C++ Library\n\n```cpp\n#include \u003ctip5xx/tip5xx.hpp\u003e\n\n// Create digests\ntip5xx::BFieldElement elements1[] = {\n    tip5xx::BFieldElement::new_element(1),   // decimal\n    tip5xx::BFieldElement::new_element(2),\n    tip5xx::BFieldElement::new_element(3),\n    tip5xx::BFieldElement::new_element(4),\n    tip5xx::BFieldElement::new_element(5)\n};\ntip5xx::Digest digest1(elements1);\n\ntip5xx::BFieldElement elements2[] = {\n    tip5xx::BFieldElement::new_element(0x6), // hexadecimal\n    tip5xx::BFieldElement::new_element(0x7),\n    tip5xx::BFieldElement::new_element(0x8),\n    tip5xx::BFieldElement::new_element(0x9),\n    tip5xx::BFieldElement::new_element(0xa)\n};\ntip5xx::Digest digest2(elements2);\n\n// Hash pair of digests\nauto result = tip5xx::Tip5::hash_pair(digest1, digest2);\n\n// Hash variable length array of digests\nstd::vector\u003ctip5xx::BFieldElement\u003e varlen;\nvarlen.insert(varlen.end(), digest1.begin(), digest1.end());\nvarlen.insert(varlen.end(), digest2.begin(), digest2.end());\nauto varlen_result = tip5xx::Tip5::hash_varlen(varlen);\n```\n\n### Sample Applications\n\nBoth C++ and Rust implementations provide similar command-line interfaces supporting pair and variable-length hashing modes.\n\n#### C++ Sample\n\n```bash\ncd build/samples/tip5-cpp\n\n# Pair mode with different number formats\n./tip5 \"(0x1,0x2,0x3,0x4,0x5)\" \"(0x6,0x7,0x8,0x9,0xa)\"     # hexadecimal\n./tip5 \"(1,2,3,4,5)\" \"(6,7,8,9,10)\"                         # decimal\n\n# Variable-length mode with mixed formats\n./tip5 -m varlen \"(1,2,3,4,5)\" \"(6,7,8,9,10)\" \"(11,12,13,14,15)\"\n\n# Show help and options\n./tip5 --help\n```\n\nOptions for C++ implementation:\n- `-m, --mode \u003cmode\u003e`: Hashing mode ('pair' or 'varlen')\n  - `pair`: Takes exactly 2 digests (default mode)\n  - `varlen`: Takes 2 or more digests\n- Each digest must be in format (n1,n2,n3,n4,n5) where each number can be:\n  - Hexadecimal: Numbers with 0x prefix (e.g., 0x1F)\n  - Decimal: Plain numbers (e.g., 42)\n\n#### Rust Sample\n\n```bash\ncd samples/tip5-rust\n\n# Pair mode with different number formats\ncargo run -- \"(0x1,0x2,0x3,0x4,0x5)\" \"(0x6,0x7,0x8,0x9,0xa)\"     # hexadecimal\ncargo run -- \"(1,2,3,4,5)\" \"(6,7,8,9,10)\"                         # decimal\n\n# Variable-length mode with mixed formats\ncargo run -- -m varlen \"(1,2,3,4,5)\" \"(6,7,8,9,10)\" \"(11,12,13,14,15)\"\n\n# Show help and options\ncargo run -- --help\n```\n\nOptions for Rust implementation:\n- `-m, --mode \u003cmode\u003e`: Hashing mode ('pair' or 'varlen')\n  - `pair`: Takes exactly 2 digests (default mode)\n  - `varlen`: Takes 2 or more digests\n- Each digest must be in format (n1,n2,n3,n4,n5) where each number can be:\n  - Hexadecimal: Numbers with 0x prefix (e.g., 0x1F)\n  - Decimal: Plain numbers (e.g., 42)\n\nNote: Hex format requires the 0x prefix and even number of digits.\n\n## License\n\nSee the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxirmx%2Ftip5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxirmx%2Ftip5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxirmx%2Ftip5/lists"}