1. A method, comprising: generating a first secret key for a first data of an ordered list of data read or to be written by an electronic device; for each data of the list, following the first data, generating a distinct secret key based on a deterministic function; applying a cryptographic operation to each data read or to be written of the list based on the secret key generated for the data, wherein the deterministic function is applied to a secret key generated for a previous data of the list and at least one of: the previous data; and a result of application of the cryptographic operation to the previous data; comparing a result of application of the cryptographic operation to a last data of the ordered list to a reference data; and selectively causing the electronic device to enter an error state based on the comparison.