Safe Sliding Window Exponentiation via Finite Automaton
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for calculating exponentiation, such as the sliding window algorithm, are inefficient and vulnerable to side-channel attacks, particularly in resource-constrained devices like chip cards, where protecting secret data is crucial.
Innovation Solution
Implementing the sliding window algorithm as a finite automaton, which processes exponentiation as a sequence of similar arithmetic operations and state transitions, masking the exponent value's influence on the calculation profile and thus resisting side-channel attacks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the sliding window algorithm is implemented directly with conditional branches, then the exponentiation calculation speed is improved, but the security against side-channel attacks deteriorates
Solution Approach 1:
The patent applies homogeneity by making all iteration steps structurally identical - each step performs the same sequence of operations (squaring the accumulator, conditionally multiplying by precomputed values based on window bits) regardless of the exponent bit values. This uniform structure eliminates timing variations that would otherwise leak exponent information through side-channel attacks, while still achieving fast exponentiation through the sliding window method.
2Reliability
If dummy operations are added to protect against side-channel attacks, then the security is improved, but the calculation efficiency deteriorates
Solution Approach 1:
The patent applies preliminary action by precomputing all necessary power values (g^0, g^1, g^2, ..., g^k-1) and storing them in a lookup table before the exponentiation process begins. During the actual exponentiation, only table lookups and conditional multiplications are needed, eliminating the need for dummy operations while maintaining both security and efficiency.
Data Source
Figure 1
Figure 2~3
AI summary
The method involves executing calculation of exponentiation as a sequence of a homogeneous arithmetic operations e.g. multiplication and quadrature, and state transitions, where the method is implemented in a finite state machine. The state machine is implemented as a table with states and state transitions. Exponent bits are processed in each sub-step. One of the arithmetic operations fixed by the table is executed and one of the state transitions fixed by the table is executed in each sub-step. An independent claim is also included for a system for implementing a method calculating a result of an exponentiation according to a sliding window algorithm.