A side channel time attack protection circuit and method for SPHINCS+

By introducing a computing unit and a protection unit into the hardware carrier of the SPHINCS+ algorithm, storing the hashing operation results and approximate the power consumption curve, the problem of side channel time attack is solved and information security is improved.

CN118337364BActive Publication Date: 2025-04-01HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410517363.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2025-04-01
Estimated Expiration
2044-04-28

AI Technical Summary

Technical Problem

In the hardware carrier that deploys the SPHINCS+ algorithm, the attacker can bypass the underlying mathematical problems of the cryptographic algorithm by measuring the power consumption and time information of the chip during operation, and complete the theft of private information, resulting in side channel security issues.

Method used

By introducing an operation unit and a protection unit in the protection circuit, which are used for hashing operations and storing the operation results respectively, the power consumption curve generated by each operation is approximated, thereby covering up the signature generation time and preventing attackers from obtaining signature generation time information through power consumption measurements.

Benefits of technology

It effectively masks the signature generation time, making it impossible for attackers to obtain private information by measuring power consumption, and improves the security of the information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118337364B_ABST
    Figure CN118337364B_ABST
Patent Text Reader

Abstract

The present application provides a side channel time attack protection circuit and method for SPHINCS+. It includes: an operation unit, which is used to perform hash operations based on input data and output the operation results generated by each hash operation; a protection unit, connected to the operation unit, which is used to receive the operation results generated by each hash operation, and store the operation results corresponding to each operation, so that the power consumption curve generated by each operation is approximate. After each operation is completed, the present application stores the corresponding operation results, so that the power consumption curve generated by each operation is approximate. The attacker cannot obtain the real signature generation time by measuring the power consumption, and cannot complete the acquisition of private information, thereby improving information security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a side-channel time attack protection circuit and method for SPHINCS+. Background Art

[0002] Digital signatures are essential in our increasingly digital and interconnected world. From protecting sensitive financial transactions and legal contracts to protecting the integrity of important healthcare and government documents, they are the cornerstone of trust and security in a variety of online activities. However, with the development of quantum computers, traditional ECDH and RSA will no longer be able to provide sufficient security. Post-quantum cryptographic algorithms are considered to be a new generation of cryptographic systems that can effectively resist brute force attacks from quantum computers. Since the National Institute of Standards and Technology (NIST) launched the post-quantum cryptography solicitation project in 2016, after three rounds of screening, only four algorithms, Kyber, Dilithuim, Falcon, and SPHINCS+, have been successfully selected and are being standardized. Among these four algorithms, SPHINCS+ has become the only hash-based algorithm among the winners of the third round of NIST solicitation algorithms due to its complete security proof and simple calculation operations.

[0003] However, in actual applications, the hardware carriers that deploy this algorithm will face many potential side-channel security issues. Attackers can bypass the underlying mathematical problems of the cryptographic algorithm and steal private information by measuring the power consumption, time and other information generated by the chip during operation. Summary of the invention

[0004] To solve the above problems, the present application provides a side channel time attack protection circuit and method for SPHINCS+. The method stores the calculation results corresponding to each operation, so that the power consumption curve generated by each operation is approximate, thereby masking the signature generation time in the algorithm, making it impossible for attackers to obtain signature generation time information by measuring power consumption, thereby improving information security.

[0005] The first technical solution provided by the present application is: to provide an anti-side channel time attack protection circuit for SPHINCS+, including: an operation unit, used to perform hash operation based on input data, and output the operation result generated by each hash operation; a protection unit, connected to the operation unit, used to receive the operation result generated by each hash operation, and store the operation result corresponding to each operation, so that the power consumption curve generated by each operation is approximate.

[0006] Wherein, the protection unit includes: a storage unit, the storage unit includes a first signature area and a second signature area, the first signature area is used to store operation results corresponding to part of the operation; the second signature area is used to store operation results corresponding to the remaining part of the operation.

