Security coprocessor architecture based on fifth generation reduced instruction set architecture and security coprocessor

By adopting a secure coprocessor based on the fifth generation streamlined instruction set architecture in IoT devices, using high-speed parallel pipeline computing and multiple encryption algorithms, the instruction set authorization, CPU overload and encryption algorithms in hardware encryption technology are solved. Complete problems improve encryption and decryption performance and information security, and defend against cyber attacks.

CN118898079APending Publication Date: 2024-11-05SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411035452.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The existing hardware encryption technology has the problem of instruction set authorization in IoT devices, excessive CPU load, low computing efficiency and incomplete encryption algorithms, which leads to the system being vulnerable to network attacks and cannot effectively ensure data security.

Method used

Using a secure coprocessor based on the fifth generation streamlined instruction set architecture, the encryption and decryption operations are carried out through a high-speed parallel pipeline computing architecture and a variety of encryption algorithms (symmetric encryption, asymmetric encryption, hash encryption), and integrated into the Internet of Things device. Improve safety and performance.

Benefits of technology

It solves the performance bottleneck of traditional encryption and decryption algorithms in large-scale data stream processing, improves the speed of encryption and decryption data streams, realizes effective defense against network attacks, and ensures information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898079A_ABST
    Figure CN118898079A_ABST
Patent Text Reader

Abstract

The invention relates to a security coprocessor architecture based on a fifth-generation reduced instruction set architecture and a security coprocessor based on the fifth-generation reduced instruction set architecture. Comprising a fifth-generation reduced instruction set architecture core, a security module, an input / output port, a read-only memory, a static random access memory and a dynamic random access memory, the problem of instruction set authorization is solved by adopting an open-source fifth-generation reduced instruction set architecture; the corresponding encryption and decryption algorithm is called through the security module based on the encryption and decryption task instruction, and the input data is encrypted and decrypted by adopting the high-speed parallel pipeline computing architecture, so that the performance bottleneck of the traditional encryption and decryption algorithm computing architecture during large-scale data stream processing is solved, the data stream encryption and decryption speed of the security coprocessor is improved, and the security of the security coprocessor is improved. And various encryption algorithms such as symmetric encryption, asymmetric encryption and Hash encryption are integrated, so that effective defense of network attacks is realized, and information security is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of security coprocessors, and in particular to a security coprocessor architecture based on a fifth-generation reduced instruction set architecture and a security coprocessor based on a reduced instruction set architecture. Background Art

[0002] As the IOT (Internet of Things) industry enters a period of rapid development, the number of smart connected devices around the world is exploding. At the same time, the explosive growth of IOT devices has led to a rapid increase in information nodes and information transmission speed. A large number of information nodes and data interactions have brought more attack opportunities to attackers. The leakage and tampering of information during transmission will cause immeasurable losses to individuals, organizations and society. Therefore, protecting data from tampering and leakage through information encryption is an important issue in the era of information explosion.

[0003] Generally, encryption algorithms implemented in hardware have better security and higher performance than those implemented in software. In the existing technical solutions for implementing information security protection through hardware, hardware encryption algorithms are usually integrated in SoC (System on Chip), where the processor core of the SoC chip generally adopts the ARM (Advanced RISC Machine) architecture. In addition, the integrated hardware encryption algorithm is not complete, and the hardware encryption module generally adopts the traditional serial computing architecture. However, the CPU directly handles the security tasks of large-scale data streams, which may cause the CPU (Central Processing Unit) to be overloaded, affecting the response speed and stability of the system; the processor core using the ARM architecture has the problem of instruction set authorization, which limits the functional expansion of the processor and increases the cost of chip design; for processors with incomplete integrated hardware encryption algorithms, the security of data cannot be effectively guaranteed, making the system vulnerable to network attacks; the traditional serial computing architecture has low throughput and low computing efficiency, which seriously limits the performance of the chip. Summary of the invention

[0004] In view of the above problems, a security coprocessor architecture based on a fifth-generation reduced instruction set architecture and a security coprocessor based on a fifth-generation reduced instruction set architecture are proposed to overcome the above problems or at least partially solve the above problems.

[0005] Specifically, the present invention provides a security coprocessor architecture based on the fifth generation reduced instruction set architecture, characterized in that it is applied to an Internet of Things device, and the architecture includes: a fifth generation reduced instruction set architecture core, a security module, an input and output port, a read-only memory, a static random access memory, and a dynamic random access memory;

[0006] The security coprocessor performs data interaction with the IoT device through the input and output ports;

[0007] When the IoT device needs to perform a security task, the central processor of the IoT device assigns the security task to the security coprocessor, and the fifth-generation reduced instruction set architecture core reads the encryption and decryption task instructions from the read-only memory, and reads the input data stored in the dynamic random access memory to the security module;

[0008] The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instruction, and uses a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, and stores the output results of the encryption and decryption operations in the dynamic random access memory; the static random access memory is used to store temporary data and variables generated when the security module performs the encryption and decryption operations

[0009] Further, the security module includes: an advanced peripheral bus interface, a direct memory access interface, an encryption and decryption module, a key encapsulation module, a key derivation module, a true random number generator module, and a one-time programmable memory module;

