Key accelerator based on true random number generator and working method thereof
The integration of a TRNG and PKA in a key accelerator system addresses vulnerabilities to DPA attacks by generating unpredictable private keys, improving cryptographic security and stability.
Patent Information
- Application Number
- CN202411192770.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
AI Technical Summary
Existing cryptographic systems are vulnerable to DPA attacks due to predictable pseudo-random number generators, and existing public key accelerators lack sufficient security measures against such attacks.
A key accelerator system integrating a true random number generator (TRNG) and a public key accelerator (PKA) to generate unpredictable private keys, utilizing differential power consumption analysis to counter noise interference and enhance security.
The system generates unpredictable private keys resistant to DPA attacks, enhancing security and stability of cryptographic operations.
Smart Images

Figure CN119094118A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a key accelerator based on a true random number generator and a working method thereof. Background Art
[0002] TRNG, a true random number generator, is a device used to generate random numbers. The random numbers it outputs are based on physical random phenomena or processes that have a fixed randomness. Unlike PRNG, a pseudo-random number generator, the random numbers generated by TRNG are not generated by computers or predictable methods, but come from unpredictable processes. TRNG has important application value in fields such as cryptography, network security, and scientific simulation, because the randomness they can provide enhances the security and reliability of data. In contrast, pseudo-random number generators are predictable to a certain extent, so they may not be ideal in some application scenarios with extremely high security requirements.
[0003] DPA, differential power analysis, DPA attack technology has strong offensiveness and decryption efficiency. Its principle is: when the chip executes different instructions to perform various operations, the corresponding power consumption also changes accordingly. By using special electronic measuring instruments and mathematical statistics techniques to detect and analyze these changes, specific key information in the chip can be obtained. This is a method of using the current changes of instructions to analyze cryptographic algorithms and passwords. The attack principle of DPA is mainly based on the correlation between data and power consumption to restore the key, thereby achieving the effect of the attack.
[0004] PKA, Public Key Accelerator, is a coprocessor dedicated to the mathematically intensive elements required for RSA operations and the ECC, Elliptic Curve Cryptography, algorithm used in the prime field. DWC_pka is seamlessly integrated with DesignWare Cryptography Software, enabling designers to accelerate the asymmetric encryption required for public key algorithms, thereby providing performance levels that pure software solutions cannot reach. ECC is an encryption algorithm based on the mathematical theory of elliptic curves applied to the field of cryptography. The ECC algorithm implements encryption and digital signatures through points on elliptic curves, with high security and efficiency. Compared with the traditional RSA algorithm, the ECC algorithm uses a shorter key length under the same security, so it can improve the efficiency of encryption and array signatures and reduce computing and storage costs. The ECC algorithm is more suitable in resource-constrained environments such as mobile devices and IoT devices. Summary of the invention
[0005] The object of the present invention is to provide a key accelerator based on a true random number generator and a working method thereof to solve the problems in the background technology.
[0006] In order to solve the above technical problems, the present invention provides a key accelerator based on a true random number generator, comprising two parts: a true random number generator and a public key accelerator;
[0007] The true random number generator is composed of a differential power consumption analysis function interface logic and a true random number generation logic. By configuring the true random number generator, the serial noise interface of the differential power consumption analysis function interface logic and the serial noise source effective bit interface generate data and output it to the corresponding interface of the public key accelerator; the true random number generator is configured again to generate a true random number as a private key. The user generates a multi-bit private key according to his own needs, and stores it in the RAM unit inside the public key accelerator through the CPU write data interface;
[0008] The public key accelerator is composed of differential power consumption analysis confrontation logic and an arithmetic logic unit. The confrontation logic switch interface is enabled through an external register control logic, and the confrontation logic inside the differential power consumption analysis is enabled to counter the noise interference data from the true random number generator. The firmware algorithm, private key and ECC related parameters required by the public key accelerator are written into the corresponding RAM unit inside the public key accelerator through the CPU, and the arithmetic logic unit participates in the calculation. The calculated public key is stored in the RAM unit and can be read through the CPU read data interface.
[0009] In one embodiment, in the public key accelerator, the RAM unit prepares the data source from the external data, configures the Entry_point and the size of the operand to the register unit inside the public key accelerator through the CPU write data interface, and starts the public key accelerator to start calculation, so that the data in the RAM unit will be sent to the arithmetic logic unit for calculation. The RAM unit, the register unit and the arithmetic logic unit must perform real-time data interaction and command interaction to ensure that the public key accelerator is in a normal working state, and obtains the working state inside the public key accelerator through the CPU read data interface.
[0010] In one embodiment, the hardware random number generator generates one or more segments of 32-bit non-deterministic full entropy noise seeds as random numbers, and composes the required multi-bit-wide key value as a private key value based on key parameter characteristics.
[0011] In one embodiment, the public key accelerator internally allocates respective RAM addresses for data access to algorithms and various operands used for calculation; the public key accelerator first writes the relevant algorithms used for calculating the public key into the corresponding RAM units through the CPU, and then writes the generated true random numbers and related parameters into the corresponding RAM units.
[0012] In one embodiment, the firmware algorithm includes algorithms with multiple operation functions including elliptic encryption algorithm and asymmetric encryption algorithm. Before parameter and register configuration, the firmware algorithm is first written into the corresponding RAM unit inside the public key accelerator through the CPU interface.
[0013] The present invention also provides a working method of a key accelerator based on a true random number generator, including a startup process of a true random number generator and a working process of a public key accelerator;
[0014] The true random number generator starts to start, the true random number generator core initializes the operation and enables the random number controller to start working. The true random number generator starts a non-deterministic serial full entropy noise and configures the full entropy noise density. The adversarial logic inside the public key accelerator is enabled through an external register;
[0015] The true random number generator is used again to generate multiple non-deterministic full entropy noise seeds for generating multiple segments of 32-bit true random numbers. The multiple segments of 32-bit true random numbers are combined into multiple bits of true random numbers as private keys as needed, and the CPU reads and stores the private keys.
[0016] After the noise source and true random number are prepared, the firmware algorithm is loaded into the corresponding RAM unit of the public key accelerator. After the firmware algorithm is loaded, the private key and various ECC parameters are configured in the corresponding RAM unit. The entry_point and operand size are configured in the register of the public key accelerator and the public key accelerator is started to start the calculation. After the calculation is completed, the public key is read from the corresponding RAM unit by the CPU and stored, and finally the public and private key pair is obtained.
[0017] The present invention provides a key accelerator based on a true random number generator and a working method thereof. The TRNG used is a device generated from a physical process rather than a computer program. Theoretically, these random processes are unpredictable. The DPA attack data source generated by TRNG is more realistic than that generated by software functions because it has an adjustable noise rate and can simulate typical characteristics of attack data. The public-private key pair obtained by combining TRNG with true random numbers and PKA calculation is more difficult to crack than that generated by computer programs, and has higher security and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the overall principle structure of the design method of the present invention;
[0019] Figure 2 It is a schematic diagram of the actual operation of PKA in the present invention;
[0020] Figure 3 1. The working flow chart of the design method of the present invention. DETAILED DESCRIPTION
[0021] The following is a further detailed description of a key accelerator based on a true random number generator and a working method thereof proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer according to the following description. It should be noted that the accompanying drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0022] Figure 1 The present invention provides an overall principle structure diagram of a key accelerator based on a true random number generator, which is mainly composed of two parts: TRNG and PKA. In this scenario, TRNG is involved in the work of DPA functional interface logic and true random number generation logic. By configuring TRNG, the serial noise interface and serial noise source effective bit interface of the DPA functional interface logic generate data and output it to the corresponding interface of PKA; TRNG is configured again to generate a true random number as a private key. Users can generate multi-bit private keys according to their own needs, and store them in the RAM unit inside PKA through the CPU write data interface.
[0023] In this scenario, the DPA adversarial logic and arithmetic logic unit (ALU) are mainly involved in the work of PKA. The adversarial logic switch interface is enabled through the external register control logic, and the adversarial logic inside the DPA is enabled to counter the noise interference data from the TRNG, so that the data in the RAM can be protected from being stolen or tampered with. The firmware algorithm, private key and ECC related parameters required by PKA are written into the corresponding RAM unit inside PKA through the CPU, and the ALU participates in the calculation. The calculated public key is stored in the RAM unit and can be read through the CPU read data interface.
[0024] Figure 2 For the actual operation diagram of PKA involved in the present invention, the RAM unit prepares the data source from the external data, configures the Entry_point and the size of the operand to the register unit inside the PKA through the CPU write data interface, and starts the PKA to start calculation, so that the data in the RAM unit will be sent to the ALU for calculation. The RAM unit, the register unit and the ALU must perform real-time data interaction and command interaction to ensure that the PKA is in a normal working state. The working state inside the PKA can be obtained through the CPU read data interface.
[0025] Figure 3 This is a workflow diagram of the design method involved in the present invention, which mainly includes the TRNG startup process and the PKA workflow.
[0026] TRNG starts to start, TRNG CORE (True Random Number Generator Core) initializes operations and enables RNC (Random Number Controller) to start working, TRNG starts a non-deterministic serial full entropy noise and configures the full entropy noise density, and enables the internal adversarial logic of PKA through external registers;
[0027] Use TRNG again to generate multiple non-deterministic full entropy noise seeds to generate multiple 32-bit true random numbers. Combine the multiple 32-bit true random numbers into multiple true random numbers as private keys as needed. The CPU reads and stores the private keys.
[0028] After the noise source and true random number are prepared, the firmware algorithm is loaded into the corresponding RAM of PKA. After the firmware algorithm is loaded, the private key and various ECC parameters are configured in the corresponding RAM. The Entry_point and operand size are configured in the register of PKA and PKA is started to start calculation. After the calculation is completed, the public key is read from the corresponding RAM unit through the CPU and stored, and finally the public and private key pair is obtained.
[0029] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A key accelerator based on a true random number generator, characterized in that: It includes two parts: true random number generator and public key accelerator; The true random number generator is composed of a differential power consumption analysis function interface logic and a true random number generation logic. By configuring the true random number generator, the serial noise interface of the differential power consumption analysis function interface logic and the serial noise source effective bit interface generate data and output it to the corresponding interface of the public key accelerator; the true random number generator is configured again to generate a true random number as a private key. The user generates a multi-bit private key according to his own needs, and stores it in the RAM unit inside the public key accelerator through the CPU write data interface; The public key accelerator is composed of differential power consumption analysis confrontation logic and an arithmetic logic unit. The confrontation logic switch interface is enabled through an external register control logic, and the confrontation logic inside the differential power consumption analysis is enabled to counter the noise interference data from the true random number generator. The firmware algorithm, private key and ECC related parameters required by the public key accelerator are written into the corresponding RAM unit inside the public key accelerator through the CPU, and the arithmetic logic unit participates in the calculation. The calculated public key is stored in the RAM unit and can be read through the CPU read data interface.
2. The key accelerator based on a true random number generator as claimed in claim 1, characterized in that: In the public key accelerator, the RAM unit prepares the data source from the external data, configures the Entry_point and the size of the operand to the register unit inside the public key accelerator through the CPU write data interface, and starts the public key accelerator to start calculation, so that the data in the RAM unit will be sent to the arithmetic logic unit for calculation. The RAM unit, the register unit and the arithmetic logic unit must perform real-time data interaction and command interaction to ensure that the public key accelerator is in a normal working state, and obtains the working state inside the public key accelerator through the CPU read data interface.
3. The key accelerator based on a true random number generator as claimed in claim 1, characterized in that: The hardware random number generator generates one or more 32-bit non-deterministic full entropy noise seeds as random numbers, and composes the required multi-bit width key value as the private key value according to the key parameter characteristics.
4. The key accelerator based on a true random number generator as claimed in claim 1, characterized in that: The public key accelerator has its own RAM addresses assigned to the algorithms and operands used for calculation for data access. The public key accelerator first writes the relevant algorithms used to calculate the public key into the corresponding RAM units through the CPU, and then writes the generated true random numbers and related parameters into the corresponding RAM units.
5. The key accelerator based on a true random number generator as claimed in claim 1, characterized in that: The firmware algorithm includes algorithms with various operation functions including elliptic encryption algorithm and asymmetric encryption algorithm. Before parameter and register configuration, the firmware algorithm is first written into the corresponding RAM unit inside the public key accelerator through the CPU interface.
6. A working method of a key accelerator based on a true random number generator, characterized in that: Includes the startup process of the true random number generator and the public key accelerator workflow; The true random number generator starts to start, the true random number generator core initializes the operation and enables the random number controller to start working. The true random number generator starts a non-deterministic serial full entropy noise and configures the full entropy noise density. The adversarial logic inside the public key accelerator is enabled through an external register; The true random number generator is used again to generate multiple non-deterministic full entropy noise seeds for generating multiple segments of 32-bit true random numbers. The multiple segments of 32-bit true random numbers are combined into multiple bits of true random numbers as private keys as needed, and the CPU reads and stores the private keys. After the noise source and true random number are prepared, the firmware algorithm is loaded into the corresponding RAM unit of the public key accelerator. After the firmware algorithm is loaded, the private key and various ECC parameters are configured in the corresponding RAM unit. The entry_point and operand size are configured in the register of the public key accelerator and the public key accelerator is started to start the calculation. After the calculation is completed, the public key is read from the corresponding RAM unit by the CPU and stored, and finally the public and private key pair is obtained.
