Constructing the Word's First JPEG XL MD5 Hash Quine

https://news.ycombinator.com/rss Hits: 10
Summary

Constructing The Word’s First JPEG XL MD5 Hash Quine You may have heard the term Quine before… It means a program which prints its own source. For example in python: $ cat quine.py s='s=%r;print(s%%s)';print(s%s) $ python3 quine.py s='s=%r;print(s%%s)';print(s%s) A sort of self-referential fractal poetry… the output of the program is itself… However a Hash Quine takes this a step further. Rather than printing its own source, the Hash Quine prints or displays its own Hash, a cryptographic trace of its own identity. By the end of this post, you will learn how I created the following image, which displays its own MD5 Hash! Here it is now: $ md5sum shark_hashquine.jxl c0dec0007b5246f7428936d9bed2f446 shark_hashquine.jxl JPEG XL Image Which Displays Its Own MD5 Hash NOTE: Your browser does not support JPEG XL! If you want to verify the hash, either try a browser that does (safari), or download the .jxl file The image above is a PNG render which does not have the same MD5 properties 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. $ md5sum ./my-cool-file.pdf 6cef0cf6194efa36cb5be483ce87bd3b my-cool-file.pdf Now the fun thing about a hash is you can do it to any file, anything at all! So by making a Quine print its own hash we open up the Quine Cinematic Universe (QCU) to all other file formats. By doing so we also learn new mediums with entirely different computational paradigms. After all, what is an image other than a program which runs inside of a graphic codec runtime… So, to learn more, let’s create an image which can display its own MD5 Hash! How Can It Be Possible? Finding a fixed point where the file displays its own hash sounds impossible! You can imagine that every time you change the file to display one ha...

First seen: 2025-12-09 14:29

Last seen: 2025-12-09 23:31