# Improved Neural Differential Distinguisher Model for Lightweight Cipher Speck
## 1 Introduction  
With the rapid development of computer networks [1; 2] and Internet of Things [3] (IoT) technology, IoT devices have been applied in many fields and have achieved constructive results. However, in the production of IoT devices, storage and computing resources are compressed to improve their productivity and convenience, which makes traditional algorithms such as DES and AES ineffective in IoT devices and thus reduces the security of the devices. For this problem, the National Security Agency (NSA) [4] designed the lightweight block cipher Speck, which offers better performance on both hardware and software platforms compared with other existing ciphers. However, the designers of Speck neither provided the design rationale nor gave any security evaluation or cryptanalysis results. This has spurred further research on Speck in the cryptographic community to deepen the understanding and refine it, such as an ultra-lightweight cryptographic Speck-R proposed by [PERSON] and [PERSON] [5] based on Speck. Furthermore, among this cryptanalytic research, differential cryptanalysis is the most promising attack. Differential cryptanalysis was proposed by [PERSON] and [PERSON] [6] in 1990 for breaking Data Encryption Standard [7] (DES) block ciphers, and today it is considered one of the most robust techniques in cryptanalysis of symmetric key cryptographic primitives. [PERSON] et al. [8] introduced the first differential attack for almost all Speck variants. [PERSON] et al. [9] searched for better differential features of Speck. In [10], [PERSON] improved the key recovery attack for all variants of Speck and [PERSON] [11] showed an automatic algorithm for searching the best differential trajectory with improved MILP-based differential features results. The development of deep learning has brought some new minds to cryptanalysis. In recent years, deep learning has spread across almost every field of science and technology (medical [12], agriculture [13], etc.) and has made remarkable progress on many difficult tasks. Several researchers have begun to apply deep learning to the study of cryptanalysis of block ciphers. At CRYPTO 2019, [PERSON] [14] successfully trained (5\(\sim\)8)-round of differential neural distinguisher by using the residual network (ResNet) [15] to create a precedent for neural-aided cryptanalysis. It was used to capture the distribution of output pairs when the input pairs of round-reduced Speck32/64 have specific differences. In [PERSON]'s work, a sample consists of only one ciphertext pair. To improve the prediction accuracy of the differential neural differentiator, [PERSON] and [PERSON] [16] combine multiple ciphertext pairs generated by encrypting multiple plaintext pairs with the same key into a matrix as one sample of the neural network input. By using more output differences in the matrix, the neural network is made to learn more features. As a result, they improved the prediction accuracy of the (5\(\sim\)7)-round differential neural distinguisher for Speck32/64 to some extent. [PERSON] et al. [17] modified the initial convolutional layer by borrowing ideas from the Inception module of GoogLeNet, which was used to construct a new neural network structure. Thus, they trained differential neural distinguishers for (5\(\sim\)9)-round of Speck32/64. In this paper, we further improve the data format of the input data and the neural network framework in the differential neural distinguisher, which helps the differential distinguisher identify ciphertext pairs with specific differential features more correctly. (1) By analyzing the features of Speck's cipher and modifying the data format in the input data of the differential neural distinguisher according to Speck's round function.