#bcactf2 #!/usr/bin/env python3 import random import math import time import binascii import secrets from Crypto.Cipher import AES from Crypto.Hash import SHA from Crypto.Util.Padding import pad, unpad with open("flag.txt", "r") as f: flag = f.read().strip().encode("ascii") with open("key.txt", "r")…