The invention relates to a security
chip design method based on
control flow detection and resistant to error injection
attack. The security
chip design method comprises a first step of compiling a standard assembling file which supports a security
chip, a second step of dividing the standard assembling file into basic blocks by means of
lexical analysis, a third step of generating
basic block signature values and forming an assembling file with a
control flow detection instruction, a fourth step of translating the assembling file into a target file, generating
basic block checking values and inserting
basic block checking instructions, and a fifth step of generating an
executable file from the target file and a
database file link and executing the
executable file on hardware. The security chip design method based on
control flow detection and resistant to error injection
attack can effectively detect skip errors among the basic blocks and inside each basic block and non-skip errors of a command sequence, has the
self checking function on the control flow detection instruction which is newly added, and is simple in implementation and low in redundancy code cost by the adoption of the mode of combination of
software and hardware.