r/TrueOpenSource • • 1d ago

Contribution: Open Data & Research Research: Turning the Speck cipher into a secure variable output hash function

Speck is a tiny cipher that can fit in just 7 lines of code, although the creators didn't have hashing in mind when they made it, we're turning it into a hash anyway. Speck is small and still hasn't been broken; we are using Davies-Meyer & Hirose's double-block-length construction to achieve 32 bytes of output at full security, but the hash allows for less or more bytes of output. Without custom SHA hardware acceleration it is slightly faster than SHA-256, with theoretically comparable amount of security.

It is called SpeckHashX, and it's CC0: https://github.com/CRYPTOSOMA/SpeckHashX

There is also a website where you can type text in and see the hash: link

There are npm and Rust packages available for anyone interested in trying it.

[Fable 5.2 assisted in the development and I put the prompts in the commits descriptions]

Who it's for: Anyone who needs a tiny new hash or likes to study.

Closest existing projects: LwHash (broken) - maruhash (broken)

What mine adds: A Speck-based hash with no known break, any output length, a full spec and open cryptanalysis.

1 Upvotes

2 comments sorted by

•

u/trueopensource-bot 🤖 Robot 1d ago

About this project · CRYPTOSOMA/SpeckHashX
⭐ 0 stars · 🍴 0 forks · 👥 1 contributor · 📄 CC0-1.0
History: started Nov 2026 · last code change yesterday · 36 commits on 11 different days in the last 90 days
Releases: none published yet

Facts from GitHub when this was posted. I'm a bot.

1

u/Individual-Flow9158 1d ago

It's an older code sir, but it checks out.