IP Library Granted Patent US 12,244,685
Granted Patent B2
US 12,244,685 · App. 18/173,569 · Granted Mar 4, 2025

Carry-based differential power analysis and its application to testing for vulnerability of SHA-2 and HMAC-SHA-2 to side channel attack

Inventors: Yaacov Belenky (Maale Adumim, IL); Ury Kreimer (Tekoa, IL); Alexander Kesler (Newton, MA)
Assignee: FORTIFYIQ, INC.
H04L9/002G06F21/577G06F2221/033
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,244,685
App. No.
18/173,569
Granted
Mar 4, 2025
Kind
B2
Abstract

In a general aspect, a method for testing vulnerability of a cryptographic function (CF) to a side-channel attack includes providing a plurality of input values to the function, where the CF, for each input value calculates a sum of the input value and a first value of the CF, and replaces a second value of the CF with the sum. The method further includes measuring a set of samples including a respective side-channel leakage sample for each input value. The method also includes iteratively performing a series of operations including splitting the set of samples into a plurality of subsets based on the input values, calculating a respective value for each subset based on samples of the subset, and comparing the respective values for different subsets to discover respective bit values of the first value and the second value from their least significant bits to most significant bits.

Claims (80)

1. A method for testing for vulnerability of a cryptographic function to a side-channel attack, the method comprising:

providing a plurality of input values to the cryptographic function, wherein the cryptographic function, for each input value of the plurality of input values:

calculates a sum of the input value and a first value of the cryptographic function; and

replaces a second value of the cryptographic function with the sum;

measuring a set of samples including, for each input value of the plurality of input values, a respective side-channel leakage sample; and

iteratively performing a series of operations including:

splitting the set of samples into a plurality of subsets based on the plurality of input values;

for each subset of the plurality of subsets, calculating a respective value based on samples of the subset; and

comparing the respective values for different subsets to discover bit values of the first value and bit values of the second value,

the bit values of the first value and the bit values of the second value being discovered from respective least significant bits (LSBs) to respective most significant bits (MSBs).

2. The method of claim 1 , further comprising respectively comparing the discovered bit values of the first value and the discovered bit values of the second value to the first value and the second value to determine if the discovered bit values of the first value and the discovered bit values of the second value are correct.

3. The method of claim 1 , wherein each iteration of the series of operations discovers one or more bit values of the first value and one or more bit values of the second value.

4. The method of claim 1 , wherein splitting the set of samples into the plurality of subsets is further based on previously discovered bit values of the first value and the second value.

5. The method of claim 1 , wherein the respective values for the different subsets are respective averages.

6. The method of claim 1 , wherein the cryptographic function is implemented in hardware.

7. A method for testing for vulnerability of a cryptographic function to a side-channel attack, the method comprising:

providing a plurality of input values to the cryptographic function, wherein the cryptographic function, for each input value of the plurality of input values:

calculates a first sum, the first sum being a sum of the input value and a first value of the cryptographic function;

calculates a second sum, the second sum being a sum of the input value and a second value of the cryptographic function;

replaces a third value of the cryptographic function with the first sum; and

replaces a fourth value of the cryptographic function with the second sum;

measuring a set of traces including, for each input value of the plurality of input values, a respective side-channel leakage trace;

iteratively performing a series of operations, each operation in the series of operations including:

splitting the set of traces into a plurality of subsets based on the plurality of input values;

for each subset of the plurality of subsets, calculating a respective value based on traces of the subset; and

comparing the respective values for different subsets to discover bit values of the first value and bit values of the second value,

the series of operations discovering the bit values of the first value and the bit values of the second value from respective least significant bits (LSBs) to respective most significant bits (MSBs); and

respectively comparing the discovered bit values for the first value and the second value to the first value and the second value to determine if the discovered bit values of the first value and the discovered bit values of the second value are correct.

8. The method of claim 7 , wherein each iteration of the series of operations results in one of:

no bit values being discovered; or

one or more bit values of the first value and one or more bit values of the second value being discovered.

9. The method of claim 7 , wherein splitting the set of traces into the plurality of subsets is further based on previously discovered bit values of the first value and the second value.

10. The method of claim 7 , wherein the respective values for the different subsets are respective averages.

11. The method of claim 7 , wherein the cryptographic function is implemented in hardware.

12. The method of claim 7 , wherein the cryptographic function is a secure hash algorithm 2 (SHA-2) hash function.

13. The method of claim 7 , wherein the cryptographic function is a hash-based message authentication code (HMAC) function.

14. The method of claim 7 , wherein each respective side-channel leakage trace includes a plurality of side-channel leakage samples.

15. The method of claim 14 , wherein the plurality of side-channel leakage samples includes at least one of:

a plurality of side-channel leakage samples corresponding with a same clock cycle of the cryptographic function; or

a plurality of side-channel leakage samples corresponding with different clock cycles of the cryptographic function.

16. The method of claim 7 , wherein the plurality of subsets is a first plurality of subsets and the series of operations is a first series of operations, the method further comprising:

if the discovered bit values of the first value and the discovered bit values of the second value are determined to be correct, iteratively performing a second series of operations to discover a set of hypotheses for the third value and the fourth value, each operation in the second series of operations including, for each hypothesis of the set of hypotheses:

splitting the set of traces into a second plurality of subsets based on the plurality of input values;

for each subset of the second plurality of subsets, calculating a respective value based on traces in the subset; and

comparing the respective values for different subsets of the second plurality of subsets to expand the hypothesis by discovering bit values of the third value and bit values of the fourth value,

the second series of operations discovering the bit values of the third value and the bit values of the fourth value from respective least significant bits (LSBs) to respective most significant bits (MSBs); and

