Skip to content

feat(cipher): add Snefru hash function (Merkle, 1990, S-box-based compression, direct historical link before the Tiger/MD lineage) - #996

Draft
Aakif-Kohari wants to merge 1 commit into
csxark:mainfrom
Aakif-Kohari:feat/cipher-snefru
Draft

feat(cipher): add Snefru hash function (Merkle, 1990, S-box-based compression, direct historical link before the Tiger/MD lineage)#996
Aakif-Kohari wants to merge 1 commit into
csxark:mainfrom
Aakif-Kohari:feat/cipher-snefru

Conversation

@Aakif-Kohari

Copy link
Copy Markdown
Contributor

Pull Request

Description

Adds a complete, step-instrumented visualizer for Snefru, Ralph Merkle's 1990 hash design. This implementation uses 4 large generated S-boxes and exposes configurable passes and output length, mirroring the configuration pattern established by HAVAL.


Related Issue

Closes #985


Type of Change

  • Bug Fix
  • New Feature
  • Documentation
  • UI/UX Improvement
  • Refactoring
  • Performance Improvement
  • Accessibility

Changes Made

  • Created lib/cipher/hash/snefru.ts with generated 256x32-bit S-boxes and configurable compression
  • Created tests/unit/hash/snefru.test.ts verifying multi-configuration support
  • Added snefru to CipherName union in lib/cipher/types.ts
  • Registered snefru in lib/cipher/registry.ts with configurable options
  • Added lazy-import dispatch case in lib/workers/cipher.worker.ts

Testing

  • Tested locally
  • No console errors
  • Existing functionality works as expected

Checklist

  • My code follows the project guidelines.
  • I have tested my changes.
  • I have updated the documentation if required.
  • My changes address the related issue.
  • This PR focuses on a single issue.

Additional Notes

Snefru is Merkle's own hash design, complementing the already-present merkle-hellman.ts. It shares the configuration-exposure pattern (passes/outputBits) with HAVAL.

Note

Please Merge after 03:15 PM IST (GMT +5:30) 11 August.
Please ensure PR has ECSoC26 Tag before merge.

…pression, direct historical link before the Tiger/MD lineage)
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

@Aakif-Kohari is attempting to deploy a commit to the csxark's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 05de8fa4-0c86-4a29-b81e-2ce0319d6157

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Thank You for Your Contribution

Hello @Aakif-Kohari,

Thank you for submitting a Pull Request to CryptoViz. We appreciate the time and effort you've invested in contributing to the project.

Your Pull Request has been received successfully and will be reviewed by the maintainers as soon as possible.

📋 Pull Request Checklist

  • ✅ Linked the related issue
  • ✅ No merge conflicts
  • ✅ Synced with the latest main branch
  • ✅ Build passes successfully
  • ✅ All tests pass

Ensuring these requirements are met helps streamline the review process and enables maintainers to review your contribution more efficiently.

❤️ Support CryptoViz

If you find CryptoViz helpful, consider supporting the project by:

  • ⭐ Starring the repository
  • 🍴 Forking the repository
  • 👤 Following Ark on GitHub
  • 💼 Connecting on LinkedIn
  • 🌐 Visiting the Portfolio

Your support helps increase the project's visibility and encourages continued development. Thank you for being a part of the CryptoViz community!

Thank you once again for contributing to CryptoViz. We appreciate your support and look forward to reviewing your contribution.

@Aakif-Kohari

Copy link
Copy Markdown
Contributor Author

Note

Please Merge after 03:15 PM IST (GMT +5:30) 11 August.
Please ensure PR has ECSoC26 Tag before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Snefru hash function (Merkle, 1990, S-box-based compression, direct historical link before the Tiger/MD lineage)

1 participant