Patent ID: 7890769

Claim:
A method for secure code downloading, comprising: (a) receiving, via a bus, a host command in a security processor from a host processor, wherein the host processor, the security processor and the bus are part of a system on a chip in a set-top box, the host command having a data structure that is independent of command type and number of operations, wherein the security processor swizzles a one-time programmable key stored in the security processor and uses the swizzled one-time programmable key to decrypt an encrypted loading key of the received command, wherein the security processor uses a key signature of the received command, the decrypted loading key and the swizzled one-time programmable key to verify the decrypted loading key before loading into the security processor; (b) loading the decrypted loading key based on the received command; (c) configuring the security processor with a selected scrambling type and a selected signature type based on the received command, wherein the security processor outputs a status command of a status of the configuring of the security processor; and (d) processing incoming code using the loaded key and the configured security processor.