|国家预印本平台
首页|基于深度学习的Python密码学误用检测与修复方法的研究与实现

基于深度学习的Python密码学误用检测与修复方法的研究与实现

Research and implementation of Python Cryptography Misuse detection and remediation Based on deep learning

中文摘要英文摘要

由于信息科技的快速发展,社会对信息安全的焦虑也与日俱增,密码学误用严重威胁了软件及信息传输的安全,进而导致个人信息泄露等社会信息安全问题。面对日益增长的对密码学安全的需要,一个能够检测密码学误用的方法变得越来越重要,但是传统的密码学误用检测方法存在效率低下和泛化能力差的问题。并且现有的密码学误用检测研究主要针对的是C和Java语言,针对Python密码学误用的研究十分有限。 由于深度学习的快速发展,基于该技术的源代码检测技术得到了快速的发展,但是现有的基于深度学习的源代码密码学误用检测技术没有对代码中的结构信息进行利用,并且基于图神经网络的深度学习模型的输入与之前的研究存在不同,怎样表征代码图数据也是需要研究的方向。因此,本文从源代码图数据特征表示和密码学误用检测方法设计两个方面提出了一种Python代码图数据的表示方法和一种基于图神经网络的Python密码学误用检测方法。通过Python代码图数据表示方法,丰富了图中的节点信息,使图神经网络模型能够获取更丰富的源代码结构。通过基于图神经网络的Python密码学误用检测方法中多层图池化层的使用提高了代码图数据中关键信息在整个图的特征中重要程度,进而提高了模型检测Python密码学误用的性能。 本文就Python密码学误用中的弱加密弱哈希算法的使用这一误用构建了Python密码学误用数据集,并基于这个数据集对本文提出的检测与修复方法进行了对比实验和消融实验,通过实验结果验证了两个方法的可行性。

ue to the rapid development of information technology, social anxiety about information security is also increasing day by day, the misuse of cryptography seriously threatens the security of software and information transmission, and then leads to personal information leakage and other social information security problems. In the face of the growing needs of cryptography security, a method that can detect misapplication of cryptography becomes more and more important, but the traditional misapplication detection method of cryptography has problems of low efficiency and poor generalization ability. In addition, existing researches on cryptography misuse detection are mainly aimed at C and Java languages, while researches on Python cryptography misuse detection are very limited. Due to the rapid development of deep learning, the source code detection technology based on this technology has been rapidly developed. However, the existing source code cryptography misuse detection technology based on deep learning does not utilize the structural information in the code, and the input of the deep learning model based on graph neural network is different from previous studies. How to represent the code graph data is also the direction of research. Therefore, this paper proposes a representation method of Python code graph and a misuse detection method of Python cryptography based on graph neural network from two aspects: feature representation of source code graph and design of cryptography misuse detection method. Through the Python code graph representation method, the node information in the graph is enriched, so that the graph neural network model can obtain more abundant source code structure. The application of multilayer graph pooling layer in the Python cryptography misapplication detection method based on graph neural network improves the importance of key information in the code graph data in the whole graph characteristics, and thus improves the performance of model detection of Python cryptography misapplication. In this paper, the misuse of weak encryption and weak hash algorithm in the misuse of Python cryptography is used to construct the Python cryptography misuse data set, and based on this data set, the detection and repair methods proposed in this paper are compared and ablation experiments are conducted, and the feasibility of the two methods is verified through the experimental results.

董徐良、徐国胜

计算技术、计算机技术自动化技术、自动化技术设备

Python密码学误用程序分析程序修复深度学习图神经网络预训练模型

Python Cryptography misusesprogram analyzersprogram repairdeep learninggraph neural networkpretraining models

董徐良,徐国胜.基于深度学习的Python密码学误用检测与修复方法的研究与实现[EB/OL].(2023-03-20)[2025-08-19].http://www.paper.edu.cn/releasepaper/content/202303-213.点此复制

评论