This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from chall import AlternatingMatrixProductCryptosystem | |
| from random import SystemRandom | |
| from hashlib import sha256 | |
| from itertools import product | |
| from Crypto.Cipher import AES | |
| from sage.all import matrix, ZZ, Zmod, randint, prod, log, GF, block_matrix, vector | |
| from tqdm import tqdm | |
| # Break AlternatingMatrixProductCryptosystem of https://eprint.iacr.org/2023/1745.pdf |