Patent ID: 8601285

Claim:
A method comprising: obtaining a program code to a first electronic device; splitting said program code to at least two first program code pieces; providing a first program code piece to a second electronic device, said first program code piece being one of said at least two first program code pieces; receiving a message authentication code computed from said first program code piece in said second electronic device, wherein said message authentication code comprises a first authenticated program code piece, said first authenticated program code piece comprising said first program code piece and said message authentication code; detecting a need to execute said program code in said first electronic device; providing said first authenticated program code piece to said second electronic device; verifying said message authentication code from said first authenticated program code piece in order to allow the execution of said first program code piece in said second electronic device; computing a program hash code using said at least two first program code pieces; computing a storage key from a device secret associated with said second electronic device and said program hash code; computing authentication data from a memory entry using said storage key in said first electronic device; associating said memory entry with said authentication data in said first electronic device; storing said memory entry and said authentication data to said first electronic device; obtaining said memory entry and said authentication data to said second electronic device; verifying said authentication data with said second electronic device; and providing said memory entry to a second program code piece to be executed in said second electronic device, said second program code piece being one of said at least two first program code pieces.