[0010] The advanced peripheral bus interface is used for register command processing inside the security coprocessor; the direct memory access interface is used for transmitting data between the security module and the memory; the encryption and decryption module is used for the security module to call the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions to perform corresponding encryption and decryption operations on the input data; the key encapsulation module is used to encrypt key information; the key derivation module derives at least one output key from at least one input key based on a function for generating a key; the true random number generator module is used to provide true random numbers for the encryption and decryption module; the one-time programmable memory module is used to store the input key and the output key.

[0011] Furthermore, the encryption and decryption modules include: an advanced encryption standard symmetric encryption and decryption module, an RSA asymmetric encryption algorithm encryption and decryption module, and a hash algorithm encryption and decryption module;

[0012] The advanced encryption standard symmetric encryption and decryption module is used to perform symmetric encryption on the input data; the RSA asymmetric encryption algorithm encryption and decryption module is used to perform RSA asymmetric encryption on the input data; the hash algorithm encryption and decryption module is used to perform hash encryption on the input data;

[0013] The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instruction, and uses a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, including:

[0014] When the security module needs to perform symmetric encryption on the input data based on the encryption and decryption task instruction, the advanced encryption standard symmetric encryption and decryption module is called to perform the encryption and decryption operation on the input data using the high-speed parallel pipeline computing architecture;

[0015] When the security module needs to perform asymmetric encryption on the input data based on the encryption and decryption task instruction, the RSA asymmetric encryption algorithm encryption and decryption module is called to perform the encryption and decryption operation on the input data;

[0016] When the security module needs to perform hash algorithm encryption on the input data based on the encryption and decryption task instruction, the hash algorithm encryption and decryption module is called to perform the encryption and decryption operation on the input data using the high-speed parallel pipeline computing architecture.

[0017] Furthermore, the advanced encryption standard symmetric encryption and decryption module adopts the high-speed parallel pipeline computing architecture, obtains the initial plaintext corresponding to the encryption scheme based on the encryption scheme of the symmetric key encryption algorithm, divides the initial plaintext into a preset number of groups, and each group performs the encryption and decryption operations respectively.

[0018] Further, the advanced encryption standard symmetric encryption and decryption module includes: an encryption iterative calculation module and a decryption iterative calculation module;

[0019] In addition to adopting the high-speed parallel pipeline computing architecture, the Advanced Encryption Standard symmetric encryption and decryption module also includes:

[0020] An encryption scheme based on a symmetric key encryption algorithm obtains an initial plaintext corresponding to the encryption scheme;

[0021] Obtaining the number of operation rounds based on the encryption scheme;

[0022] The encryption iterative calculation module and the decryption iterative calculation module use an inter-round pipeline architecture for encryption.

[0023] Furthermore, the RSA asymmetric encryption algorithm encryption and decryption module includes: a key generation module and an asymmetric encryption and decryption module;

[0024] The key generation module obtains a public key and a private key based on a modular multiplication operation of the true random number;

[0025] The asymmetric encryption and decryption module performs the encryption and decryption operations on the input information based on the public key and the private key.

[0026] Furthermore, the hash algorithm encryption and decryption module includes: a data filling module, a message word expansion module, an iterative calculation module and an adder;

[0027] The data filling module is used to fill the input message to the length required by the hash algorithm; the message word expansion module is used to expand the filled message block; the iterative calculation module is used to perform logical operations on the expanded message words; the adder is used to accumulate the iteratively calculated values ​​of the initial variable corresponding to the number of operation rounds.

[0028] Furthermore, the iterative calculation module and the message word expansion module are combined into a parallel calculation module, and a register is inserted into the parallel calculation module.

[0029] The present invention also provides a security coprocessor based on a fifth-generation reduced instruction set architecture, including the security coprocessor architecture as described above.

[0030] Beneficial effects of the present invention:

[0031] In an embodiment of the present invention, a security coprocessor architecture based on a fifth-generation reduced instruction set architecture is proposed, including: a fifth-generation reduced instruction set architecture core, a security module, an input and output port, a read-only memory, a static random access memory, and a dynamic random access memory; the security coprocessor interacts with an Internet of Things device through the input and output port. When the Internet of Things device needs to perform a security task, the central processing unit of the Internet of Things device assigns the security task to the security coprocessor, the fifth-generation reduced instruction set architecture core reads encryption and decryption task instructions from the read-only memory, and reads the input data stored in the dynamic random access memory to the security module. The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions, and uses a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, and stores the output results of the encryption and decryption operations in the dynamic random access memory; the static random access memory is used to store temporary data and variables generated when the security module performs encryption and decryption operations. The problem of instruction set authorization is solved by adopting the open source fifth-generation reduced instruction set architecture. The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions, and uses a high-speed parallel pipeline computing architecture to encrypt and decrypt the input data, which solves the performance bottleneck of traditional encryption and decryption algorithms based on serial computing architecture when processing large-scale data streams, improves the speed of encryption and decryption data streams of the security coprocessor, and integrates multiple encryption algorithms such as symmetric encryption, asymmetric encryption and hash encryption, realizing effective defense against network attacks and ensuring information security. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application.

