构建第一个 JPEG XL MD5 哈希quine
Constructing the Word's First JPEG XL MD5 Hash Quine

原始链接: https://stackchk.fail/blog/jxl_hashquine_writeup

## JPEG XL MD5 哈希quine 总结 本文详细介绍了创建一张显示自身 MD5 哈希值的 JPEG XL 图像——“哈希quine”的过程。该项目基于quine的概念(一种输出自身源代码的程序),利用 MD5 散列算法的弱点和 JPEG XL 格式的独特特性。 核心技术是利用诸如 `fastcoll` 之类的工具,在 MD5 中利用“相同前缀碰撞”生成具有相同哈希值但位模式不同的文件对。然后,这些位翻转被策略性地嵌入到图像的残差数据流中(这得益于修改 JPEG XL 编码器以使用简化的全字母 Huffman 编码)。 JPEG XL 的模块化模式及其可编程的“预测树”至关重要。该树用于检测来自 MD5 碰撞的位翻转,将它们组合成十六进制数字,并在图像中可见地渲染这些数字。该过程涉及创建由位翻转控制的像素值“线路”,最终显示 MD5 哈希值本身。 经过大量的编码、碰撞块放置和最终哈希值暴力破解,一个可用的 JPEG XL 哈希quine 被创建出来。作者希望该项目能鼓励在其他文件格式中探索哈希quine,突出密码学、文件格式和计算创造力之间有趣的相互作用。

相关文章

原文
Constructing The Words First JPEG XL MD5 Hash Quine writeup

You may have heard the term Quine before… It means a program which prints its own source. For example in python:

Download JPEG XL Hashquine

What In The Hash!

You have likely computed a hash before. It is a seemingly mundane string of numbers which is the result of passing the entire file through a one-way function. In a real way, this calculation can represent the soul of the file in as much as the source itself does.