I'm wondering if the following system would be a secure way to store frequently duplicated files.
- Hash the source file, deterministically derive a key from it.
- The source file(s) are likely to be high entropy (PDFs, archives of multiple files etc)
- Use that key to encrypt the source file.
- Upload that encrypted file to any public network.
- If the files are "encrypted", the storage provider does not have to be trusted.
To access/share the files, the address of the encrypted file and the source hash would need to be shared. The advantage I'm going for here is even if two people have the same source file (which is likely in my use case), it would only have to be stored once, saving storage costs.
My question from a storage provider's standpoint; Is this system secure? (assuming good hash and key derivation functions are used)
Edit: I'm not concerned about the key changing since the storage will primarily be content addressed (IPFS like) and is for long term storage rather than regular updates.