One-time random number generation device and application method

By designing a device that combines start bit detection and pseudo-random number generator, generates nonce sequences related to valid data, solving the problem of nonce difficult to protect in the prior art, and achieving effective defense and hardware for bypass attacks Improved security.

CN114035766BActive Publication Date: 2024-11-22ZHEJIANG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111279891.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2024-11-22
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

When defending against bypass attacks, it is difficult to effectively protect the one-time random number nonce, resulting in insufficient hardware security. Attackers can obtain key values ​​through leaked power consumption analysis, which makes it difficult to achieve increasing attack complexity.

Method used

A device including a start bit detection module, a pseudo-random number generator module, a counter module and a plaintext detection module is designed. A pseudo-random number generator that works by alternating opposite assignment methods is generated by combining the time and content of effective data arrival. , reduce hardware resources and power consumption, and generate nonce sequences related to valid data.

Benefits of technology

Effectively resist bypass attacks such as power consumption analysis, improve the security and robustness of the hardware system, reduce hardware area and power consumption, increase attack difficulty, and improve the security and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114035766B_ABST
    Figure CN114035766B_ABST
Patent Text Reader

Abstract

The present invention discloses a one-time random number generation device and an application method. The one-time random number generation device includes a start bit detection module, a pseudo-random number generator (DRBG) module; a counter module, a plaintext detection module, and a delay generation module; the start bit detection module and the plaintext detection module are respectively connected to the delay generation module, and work together to generate a sampling time signal; the counter module is connected to two pseudo-random number generation modules, and the operation thereof is controlled to generate a one-time random number nonce sequence; the sampling time signal samples the random number nonce sequence to obtain a one-time nonce output. The nonce generated by the scheme is uncontrollable and unmeasurable, and is related to both the valid data reception time and the plaintext content. In addition, the power consumption generated by the operation of the scheme itself has a very poor correlation with the valid content of the nonce, and it is difficult to obtain it through statistical analysis by power consumption analysis, which greatly increases the difficulty of cracking the hardware key by side-channel attacks such as power consumption analysis, and has great security and practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of cryptography and hardware security, and in particular to a one-time random number generation device and an application method. Background Art

[0002] The advent of the information and digital era has brought countless conveniences to people's lives. While enjoying the benefits brought by digitalization, the value of information is getting higher and higher, and its security is becoming more and more important. There are many cases where criminals steal and tamper with information data through various means of attack, and various means are difficult to prevent.

[0003] Side-channel attacks are one of the biggest threats to hardware security. When a processor calculates an encryption function on certain data, information leakage is inevitable. Through side-channel attacks, attackers use this leakage, such as power consumption, to indirectly analyze possible key values, thereby indirectly threatening information security without analyzing the underlying principles.

[0004] Nonce (number once) is the abbreviation of a one-time random number in cryptography. This random number becomes invalid after being used only once. In most authentication protocols or data encryption systems, it is used as seed data, and the seed vector participates in identity recognition or data validity judgment. In the side-channel attack analysis of this type of algorithm, the nonce used in each encryption is used as known information to participate in the analysis of formulas and statistics to obtain unknown key bits. Therefore, it is very important for attackers to obtain the nonce used in encryption. Making it more difficult to obtain the nonce can increase the complexity of the side-channel attack to a certain extent, thereby achieving the purpose of improving the hardware security performance. Summary of the invention

[0005] In order to overcome the deficiencies of the prior art, the object of the present invention is to provide a one-time random number generation device and application method.

[0006] A one-time random number generation device includes: a start bit detection module, a pseudo-random number generator (DRBG) module, a counter module, a plaintext detection module, and a delay generation module. The start bit detection module and the plaintext detection module are respectively connected to the delay generation module, and work together to generate a sampling time signal. The counter module is connected to two pseudo-random number generation modules to control their operation to generate a one-time random number nonce sequence. The sampling time signal samples the random number nonce sequence to obtain a one-time nonce output. The pseudo-random number generator module works in an alternating opposite assignment mode under the control of the counter module, saving hardware resources and generating self-power consumption overlap under the premise of ensuring normal functions. The start bit detection module controls the starting point of the nonce sampling time through the arrival time of valid data, and the final nonce generated is related to the arrival time of valid data (plaintext or ciphertext). The plaintext detection module controls the starting point of the nonce sampling time through the plaintext content, and the final nonce generated is related to the content of the valid data (plaintext or ciphertext).

[0007] The pseudo-random number generator module works in an alternating opposite assignment mode under the control of the counter module, thereby saving hardware resources and generating its own power consumption overlap while ensuring normal functions.

[0008] The start bit detection module controls the starting point of nonce sampling time through the arrival time of valid data, and the final generation of nonce is related to the arrival time of the valid plaintext or ciphertext data.

