Branchless DES and Triple-DES Encryption Against Fault and Timing Attacks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing cryptographic systems are vulnerable to fault and timing attacks, particularly when selecting cryptographic algorithms through conditional branches, which can be exploited by attackers to disrupt the execution flow and infer sensitive information.
Innovation Solution
A method for encrypting and decrypting data using Triple Data Encryption Standard (T-DES) or Data Encryption Standard (DES) without conditional branches, by providing different encryption keys to a sequence of cipher functions, ensuring the same execution time for both algorithms, thus masking the execution time and preventing fault and timing attacks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conditional branches are used to select cryptographic algorithms, then program flexibility and algorithm selection capability are improved, but vulnerability to fault attacks and timing attacks increases
Solution Approach 1:
The patent extracts and removes the conditional branch structure from the cryptographic algorithm selection process. Instead of using if-then-else statements to select between DES and T-DES, the invention uses a unified code path that executes the same sequence of operations regardless of which algorithm is ultimately used, thereby eliminating the security vulnerability while preserving algorithm selection capability through key-based differentiation.
Solution Approach 2:
The patent implements a universal code structure that can handle both DES and T-DES algorithms without requiring separate code paths. The same encryption function is used for both algorithms, with the distinction made through key management (single key for DES, three keys for T-DES), making the code adaptable to different algorithms while maintaining consistent execution flow and security properties.
2Productivity
If different cryptographic algorithms (DES and T-DES) are implemented with separate code paths, then algorithm-specific optimization is improved, but execution time variation increases making the system vulnerable to timing attacks
Solution Approach 1:
The patent merges the previously separate code paths for DES and T-DES into a single unified execution path. Both algorithms use the same encryption function calls in the same sequence, eliminating timing variations that would reveal which algorithm is being executed. The merging is achieved through consistent use of encryption/decryption functions and uniform control flow structure.
Solution Approach 2:
The patent changes the distinguishing parameter from code structure to key parameters. Instead of differentiating algorithms through separate code paths (structural parameter), the invention differentiates them through key usage (functional parameter): DES uses a single key while T-DES uses three keys in sequence. This parameter change allows algorithm selection without creating timing vulnerabilities.
3Reliability
If duplicated conditional controls are implemented to prevent fault attacks, then fault attack resistance is improved, but code complexity and structural overhead increase
Solution Approach 1:
The patent extracts and removes the duplicated conditional control structures (such as if-then-else clauses) that were previously used to implement fault attack countermeasures. By eliminating these redundant control structures entirely and adopting a unified code path, the invention reduces code complexity while maintaining fault attack resistance through consistent execution flow.
4Reliability
If time-invariant algorithms are used to prevent timing attacks, then timing attack resistance is improved, but applicability and performance flexibility are reduced
Solution Approach 1:
The patent changes the approach from using inherently time-invariant algorithms to creating time-invariant execution through unified code structure. The invention maintains the ability to use different cryptographic algorithms (DES, T-DES) with their natural performance characteristics, but ensures timing attack resistance by making the execution path invariant through consistent control flow and function call sequences regardless of which algorithm is selected.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Method for encrypting data in an electronic system, comprising selecting (150) between performing on input data (D) a Triple Data Encryption Standard encryption (3D), obtaining (107) as output Triple Data Encryption Standard encrypted data (DX);or performing on said input data a single DES encryption (SD) obtaining (107) as output single Data Encryption Standard encrypted data (DX), said performing on said input data a Triple Data Encryption Standard encryption comprising providing (101) said input data to a first cipher performing a Data Encryption Standard encryption, providing (103) its output data to second cipher performing a Data Encryption Standard decryption, providing (105) its output data to a third cipher performing a further Data Encryption Standard encryption, each of said first, second and third cipher receiving a respective encryption or decryption key (K1, K2, K3), at least the key (K1) supplied to the first cipher being different from the key (K2) supplied to the second cipher, obtaining said output Triple Data Encryption Standard encrypted data (DX), said performing on said input data a single DES encryption comprising supplying (101) said input data to a first cipher performing (102) a DES encryption (EF1), providing (103) its output to a second cipher performing (104) a DES decryption outputting (105) data to a third cipher performing (106) a further DES encryption, each of said first (EF1), second (DF1) and third (EF2) cipher receiving a same encryption or decryption key (K), obtaining (107) as output single Data Encryption Standard encrypted data (DX).