Ciphertext Comparison Using Equal-Hamming-Weight Lookup Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing cryptographic algorithms are vulnerable to side channel attacks, particularly through differential power analysis, during ciphertext comparison operations, as intermediate comparison results are exposed, necessitating a secure comparison method.
Innovation Solution
A ciphertext comparison method that segments ciphertexts into part bitstreams, uses lookup tables to generate intermediate and result values with identical Hamming weights, and processes these values to produce a final comparison result, thereby masking power consumption patterns.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a ciphertext comparison operation is performed using conventional methods, then the comparison function is achieved, but intermediate comparison results are exposed making the system vulnerable to side channel attacks
Solution Approach 1:
The ciphertext comparison operation is divided into multiple segments processing different bit positions separately. Each segment processes a portion of the ciphertext bits independently, accumulating results without exposing intermediate comparison states that could be exploited in side channel attacks.
Solution Approach 2:
An intermediate accumulator variable is introduced to hold cumulative comparison results. This mediator prevents exposure of individual bit comparison states by aggregating results through XOR operations, ensuring that no intermediate value reveals information about the comparison process to potential attackers.
2Reliability
If ciphertexts are segmented and processed through lookup tables, then side channel attack resistance is improved, but computational overhead increases
Solution Approach 1:
Lookup tables are pre-computed and stored containing all possible comparison results for given bit patterns. During the actual comparison operation, these pre-computed values are retrieved and combined through XOR operations, eliminating the need for complex real-time computations and reducing processing time despite the enhanced security measures.
3Measurement precision
If intermediate comparison results are maintained for accurate comparison, then comparison precision is achieved, but power consumption patterns expose secret information
Solution Approach 1:
The comparison operation is designed to maintain uniform power consumption characteristics regardless of the comparison outcome or intermediate states. By using XOR accumulation and processing all bit segments uniformly, the method ensures that power traces do not reveal information about which ciphertext bits differ, preserving both accuracy and security.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
A ciphertext comparison method according to an embodiment is performed by a processor in a computing apparatus, and the method includes an operation of segmenting a first ciphertext and a second ciphertext into m part bitstreams (in this instance, m is a natural number satisfying 1<m), respectively; an operation of extracting a value corresponding to a j-1th part bitstream (in this instance, j=i+1, i is a natural number satisfying 0≤i≤m-1) of the first ciphertext and a j-1th part bitstream of the second ciphertext, as a jth intermediate value between a first value and a second value in a first lookup table including the first value and the second value of which Hamming weights are identical; an operation extracting a value corresponding to the jth intermediate value and a j-1th result value, as a jth result value between a third value and a fourth value in a second lookup table including the third value and the fourth value of which Hamming weights are identical; and in a case of j≠m, an operation of repeatedly performing extraction as the jth intermediate value and extraction as the jth result value by increasing J; and in a case of j=m, an operation of outputting an mth result value as a result value of comparison between the first ciphertext and the second ciphertext.