I use PyCrypto to store some files in a SQLITE database.
I use 4 fields:
file name, file
length (in bytes) the
SHA512 hash of the file is an
encrypted file (with AES, and then from base64 to ASCII).
I need all the fields to display some information about the file without decrypting it.
Question: Is it safe to store such data?
For example, the first characters of a ZIP file or executable file are always the same, and if you already know the hash and file length ... is it possible to decrypt the file, perhaps partially?
If it is not protected, how can I store some file information in order to index files without decrypting them? (information like length, hash, name, tags, etc.)
(I use python, but you can give examples in any language)
source
share