Design and implementation of generic mask defense scheme based on finite fields
Encryption algorithms are widely used to protect secret information.Side-channel attacks exploit side-channel data to attack encryption algorithms.Correlation Power Analysis(CPA)attack is a significant threat due to its ease of capturing power data,simple algorithm implementation,and high attack efficiency.Masking technique is commonly used to defend against CPA attack.This technology introduces random numbers without modifying the power consumption characteristics of the algorithm itself.The mask randomizes the algorithm intermediate values and reduces the correlation between the algorithm intermediate values and the power consumption data,so it can defend against attacks such as correlated power analysis attack.The focus in protecting the Advanced Encryption Standard(AES)and SM4 algorithms,which are implemented in finite fields,is to optimize the finite fields inversion algorithm.Full mask algorithms are proposed for the AES algorithm and SM4 algorithm respectively,which contain a general finite fields inverse algorithm.The GF(28)inversion algorithm uses a total of six GF(24)multiplication operation modules,two GF(24)square operation modules,two GF(24)post-square multiplication constant operation modules and a GF(24)inversion operation modules,the output of the inverse result is synchronized.The experimental results show that the masking algorithms effectively improve the resistance to power attacks of the hardware implementation of the algorithm,and the defense capability of the hardware implementation of the AES algorithm is improved by more than 110 times compared to the unmasked algorithm.