logoalt Hacker News

kmm • today at 8:21 PM • 0 replies • view on HN

No, it might look like a collision or even pre-image attack, but it really isn't. It hinges on the idea of quine, a program which reproduces its own source (obviously without just reading the contents from the file it's running from). The interesting part here is that the AI (ab)used the HEIC decoder to run computations.

Just for fun, here's a Python program that prints the md5 hash of its own source code

  ~> cat md5quine.py
  from hashlib import md5; c = b'from hashlib import md5; c = %r; print(md5(c %% c).hexdigest())'; print(md5(c % c).hexdigest())
  ~> md5sum md5quine.py
  ccccf89ddfe2bbca3298fa3b908324fd  quine.py
  ~> python md5quine.py
  ccccf89ddfe2bbca3298fa3b908324fd