Why not to define a new hashing instead of creating a new layer for encryption? this would'nt need to develop and maintain an additional ecryption database.
I mean, if the hash of the file includes the location hash and the encryption hash, then the file can be managed with the current API. Only the ones who know the complete hash would be able to access it. But the ones who try to access the repository by other means would not be able to see anything.
I don´t know if you take it into account:
1 - ideally it should be at least optional to guarantee that nobody should be able to inspect anything in his local (or remote) IPFS storage unless he provides the IPFS address.
2- This means that the content could be encrypted by default. Otherwise privacy will be compromised.
3- encryption/decryption of the content in the storage, that addresses the previous points can be done transparently using an optional IPFS hashing which could provide symetrical transparent encryption/decription without breaking compatibility with previous versions of IPFS. IPFS admits diffenent hashigs. It is a matter of adding a new one. This hash would have a double role: for addressing and for symetric encryption/decryption
I think that hashing can/should be used no only for content addressing but also for privacy, since only the ones who know the IPFS address should be able to access it.
Am I right? can be done? is it done already?