[0007] Among them, the protection circuit includes: a counter, used to count the number of hash operations, and each time a hash operation is performed, the counter result is increased by 1; a judgment module, connected to the counter, used to compare the counting result of the counter with the information to be signed, and output the comparison result; a data distributor, connected to the judgment module, used to determine whether to store the operation result corresponding to the current operation in the first signature area or the second signature area according to the comparison result.

[0008] Wherein, the protection circuit includes: a register, the register is connected to the operation unit, and is used to receive the operation result output by the operation unit; the data distributor is connected to the register, and is used to selectively store the operation result corresponding to the current operation stored in the register to the first signature area or the second signature area.

[0009] If the comparison result indicates that the count result of the counter is the same as the information to be signed, the operation result corresponding to the current operation is stored in the first signature area;

[0010] If the comparison result indicates that the counting result of the counter is different from the information to be signed, the operation result corresponding to the current operation is stored in the second signature area.

[0011] Wherein, the protection unit further includes: an output unit connected to the first signature area, and the output unit is used to output the operation result stored in the first signature area.

[0012] The second technical solution provided by the present application is: to provide a side channel time attack protection method for SPHINCS+, including: performing hash operations based on input data, and outputting the operation results of each hash operation; receiving the operation results generated by each hash operation, and storing the operation results corresponding to each operation, so that the power consumption curve generated by each operation is approximate.

[0013] The operation result corresponding to each operation is stored, including: storing the operation results corresponding to part of the operations in the first signature area, and storing the operation results corresponding to the remaining operations in the second signature area.

[0014] A counter is used to count the number of hash operations, and each time a hash operation is performed, the counter result is increased by 1; the count result of the counter is compared with the information to be signed, and the comparison result is output; and according to the comparison result, it is determined to store the operation result corresponding to the current operation in the first signature area or the second signature area.

[0015] If the comparison result indicates that the counting result of the counter is the same as the information to be signed, the operation result corresponding to the current operation is stored in the first signature area; if the comparison result indicates that the counting result of the counter is different from the information to be signed, the operation result corresponding to the current operation is stored in the second signature area.

[0016] The beneficial effect of this application is different from the prior art. After each operation is completed, the corresponding operation result is stored, so that the power consumption curve generated by each operation is approximate. Attackers cannot obtain the real signature generation time by measuring power consumption, and cannot obtain private information, thereby improving information security. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0018] Figure 1 It is a structural schematic diagram of a first embodiment of a side channel time attack protection circuit for SPHINCS+ of the present invention;

[0019] Figure 2a This is a power consumption curve of the hash chain operation in the existing SPHINCS+;

[0020] Figure 2b This is a power consumption curve diagram of the anti-side channel time attack protection circuit used in SPHINCS+ in this application;

[0021] Figure 3 It is a structural schematic diagram of a second embodiment of a side channel time attack protection circuit for SPHINCS+ of the present invention;

[0022] Figure 4 The figure is a schematic diagram of the structure of an embodiment of a method for protecting SPHINCS+ against side channel time attacks according to the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] For the hash chain operation in SPHINCS+, the value D of the private information i It will be converted into the corresponding number of hash operations, that is, the information to be signed. Specifically, when the count value index in the hash operation process is equal to the information to be signed D i When , the time point of signature generation is marked, and the processor generates the operation of storing the signature. Figure 2a As shown, assuming D i =3, then the third operation is the signature generation time. Because the processor generates the operation of storing the signature at the time of signature generation, the power consumption will increase significantly at this time, as shown in the elliptical part in the figure. The attacker can obtain the signature generation time by measuring the power consumption, and then complete the acquisition of private information, which has low information security.

[0025] Based on this, the present application provides a protection circuit that can prevent attackers from obtaining signature generation time information by measuring power consumption, thereby improving information security. Figure 1 , Figure 1 This is a schematic diagram of the structure of the first embodiment of the side channel time attack protection circuit for SPHINCS+ of the present invention, including: an operation unit 11 and a protection unit 12. The operation unit is used to perform a hash operation based on the input data, and output the operation result generated by each hash operation. The protection unit 12 is connected to the operation unit 11, and is used to receive the operation result generated by each hash operation, and store the operation result corresponding to each operation, so that the power consumption curve generated by each operation is approximate. It should be noted that the operation result corresponding to each operation is the corresponding signature.

