# A Novel Encryption Scheme in Ship Remote Control against Differential Fault Attack
## 4 Results and Discussion
### Analysis of Experimental Results  
The experimental environment is shown in Table 2.  
The S-boxes generated in Section 3 are sampled and evaluated. The Figure 6 is one of the generated S-boxes. The evaluation indicators include nonlinearity \(N_{F}\), differential uniformity \(\delta_{F}\), algebraic degree \(deg_{F}\), avalanche characteristics, and compared with the original S-box of the SM4. The evaluation results are shown in Table 3. Among them, nonlinearity \(N_{F}\) is a nonlinear criterion used to measure the ability to resist linear attacks. The greater the nonlinearity, the stronger the ability to resist the linear attack. Differential  
Figure 5: Security conceptual figure of intelligent ship CPS. uniformity \(\delta_{F}\) is used to measure the ability of a cryptographic algorithm to resist differential cryptanalysis. In order to resist differential cryptanalysis attacks, the lower the differential uniformity, the better. If the algebraic degree \(deg_{F}\) is too low, the cryptographic algorithm is vulnerable to attack by higher-order differential cryptanalysis. The strict avalanche distance is an important index to measure the anti-attack ability of the S-box. The smaller the strict avalanche distance of each component function, the better. Although the indexes of the S-box generated in this paper are slightly weaker than the original S-box, its generation speed is fast and can meet the requirements of replacing the S-box at any time. We take the plaintext of a command message data frame of the remote control of the intelligent ship as an example. Through the comparison of the ciphertext before and after the dynamic replacement of the S-box, it can be found that the replacement of the S-boxes can not only change the differential distribution table, but also change the corresponding ciphertext, and the generated S-boxes does not significantly reduce the information entropy of the ciphertext, as shown in Table 4.  
The results show that the generated S-boxes have good cryptographic characteristics. As a dynamic replacement for the SM4 algorithm, generated S-boxes can ensure the data security of intelligent ships. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**S-box** & **Data Frame Plaintext** & **Data Frame Ciphertext** & **Information Entropy** \\ \hline SM4 & 01 06 00 32 29 f9 & 6307237438457 ae0 cab724 aed7 af5 aef & 4.87802 \\  & 3f01f6c050d50d78e7f3f8d3c7639530 & 4.87802 \\ S-box 1 & 01 06 00 32 29 f9 & 0c1c2d7e0 ac72e65 ed8a9 db87675b563 & 5.26455 \\  & 76a4 db75e31f2b9 edc7b1a5c411e562 & 5.26455 \\ S-box 2 & 01 06 00 32 29 f9 & 0301702e9475f982954 bd52b18f83 ef7 & 5.26888 \\  & & ad41 fe64e575b617d64 fe53 chaf9d429 & 5.26888 \\  & & c700d5f80f9e68 ff7d0380 deca97724 & 4.99667 \\  & & b28 dda1891e423 ec03d2e4 fa24469 af & 4.99667 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of ciphertext using different S-boxes. \begin{table}
\begin{tabular}{c c} \hline \hline
**Item** & **Parameter** \\ \hline OS & Win10 professional \\ CPU & Intel(R) Core(TM) i7-600 HQ \\ GPU & NVIDIA GeForce GTX 960M \\ TensorFlow & 2.8.0 \\ CUDA/CuDNN & CUDA v11.6/CuDNN v8.3.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experimental environment parameter settings. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**S-Box** & \(N_{F}\) & \(\delta_{F}\) & \(deg_{F}\) & **Static** \\  & & & **Avalanche** \\  & & & **Distance** \\ \hline SM4 & 112 & 4/256 & 7 & 6–8 \\ S-box 1 & 102 & 10/256 & 7 & 8–12 \\ S-box 2 & 104 & 6/256 & 7 & 6–12 \\ S-box 3 & 102 & 10/256 & 7 & 8–10 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Cryptography performance analysis of generated S-boxes. The optimization scheme is applied at the end of the original round encryption. Even if the algorithm mechanism and S-box are public, the attacker can only obtain the difference table of S-box and directly obtain \(\triangle F_{i}=\triangle S_{i}\oplus\triangle rk_{31}=\triangle S_{i}\) from the correct ciphertext and the wrong ciphertext.