本文对智能合约安全进行了全面的调研,主要 有以下研究发现.
GQ1:在智能合约安全保障过程中,共涉及合约 设计人员、合约实现人员、合约测试人员、合约监管 人员和合约用户这5类利益相关者.
GQ2:智能合约的安全和挑战主要包括合约安 全和隐私安全.针对合约安全,主要体现在合约设 计、实现及测试、部署及运维,隐私安全则主要关注 合约代码隐私和合约数据隐私,针对5种不同类型 的合约安全和隐私安全问题,智能合约面临着不同 安全挑战.
GQ3:针对智能合约安全保障方法,合约设计相 关研究主要通过定义抽取设计模式展开;合约实现 及测试相关研究主要应用定理证明、模型检测、模糊 测试、抽象语法树等技术检测智能合约缺陷;合约部 署及运维主要分析日志或信息流图,监测合约异常 行为,发现合约缺陷、EVM漏洞并制定相关防御策 略;代码隐私保护方法主要集中在合约拆分、合约语 言设计和TEE技术应用;数据隐私主要结合零知识 证明、安全多方计算等密码学技术对数据进行加密, 或将数据加载至可信执行环境保护隐私.
GQ4:针对智能合约安全保障方法验证,合约安 全保障方法主要通过分析、实践、举例的方式进行 验证.
FQ1:对于合约安全,设计文本、合约编码规范、 实现语言、EVM机制、外部合约调用、运行环境等 因素都可能与合约安全威胁产生相关;对于隐私安 全,公有链公开透明的性质和合约隐私保护机制不 健全对合约代码隐私产生威胁,此外,公开数据的恶 意分析和合约用户泄漏都可能导致数据隐私威胁. FQ2:已有的合约安全保障研究初步提出了合 约设计理念、实现了大部分智能合约缺陷检测、完成 了基本的合约运行状态监测.但是,安全可信的智能 合约设计仍没有形成健全的体系;合约测试方法多 样,每种方法可检测的缺陷类型有限,未形成全面、 体系的智能合约缺陷检测框架,通用性不高;对于合 约部署及运维安全,尚未实现灵活、有效的合约维护 机制.
FQ3:已有的合约代码隐私保护方案能够实现 智能合约代码核心内容保护,但存在应用场景不丰 富、适用平台不广泛等问题;合约数据隐私保护方案 结合密码学技术实现不同程度的合约数据隐私保 护,主要存在性能和没有实现完全去中心化的问题.
FQ4:智能合约安全的未来研究方向针对合约 安全和隐私安全展开,支持智能合约全方位、全生命 周期的安全保障,基本思路是先验方法和后验方法 结合、定性方法和定量方法结合、静态方法和动态方 法结合.
SQ1:该领域的研究始于2015年,2016年仅有 少量相关研究成果发表,2018年开始研究成果数量 增长迅速,并有继续上升的趋势.
SQ2:18篇文献发表在软件工程或安全领域的 顶级期刊和会议,说明智能合约安全是一个备受关 注的新兴课题.
总的来说,目前已有较多关于智能合约安全的 研究,值得研究者投入更多精力解决这些有趣问题.
参考文献
[1]ButerinV.Anextgenerationsmartcontractanddecentralized applicationplatform.WhitePaper,2014
[2]YuanY,WangFY.Blockchainandcryptocurrencies:Model, techniques,andapplications.IEEETransactionsonSystems, Man,andCybernetics:Systems,2018,48(9):14211428
[3]KitchenhamB,ChartersS.Guidelinesforperformingsystematic
0 1 5
2 计 算 机 学 报 2021年
《 计
算
机
学
报
》
literaturereviewsinsoftwareengineering.Departmentof
[28]SnchezDC.Raziel:Privateandverifiablesmartcontracts
[54]WatanabeH,ShigeruF,AtsushiN,etal.Blockchain
InternationalConferenceonOmniLayerIntelligentSystems
(COINS).Barcelona,Spain,2020:16
[82]LuD,YurekT,KulshreshthaS,etal.HoneyBadgerMPC andAsynchroMix:PracticalasynchronousMPCandits applicationtoanonymouscommunication//Proceedingsofthe 2019ACMSIGSACConferenceonComputerandCommuni cationsSecurity(CCS).London,UK,2019:887903
[83]AlharbyM,vanMoorselA.Blockchainbasedsmartcontracts: Asystematicmappingstudy.arXiv:710.06372,2017
[84]PariziRM,DehghantanhaA,ChooKKR,etal.Empirical vulnerabilityanalysisofautomatedsmartcontractssecurity testingonblockchains//Proceedingsofthe28thAnnual InternationalConferenceonComputerScienceandSoftware Engineering(CASCON).Markham,Canada,2018:103113
犎犝犜犻犪狀犢狌犪狀,Ph.D.candidate. Herresearchinterestsincludesoftware engineering,blockchainsecurity.
犔犐犣犲犆犺犲狀犵,Ph.D.candidate.Hisresearchinterest liesintheblockchainsecurity.
犔犐犅犻犡犻狀,Ph.D.,professor,Ph.D.supervisor.His researchinterestsincludesoftwareengineering,blockchain security.
犅犃犗犙犻犎犪狅,Ph.D.candidate.Hisresearchinterests includesoftwareengineering,blockchainsecurity.
犅犪犮犽犵狉狅狌狀犱
Thispaperisasystemmappingstudybelongingtothe fieldofblockchainsecurity,whichsurveysrecentworkson smartcontractsecurity.Thecombinationofsmartcontracts andblockchainisconsideredamilestoneupgradeinthe blockchainworld.Asanautomaticallyexecutabledigital protocol,smartcontractsaddprogrammablepropertiestothe blockchain.Thesecurityandprivacyprotectionfeaturesof theblockchainareimportantfactorsinpromotingthe longtermdevelopmentoftheblockchain.However,dueto theimmaturityofthisemergingtechnology,frequentsmart contractattacksseriouslythreatenthesecurityofthe blockchainecosystem.Thereisanurgentneedfortechnical supportrelatedtosmartcontractssecurity.
Thereareplentifulstudiesfocusingonsmartcontracts security.However,theexistingresearcheslacksystematiza tionandclarity,resultinginalackofstrongguidancefor solvingsmartcontractsecurityproblems.Inordertoprovide referencesforfurthersolutionstosmartcontractsecurity issues,thispaperconcentratesonseveralhighqualitystudies relatedtosmartcontractssecurity.
Inthispaper,thecurrentstateofresearchesaresummarized
andanalyzedbysettingseveralresearchquestionsrelatedto smartcontractsecurity.Firstly,theexistingsecurity problemsandsecuritychallengesofsmartcontractsecurity areanalyzedaccordingtothecharacteristicsofsmartcontract inblockchainsystem.Smartcontractsecurityisdividedinto contractsecurityandprivacysecurity.Fromtheperspective ofthelifecycleofsmartcontract,thecontractsecurityis guaranteedindifferentstagesofdesign,implement,testing, deploymentandmaintenance.Moreover,theprivacysecurity involvedcodeprivacyanddataprivacy.Furthermore,the existingsecurityassurancetechniquesarecollectedaimingat thesecurityissuesandchallengesofsmartcontractsecurity. Effectivenessandlimitationsofdifferenttechniquesare analyzedbycombiningtheverificationofdifferentresearches. Amultidimensionalanalysisofdifferenttechniquesassuring smartcontractsecuritywasconducted.Strengthsand weaknessesofsecurityassurancetechniquesforcontract securityandprivacysecurityareconcluded.Finally,future researchdirectionsmainlyfocusedonsmartcontractdetection andprivacyprotectionaresuggested.
4 1 5
2 计 算 机 学 报 2021年