The Impact of Cryptographic Algorithm Performance on Smart Contracts in WebAssembly
摘要
WebAssembly is the fourth officially endorsed Web language, following HTML, CSS, and JavaScript. It focuses on performance, security, and portability. With the development of WebAssembly system interface and standalone WebAssembly runtimes, WebAssembly is increasingly being used outside of browsers and adopted as a format for smart contracts in blockchains. However, the performance issues of cryptographic algorithms as a common operation for smart contracts in standalone WebAssembly runtime are still overlooked. To fill up this knowledge gap, we study the performance differences of commonly used cryptographic algorithms across various runtime and native environments, and analyze potential causes. In addition, we utilize OpenZeppelin’s smart contract to study the impact of the above performance differences on practical application scenarios. We hope our study can promote the research and development of encryption algorithms and smart contracts in the WebAssembly ecosystem.