[0033] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0034] Figure 1 1 is a schematic diagram of a security coprocessor architecture based on a fifth-generation reduced instruction set architecture according to an embodiment of the present invention;

[0035] Figure 2 It is a schematic diagram of the structure of a security module of a security coprocessor based on a fifth-generation reduced instruction set architecture according to an embodiment of the present invention;

[0036] Figure 3 for Figure 2 The structural diagram of the Advanced Encryption Standard symmetric encryption and decryption module shown;

[0037] Figure 4 for Figure 2 The structural diagram of the RSA asymmetric encryption algorithm encryption and decryption module shown;

[0038] Figure 5 for Figure 2 The structural diagram of the hash algorithm encryption module shown;

[0039] Figure 6 It is a structural schematic diagram of a true random number generator module according to an embodiment of the present invention.

[0040] Reference numerals:

[0041] 100-Fifth-generation RISC core; 200-Security module; 300-Input and output ports; 400-Read-only memory; 500-Static random access memory; 600-Dynamic random access memory; 210-Advanced peripheral bus interface; 220-Direct memory access interface; 230-Advanced encryption standard symmetric encryption and decryption module; 240-RSA asymmetric encryption algorithm encryption and decryption module; 250-Hash algorithm encryption and decryption module; 260-Key encapsulation module; 270-Key derivation Module; 280-true random number generator module; 290-one-time programmable memory module; 232, 233-encryption iterative calculation module; 234, 235-decryption iterative calculation module; 241-key generation module; 242-asymmetric encryption module; 251-data filling module; 252-message word expansion module; 253 iterative calculation module; 254-adder; 281-digital entropy source module; 282-sampling module; 283-health detection module; 284-post-processing module. DETAILED DESCRIPTION

[0042] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] As the IOT (Internet of Things) industry enters a period of rapid development, the number of smart connected devices around the world is exploding. At the same time, the explosive growth of IOT devices has led to a rapid increase in information nodes and information transmission speed. A large number of information nodes and data interactions have brought more attack opportunities to attackers. The leakage and tampering of information during transmission will cause immeasurable losses to individuals, organizations and society.

[0044] In the existing technical solutions for implementing information security protection through hardware, hardware encryption algorithms are usually integrated in SoC chips, and data is encrypted and decrypted by calling the hardware encryption algorithm module to achieve the purpose of information protection. However, there is a problem of incompleteness in the integrated hardware encryption algorithm. Therefore, the processor cannot effectively guarantee the security of data, and the system is vulnerable to network attacks. In addition, the processor core of the SoC chip generally adopts the ARM (Advanced RISCMachine) architecture and adopts the traditional serial computing architecture. However, the processor core using the ARM architecture has the problem of instruction set authorization, and the traditional serial computing architecture causes the CPU to be overloaded when facing large amounts of data processing and high-performance encryption and decryption calculations, affecting the response speed and stability of the system.

[0045] In response to the problems existing in the existing technology, we proposed a security coprocessor architecture based on the fifth-generation reduced instruction set architecture and a security coprocessor based on the fifth-generation reduced instruction set architecture. The problem of instruction set authorization is solved by adopting the open source fifth-generation reduced instruction set architecture; the corresponding encryption and decryption algorithm is called based on the encryption and decryption task instructions through the security module, and the input data is encrypted and decrypted using a high-speed parallel pipeline computing architecture, which solves the performance bottleneck of the traditional encryption and decryption algorithm computing architecture when processing large-scale data streams, improves the speed of encryption and decryption data streams of the security coprocessor, and integrates multiple encryption algorithms such as symmetric encryption, asymmetric encryption and hash encryption, realizing effective defense against network attacks and ensuring information security.

[0046] Reference Figure 1 , shows a schematic diagram of a security coprocessor architecture based on a fifth-generation reduced instruction set architecture provided in an embodiment of the present invention, which may specifically include:

[0047] The security coprocessor architecture includes: a fifth-generation reduced instruction set architecture core, a security module, an input and output port, a read-only memory, a static random access memory, and a dynamic random access memory;

[0048] The security coprocessor performs data interaction with the IoT device through the input and output ports;

[0049] When the IoT device needs to perform a security task, the central processor of the IoT device assigns the security task to the security coprocessor, and the fifth-generation reduced instruction set architecture core reads the encryption and decryption task instructions from the read-only memory, and reads the input data stored in the dynamic random access memory to the security module;

[0050] The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions, and adopts a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, and stores the output results of the encryption and decryption operations in the dynamic random access memory; the static random access memory is used to store temporary data and variables generated when the security module performs the encryption and decryption operations.

[0051] In this embodiment, the proposed security coprocessor architecture based on the fifth-generation reduced instruction set architecture includes: a RISC-V (fifth-generation reduced instruction set architecture) core 100, a security module 200, an IO port (input and output port) 300, a read-only memory 400, a static random access memory 500 and a dynamic random access memory 600.