for at least one expanded hypothesis, respectively comparing the discovered bit values for the third value and discovered bit values for the fourth value to the third value and the fourth value to determine if the discovered bit values of the third value and the discovered bit values of the fourth value are correct.

17. The method of claim 16 , wherein expanding the hypothesis includes increasing a number of hypotheses of the set of hypotheses.

18. The method of claim 16 , wherein the cryptographic function is a secure hash algorithm 2 (SHA-2) hash function.

19. The method of claim 16 , wherein the cryptographic function is a hash-based message authentication code (HMAC) function.

20. A non-transitory computer-readable medium having instructions stored thereon, the instructions, when executed by one or more processors cause the one or more processors to:

provide a plurality of input values to a cryptographic function, wherein the cryptographic function, for each input value of the plurality of input values:

calculates a sum of the input value and a first value of the cryptographic function; and

replaces a second value of the cryptographic function with the sum;

measure a set of samples including, for each input value of the plurality of input values, a respective side-channel leakage sample; and

iteratively perform a series of operations including:

splitting the set of samples into a plurality of subsets based on the plurality of input values;

for each subset of the plurality of subsets, calculating a respective value based on samples of the subset; and

comparing the respective values for different subsets to discover bit values of the first value and bit values of the second value,

the bit values of the first value and the bit values of the second value being discovered from respective least significant bits (LSBs) to respective most significant bits (MSBs).

21. A non-transitory computer-readable medium having instructions stored thereon, the instructions, when executed by one or more processors cause the one or more processors to:

provide a plurality of input values to a cryptographic function, wherein the cryptographic function, for each input value of the plurality of input values:

calculates a first sum, the first sum being a sum of the input value and a first value of the cryptographic function;

calculates a second sum, the second sum being a sum of the input value and a second value of the cryptographic function;

replaces a third value of the cryptographic function with the first sum; and

replaces a fourth value of the cryptographic function with the second sum;

measure a set of traces including, for each input value of the plurality of input values, a respective side-channel leakage trace;

iteratively perform a series of operations, each operation in the series of operations including:

splitting the set of traces into a plurality of subsets based on the plurality of input values;

for each subset of the plurality of subsets, calculating a respective value based on traces of the subset; and

comparing the respective values for different subsets to discover bit values of the first value and bit values of the second value,

the series of operations discovering the bit values of the first value and the bit values of the second value from respective least significant bits (LSBs) to respective most significant bits (MSBs); and

respectively compare the discovered bit values for the first value and the second value to the first value and the second value to determine if the discovered bit values of the first value and the discovered bit values of the second value are correct.

22. The non-transitory computer-readable medium of claim 21 , wherein the plurality of subsets is a first plurality of subsets and the series of operations is a first series of operations, and the instructions, when executed by the one or more processors, further cause the one or more processors to:

if the discovered bit values of the first value and the discovered bit values of the second value are determined to be correct, iteratively perform a second series of operations to discover a set of hypotheses for the third value and the fourth value, each operation in the second series of operations including, for each hypothesis of the set of hypotheses:

splitting the set of traces into a second plurality of subsets based on the plurality of input values;

for each subset of the second plurality of subsets, calculating a respective value based on traces in the subset;

comparing the respective values for different subsets of the second plurality of subsets to expand the hypothesis by discovering bit values of the third value and bit values of the fourth value,

the second series of operations discovering the bit values of the third value and the bit values of the fourth value from respective least significant bits (LSBs) to respective most significant bits (MSBs); and

for at least one expanded hypothesis, respectively compare the discovered bit values for the third value and discovered bit values for the fourth value to the third value and the fourth value to determine if the discovered bit values of the third value and the discovered bit values of the fourth value are correct.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2023
From: BELENKY, YAACOV; KREIMER, URY; KESLER, ALEXANDER
To: FORTIFYIQ, INC.
Reel/Frame 063838/0383 →
Continuity (2)
Provisional Application 63268482 · Feb 24, 2022
Related Publication 20230269065A1 · Aug 24, 2023
References Cited (14)
US 10454674B1 · Bar-El · 2019 [cited by examiner]
US 20090010424A1 · Qi et al. · 2009 [cited by applicant]
US 20130173928A1 · Kocher et al. · 2013 [cited by applicant]
US 20150134973A1 · Maytal · 2015 [cited by examiner]
US 20150222421A1 · Guo et al. · 2015 [cited by applicant]
US 20150365228A1 · Belenky · 2015 [cited by applicant]
US 20180069693A1 · Boivie · 2018 [cited by examiner]
US 20190318130A1 · Ghosh · 2019 [cited by examiner]
US 20220414227A1 · Belenky et al. · 2022 [cited by applicant]
Belaid, Sonia, et al. “Differential power analysis of HMAC SHA-2 in the Hamming weight model.” 2013 International Conference on Security and Cryptography (SECRYPT). IEEE, 2013, 13 pages. [cited by applicant]
Gebotys, Catherine H., Brian A. White, and Edgar Mateos. “Preaveraging and carry propagate approaches to side-channel analysis of HMAC-SHA256.” ACM Transactions on Embedded Computing Systems (TECS) 15.1 (2016): pp. 1-19. [cited by applicant]
McEvoy, Robert, et al. “Differential power analysis of HMAC based on SHA-2, and countermeasures.” International Workshop on Information Security Applications. Springer, Berlin, Heidelberg, 2007, 16 pages. [cited by applicant]
International Search Report and Written Opinion for PCT Application No. PCT/US2023/063152, mailed on Jul. 27, 2023, 12 pages. [cited by applicant]
Iokibe, Kengo, et al., “A Study on Evaluation Board Requirements for Assessing Vulnerability of Cryptographic Modules to Side-Channel Attacks”, IEEE, 2020, pp. 528-531. [cited by applicant]