Abstract
Cryptanalysis is predicated on the recognition of cipher algorithms, but in practice, researcher often do not know the cipher algorithm used. This paper focuses on block cipher algorithms identification and proposes an interpretable fusion model. The model extracts feature from the ciphertext based on bit segmentation and finds the optimal bit segmentation length. For the high-dimensional nonlinear ciphertext feature data, UMAP is used for dimensionality reduction, and the processed data is converted into image features. The model is based on CNN-Transformer, which separately inputs the image features and the ciphertext data itself, and then fuses them. Eight block ciphers including AES, DES, SM4, etc. were selected as the experimental objects. Under random key, a total of 72,000 encrypted ciphertext files of eight block cipher algorithms were constructed for algorithm identification. The experimental results show that, compared to existing research, under random keys, the binary classification accuracy is about 91%, and the eight-classification accuracy is about 70%, which are 8 and 19% higher than the average accuracy of existing research, respectively. Meanwhile, the extracted ciphertext bit rules are analyzed to provide model’s interpretability. It offers a new perspective for in-depth research on cipher algorithm recognition.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Rivest, R.L.: Cryptography and machine learning. In: The International Conference on the Theory and Application of Cryptology, pp. 427–439 (1991)
Pooja, M.: Classification of ciphers. Indian Institute of Technology, Kanpur (2001)
Chandra, G.: Classification of modern ciphers. IIT Kanpur (2002)
Rao, M.B.: Classification of RSA and IDEA ciphers. Indian Institute of Technology, Kanpur (2003)
Dileep, A.D., Sekhar, C.C.: Identification of block ciphers using support vector machines. In: The 2006 IEEE International Joint Conference on Neural Network Proceedings, pp. 2696–2701. IEEE (2006). https://doi.org/10.1109/IJCNN.2006.247172
Chou, J.W., Lin, S.D., Cheng, C.M.: On the effectiveness of using state-of-the-art machine learning techniques to launch cryptographic distinguishing attacks. In: Acm Workshop on Security and Artificial Intelligence, pp. 105–110 (2012). https://doi.org/10.1145/2381896.2381912
Manjula, R., Anitha, R.: Identification of encryption algorithm using decision tree. In: Communications in Computer and Information Science, vol. 133, pp. 237–246. Springer (2011). https://doi.org/10.1007/978-3-642-17881-8_23
Mishra, S., Bhattacharjya, A.: Pattern analysis of cipher text: a combined approach. In: 2013 International Conference on Recent Trends in Information Technology (ICRTIT), pp 393–398 (2013). https://doi.org/10.1109/ICRTIT.2013.6844236
Zhicheng, Z., Yaqun, Z., Fengmei, L.: Recognition scheme of block cipher system based on randomness test. J. Cryptogr. 6(2), 177–190 (2019). https://doi.org/10.13868/j.cnki.jcr.000293
Wang, X., Chen, Y., Wang, Q., et al.: A password regime recognition scheme combining feature selection and ensemble learning. Comput. Eng. 47(01), 139–145+153 (2021). https://doi.org/10.19678/j.issn.1000-3428.0056918
Yuan, K., Huang, Y., Li, J., et al.: A block cipher algorithm identification scheme based on hybrid random forest and logistic regression model. Neural. Process. Lett. 55, 3185–3203 (2023). https://doi.org/10.1007/s11063-022-11005-2
De Souza, WAR., Tomlinson, A.: A distinguishing attack with a neural network. In: 2013 IEEE 13th International Conference on Data Mining Workshops, p 154161. IEEE (2013). https://doi.org/10.1109/ICDMW.2013.116
Yang, W., Tao, W., Jindong, L.: Research on a new method of statistical detection of block cipher algorithm ciphertext. J. Ordnance Eng. College 000(003), 58–64 (2015). https://doi.org/10.3969/j.issn.1008-2956.2015.03.011
Liangtao, H., Zhicheng, Z., Yaqun, Z.: Hierarchical recognition scheme of cryptosystem based on random forest. J. Comput. 41(002), 382–399 (2018). https://doi.org/10.11897/SP.J.1016.2018.00382
Cheng, T., Man, C., Qingbing, J.: Sequence cipher recognition based on ciphertext-only data. Commun. Technol. 53(01), 156–160 (2020)
Ruiqi, X., Manman, L., Shaozhen, C.: Group cipher structure recognition based on machine learning. J. Netw. Inf. Secur. 9(03), 79–89 (2023)
Yang, Z., Wang, J., Tang, Y., Chen, K., Zhao, H., Torr, P.H.: Lavt: Language-aware vision transformer for referring image segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 18 155–18 165 (2022)
Liu, C., Ding, H., Zhang, Y., Jiang, X.: Multi-modal Mutual Attention and Iterative Interaction for Referring Image Segmentation (2023)
UCI Machine Learning Repository. https://archive.ics.uci.edu/
Caltech-256 Object Category Dataset. https://authors.library.caltech.edu/records/5sv1j-ytw97
Acknowledgments
This research was supported by the Funding Project for Excellent Master of Beijing Electronics Science and Technology Institute (328202260).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Xie, R., Chen, X., Zhang, X., Shi, G. (2025). Block Cipher Algorithm Identification Based on CNN-Transformer Fusion Model. In: Lin, Z., et al. Pattern Recognition and Computer Vision. PRCV 2024. Lecture Notes in Computer Science, vol 15041. Springer, Singapore. https://doi.org/10.1007/978-981-97-8795-1_7
Download citation
DOI: https://doi.org/10.1007/978-981-97-8795-1_7
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-97-8794-4
Online ISBN: 978-981-97-8795-1
eBook Packages: Computer ScienceComputer Science (R0)