Reputation: 123
I have a quick question with reference to pycrypto AES encryption. Suppose I use the accepted answer to the Encrypt & Decrypt using PyCrypto AES 256, and I have my passphrase to AES encryptor > 16 bytes(my block size), will the data be truncated or will it still be encrypted. Please shed some light. Thank you.
Upvotes: 0
Views: 162
Reputation: 1311
I’m not sure, but you should not use the password directly as input to AES. Instead, run your password through a key derivation function like scrypt, bcrypt, or PBKDF2 and use that as your AES key. See my comment regarding KDFs.
Upvotes: 1