I am trying to decrypt a file in python which was encrypted using CryptoJS(AES) in Node.js. I know there is an equivalent module in python (Pycrypto) but I don't know how to use it or which mode of AES decryption to use for decrypting the data(I have the cipher and the key but don't have any iv).
Here is the code(Node.js) which i am trying to translate to Python:
function fileEncrypt(plaintext, password){
return CryptoJS.AES.encrypt(plaintext,password).toString();
}
function fileDecrypt(ciphertext, password){
return CryptoJS.AES.decrypt(ciphertext,password).toString(CryptoJS.enc.Latin1);
}
As you can see, no iv has been passed here. Please help me translate the code to Python. Thank you in advance :)