[0052] The RISC-V core 100 performs general logic calculations and data processing based on the RISC-V instruction set. The security module 200 encrypts and decrypts the information flow of the IOT device to prevent the device from being attacked by the network, etc. The IO (input and output) port 300 is used for data interaction between the chip and the external circuit. The ROM (read-only memory) 400 is used to store specific encryption and decryption instructions and firmware data. The SRAM (static random access memory) 500 is used as the first-level buffer and second-level buffer of the coprocessor to store temporary data and variables during the execution of encryption and decryption tasks. DRAM (dynamic random access memory) 600 is used to store large-capacity data streams and programs during the encryption and decryption process.

[0053] In one embodiment of the present invention, the security module includes: an advanced peripheral bus interface, a direct memory access interface, an encryption and decryption module, a key encapsulation module, a key derivation module, a true random number generator module, and a one-time programmable memory module;

[0054] The advanced peripheral bus interface is used for register command processing inside the security coprocessor; the direct memory access interface is used for transmitting data between the security module and the memory; the encryption and decryption module is used to call the corresponding encryption and decryption algorithm based on the security module and the encryption and decryption task instructions to perform corresponding encryption and decryption operations on the input data; the key encapsulation module is used to encrypt key information; the key derivation module derives at least one output key from at least one input key based on a function for generating a key; the true random number generator module is used to provide true random numbers for the encryption and decryption module; the one-time programmable memory module is used to store the input key and the output key.

[0055] In one embodiment of the present invention, the encryption and decryption module includes: an advanced encryption standard symmetric encryption and decryption module, an asymmetric encryption algorithm encryption and decryption module, and a hash algorithm encryption and decryption module;

[0056] The advanced encryption standard symmetric encryption and decryption module is used to symmetric encrypt the input data; the asymmetric encryption algorithm encryption and decryption module is used to asymmetric encrypt the input data; the hash algorithm encryption and decryption module is used to hash encrypt the input data;

[0057] The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instruction, and uses a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, including:

[0058] When the security module needs to perform symmetric encryption on the input data based on the encryption and decryption task instruction, the advanced encryption standard symmetric encryption and decryption module is called to perform the encryption and decryption operation on the input data using the high-speed parallel pipeline computing architecture;

[0059] When the security module needs to perform asymmetric encryption on the input data based on the encryption and decryption task instruction, the asymmetric encryption algorithm encryption and decryption module is called to perform the encryption and decryption operation on the input data;

[0060] When the security module needs to perform hash algorithm encryption on the input data based on the encryption and decryption task instruction, the hash algorithm encryption and decryption module is called to perform the encryption and decryption operation on the input data using the high-speed parallel pipeline computing architecture.

[0061] Reference Figure 2 , shows a schematic diagram of the structure of a security module of a security coprocessor based on a fifth-generation reduced instruction set architecture provided in an embodiment of the present invention, which may specifically include:

[0062] The security module includes an APB (Advanced High-performance Bus) interface 210, a DMA (Direct Memory Access) interface 220, an AES (Advanced Encryption Standard) symmetric encryption and decryption module 230, an RSA (Rivest-Shamir-Adleman) asymmetric encryption and decryption module 240, a Hash (hash algorithm) encryption and decryption module 250, a key encapsulation module 260, a key derivation module 270, a true random number generator module 280, and a one-time programmable memory module 290.