[0009] The plaintext detection module controls the starting point of nonce sampling time through the plaintext content, and the final nonce generated is related to the plaintext or ciphertext valid data content.

[0010] The method includes:

[0011] Step S1, after power-on, two 16-bit pseudo-random number generators with different seeds start working;

[0012] Step S2, the counter counts cyclically. Under the control of the counter, two 16-bit pseudo-random number generators assign values ​​to 128-bit nonce groups in opposite directions at the same time;

[0013] Step S3: If the start bit SOF is not detected, then continue to update the nonce value in step S2; if the start bit SOF is detected, proceed to the next step;

[0014] Step S4, extracting the plaintext grouping in the valid data;

[0015] Step S5: If the kth bit in the plaintext group has not been obtained, continue to extract the plaintext group content; if the kth bit of the plaintext is extracted, the sampling calculation start time T Sis set, and the i , j , k The three bits together constitute the sampling calculation delay time counting and final value determination T D ,in i , j , k You can specify it yourself. k is the less significant bit of the three;

[0016] Step S6, counter 2 T S Start counting at time and count to T D Stop counting when the current nonce packet is taken out as the nonce value used for encryption;

[0017] Step S7, counter 2, T S , T D , clear.

[0018] Beneficial effects of the present invention:

[0019] The one-time random number hardware generation method provided by the present invention can associate the generated one-time random number with the arrival time and content of valid data (plaintext / ciphertext). When it works as a chip alone or as an IP in other systems, it will generate power consumption compensation, which can effectively resist side-channel attacks such as power consumption analysis and improve the security and robustness of the hardware system. At the same time, the nonce generation principle used adopts a structure of multiplexing and alternating work of a low-bit pseudo-random number generator, which effectively reduces the hardware area and power consumption while further disrupting the power consumption law, which can effectively improve the security and stability of the device itself and the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0021] Figure 1 It is a structural block diagram of nonce generation provided by an embodiment of the present invention.

[0022] Figure 2 It is a schematic diagram of a nonce generation process provided by an embodiment of the present invention.

[0023] Figure 3 This is a nonce calculation principle diagram provided by an embodiment of the present invention.

[0024] Figure 4 This is a schematic diagram of the nonce sampling principle provided by an embodiment of the present invention.

[0025] Figure 5 This is a power consumption analysis diagram of a hardware implementation provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The specific implementation of the present invention is described in detail below. The described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementations obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0027] See also Figure 1 An embodiment of the present invention provides a hardware generation method implementation structure of a one-time random number nonce, including: a start bit detection module, a plaintext detection module, a delay generation module, a pseudo-random number generator (DRBG) module, and a counter module.

[0028] The start bit detection module and the plaintext detection module detect the start bit of the received data and the plaintext data group respectively, and are connected to the delay generation module respectively. The sampling time signal is generated by mathematical calculation of the start bit receiving time and the plaintext content. The specific calculation principle is shown in Figure 3 and Figure 4 And the corresponding description content. The counter module is connected to two pseudo-random number generation modules, assigns nonce data packets under clock control, generates a one-time random number nonce sequence that changes with time, and samples the random number nonce sequence of the sampling time signal to obtain a one-time nonce output. The pseudo-random number generator module works in an alternating opposite assignment manner under the control of the counter module, saving hardware resources and generating its own power consumption overlap while ensuring normal functions. The start bit detection module controls the starting point of the nonce sampling time through the arrival time of the valid data, and the final nonce generated is related to the arrival time of the valid data (plaintext or ciphertext). The plaintext detection module controls the starting point of the nonce sampling time through the plaintext content, and the final nonce generated is related to the content of the valid data (plaintext or ciphertext).

[0029] See also Figure 2 An embodiment of the present invention provides a hardware method for generating a one-time random number nonce, comprising:

[0030] Step S1: After the chip is powered on, two 16-bit pseudo-random number generators with different seeds start working.

[0031] Step S2: The counter counts cyclically. Under the control of the counter, two 16-bit pseudo-random number generators assign values ​​to 128-bit nonce groups in opposite directions at the same time.

[0032] Step S3: If the start bit SOF is not detected, continue to update the nonce value in step S2; if the start bit SOF is detected, proceed to the next step.

[0033] Step S4: extract the plaintext grouping in the valid data.

[0034] Step S5: If the kth bit in the plaintext group has not been obtained, continue to extract the plaintext group content; if the kth bit of the plaintext is extracted, the sampling calculation start time T S is set, and the i , j , k The three bits together constitute the sampling calculation delay time counting and final value determination T D ( i , j , k You can specify it yourself. k is the less significant bit of the three).

[0035] Step S6, counter 2 T S Start counting at time and count to T D Stop counting when the nonce packet is received, and take out the 128-bit data in the nonce packet at the current moment as the nonce value used for encryption.

[0036] Step S7, counter 2, T S , T D , clear.

