Ciphertext Comparison Using Equal-Hamming-Weight Lookup Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvesecurity against side channel attackVSAvoidcomplexity of comparison operation
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If ciphertexts are segmented and processed through lookup tables, then side channel attack resistance is improved, but computational overhead increases

Engineering Contradiction:
Improvesecurity against differential power analysisVSAvoidcomparison operation speed
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If intermediate comparison results are maintained for accurate comparison, then comparison precision is achieved, but power consumption patterns expose secret information

Engineering Contradiction:
Improveciphertext comparison accuracyVSAvoidpower analysis vulnerability
Core Design Contradiction:
Measurement precisionVSObject-affected harmful factors

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.

Inventive Principle:
Principle #33Homogeneity

Data Source

PatentEP4423960B1Apparatus and method for ciphertext comparison capable of preventing side channel attack
Publication Date: 2026.03.18 SAMSUNG SDS CO LTD
  • EP4423960B1 patent drawingFigure 1~2
  • EP4423960B1 patent drawingFigure 3
  • EP4423960B1 patent drawingFigure 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.