基于最弱访问控制条件的Agda中比特币脚本验证

Fahad F. Alhabardi, A. Beckmann, B. Lazar, A. Setzer
{"title":"基于最弱访问控制条件的Agda中比特币脚本验证","authors":"Fahad F. Alhabardi, A. Beckmann, B. Lazar, A. Setzer","doi":"10.4230/LIPIcs.TYPES.2021.1","DOIUrl":null,"url":null,"abstract":"This paper contributes to the verification of programs written in Bitcoin’s smart contract language script in the interactive theorem prover Agda. It focuses on the security property of access control for script programs that govern the distribution of Bitcoins. It advocates that weakest preconditions in the context of Hoare triples are the appropriate notion for verifying access control. It aims at obtaining human-readable descriptions of weakest preconditions in order to close the validation gap between user requirements and formal specification of smart contracts. As examples for the proposed approach, the paper focuses on two standard script programs that govern the distribution of Bitcoins, Pay to Public Key Hash (P2PKH) and Pay to Multisig (P2MS) . The paper introduces an operational semantics of the script commands used in P2PKH and P2MS, which is formalised in the Agda proof assistant and reasoned about using Hoare triples. Two methodologies for obtaining human-readable descriptions of weakest preconditions are discussed: (1) a step-by-step approach, which works backwards instruction by instruction through a script, sometimes grouping several instructions together; (2) symbolic execution of the code and translation into a nested case distinction, which allows to read off weakest preconditions as the disjunction of conjunctions of conditions along accepting paths. A syntax for equational reasoning with Hoare Triples is defined in order to formalise those approaches in Agda. Cryptocurrency, Bitcoin, Agda, Verification, Hoare Bitcoin","PeriodicalId":131421,"journal":{"name":"Types for Proofs and Programs","volume":"160 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-03-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":"{\"title\":\"Verification of Bitcoin Script in Agda Using Weakest Preconditions for Access Control\",\"authors\":\"Fahad F. Alhabardi, A. Beckmann, B. Lazar, A. Setzer\",\"doi\":\"10.4230/LIPIcs.TYPES.2021.1\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper contributes to the verification of programs written in Bitcoin’s smart contract language script in the interactive theorem prover Agda. It focuses on the security property of access control for script programs that govern the distribution of Bitcoins. It advocates that weakest preconditions in the context of Hoare triples are the appropriate notion for verifying access control. It aims at obtaining human-readable descriptions of weakest preconditions in order to close the validation gap between user requirements and formal specification of smart contracts. As examples for the proposed approach, the paper focuses on two standard script programs that govern the distribution of Bitcoins, Pay to Public Key Hash (P2PKH) and Pay to Multisig (P2MS) . The paper introduces an operational semantics of the script commands used in P2PKH and P2MS, which is formalised in the Agda proof assistant and reasoned about using Hoare triples. Two methodologies for obtaining human-readable descriptions of weakest preconditions are discussed: (1) a step-by-step approach, which works backwards instruction by instruction through a script, sometimes grouping several instructions together; (2) symbolic execution of the code and translation into a nested case distinction, which allows to read off weakest preconditions as the disjunction of conjunctions of conditions along accepting paths. A syntax for equational reasoning with Hoare Triples is defined in order to formalise those approaches in Agda. Cryptocurrency, Bitcoin, Agda, Verification, Hoare Bitcoin\",\"PeriodicalId\":131421,\"journal\":{\"name\":\"Types for Proofs and Programs\",\"volume\":\"160 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-03-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Types for Proofs and Programs\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4230/LIPIcs.TYPES.2021.1\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Types for Proofs and Programs","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.TYPES.2021.1","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

摘要

本文有助于在交互式定理证明器Agda中验证用比特币智能合约语言脚本编写的程序。它侧重于管理比特币分发的脚本程序的访问控制的安全属性。它主张Hoare三元组上下文中的最弱前提条件是验证访问控制的适当概念。它旨在获得人类可读的最弱前提条件的描述,以缩小用户需求与智能合约的正式规范之间的验证差距。作为提议方法的示例,本文重点介绍了管理比特币分发的两个标准脚本程序,即向公钥哈希支付(P2PKH)和向Multisig支付(P2MS)。本文介绍了P2PKH和P2MS中使用的脚本命令的操作语义,并在Agda证明助手中进行了形式化,并对使用Hoare三元组进行了推理。本文讨论了获取人类可读的最弱前提条件描述的两种方法:(1)一步一步的方法,它通过脚本一步一步地向后工作,有时将几个指令分组在一起;(2)代码的符号执行和翻译成一个嵌套的情况区分,这允许读取最弱的前提条件作为条件的连词的分离沿接受路径。定义了具有Hoare三元组的等式推理语法,以便在Agda中形式化这些方法。加密货币,比特币,Agda,验证,Hoare比特币
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Verification of Bitcoin Script in Agda Using Weakest Preconditions for Access Control
This paper contributes to the verification of programs written in Bitcoin’s smart contract language script in the interactive theorem prover Agda. It focuses on the security property of access control for script programs that govern the distribution of Bitcoins. It advocates that weakest preconditions in the context of Hoare triples are the appropriate notion for verifying access control. It aims at obtaining human-readable descriptions of weakest preconditions in order to close the validation gap between user requirements and formal specification of smart contracts. As examples for the proposed approach, the paper focuses on two standard script programs that govern the distribution of Bitcoins, Pay to Public Key Hash (P2PKH) and Pay to Multisig (P2MS) . The paper introduces an operational semantics of the script commands used in P2PKH and P2MS, which is formalised in the Agda proof assistant and reasoned about using Hoare triples. Two methodologies for obtaining human-readable descriptions of weakest preconditions are discussed: (1) a step-by-step approach, which works backwards instruction by instruction through a script, sometimes grouping several instructions together; (2) symbolic execution of the code and translation into a nested case distinction, which allows to read off weakest preconditions as the disjunction of conjunctions of conditions along accepting paths. A syntax for equational reasoning with Hoare Triples is defined in order to formalise those approaches in Agda. Cryptocurrency, Bitcoin, Agda, Verification, Hoare Bitcoin
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信