1. A method comprising: obtaining a program record to an execution environment comprised in an electronic device, said program record comprising at least executable computer program code; computing a confidentiality key of at least part of said program record and a unique device secret specific to said electronic device; using at least the confidentiality key, decrypting first state information associated with said executable computer program code, said first state information associated with said executable computer program code prior to execution of said executable computer program code; using at least said decrypted first state information, performing said execution of said executable computer program code to produce second state information and an output data element; and using at least the confidentiality key, encrypting said second state information associated with said executed computer program code.