US 12,405,796 B2
Method for fetching encrypted instructions, decoding and executing decrypted instructions, and comparing instruction signatures to ensure execution integrity
Thomas Chamelot, Grenoble (FR); Damien Courousse, Grenoble (FR); and Karine Heydemann, Paris (FR)
Assigned to Commissariat ál'Energie Atomique et aux Energies Alternatives, Paris (FR); CENTRE NATIONAL DE LA RECHERCHE SCENTIFIQUE, Paris (FR); and SORBONNE UNIVERSITE, Paris (FR)
Filed by Commissariat à l'Energie Atomique et aux Energies Alternatives, Paris (FR); CENTRE NATIONAL DE LA RECHERCHE SCIENTIFIQUE, Paris (FR); and SORBONNE UNIVERSITE, Paris (FR)
Filed on Aug. 23, 2023, as Appl. No. 18/454,173.
Claims priority of application No. 22 08504 (FR), filed on Aug. 24, 2022.
Prior Publication US 2024/0069917 A1, Feb. 29, 2024
Int. Cl. G06F 9/30 (2018.01); H04L 9/08 (2006.01); H04L 9/32 (2006.01)
CPC G06F 9/30178 (2013.01) [H04L 9/0894 (2013.01); H04L 9/3247 (2013.01)] 12 Claims
OG exemplary drawing
 
1. A method for executing a machine code with a computer comprising a hardware instruction processing path, said hardware processing path comprising a sequence of stages which process, one after another, each instruction to be executed of the machine code, said sequence of stages comprising an instruction loader, a decoder, and an arithmetic logic unit, said method comprising executing, for each cryptogram of an instruction in a series of consecutive instructions of the machine code:
the instruction loader loading the cryptogram of an instruction designated by a program counter in order to obtain a loaded cryptogram,
decrypting the loaded cryptogram in order to obtain a decrypted instruction,
the decoder decoding the decrypted instruction in order to generate signals which configure the computer to execute the decrypted instruction, and
the arithmetic logic unit executing the decrypted instruction,
wherein the method further comprises, for a current instruction in the series of consecutive instructions:
after decoding the current instruction and before decrypting a cryptogram of a following instruction in the series of consecutive instructions, constructing a signature for the current instruction:
(1) based on a set of signals, which are generated by a stage in a sequence of stages in response to processing of said current instruction by said stage, said stage that generates said set of signals being the decoder or a stage following the decoder in the sequence of stages, and
(2) based on a preceding signature constructed for the instruction that precedes the current instruction in the series of consecutive instructions, said signature for the current instruction thus varying in accordance with the current instruction and in accordance with all instructions preceding the current instruction in the series of consecutive instructions,
checking an integrity of the executed machine code by comparing the constructed signature for the current instruction with a prestored reference signature, and
only when the integrity of the current instruction has been checked successfully, decrypting the cryptogram of the following instruction using the constructed signature for the current instruction.