{"title":"ChatGPT's Potential in Cryptography Misuse Detection: A Comparative Analysis with Static Analysis Tools","authors":"Ehsan Firouzi, Mohammad Ghafari, Mike Ebrahimi","doi":"arxiv-2409.06561","DOIUrl":null,"url":null,"abstract":"The correct adoption of cryptography APIs is challenging for mainstream\ndevelopers, often resulting in widespread API misuse. Meanwhile, cryptography\nmisuse detectors have demonstrated inconsistent performance and remain largely\ninaccessible to most developers. We investigated the extent to which ChatGPT\ncan detect cryptography misuses and compared its performance with that of the\nstate-of-the-art static analysis tools. Our investigation, mainly based on the\nCryptoAPI-Bench benchmark, demonstrated that ChatGPT is effective in\nidentifying cryptography API misuses, and with the use of prompt engineering,\nit can even outperform leading static cryptography misuse detectors.","PeriodicalId":501332,"journal":{"name":"arXiv - CS - Cryptography and Security","volume":"15 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-09-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Cryptography and Security","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.06561","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
The correct adoption of cryptography APIs is challenging for mainstream
developers, often resulting in widespread API misuse. Meanwhile, cryptography
misuse detectors have demonstrated inconsistent performance and remain largely
inaccessible to most developers. We investigated the extent to which ChatGPT
can detect cryptography misuses and compared its performance with that of the
state-of-the-art static analysis tools. Our investigation, mainly based on the
CryptoAPI-Bench benchmark, demonstrated that ChatGPT is effective in
identifying cryptography API misuses, and with the use of prompt engineering,
it can even outperform leading static cryptography misuse detectors.
对于主流开发者来说,正确采用密码学 API 是一项挑战,往往会导致广泛的 API 滥用。与此同时,密码学滥用检测器的性能并不稳定,大多数开发人员仍然无法使用。我们研究了 ChatGPT 能在多大程度上检测到密码学滥用,并将其性能与最先进的静态分析工具进行了比较。我们的调查主要基于 CryptoAPI-Bench 基准,结果表明 ChatGPT 在识别密码学 API 滥用方面非常有效,如果使用提示工程,它的性能甚至可以超过领先的静态密码学滥用检测器。