当合约遇上密码学:探究开发者在以太坊密码学API方面的困境
When Contracts Meets Crypto: Exploring Developers' Struggles with Ethereum Cryptographic APIs
AI总结:
该研究针对以太坊官方密码学API因开发者缺乏专业知识引发的安全与可用性问题,通过分析大量交易、合约及社区帖子并调研从业者,梳理了开发者的密码学任务与五类障碍,提出了API优化、模板及工具开发等改进方向。
摘要:
为了赋予智能合约强大的密码学能力,以太坊官方推出了一组密码学API,用于支持智能合约内的基础密码学操作,例如椭圆曲线运算。然而,由于开发者未必是密码学专家,要求他们直接使用这些底层API已引发了实际安全问题及潜在的可用性挑战。为给后续相关研究和解决方案提供指引,我们开展了首项针对以太坊密码学实践的实证研究。通过分析91,484,856笔以太坊交易、500份与密码学相关的合约以及483条StackExchange帖子,我们首次深入梳理了开发者需要完成的密码学任务,并识别出他们面临的五大类障碍。此外,我们对78名智能合约从业者开展了在线调研,了解他们对这些障碍的看法并探究背后的深层原因。研究发现,超过半数的从业者认为,与智能合约中的通用业务逻辑相比,密码学相关任务的挑战更大。他们的反馈凸显了底层密码学API与所需完成的高层任务之间存在差距,表明亟需优化密码学API、推出基于任务的模板以及有效的辅助工具。基于这些发现,我们提出了后续改进的实践建议,并展望了未来的研究方向。
英文摘要:
To empower smart contracts with the promising capabilities of cryptography, Ethereum officially introduced a set of cryptographic APIs that facilitate basic cryptographic operations within smart contracts, such as elliptic curve operations. However, since developers are not necessarily cryptography experts, requiring them to directly interact with these basic APIs has caused real-world security issues and potential usability challenges. To guide future research and solutions to these challenges, we conduct the first empirical study on Ethereum cryptographic practices. Through the analysis of 91,484,856 Ethereum transactions, 500 crypto-related contracts, and 483 StackExchange posts, we provide the first in-depth look at cryptographic tasks developers need to accomplish and identify five categories of obstacles they encounter. Furthermore, we conduct an online survey with 78 smart contract practitioners to explore their perspectives on these obstacles and elicit the underlying reasons. We find that more than half of practitioners face more challenges in cryptographic tasks compared to general business logic in smart contracts. Their feedback highlights the gap between low-level cryptographic APIs and high-level tasks they need to accomplish, emphasizing the need for improved cryptographic APIs, task-based templates, and effective assistance tools. Based on these findings, we provide practical implications for further improvements and outline future research directions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。