[0063] Among them, the APB interface 210 is used for processing the internal register commands of the coprocessor; the DMA interface 220 is used for transmitting data in large quantities between the security module and the memory; the AES symmetric encryption and decryption module 230 uses AES to encrypt and decrypt the input data. AES (Advanced Encryption Standard) is a symmetric key encryption algorithm used to protect the security of electronic data; the RSA asymmetric encryption and decryption module uses RSA to encrypt and decrypt the input data. RSA (Rivest-Shamir-Adleman) is an asymmetric encryption algorithm proposed by Ron Rivest, Adi Shamir and Leonard Adleman in 1977. The RSA algorithm is based on the mathematical problem of factoring large integers, that is, for a very large composite number, it is very difficult to find its prime factors. This feature makes the RSA algorithm occupy an important position in public key cryptography and is widely used in secure communications, digital signatures, key exchange and other fields; the Hash encryption and decryption module 250 uses a hash algorithm to encrypt and decrypt the input data; the KWP key packaging module 260 uses KWP (Key Wrapping The key derivation module 270 uses a KDF (Key Derivation Function) to derive one or more high-security keys from a secret value (such as a master key, password or passphrase), that is, to derive one or more output keys from one or more input keys for key expansion; the TRNG (True Random Number Generator) module 280 is used to provide true random numbers for the encryption and decryption modules to generate keys. The OTP (One-Time Programmable) module 290 is used to store keys in the encryption and decryption process.

[0064] In this embodiment, when performing AES encryption, before the round function starts iterative calculation, the plaintext and the original key are first XOR-encrypted, and then several round function calculations are started. When each round function is implemented, it is necessary to perform logical calculations on the previous calculation results and the derived key. In each subsequent round function calculation, the derived key is obtained by expanding the original key through the key expansion function in the key derivation module.

[0065] Taking AES-256 as an example, the original key of AES-256 is 256 bits. Before starting the round function iteration calculation, the original key is first XOR-encrypted with the plaintext. The keys required for the following 14 round function operations are all derived through the key derivation module based on the key expansion function.

[0066] It should be noted that the version of AES can be AES-128, AES-192 or AES-256, which can be adjusted according to different encryption requirements. This application does not make specific limitations on this.

[0067] Reference Figure 3 , showing Figure 2 The structural diagram of the Advanced Encryption Standard (AES) symmetric encryption and decryption module shown in the figure includes: an encryption iterative calculation module (232, 233) and a decryption iterative calculation module (234, 235).

[0068] In one embodiment of the present invention, the advanced encryption standard symmetric encryption and decryption module adopts the high-speed parallel pipeline computing architecture, obtains the initial plaintext corresponding to the encryption scheme based on the encryption scheme of the symmetric key encryption algorithm, divides the initial plaintext into a preset number of groups, and each group performs the encryption and decryption operations respectively.

[0069] In this embodiment, a parallel pipeline computing architecture is used during AES encryption, and the processing speed is accelerated by decomposing the task into multiple subtasks and executing them simultaneously on multiple processing units.

[0070] In one embodiment of the present invention, the advanced encryption standard symmetric encryption and decryption module includes: an encryption iterative calculation module and a decryption iterative calculation module;

[0071] In addition to adopting the high-speed parallel pipeline computing architecture, the Advanced Encryption Standard symmetric encryption and decryption module also includes:

[0072] An encryption scheme based on a symmetric key encryption algorithm obtains an initial plaintext corresponding to the encryption scheme;

[0073] Obtaining the number of operation rounds based on the encryption scheme;

[0074] The encryption iterative calculation module and the decryption iterative calculation module use an inter-round pipeline architecture for encryption.

[0075] Reference Figure 3 Taking AES-256 as an example, the original key is 256 bits, and 14 rounds of operations are required to complete encryption and decryption. The original key is used for the first round of round key addition operations. The original key is input into the KDF key derivation module, and the derived key used for the round key addition operations in the subsequent 14 rounds of iterative calculations can be calculated. In this embodiment, the AES symmetric encryption and decryption module uses parallel computing to accelerate the AES encryption and decryption operations, divides the 256-bit initial plaintext into 2 groups, and performs encryption and decryption operations on each group, which can shorten the encryption and decryption time by half.

[0076] In addition to parallel computing, each encryption and decryption iterative computing module (232, 233, 234, 235) adopts an inter-round pipeline architecture to accelerate AES symmetric encryption, so as to achieve the purpose of increasing data throughput. After the 256-bit initial plaintext is grouped, 14 rounds of operations are performed on the 128-bit plaintext of each group, and each round includes four operations, namely byte substitution, row shift, column mixing and round key addition. The last round of iterative calculation does not perform column mixing. Before the first round of iteration, the plaintext and the original key are first XORed. The decryption operation is the inverse operation of the encryption operation. 14 rounds of calculations are also performed. Each round of operation includes reverse row shift, reverse byte substitution, round key addition and reverse column mixing. The last round does not perform reverse column mixing. Before the first round of iteration, the ciphertext and the key need to be XORed. Finally, the round operation output results of the two groups are merged to obtain the AES encrypted ciphertext or decrypted plaintext.

[0077] In an embodiment, the inter-round pipeline architecture decomposes multiple rounds of the AES algorithm into independent subtasks, and inserts pipeline registers between these rounds. In this way, the output of each round of encryption operation can be directly used as the input of the next round of encryption operation without waiting for the entire encryption process to complete. For example: 1024-bit plaintext needs to be encrypted with AES-256, and the 1024-bit plaintext is grouped into 4 256-bit plaintexts. If a serial computing architecture is used, the first group of 256-bit plaintexts needs to be calculated by 14 rounds of functions to obtain ciphertext before the second group of 256-bit plaintexts can be encrypted. If an inter-round pipeline computing architecture is used, the first group of 256-bit plaintexts enters the second round function after completing the first round function calculation. At this time, the second group of 256-bit plaintexts can enter the first round function for calculation, and so on. In this way, when the first group of 256-bit plaintexts completes 14 rounds of function calculations, it waits for another round, and the second group of 256-bit plaintexts are encrypted. That is to say, the serial computing architecture requires 56 rounds of function time to complete 1024-bit plaintext encryption; the inter-round pipeline computing architecture requires 17 rounds of function time to complete 1024-bit plaintext encryption, thus greatly increasing the data throughput.

[0078] The specific number of encryption rounds is determined according to the version of AES. For example, the number of encryption rounds of AES-256 is 14, the number of encryption rounds of AES-192 is 12, and the number of encryption rounds of AES-128 is 10. This application does not make specific limitations on this.

[0079] In one embodiment of the present invention, the RSA asymmetric encryption algorithm encryption and decryption module includes: a key generation module and an asymmetric encryption and decryption module;

[0080] The key generation module obtains a public key and a private key based on a modular multiplication operation of the true random number;

[0081] The asymmetric encryption and decryption module performs the encryption and decryption operations on the input information based on the public key and the private key.

[0082] Reference Figure 4 , showing Figure 2 The structural diagram of the asymmetric encryption algorithm encryption and decryption module shown in the figure, the RSA asymmetric encryption and decryption module includes: a key generation unit 241 and an asymmetric encryption and decryption module 242.

[0083] The key generation unit 241 receives the true random numbers generated by the true random number generator 280, uses these true random numbers to select two large prime numbers p and q, and calculates the key length N, the public key and the private key by the following formula:

[0084] N=p×q

[0085] Φ=(p-1)×(q-1)

[0086] D×E modΦ=1

[0087] Among them: p and q are prime numbers; Φ is the Euler function; modΦ is the modulus operator; E is a random integer greater than 1 and less than Φ, and D is the modular inverse element of E.

[0088] Select an integer E that is coprime with Φ as part of the public key, calculate the modular inverse element D of E, that is, satisfy D×E modΦ=1, as part of the private key, and then generate the public key (E, N) and private key (D, N).

[0089] After obtaining the public key (E, N) and the private key (D, N), the public key and the private key are transmitted to the asymmetric encryption and decryption module 242, and the asymmetric encryption and decryption module 242 performs modular exponentiation calculation on the input information to complete the asymmetric encryption and decryption of the input information.

[0090] For encryption operations, the public key (E, N) is used to perform modular exponentiation calculation on the input information, that is, c=m^E mod N, where m is the plaintext message and c is the ciphertext message.

[0091] For the decryption operation, the private key (D, N) is used to perform modular exponentiation calculation on the ciphertext, that is, m=c^E od N, where c is the ciphertext message and m is the plaintext message.

[0092] These steps ensure the security and correctness of the RSA algorithm. The public key (E, N) can be made public and used to encrypt data, while the private key (D, N) must be kept secret and used to decrypt data. The security of the RSA algorithm is based on the difficulty of factoring large integers. Even if the public key (E, N) is known, it is difficult to factorize p and q from N, and thus it is impossible to calculate the private key (D, N).

[0093] In one embodiment of the present invention, the Hash algorithm encryption and decryption module includes: a data filling module, a message word expansion module, an iterative calculation module and an adder;

[0094] The data filling module is used to fill the input message to the length required by the hash algorithm; the message word expansion module is used to expand the filled message block; the iterative calculation module is used to perform logical operations on the expanded message words; the adder is used to accumulate the iteratively calculated values ​​of the initial variable corresponding to the number of operation rounds.

[0095] These modules work together to ensure that the hash function can transform an input message of arbitrary length into an output of fixed length, and has the following properties:

[0096] One-way: The original message cannot be deduced from the hash value;

[0097] Collision resistance: It is difficult to find two different input messages that produce the same hash value;

[0098] Consistency: The same input message always produces the same hash value.

[0099] In one embodiment of the present invention, the iterative calculation module and the message word expansion module are combined into a parallel calculation module, and a register is inserted into the parallel calculation module.

[0100] Reference Figure 5 , showing Figure 2 The structural diagram of the hash algorithm encryption module shown in the figure, the hash algorithm encryption module includes: a data filling module 251, a message word expansion module 252, an iterative calculation module 253 and an adder 254.

[0101] In the SHA-256 structure, a serial computing architecture is generally adopted, that is, data is first filled, then the message word is expanded, and finally iterative calculation is performed. The serial computing architecture severely limits the speed of hash calculation. The main computational workload in SHA-256 is concentrated in message word expansion and iterative calculation. SHA-256 includes a total of 64 rounds of iterative calculations, and 64 message words are required in 64 rounds of iterative calculations. The first 16 message words are directly composed of data filling groups, and the last 48 message words need to be calculated through message word expansion. Therefore, iterative calculation and message word expansion can be combined into a parallel computing module. The message word Wi used in the i-th round of iterative calculation is obtained by expanding the message word in the previous round of parallel computing modules. At the same time, registers are inserted in the 64 parallel computing modules to realize pipeline calculation and accelerate hash encryption.

[0102] Specifically, in the 1st to 15th rounds of iterative calculations, the message words used in the iterative calculations are W0 to W15, which are obtained by grouping 512-bit data. When the 15th round of iterative calculations is performed, the message word expansion module calculates the W16 message word and stores the calculated message word in the memory, waiting for the next round of iterative calculation module to call. After completing 64 rounds of iterative calculations, the calculated result is added to the initial variables A to H through adder 254 to obtain the output result.

[0103] It should be noted that the hash algorithm encryption and decryption module proposed in this embodiment is described using SHA-256. This embodiment can be applied to other forms of hash encryption algorithms, such as SHA-1, SHA-2 family, etc. Similarly, the number of iterative calculation rounds is also determined based on the algorithm used, and this application does not make specific limitations on this.

[0104] In one embodiment of the present invention, the true random number generator module includes: a digital entropy source module, a sampling module, a health detection module and a post-processing module;

[0105] The digital entropy source module outputs an original signal with randomness;

[0106] The sampling module samples the original signal to obtain a binary output sequence;

[0107] The health detection module performs randomness detection on the binary output sequence and outputs a random number sequence;

[0108] The post-processing module processes the random number sequence and outputs true random numbers.

[0109] Reference Figure 6 , Figure 6 It is a structural schematic diagram of a true random number generator module according to an embodiment of the present invention, the true random number generator module comprises: a digital entropy source module 281, a sampling module 282, a health detection module 283 and a post-processing module 284.

[0110] In this embodiment, the digital entropy source module 281 is the core part of the true random number generator and is responsible for providing a source of randomness. The entropy source can be a physical phenomenon (such as electronic noise, quantum effect) or a software algorithm (such as operating system events, network traffic); the sampling module 282 is responsible for sampling the output signal of the entropy source with randomness, and the sampling process usually involves converting a continuous random signal into a discrete random sequence; the health detection module 283 performs a randomness test on the sampled initial random sequence to determine whether it meets the randomness requirements. These tests may include statistical tests (such as frequency tests, run tests, autocorrelation tests) and cryptographic tests (such as NIST SP 800-90B tests); the post-processing module 284 processes the random sequence to eliminate the bias and non-random components in the sequence. The processing method may include a debiasing algorithm (such as vonNeumann debiasing), an entropy extraction algorithm (such as SHA-256 hashing) and a randomness enhancement algorithm (such as randomness diffusion). Finally, the post-processed random sequence is output as true random numbers, which can be used in cryptographic applications (such as key generation, random initialization vectors), simulation experiments, games and other fields.

[0111] In an embodiment of the present invention, a security coprocessor architecture based on a fifth-generation reduced instruction set architecture is proposed, including: a fifth-generation reduced instruction set architecture core, a security module, an input and output port, a read-only memory, a static random access memory, and a dynamic random access memory; the security coprocessor interacts with an Internet of Things device through the input and output port. When the Internet of Things device needs to perform a security task, the central processing unit of the Internet of Things device assigns the security task to the security coprocessor, the fifth-generation reduced instruction set architecture core reads encryption and decryption task instructions from the read-only memory, and reads the input data stored in the dynamic random access memory to the security module. The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions, and uses a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, and stores the output results of the encryption and decryption operations in the dynamic random access memory; the static random access memory is used to store temporary data and variables generated when the security module performs encryption and decryption operations. The problem of instruction set authorization is solved by adopting the open source fifth-generation reduced instruction set architecture; the corresponding encryption and decryption algorithm is called based on the encryption and decryption task instructions through the security module, and the input data is encrypted and decrypted using a high-speed parallel pipeline computing architecture, which solves the performance bottleneck of the traditional encryption and decryption algorithm computing architecture when processing large-scale data streams, improves the speed of encryption and decryption data streams of the security coprocessor, and integrates multiple encryption algorithms such as symmetric encryption, asymmetric encryption and hash encryption, realizing effective defense against network attacks and ensuring information security.

[0112] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0113] An embodiment of the present invention further provides a security coprocessor based on a fifth-generation reduced instruction set architecture, which may include the architecture of the security coprocessor based on the fifth-generation reduced instruction set architecture as described above.

