Demystifying and Detecting Cryptographic Defects in Ethereum Smart Contracts
Ethereum has officially provided a set of system-level cryptographic APIs to enhance smart contracts with cryptographic capabilities. These APIs have been utilized in over 10% of Ethereum transactions, motivating developers to implement various on-chain cryptographic tasks, such as digital signatures. However, since developers may not always be cryptographic experts, their ad-hoc and potentially defective implementations could compromise the theoretical guarantees of cryptography, leading to real-world security issues. To mitigate this threat, we conducted the first study aimed at demystifying and detecting cryptographic defects in smart contracts. Through the analysis of 2,406 real-world security reports, we defined nine types of cryptographic defects in smart contracts with detailed descriptions and practical detection patterns. Based on this categorization, we proposed Crysol, a fuzzing-based tool to automate the detection of cryptographic defects in smart contracts. It combines transaction replaying and dynamic taint analysis to extract fine-grained crypto-related semantics and employs crypto-specific strategies to guide the test case generation process. Furthermore, we collected a large-scale dataset containing 25,745 real-world crypto-related smart contracts and evaluated CRYSOL's effectiveness on it. The result demonstrated that CRySOL achieves an overall precision of 95.4% and a recall of 91.2%. Notably, CRySOL revealed that 5,847 (22.7%) out of 25,745 smart contracts contain at least one crvptographic defect” hiahlighting the prevalence of these defects.
Authors
- Jiashuo Zhang (ORCID: https://orcid.org/0000-0002-8140-9208)
- Jianzhong Su (ORCID: https://orcid.org/0000-0003-1054-6042)
- Jiachi Chen (ORCID: https://orcid.org/0000-0002-0192-9992)
- Jianbo Gao (ORCID: https://orcid.org/0000-0002-6760-5552)
- Yanlin Wang (ORCID: https://orcid.org/0000-0001-7761-7269)
- Ting Chen (ORCID: https://orcid.org/0000-0001-9165-8331)
- Zhong Chen (ORCID: https://orcid.org/0000-0002-5785-2912)
- Yiming Shen
Institutions
- University of Electronic Science and Technology of China (CN)
- Sun Yat-sen University (CN)
- Peking University (CN)
- Beijing Jiaotong University (CN)
Publication Details
- Published
- 2025-04-26
- DOI
- https://doi.org/10.1109/icse55347.2025.00010
- Citations
- 2
- Primary Topic
- Blockchain Technology Applications and Security
- Type
- article
- Field-Weighted Citation Impact
- 6.49