| The information technology revolution has brought mankind into the digital age.Digital technology has increasingly diversified data application scenarios and participants,while the openness of the network has resulted in more and more serious data security problems.To ensure that data information is not leaked has become a problem that can not be ignored by all parties.Development and security were outlined in last year’s two sessions,the 14th Five-Year Plan and vision 2035.On September 1 of the same year,the Data Security Law of the People’s Republic of China was officially passed and implemented.The law is the basic law of data security management in China,which plays a role in pointing out the direction and also shows the determination of China to ensure data security.There are many effective methods to solve the problem of data security,among which the most common and the most basic method is to encrypt data information,which can significantly enhance the security of information.There are many effective algorithms in the field of modern cryptography to solve the problem of data encryption,but all of these algorithms are complicated and have a large amount of computation.These features are not a problem for cloud computing,but due to the limitation of power consumption,the processor frequency of Internet of Things devices will not be very high,and the volume limitation leads to insufficient storage space to store and run programs with large amounts of code,so the whole system will not have high performance,and it is difficult to complete complex computing quickly.In this paper,aiming at the data encryption requirements of IoT terminal devices,referring to the latest RISC-V cryptography extension instruction set K,a SoC with RISC-V architecture and supporting K extension instruction set,MQ0891,is designed and implemented.The specific work content is as follows:1)Complete the front-end design of SoC.Complete the hardware design of all new instructions,integrate them into the encryption and decryption execution unit,and integrate them into the execution module,and add SoC support for encryption and decryption instruction.2)Complete the design of software reference model and test cases.Software is used to construct the bit-operation instruction function,and the execution output is obtained by given input parameters,which is used as the reference value for the verification of bit-operation instruction.In order to verify the encryption and decryption instructions.several test cases are designed for each algorithm.3)Complete the verification of the new SoC’s support for encryption and decryption instructions.Use the test case designed in 2)to test the encryption and decryption algorithm of the new SoC and get the correct result.The reference value is generated by the reference model in 2),and the simulation test is carried out on the position operation instruction,and the output is the same as the reference value,which ensures the correct SoC function.This SoC uses specific instructions to perform hardware acceleration on key computing processes and frequently used operations in several popular encryption and decryption algorithms,improving the computing speed of these algorithms in edge computing terminals,while reducing code size and better adapting to the Internet of Things The device has limited storage capacity.Compared with other general embedded processors,MQ0891 can quickly complete data encryption and decryption operations,and has small chip area,low power consumption,and many peripheral resources,which is very suitable for embedded fields and IoT terminals. |