The invention discloses a security protection method based on an SM9 decryption
algorithm, which masks a private key by using a random number, randomizes the
operand of point multiplication, does not leak the private key in the whole decryption
algorithm process, and performs full-flow masking in the middle process, so that
power consumption,
electromagnetism and key information are free from correlation, and the security of the decryption
algorithm is improved. Therefore, energy
power consumption and electromagnetic
attack can be resisted; the
operation time is determined according to the value of the random number, and when the NAF point multiplication operation is adopted, the point multiplication
operation time of the random window is random, so that the timing
attack can be resisted; when the KDF function is used for operation, a ct
randomization mode is adopted, and sensitive information is prevented from being leaked; by comparing SM3 hash operation values before and after the SM3 hash operation values, whether the parameter variables are tampered or whether errors are injected is effectively detected; and
encryption operation is carried out on the decrypted
plaintext, so that whether all parameter variables and intermediate variables are tampered or whether errors are injected in the whole-
process operation can be detected, and therefore, fault attacks can be resisted.