作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (1): 166-173. doi: 10.19678/j.issn.1000-3428.0067050

• 网络空间安全 • 上一篇    下一篇

一种基于Schnorr签名的区块链预言机改进方案

崔怀勇1,2,*(), 张绍华3, 李超2, 戴炳荣2   

  1. 1. 上海海洋大学信息学院, 上海 201306
    2. 上海计算机软件技术开发中心, 上海 201112
    3. 上海商学院, 上海 200235
  • 收稿日期:2023-02-27 出版日期:2024-01-15 发布日期:2024-01-11
  • 通讯作者: 崔怀勇
  • 基金资助:
    上海市科技创新行动计划(21511101504); 上海科学院关键共性技术攻关计划(SKY2022005)

An Improved Scheme for Blockchain Oracle Based on Schnorr Signature

Huaiyong CUI1,2,*(), Shaohua ZHANG3, Chao LI2, Bingrong DAI2   

  1. 1. College of Information Technology, Shanghai Ocean University, Shanghai 201306, China
    2. Shanghai Development Center of Computer Software Technology, Shanghai 201112, China
    3. Shanghai Business School, Shanghai 200235, China
  • Received:2023-02-27 Online:2024-01-15 Published:2024-01-11
  • Contact: Huaiyong CUI

摘要:

区块链预言机是一种为上链数据提供可信保障的中间件,可以有效解决链上链下数据传输的信任问题。当前预言机方案大多存在成本高、容错率低、密钥泄露、数据泄漏、签名失效等问题,为此,提出一种基于Schnorr门限聚合签名的区块链预言机改进方案。通过引入可验证随机函数生成可验证随机数,解决签名过程中随机数重复或能够被预测而导致的密钥泄露问题;通过引入可验证秘密分享技术,解决签名过程中密钥分发者作恶而导致的签名失效问题。预言机通过验证密钥碎片检测密钥分发者是否作恶,验证结束后向预言机智能合约发送验证结果,当预言机智能合约收到t个验证失败的结果时向所有预言机发送消息,达成一致性共识后重启签名。在数据提交阶段,只有预言机身份验证通过时才允许其提交,以防止签名过程中的数据泄露。同时,设置预言机信誉与激励机制,保证信誉较好的预言机在有效时间内参与签名并获得奖励。实验结果表明,在预言机节点数量为50、密钥分发者作恶且恶意预言机占预言机群体总数近50%时,该方案消耗的总时间不超过200 ms,gas消耗量不超过$ 5\times {10}^{5} $ wei,可以有效实现可信数据上链。

关键词: 区块链预言机, Schnorr签名, 门限聚合机制, 可验证随机函数, 可验证秘密分享

Abstract:

Blockchain oracle is a type of middleware that provides trustworthy guarantee for on-chain data, effectively addressing the trust problem of on- and off-chain data transmission. The current oracle scheme suffers from high cost, low fault tolerance, key leakage, data leakage, signature failure, and other problems. To address these problems, an improved blockchain oracle scheme based on Schnorr threshold aggregation signatures is proposed. First, by introducing a verifiable random function to generate verifiable random numbers, the problem of key leakage caused by duplicate or predictable random numbers in the signing process is addressed. Second, the problem of signature failure caused by the mischief of key distributors during the signing process is addressed by introducing verifiable secret sharing technology. The oracle detects whether the key distributor has committed mischief by verifying key fragments, and subsequently sends a message to all oracles when the oracle smart contract receives t verification failures, reaches a consensus on consistency, and restarts the signature. In addition, in the submission data phase, the oracle is allowed to submit only when its identity is verified, preventing data leakage during the signing process. The scheme also sets up an oracle reputation and incentive mechanism to ensure that the more reputable oracles are involved in signing and receiving rewards within a valid time frame. Experimental results demonstrate that the total time consumed by the scheme does not exceed 200 ms and the gas consumption does not exceed $ 5\times {10}^{5} $wei when the number of oracle nodes is 50, the key distributor is evil and the malicious oracle accounts for approximately 50% of all, which can effectively achieve trusted data on the chain.

Key words: blockchain oracle, Schnorr signature, threshold aggregation mechanism, verifiable random function, verifiable secret sharing