With the rapid development of network communication technology,cryptographic algorithms have become an important research direction in the field of information security and an important part of communication chip design.As a standard cryptographic algorithm formulated by our country,SM4 algorithm has been widely used.In view of the current development trend of the Internet of Everything technology,because the standard SM4 algorithm consumes a lot of hardware resources,it is difficult to meet the needs of the application market.Therefore,it is of great value and significance to design a lightweight SM4 algorithm.Usually,during the transmission of important data,the plaintext data needs to be encrypted first to obtain the ciphertext,and then the data is transmitted.Although the SM4 algorithm can achieve data encryption,it is also vulnerable to attacks and cracks.Therefore,it is also necessary to add corresponding protection measures to the SM4 algorithm.In addition,the SM4 algorithm can only guarantee the confidentiality of the data,but in some applications,the integrity of the data needs to be verified.The SM4-GCM algorithm combines the SM4 cryptographic algorithm with the hash algorithm.During data transmission,it can not only encrypt the data to obtain ciphertext,but also obtain a unique authentication label for data authentication.The application of SM4-GCM algorithm can guarantee the confidentiality and integrity of data at the same time.This thesis mainly completes the design and verification of the lightweight SM4-GCM algorithm against side-channel attacks.Firstly,according to the principle and algorithm structure of the standard SM4 algorithm,the lightweight scheme of the SM4 algorithm is improved on the basis of literature research,including module reuse,replacing the lookup table S box with a reconfigurable S box,and serialization algorithms.,and successfully implemented the lightweight SM4 algorithm encryption circuit.Compared with the standard SM4 algorithm circuit,the lightweight SM4 algorithm circuit reduces the area by half.Aiming at the power consumption attack,this thesis focuses on the scheme of adding mask to the SM4 algorithm,and successfully implements the full-mask SM4 algorithm circuit.Aiming at the error injection attack,this thesis focuses on the verification scheme of redundant rounds,and successfully implements the SM4 algorithm circuit that resists power consumption attacks and error injection attacks.In addition,in order to ensure the confidentiality and integrity of data at the same time,this thesis combines the SM4 algorithm against side-channel attacks with the GHASH function operation,and finally improves the lightweight SM4-GCM algorithm against side-channel attacks.At the same time,the principle of the algorithm and the algorithm control process are explored,and the encryption authentication of the data is successfully realized.Finally,this thesis integrates the light-weight SM4-GCM algorithm against sidechannel attacks into the SOC,and realizes the overall function inspection and testing by means of software and hardware joint debugging.This research has a good guiding role for the design of security chips. |