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
# Pure python AES128 implementation | |
# SciresM, 2017 | |
from struct import unpack as up, pack as pk | |
def sxor(s1, s2): | |
'''Xors two strings.''' | |
assert(len(s1) == len(s2)) | |
return ''.join([chr(ord(x) ^ ord(y)) for x,y in zip(s1, s2)]) | |
class AESCBC: |