[0114] In practical applications, a security coprocessor is a hardware device or module specifically designed to perform security-related tasks. It is usually integrated into computer systems, smart cards, mobile devices, or other electronic devices to protect sensitive data and perform cryptographic operations. The main purpose of a security coprocessor is to provide an isolated, trusted execution environment to prevent malware or attackers from accessing and tampering with critical security functions.

[0115] The security coprocessor based on the fifth-generation reduced instruction set architecture provided in the embodiments of the present invention can be applied to the fields of mobile devices and the Internet of Things (IoT), such as in smart phones, tablet computers and wearable devices, for protecting user data, encrypting communications and executing security applications; in IoT devices, for protecting device identity, data encryption and secure communications; the security coprocessor based on the fifth-generation reduced instruction set architecture can also be applied to the fields of servers and data centers, such as for encrypting stored and transmitted data and protecting sensitive information from network attacks; in cloud services and virtualized environments, for providing secure key management and encryption services; the security coprocessor based on the fifth-generation reduced instruction set architecture can also be applied to fields such as servers and data centers, blockchain and cryptocurrency, software protection and copyright management.

[0116] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0117] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0118] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0119] The above provides a detailed introduction to a security coprocessor architecture based on the fifth-generation reduced instruction set architecture and a security coprocessor based on the fifth-generation reduced instruction set architecture. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A security coprocessor architecture based on the fifth generation reduced instruction set architecture, characterized in that: Applied to IoT devices, the architecture includes: a fifth-generation reduced instruction set architecture core, a security module, an input and output port, a read-only memory, a static random access memory, and a dynamic random access memory; The security coprocessor performs data interaction with the IoT device through the input and output ports; When the IoT device needs to perform a security task, the central processor of the IoT device assigns the security task to the security coprocessor, and the fifth-generation reduced instruction set architecture core reads the encryption and decryption task instructions from the read-only memory, and reads the input data stored in the dynamic random access memory to the security module; The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions, and adopts a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, and stores the output results of the encryption and decryption operations in the dynamic random access memory; the static random access memory is used to store temporary data and variables generated when the security module performs the encryption and decryption operations.

