# Challenging Assumptions of Normality in AES s-Box Configurations under Side-Channel Analysis
## 3 Methods
[PERSON]'s \(t\)-test evaluates the difference between two groups' means while also assuming that the two groups are observation-independent, contain no significant outliers, and that each group's data are normally distributed [15]. [PERSON]'s \(t\)-test is applied to the data rather than [PERSON]'s \(t\)-test, since each group of power traces' variances are not assumed to be equal. The null hypothesis for [PERSON]'s \(t\)-test states that the two groups' difference in means is 0, while the two-tailed alternative hypothesis is that the difference between the means is not 0. A significance level, \(\alpha\), is selected before performing the test and is used to determine whether there is any statistically significant difference between the two groups' means. To follow [PERSON] et al. 's chosen significance level, \(\alpha\) is chosen to be 0.0001, which has an associated \(t\)-statistic of 4.5. The calculation of the samples' \(t\)-statistic, \(\hat{t}\), is defined as:  
\[\hat{t}=\frac{\bar{X}_{1}-\bar{X}_{2}}{\sqrt{\frac{\bar{s}_{1}^{2}}{N_{1}^{2}} +\frac{\bar{s}_{2}^{2}}{N_{2}}}},\]  
where \(\bar{X}_{i}\) is the \(i\)th sample mean, \(s_{i}\) is the sample standard deviation, and \(N_{i}\) is the sample size. Under [PERSON]'s \(t\)-test, values satisfying \(|\hat{t}|>4.5\) provide sufficient evidence, with a 99.99% confidence interval, that there is a significant difference between the two data groups. This is consistent with the past experimental testing of AES under TVLA. In order to make critical comparisons to later evaluations, a separate [PERSON]'s \(t\)-test was run to have a base-line \(p\)-value for each of the nine datasets. Whether a dataset was sampled from a normal distribution can be assessed using the Shapiro-Wilk test [27]. This test was developed by [PERSON] and [PERSON] to determine the normality of a sample using analysis of variance. If the \(p\)-value returned from this test is less than the desired confidence level \(\alpha\), then there is significant evidence to support the claim that the data is not normal at a \((\alpha*100)\%\) significance level. The Shapiro-Wilk test for normality has an implementation in R, shapiro.test(x) [28]. However, shapiro.test(x) from the base R package only functions for between 3 and 5000 input variables. To accommodate this restriction, each dataset was separated into sequential subsets consisting of approximately 2400 data points. Approximation is used to slightly vary the number of traces present in the fixed and random groups for each s-box configuration. By splitting the data, there is no need to conduct sufficient random sampling across the entire dataset at one time. The Shapiro-Wilk test calculates a \(W\)-statistic as follows:\[W=\frac{\left(\sum_{i=1}^{n}a_{i}x_{(i)}\right)^{2}}{\sum_{i=1}^{n}\left(x_{i} \xi\right)^{2}},\]  
where \(x_{(i)}\) is the \(i\)th order statistic, \(\tilde{x}=\left(x_{1}+\cdots,+x_{n}\right)\), and the coefficient \(a_{i}\) are given by \(\left(a_{1},\cdots,a_{n}\right)=\frac{m^{T}V^{-1}}{C}\), where \(C\) is a vector norm \(C=||\ V^{-1}m\ ||=(m^{T}V^{-1}V^{-1}m)^{1/2}\) for a vector \(m=(m_{1},\cdots,m_{n})^{T}\). To ensure that there was no biasing in the subset samplings while testing for normality, the Kolmogorov-Smirnov test [29] from the base R package [28], was utilized. This test accommodates input data regardless of size, and so leveraging this removes the need for processing subsets of the power traces to test for normality. Both the one-sample and two-sample variants of the Kolmogorov-Smirnov test are utilized in this analysis. The two-sample version tests whether a given pair of traces from the fixed and random data originate from the same distribution. The one-sample version tests if a group of trace data comes from the normal distribution. To accommodate the one-sample test, both the fixed and random data are stored in separate columns of a shared R DataFrame, while the two-sample test accepts two separate DataFrames, with each containing either fixed or random data.