[0037] See also Figure 3 An embodiment of the present invention provides a calculation principle of a one-time random number nonce, including:

[0038] Two 16-bit pseudo-random number generators use different seeds and start working at the same time after power-on. The 128-bit nonce is divided into 8 16-bit data packets. Pseudo-random number generator 1 starts assigning values ​​from data packet 1 to data packet 8, and pseudo-random number generator 2 starts assigning values ​​from data packet 8 to data packet 1. The two processes are performed alternately at the same time, and the number of assignment groups is controlled by a counter.

[0039] For attackers, if the authentication encryption algorithm is a single S-box nonlinear transformation structure, the scheme generates power consumption compensation, reduces the connection between the nonlinear transformation output and the acquisition power consumption in the algorithm core, and increases the difficulty of attack; if the authentication encryption algorithm is a high-throughput structure with multiple S-boxes in parallel, the bypass attack process also requires the nonce value as a known quantity to participate in the attack analysis and calculation derivation process. In addition to generating power consumption compensation, this scheme can also hinder the attacker's analysis and acquisition of the nonce value. The parallel operation of two 16-bit pseudo-random number generators with different seeds is twice as complex as the direct generation of a single 128-bit pseudo-random number, both from the perspective of power consumption analysis and direct acquisition, which greatly increases the difficulty of the attacker's bypass attack.

[0040] See also Figure 4 An embodiment of the present invention provides a sampling principle of a one-time random number nonce, including:

[0041] Capture the first k The bit is the sampling calculation start time node T S , while i , j , k Three plaintext bits (can be specified by yourself, k The lower significant digit among the three) forms a three-digit binary number T D ,exist T S Time node counter 2 starts to work and counts to T D Stop and take out the value in the nonce data group at the current moment as the actual encryption nonce value used.

[0042] Only one nonce value is used during the encryption process. If the value of the pseudo-random number generator is sampled at a fixed point each time and used for encryption, it is easy for attackers to find the rules. Applying the above sampling principle can make the encryption nonce related to both the arrival time of the valid data and the bit information of the plaintext in the valid data, making it difficult for attackers to obtain the value of nonce, and it is also difficult to obtain through power consumption analysis and statistical methods.

[0043] See also Figure 5 , an embodiment of the present invention provides a power consumption analysis diagram of hardware implementation of a one-time use random number nonce, as described below:

[0044] The scheme is implemented in hardware and tested through power consumption analysis. The accuracy of guessed values ​​under power consumption analysis of all key bits is maintained at around 50% as the number of power consumption curves increases, indicating that the scheme can indeed reduce information leakage and improve the security of the system in coping with power consumption analysis.

[0045] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A one-time random number generator, It is characterized in that include: Start bit detection module, pseudo random number generator (DRBG) module, counter module, plain text detection module and delay generation module; The start bit detection module and the plain text detection module are respectively connected to the delay generation module, and work together to generate a sampling time signal. The counter module is connected to two pseudo-random number generation modules to control their operation to generate a one-time random number nonce sequence. The sampling time signal samples the random number nonce sequence to obtain a one-time nonce output; The pseudo-random number generator module works in an alternating opposite assignment mode under the control of the counter module, saving hardware resources and generating its own power consumption overlap under the premise of ensuring normal functions; The start bit detection module controls the starting point of nonce sampling time through the arrival time of valid data, and the final generation of nonce is related to the arrival time of the plaintext or ciphertext valid data; The plaintext detection module controls the starting point of nonce sampling time through the plaintext content, and the final nonce generated is related to the plaintext or ciphertext valid data content.

2. A method for using the device as claimed in claim 1, It is characterized in that Step S1, after power-on, two 16-bit pseudo-random number generators with different seeds start working; Step S2, the counter counts cyclically. Under the control of the counter, two 16-bit pseudo-random number generators assign values ​​to 128-bit nonce groups in opposite directions at the same time; Step S3: If the start bit SOF is not detected, then continue to update the nonce value in step S2; if the start bit SOF is detected, proceed to the next step; Step S4, extracting the plaintext grouping in the valid data; Step S5: If the kth bit in the plaintext group has not been obtained, continue to extract the plaintext group content; If the kth bit of the plaintext is extracted, the sampling calculation start time T S is set, and the i , j , k The three bits together constitute the sampling calculation delay time counting and final value determination T D ,in i , j , k You can specify it yourself. k is the less significant bit of the three; Step S6, counter 2 T S Start counting at the moment T D Stop counting when the current nonce packet is taken out as the nonce value used for encryption; Step S7, counter 2, T S , T D , clear.

Citation Information

Patent Citations

  • One-dimensional signal random sampling method based on compressed sensing

    CN103795422A

  • Device for generating physical random number based on silicon-based micro-cavity chaos

    CN109830888A

  • Data Encryption and Decryption Method and Apparatus

    US20140105382A1