Turning the HEIC decoder into a SHA-256 computer

(irisc2.com)

18 points | by luispa 4 days ago ago

4 comments

  • Ohentis 21 hours ago ago

    I'm by no means an AI hater, but this was a little much.

  • openasocket 21 hours ago ago

    It’s been a while since I’ve studied crypto, but doesn’t the fact that you can do this intrinsically imply a weakness in SHA-256?

    • kmm 20 hours ago ago

      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
    • cowlevel 21 hours ago ago

      No, it only means you can write a quine in HEIC.