#rarctf2021 ''' Base-3 AES Just use SAGE lmao ''' T_SIZE = 3 # Fixed trits in a tryte W_SIZE = 3 # Fixed trytes in a word (determines size of matrix) POLY = (2, 0, 1, 1) # Len = T_SIZE + 1 POLY2 = ((2, 0, 1), (1, 2, 0), (0, 2, 1), (2, 0, 1)) # Len = W_SIZE + 1 CONS = ((1, 2, 0), (2, 0, 1), (1, 1, 1)…