1. A method comprises: obtaining data to store; determining whether substantially similar data to the data is stored; and when the substantially similar data is stored: encrypting the data using an encryption key of the substantially similar data in accordance with an encryption function to produce encrypted data; compressing the encrypted data in accordance with a compression function to produce compressed data; and storing the compressed data.