
Construction and Evaluation of KS Based Distinguishers 339
2.3 PKS Distinguisher
PKS distinguisher is based on single-sample KS test. Its central idea is to measure
the p-value produced by comparing normal distribution and part of conditional
trace distribution L|M . For convenience, leakages L and the hypothetical power
consumptions M are usually processed by Z-score transformation in PKS. p is an
empirical parameter in PKS from zero to one. N(0,1) represents standard normal
distribution. PKS, a two-partial KS test distinguisher, is shown in the formula (6).
D
KS
l
= P
value
(D
KS
(Pr[L = l|M ≤ p]||N (0, 1))) (4)
D
KS
r
= P
value
(D
KS
(Pr[L = l|M>p]||N(0, 1))) (5)
D
PKS
= D
KS
l
× D
KS
r
(6)
PKS will return the smallest product of p-values when the key hypothesis is
correct.
3 Systematic Construction of KS Test Based
Side-Channel Distinguishers
Fromsection2,welearnthatbothKSAandPKSarebasedonKStest,and
they are able to recover the correct key by partitioning the leakages correctly.
However, KSA and PKS are really different from each other in terms of their
construction strategies. Therefore, we will show how to construct other new
variants of KS test based distinguishers by combining their different construction
strategies in a systematic way. For this purpose, we will analyze the construction
strategies using by KSA and PKS, and then we will present nine new variants
of KS test based distinguishers.
3.1 Construction Strategies of KSA and PKS
In this subsection, we will compare the construction differences between KSA
and PKS in four aspects: partition method, similarity measure used by KS test,
assumption about leakages, and normalization.
Partition Method. In a partition attack [16], leakages are divided into sev-
eral sets p
1
k
,p
2
k
, ..., p
n
k
according to each key hypothesis k. These sets are built
according to a power model H. In this paper, partition method is classified as
non-cumulative partition method and cumulative partition method. Examples
of hypothetical leakages that can be used to partition 16-element leakages are
shown in Table 1. Specifically, non-cumulative partition used by KSA is shown
in the left part of Table 1, while cumulative partition used by PKS is shown in
the right part of Table 1.
Similarity Measure Used by KS Test. Distance is used by KSA to measure
the similarity of two distributions. In contrast, p-value is adopted in PKS to
indicate whether or not partial leakages follow a normal distribution.