[0026] After each operation is completed, the corresponding operation result is stored, so that the power consumption curve generated by each operation is approximate. Figure 2b As shown, the power consumption after the third operation is completed (the oval part in the figure) is the same as the power consumption of the first two operations. At this time, the attacker cannot obtain the real signature generation time (that is, the corresponding operation result generation time) by measuring the power consumption, and cannot obtain the private information, thereby improving information security.

[0027] Please combine Figure 3 , Figure 3The structure diagram of the second embodiment of the side channel time attack protection circuit for SPHINCS+ of the present invention is shown in FIG. In this embodiment, the protection unit 12 includes: a storage unit 13. The storage unit 13 includes a first signature area and a second signature area, wherein the first signature area is used to store the operation results corresponding to some operations; and the second signature area is used to store the operation results corresponding to the remaining operations.

[0028] A first signature area and a second signature area are set in the storage unit 13, and the real operation result corresponding to the signature generation time is stored in the first signature area, and other movement results are stored in the second signature area.

[0029] Specifically, the protection circuit includes: a counter (not shown), a judgment module 123, a data distributor 122 and a register 121. The counter is used to count the number of hash operations. Each time the count result of the counter is represented by index, a hash operation is performed, and the counter result index is increased by 1. The judgment module 123 is connected to the counter and is used to compare the count result index of the counter with the information to be signed D. i The data distributor 122 is connected to the judgment module 123, and is used to determine whether to store the operation result corresponding to the current operation in the first signature area or the second signature area according to the comparison result. The register 121 is connected to the operation unit 11 and the data distributor 122, and is used to receive the operation result output by the operation unit 11; the data distributor 122 is connected to the register 121, and is used to selectively store the operation result corresponding to the current operation stored in the register 121 in the first signature area or the second signature area.

[0030] Specifically, if the comparison result indicates that the count result of the counter is the same as the information to be signed, that is, index = D i , it means that this is the signature generation time, and the operation result corresponding to the current operation is stored in the first signature area, that is, the real signature area. If the comparison result indicates that the counting result of the counter is different from the information to be signed, that is, index≠D i , then the operation result corresponding to the current operation is stored in the second signature area, that is, the forged signature area.

[0031] In the above scheme, additional storage power consumption will be generated after each operation is completed, and the actual storage time of the signature is thus hidden, thereby protecting the leakage of private information.

[0032] In one embodiment of the present application, the protection unit 12 includes an output unit connected to the first signature area, and the output unit is used to output the operation result stored in the first signature area, that is, only the real signature information stored in the first signature area is finally output.

[0033] See also Figure 4 , is a flow chart of an embodiment of a method for protecting SPHINCS+ from side channel time attacks according to the present invention, which specifically includes:

[0034] Step S41: Perform hash operation based on the input data, and output the operation result of each hash operation.

[0035] It can be understood that the protection method of this application is based on the above Figure 1 and Figure 3 In the actual solution, the operation unit is used to perform hash operation based on the input data and output the operation result of each hash operation.

[0036] Step S42: receiving the operation result generated by each hash operation, and storing the operation result corresponding to each operation, so that the power consumption curve generated by each operation is approximate.

[0037] After each operation is completed, the corresponding operation result is stored, so that the power consumption curve generated by each operation is approximate. Figure 2b As shown, the power consumption after the third operation is completed (the oval part in the figure) is the same as the power consumption of the first two operations. At this time, the attacker cannot obtain the real signature generation time by measuring the power consumption, and cannot obtain the private information, thereby improving information security.

[0038] In one embodiment, the operation results corresponding to part of the operation are stored in the first signature area, and the operation results corresponding to the remaining part of the operation are stored in the second signature area.

[0039] A first signature area and a second signature area are set in the storage unit, and the real operation result corresponding to the signature generation time is stored in the first signature area, and other movement results are stored in the second signature area.

