# Enhancing Resilience in Digital Twins: ASCON-Based Security Solutions for Industry 4.0
## 3 Proposed Solution
### Ditto Java Base Payload Mapping

Table 5: Power Consumption of LOLIN32 Lite ESP-32 Device With Three Variant Implementations of The Proposed Solution. ## 5 Hypothesis Testing and Confidence Intervals

In this section, we aim to compare the mean processing speeds and memory requirements between AES-GCM and ASCON. By employing statistical tools such as hypothesis testing and confidence intervals, we ensured a robust evaluation of the performance metrics, providing insights into the effectiveness and efficiency of ASCON. ### Hypothesis Testing

5.1.1. Objective

* **Comparison**: The aim was to compare the mean processing speeds and memory requirements of two encryption algorithms, AES-GCM and ASCON, both using a 128-bit key size. * **Null Hypothesis (\(H_{0}\))**: There is no significant difference in the mean processing speeds and memory requirements between AES-GCM and ASCON. * **Alternative Hypothesis (\(H_{a}\))**: There is a significant difference in the mean processing speeds and memory requirements between AES-GCM and ASCON. #### 5.1.2 Methodology

* **Data Collection**: Performance metrics (processing speeds and memory requirements) were measured for both AES-GCM and ASCON in various operational scenarios. * **Statistical Test**: Since the data likely follow a normal distribution (assuming large sample sizes or normality was checked), a two-sample t-test was used for hypothesis testing. -**: The two-sample t-test compares the means of two independent groups (AES-GCM and ASCON) to determine if they are statistically different from each other. #### 5.1.3 Interpretation

* \(p\)**-Value**: The computed \(p\)-value from the t-test indicates the probability of observing the data if the null hypothesis (\(H_{0}\)) is true. A lower \(p\)-value suggests stronger evidence against \(H_{0}\). * **Significance Level (\(\alpha\))**: Typically set at 0.05, the significance level determines the threshold for rejecting \(H_{0}\). If the \(p\)-value is less than \(\alpha\), \(H_{0}\) is rejected in favor of \(H_{a}\), indicating a significant difference. #### 5.1.4 Outcome

* **Conclusion**: Based on the results of the hypothesis test, conclusions were drawn regarding whether there was a statistically significant difference in processing speeds and memory requirements between AES-GCM and ASCON. ### Confidence Intervals

5.2.1. Objective

* **Assessment**: Confidence intervals were calculated to estimate the range of values within which the true mean processing speeds and memory requirements for AES-GCM and ASCON were likely to fall. * **Reliability**: They provide a measure of the variability and reliability of the performance metrics, aiding in the interpretation of the quantitative results. #### 5.2.2 Methodology

* **Calculation**: For each performance metric (processing speeds and memory requirements), a confidence interval was computed. -**: A common choice is the 95% confidence level, which means there is a 95% probability that the true mean lies within the calculated interval. #### 5.2.3 Outcome

* **Conclusion**: The interpretation of the confidence intervals helps validate the consistency and reliability of the performance metrics observed for AES-GCM and ASCON, providing additional evidence to support the conclusions drawn from hypothesis testing. ## 6 Security Analysis

The security analysis aims to evaluate the robustness of the proposed communication scheme for securing IoT device messages sent via the MQTT protocol. This analysis addresses the key security properties of the encryption scheme, including data confidentiality and message integrity. Although key management is also another critical aspect of security analysis, it is not considered within the scope of this analysis. The security analysis focuses on assessing the strength of the proposed communication scheme, safeguarding messages from IoT devices transmitted via the MQTT protocol. This evaluation delves into crucial security aspects of the encryption scheme, such as data confidentiality and message integrity.