2. The security coprocessor architecture according to claim 1, characterized in that: The security module includes: an advanced peripheral bus interface, a direct memory access interface, an encryption and decryption module, a key encapsulation module, a key derivation module, a true random number generator module, and a one-time programmable memory module; The advanced peripheral bus interface is used for register command processing inside the security coprocessor; the direct memory access interface is used for transmitting data between the security module and the memory; the encryption and decryption module is used for the security module to call the corresponding encryption and decryption algorithm based on the encryption and decryption task instructions to perform corresponding encryption and decryption operations on the input data; the key encapsulation module is used to encrypt key information; the key derivation module derives at least one output key from at least one input key based on a function for generating a key; the true random number generator module is used to provide true random numbers for the encryption and decryption module; the one-time programmable memory module is used to store the input key and the output key.

3. The security coprocessor architecture according to claim 2, characterized in that: The encryption and decryption modules include: an advanced encryption standard symmetric encryption and decryption module, an RSA asymmetric encryption algorithm encryption and decryption module, and a hash algorithm encryption and decryption module; The advanced encryption standard symmetric encryption and decryption module is used to perform symmetric encryption on the input data; the RSA asymmetric encryption algorithm encryption and decryption module is used to perform RSA asymmetric encryption on the input data; the hash algorithm encryption and decryption module is used to perform hash encryption on the input data; The security module calls the corresponding encryption and decryption algorithm based on the encryption and decryption task instruction, and uses a high-speed parallel pipeline computing architecture to perform encryption and decryption operations on the input data, including: When the security module needs to perform symmetric encryption on the input data based on the encryption and decryption task instruction, the advanced encryption standard symmetric encryption and decryption module is called to perform the encryption and decryption operation on the input data using the high-speed parallel pipeline computing architecture; When the security module needs to perform asymmetric encryption on the input data based on the encryption and decryption task instruction, the RSA asymmetric encryption algorithm encryption and decryption module is called to perform the encryption and decryption operation on the input data; When the security module needs to perform hash algorithm encryption on the input data based on the encryption and decryption task instruction, the hash algorithm encryption and decryption module is called to perform the encryption and decryption operation on the input data using the high-speed parallel pipeline computing architecture.

