i'm working on an opensource project, A generator for static (html/js), password protected photo galleries. The generator AES 256 encrypts many images with the same key in PyCrypto, and decrypt them with CryptoJS. That's what my prototype does so far:
General
- AES 256 mode=CBC, padding=Pkcs7
- Encrypt many images with the same salted password
- an unique iv for every image
- store the unencrypted salt and the unencrypted iv with every encrypted image
- store the plain sha1 of the unencrypted image with the encrypted image
Password
- salt = 16 random bytes from Random()
- aes_key = PBKDF2(dkLen=32, count=1000, salt=salt) of the user selected password
- The user can select the password. ATM the only requirement is: min 8 chars.
IV
iv = 16 random bytes from Random()
Do you think this procedure is ok for my use case? If so, can someone review my python code to encrypt the images? (I'll provide the code on github if general procedure is ok)
Thank you very much for help and have a nice day, Boerni