mercredi 7 janvier 2015

Deduplication: Encrypting the SHA-256 hash of a file chunk



I'm designing a data storage system that should be both able to deduplicate data that share the same encryption key, and be reasonably secure.


I know that this kind of encryption quality can be achieved by using AES in CTR mode with a synthetic IV derived from the HMAC of the file chunk - so that the contents are both deterministic and encrypted.


While thinking about this problem, however, it seems to me that a good way to allow data deduplication is to encrypt the SHA-256 of the unencrypted file, and use that as a key to determine if the contents are the same.


This seems simpler for a variety of reasons - the first being that it's cheaper to check if a file chunk already exists on the server; The other is that while the SHA-256 encryption should still be deterministic, the actual chunk contents' encryption don't have to be. This also allows me to compress the file contents before sending it.


Are there any down sides or known attacks for this cryptographic approach?





Aucun commentaire:

Enregistrer un commentaire