4. The security coprocessor architecture according to claim 3, characterized in that: The Advanced Encryption Standard symmetric encryption and decryption module adopts the high-speed parallel pipeline computing architecture, obtains the initial plaintext corresponding to the encryption scheme based on the encryption scheme of the symmetric key encryption algorithm, divides the initial plaintext into a preset number of groups, and each group performs the encryption and decryption operations respectively.

5. The security coprocessor architecture according to claim 4, characterized in that: The advanced encryption standard symmetric encryption and decryption module includes: an encryption iterative calculation module and a decryption iterative calculation module; In addition to adopting the high-speed parallel pipeline computing architecture, the Advanced Encryption Standard symmetric encryption and decryption module also includes: An encryption scheme based on a symmetric key encryption algorithm obtains an initial plaintext corresponding to the encryption scheme; Obtaining the number of operation rounds based on the encryption scheme; The encryption iterative calculation module and the decryption iterative calculation module use an inter-round pipeline architecture for encryption.

6. The security coprocessor architecture according to claim 3, characterized in that: The RSA asymmetric encryption algorithm encryption and decryption module includes: a key generation module and an asymmetric encryption and decryption module; The key generation module obtains a public key and a private key based on a modular multiplication operation of the true random number; The asymmetric encryption and decryption module performs the encryption and decryption operations on the input information based on the public key and the private key.

7. The security coprocessor architecture according to claim 3, characterized in that: The hash algorithm encryption and decryption module includes: a data filling module, a message word expansion module, an iterative calculation module and an adder; The data filling module is used to fill the input message to the length required by the hash algorithm; the message word expansion module is used to expand the filled message block; the iterative calculation module is used to perform logical operations on the expanded message words; the adder is used to accumulate the iteratively calculated values ​​of the initial variable corresponding to the number of operation rounds.

8. The security coprocessor architecture according to claim 7, characterized in that: The iterative calculation module and the message word expansion module are combined into a parallel calculation module, and a register is inserted into the parallel calculation module.

9. The security coprocessor architecture according to claim 3, characterized in that: The true random number generator module includes: a digital entropy source module, a sampling module, a health detection module and a post-processing module; The digital entropy source module outputs an original signal with randomness; The sampling module samples the original signal to obtain a binary output sequence; The health detection module performs randomness detection on the binary output sequence and outputs a random number sequence; The post-processing module processes the random number sequence and outputs true random numbers.

10. A security coprocessor based on the fifth generation reduced instruction set architecture, characterized in that: The fifth-generation reduced instruction set architecture-based security coprocessor comprises: a security coprocessor architecture as described in any one of claims 1-9.

Citation Information

Cited By

  • Cipher coprocessor architecture giving consideration to security and flexibility and working method

    CN119402195A

  • A Cryptographic Coprocessor Architecture and Working Method that Balances Security and Flexibility

    CN119402195B

  • A data encryption secure transmission method based on a RISC-V processor

    CN122870399A