作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2021, Vol. 47 ›› Issue (8): 157-161,169. doi: 10.19678/j.issn.1000-3428.0058608

• 网络空间安全 • 上一篇    下一篇

基于决策树的SM4分组密码工作模式识别

纪文桃1, 李媛媛1, 秦宝东1,2   

  1. 1. 西安邮电大学 网络空间安全学院, 西安 710121;
    2. 西安邮电大学 无线网络安全技术国家工程实验室, 西安 710121
  • 收稿日期:2020-06-11 修回日期:2020-07-24 发布日期:2020-08-04
  • 作者简介:纪文桃(1994-),男,硕士研究生,主研方向为基于机器学习的密码体制识别;李媛媛,硕士研究生;秦宝东,教授。
  • 基金资助:
    国家自然科学基金(61872292);青海省基础研究计划项目(2020-ZJ-701)。

Working Mode Recognition for SM4 Block Cipher Based on Decision Tree

JI Wentao1, LI Yuanyuan1, QIN Baodong1,2   

  1. 1. School of Cyberspace Security, Xi'an University of Posts & Communications, Xi'an 710121, China;
    2. National Engineering Laboratory for Wireless Network Security Technology, Xi'an University of Posts & Telecommunications, Xi'an 710121, China
  • Received:2020-06-11 Revised:2020-07-24 Published:2020-08-04

摘要: 针对密码体制识别研究缺乏对分组密码工作模式识别的现状,提出一种基于决策树的分组密码工作模式识别方案并应用于国密SM4分组密码算法。在CBC、CFB、OFB、CTR工作模式下对大量文本文件进行加密,得到密文文件,同时构造训练阶段和测试阶段所需要的特征向量空间。在训练阶段通过对特征空间的学习生成决策树,在测试阶段根据生成的决策树进行决策,将决策值与标签值相比较得到分类结果。在训练和测试阶段分别构建混合分类模型、混合文本大小分类模型和一对一分类模型,实验结果表明,混合分类模型和混合文本大小分类模型的分类正确识别率在16%~26%,一对一分类模型的正确识别率高达90%以上。

关键词: 密码体制识别, 工作模式, 决策树, SM4算法, 特征提取, 分组密码

Abstract: The existing studies on the recognition of cryptosystems usually fail to consider the working pattern recognition for block cipher. To address the problem, a decision tree-based scheme of working mode recognition for block cipher is proposed and applied to the SM4 block cipher algorithm. A large number of text files are encrypted in the CBC, CFB, OFB, CTR working modes to obtain the ciphertexts, and the eigenvector space required in the training stage and testing stage is constructed. In the training stage, the decision tree is generated by learning the feature space. In the test stage, the decision is made according to the generated decision tree, and the decision value is compared with the label value to obtain the classification result. In the training stage and testing stage, a hybrid classification model, a hybrid text size classification model and a one-to-one classification model are constructed respectively. Experimental results show that the hybrid classification model and the hybrid text size classification model provide a classification accuracy of 16%~26%, and the to-one classification model provides a recognition accuracy of more than 90% for the four working modes.

Key words: cryptosystem recognition, working mode, decision tree, SM4 algorithm, feature extraction, block cipher

中图分类号: