A secure processor comprising: an instruction execution unit executing a plurality of instructions of a program; a load/store control unit controlling loading and storing of data for an external memory in response to a command from the instruction execution unit; and an encryption processing unit (43, 44) performing data encryption and data decryption of data between the load/store control unit and the external memory, wherein the instruction execution unit specifies a key to be used for data encryption or data decryption by the encryption processing unit (43, 44) in response to an instruction being executed, the instruction execution unit specifying different keys for the plurality of instructions being executed or for a plurality of intervals of the plurality of instructions being executed, and wherein the secure processor further comprises: a key storing unit (47, 48) storing multiple keys; a first route for outputting a key number to specify the key to be used for data encryption or data decryption, the instruction execution unit specifying different keys for the plurality of instructions being executed through the first route; and a second route for outputting a key number to specify the key to be used for data encryption or data decryption, the instruction execution unit specifying different keys for the plurality of intervals of the plurality of instructions being executed through the second route, wherein the instruction execution unit outputs a signal to specify one of the first route or the second route to the key storing unit, and the key storing unit gives the key to be used for data encryption or data decryption to the encryption processing unit (43, 44) in response to the key number from the specified route. an instruction execution unit executing a plurality of instructions of a program; a load/store control unit controlling loading and storing of data for an external memory in response to a command from the instruction execution unit; and an encryption processing unit (43, 44) performing data encryption and data decryption of data between the load/store control unit and the external memory, wherein the instruction execution unit specifies a key to be used for data encryption or data decryption by the encryption processing unit (43, 44) in response to an instruction being executed, the instruction execution unit specifying different keys for the plurality of instructions being executed or for a plurality of intervals of the plurality of instructions being executed, and wherein the secure processor further comprises: a key storing unit (47, 48) storing multiple keys; a first route for outputting a key number to specify the key to be used for data encryption or data decryption, the instruction execution unit specifying different keys for the plurality of instructions being executed through the first route; and a second route for outputting a key number to specify the key to be used for data encryption or data decryption, the instruction execution unit specifying different keys for the plurality of intervals of the plurality of instructions being executed through the second route, wherein the instruction execution unit outputs a signal to specify one of the first route or the second route to the key storing unit, and the key storing unit gives the key to be used for data encryption or data decryption to the encryption processing unit (43, 44) in response to the key number from the specified route. a key storing unit (47, 48) storing multiple keys; a first route for outputting a key number to specify the key to be used for data encryption or data decryption, the instruction execution unit specifying different keys for the plurality of instructions being executed through the first route; and a second route for outputting a key number to specify the key to be used for data encryption or data decryption, the instruction execution unit specifying different keys for the plurality of intervals of the plurality of instructions being executed through the second route, wherein the instruction execution unit outputs a signal to specify one of the first route or the second route to the key storing unit, and the key storing unit gives the key to be used for data encryption or data decryption to the encryption processing unit (43, 44) in response to the key number from the specified route.