Skip to content

Instantly share code, notes, and snippets.

@rfl890
Last active August 24, 2024 13:37
Show Gist options
  • Save rfl890/044a0ef53072814bad97f9bd93d5ec62 to your computer and use it in GitHub Desktop.
Save rfl890/044a0ef53072814bad97f9bd93d5ec62 to your computer and use it in GitHub Desktop.
Shell one-liner to display the weakness of AES-ECB
# requires ffmpeg and curl
curl https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/864px-Tux.svg.png | ffmpeg -i - -c:v ppm -f image2 - | tail -c +17 | openssl enc -e -aes-256-ecb -K d38b38a2dd476e045c299e8ee5d6466834456d97bd592a71746b423a6a05f386 | head -c -16 | cat <(printf "P6\n864 1024\n255\n") - | ffmpeg -i - -c:v png -f image2 - | ffplay -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment