A method comprising: responsive to a write request: receiving, in a memory protection logic of a processor, unencrypted data from a core of the processor, encrypting the unencrypted data according to a data dependent encryption mode to generate encrypted data, generating an integrity value based on the encrypted data, encrypting the integrity value with a first key to obtain an encrypted integrity value, and sending the encrypted data, and the encrypted integrity value to be stored in association with the encrypted data, to a memory; responsive to a read request: obtaining, in the memory protection logic of a processor, the encrypted data and the associated encrypted integrity value from the memory and decrypting the encrypted data according to the data dependent decryption mode to obtain decrypted data, generating a validation integrity value based on the encrypted data, decrypting the encrypted integrity value with the first key, and providing the decrypted data to a destination based on a comparison of the decrypted integrity value and the validation integrity value, and if said comparison results in a mismatch, reporting an integrity violation and not providing the decrypted data to the destination; characterised by during a re-keying operation: decrypting the encrypted integrity value with the first key to obtain the first integrity value, and encrypting the first integrity value with a second key to obtain a new encrypted integrity value, wherein for the re-keying, the first integrity value is obtained from the memory by the memory protection logic, while the encrypted data is to remain in the memory. responsive to a write request: receiving, in a memory protection logic of a processor, unencrypted data from a core of the processor, encrypting the unencrypted data according to a data dependent encryption mode to generate encrypted data, generating an integrity value based on the encrypted data, encrypting the integrity value with a first key to obtain an encrypted integrity value, and sending the encrypted data, and the encrypted integrity value to be stored in association with the encrypted data, to a memory; receiving, in a memory protection logic of a processor, unencrypted data from a core of the processor, encrypting the unencrypted data according to a data dependent encryption mode to generate encrypted data, generating an integrity value based on the encrypted data, encrypting the integrity value with a first key to obtain an encrypted integrity value, and sending the encrypted data, and the encrypted integrity value to be stored in association with the encrypted data, to a memory; responsive to a read request: obtaining, in the memory protection logic of a processor, the encrypted data and the associated encrypted integrity value from the memory and decrypting the encrypted data according to the data dependent decryption mode to obtain decrypted data, generating a validation integrity value based on the encrypted data, decrypting the encrypted integrity value with the first key, and providing the decrypted data to a destination based on a comparison of the decrypted integrity value and the validation integrity value, and if said comparison results in a mismatch, reporting an integrity violation and not providing the decrypted data to the destination; characterised by during a re-keying operation: decrypting the encrypted integrity value with the first key to obtain the first integrity value, and encrypting the first integrity value with a second key to obtain a new encrypted integrity value, wherein for the re-keying, the first integrity value is obtained from the memory by the memory protection logic, while the encrypted data is to remain in the memory. obtaining, in the memory protection logic of a processor, the encrypted data and the associated encrypted integrity value from the memory and decrypting the encrypted data according to the data dependent decryption mode to obtain decrypted data, generating a validation integrity value based on the encrypted data, decrypting the encrypted integrity value with the first key, and providing the decrypted data to a destination based on a comparison of the decrypted integrity value and the validation integrity value, and if said comparison results in a mismatch, reporting an integrity violation and not providing the decrypted data to the destination; characterised by during a re-keying operation: decrypting the encrypted integrity value with the first key to obtain the first integrity value, and encrypting the first integrity value with a second key to obtain a new encrypted integrity value, wherein for the re-keying, the first integrity value is obtained from the memory by the memory protection logic, while the encrypted data is to remain in the memory. decrypting the encrypted integrity value with the first key to obtain the first integrity value, and encrypting the first integrity value with a second key to obtain a new encrypted integrity value, wherein for the re-keying, the first integrity value is obtained from the memory by the memory protection logic, while the encrypted data is to remain in the memory.