The invention relates to encryption and decryption of auxiliary data in the memory of a computer system. The encryption and decryption utilizes a data structure of the auxiliary data. The data structure comprises at least partially independent subunits. The auxiliary data is received into a processor unit and an encryption/decryption key associated to a subunit is provided. The encrypting/decryption of the auxiliary data is performed in a process where the encryption/decryption key is changed at boundaries between subunits, so that subunits of the auxiliary data is encrypted/decrypted using associated encryption keys. Embodiments of the invention are applicable in the field of memory encryption of audio¬ visual data (AV data).