[0040] A counter is used to count the number of hash operations, and each time a hash operation is performed, the counter result is increased by 1; the count result of the counter is compared with the information to be signed, and the comparison result is output; according to the comparison result, it is determined whether the operation result corresponding to the current operation is stored in the first signature area or the second signature area. Specifically, if the comparison result indicates that the count result of the counter is the same as the information to be signed, the operation result corresponding to the current operation is stored in the first signature area; if the comparison result indicates that the count result of the counter is different from the information to be signed, the operation result corresponding to the current operation is stored in the second signature area.

[0041] Specifically, if the comparison result indicates that the count result of the counter is the same as the information to be signed, that is, index = D i , it means that this is the signature generation time, and the operation result corresponding to the current operation is stored in the first signature area, that is, the real signature area. If the comparison result indicates that the counting result of the counter is different from the information to be signed, that is, index≠D i , the operation result corresponding to the current operation is stored in the second signature area, that is, the forged signature area. In this way, additional storage power consumption is generated after each operation is completed, and the actual storage time of the signature is thus hidden, thereby protecting the leakage of private information.

[0042] The above are only implementation methods of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A side channel time attack protection circuit for SPHINCS+, characterized in that: include: A computing unit, configured to perform a hash operation based on input data and output a computing result generated by each hash operation; A protection unit connected to the operation unit, used to receive the operation result generated by each hash operation, and store the operation result corresponding to each operation, so that the power consumption curve generated by each operation is approximate; The protection unit comprises: A storage unit, the storage unit comprising a first signature area and a second signature area, the first signature area being used to store operation results corresponding to a part of the operation; the second signature area being used to store operation results corresponding to the remaining part of the operation; The protection circuit further comprises: A counter is used to count the number of hash operations. Each time a hash operation is performed, the counter result is incremented by 1. A judgment module, connected to the counter, used to compare the counting result of the counter with the information to be signed, and output the comparison result; A data distributor is connected to the judgment module and is used to determine, based on the comparison result, whether to store the operation result corresponding to the current operation in the first signature area or the second signature area.

2. The anti-side channel time attack protection circuit for SPHINCS+ according to claim 1, characterized in that: The protection circuit comprises: A register, the register being connected to the operation unit and used for receiving the operation result output by the operation unit; The data distributor is connected to the register and is used to selectively store the operation result corresponding to the current operation stored in the register to the first signature area or the second signature area.

3. The anti-side channel time attack protection circuit for SPHINCS+ according to claim 2, characterized in that: If the comparison result indicates that the count result of the counter is the same as the information to be signed, the operation result corresponding to the current operation is stored in the first signature area; If the comparison result indicates that the counting result of the counter is different from the information to be signed, the operation result corresponding to the current operation is stored in the second signature area.

4. The anti-side channel time attack protection circuit for SPHINCS+ according to claim 3, characterized in that: The protection unit also includes: An output unit is connected to the first signature area, and the output unit is used to output the calculation result stored in the first signature area.

5. A method for protecting SPHINCS+ against side channel time attacks, characterized in that: include: Perform hash operations based on input data and output the results of each hash operation; Receive the operation result generated by each hash operation, and store the operation result corresponding to each operation so that the power consumption curve generated by each operation is approximate; The operation results corresponding to each operation are stored, including: The operation results corresponding to the partial operation are stored in the first signature area, and the operation results corresponding to the remaining partial operation are stored in the second signature area; A counter is used to count the number of hash operations, and each time a hash operation is performed, the counter result is increased by 1; Compare the counting result of the counter with the information to be signed, and output the comparison result; Determine, based on the comparison result, whether to store the operation result corresponding to the current operation in the first signature area or the second signature area.

6. The method for protecting SPHINCS+ against side channel time attacks according to claim 5, characterized in that: If the comparison result indicates that the count result of the counter is the same as the information to be signed, the operation result corresponding to the current operation is stored in the first signature area; If the comparison result indicates that the counting result of the counter is different from the information to be signed, the operation result corresponding to the current operation is stored in the second signature area.