nullcon2023-chall-bmpass

AES-ECB bitmap encryption challenge for NullCon 2023 Berlin
git clone https://git.sinitax.com/sinitax/nullcon2023-chall-bmpass
Log | Files | Refs | sfeed.txt

encrypt.py (284B)


      1#!/usr/bin/env python3
      2
      3from Crypto.Cipher import AES
      4import os, sys
      5
      6img_in = open(sys.argv[1], "rb").read()
      7img_in += b'\00' * (16 - (len(img_in) % 16))
      8cipher = AES.new(os.urandom(16), AES.MODE_ECB)
      9img_out = cipher.encrypt(img_in)
     10open(sys.argv[1] + ".enc", "wb+").write(img_out)