Python Crypto在野外误用
Python Crypto Misuses in the Wild
摘要:
背景:先前的研究表明,高达99.59%的使用加密API的Java应用程序至少滥用过一次API。然而,这些研究都是在Java和C上进行的,而对其他语言的实证研究则缺失。例如,一项针对Python中加密任务的受控用户研究表明,68.5%的专业开发人员为加密任务编写了安全的解决方案。目的:为了了解这种观察是否适用于现实世界的代码,我们对Python中的加密误用进行了研究。方法:我们开发了一个静态分析工具,涵盖了5种不同Python加密API的常见误用。通过这项分析,我们分析了来自GitHub的895个流行Python项目和51个嵌入式设备的MicroPython项目。此外,我们将我们的结果与以前的研究结果进行了比较。结果:我们的分析显示,52.26%的Python项目至少有一个误用。此外,一些Python加密库API设计可以帮助开发人员避免滥用加密函数,这在使用Java和C代码进行的研究中更为常见。结论:我们得出结论,我们可以看到良好的API设计对Python应用程序的加密滥用产生了积极的影响。此外,我们对MicroPython项目的分析揭示了混合分析的重要性。
英文摘要:
Background: Previous studies have shown that up to 99.59 % of the Java apps using crypto APIs misuse the API at least once. However, these studies have been conducted on Java and C, while empirical studies for other languages are missing. For example, a controlled user study with crypto tasks in Python has shown that 68.5 % of the professional developers write a secure solution for a crypto task. Aims: To understand if this observation holds for real-world code, we conducted a study of crypto misuses in Python. Method: We developed a static analysis tool that covers common misuses of 5 different Python crypto APIs. With this analysis, we analyzed 895 popular Python projects from GitHub and 51 MicroPython projects for embedded devices. Further, we compared our results with the findings of previous studies. Results: Our analysis reveals that 52.26 % of the Python projects have at least one misuse. Further, some Python crypto libraries API design helps developers from misusing crypto functions, which were much more common in studies conducted with Java and C code. Conclusion: We conclude that we can see a positive impact of the good API design on crypto misuses for Python applications. Further, our analysis of MicroPython projects reveals the importance of hybrid analyses.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。