cbc-mode

AES get different results by using the same key and iv to encrypt the same plaintext repeatedly

AES get different results by using the same key and iv to encrypt the same plaintext repeatedly Question: Here is my code: from Crypto.Cipher import AES import binascii def encrypt(secret_key, sign, raw): key = md5(secret_key).hexdigest()[::-2] iv = md5(sign).hexdigest()[::-2] raw += (16 – len(raw) % 16) * ” generator = AES.new(key, AES.MODE_CBC, IV=iv) #*********************************************** #Problems occur …

Total answers: 1