Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts

dc.contributor.authorHjort, Rikard
dc.contributor.departmentChalmers tekniska högskola / Institutionen för data och informationstekniksv
dc.contributor.examinerAhrendt, Wolfgang
dc.contributor.supervisorSewell, Thomas
dc.date.accessioned2020-04-15T13:54:43Z
dc.date.available2020-04-15T13:54:43Z
dc.date.issued2020sv
dc.date.submitted2019
dc.description.abstractA smart contract is immutable, public bytecode which handles valuable assets. This makes it a prime target for formal methods. WebAssembly (Wasm) is emerging as bytecode format for smart contracts. KWasm is a prototype mechanization of Wasm in the K framework which can be used for formal verification. The current project aims to verify a single Wasm smart contract, a simple token contract. First, we complete the KWasm semantics to be able to deal with modules and test the semantics against the official conformance tests. This reveals several shortcomings of the conformance tests. Second, we create an Ethereum embedding by creating a separate Ethereum client semantics and combining it with the KWasm semantics through a thin, synchronizing interface. This embedding is then unit tested, including conformance tests for two variants of the WRC20 contracts. Thirdly, we use the KWasm semantics to prove properties of incrementally more complex Wasm programs, with an emphasis on heap reasoning, culminating in the verification of a helper function that reverses the bytes of a 64-bit integer. In the process we add 25 axioms that get upstreamed into K, and several more that are useful for general Wasm verification.sv
dc.identifier.urihttps://hdl.handle.net/20.500.12380/300761
dc.language.isoengsv
dc.setspec.uppsokTechnology
dc.subjectKsv
dc.subjectK frameworksv
dc.subjectWebAssemblysv
dc.subjectWasmsv
dc.subjectEthereumsv
dc.subjectEwasmsv
dc.subjectformal methodssv
dc.subjectformal verificationsv
dc.subjectsemanticssv
dc.subjectspecificationsv
dc.titleFormally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contractssv
dc.type.degreeExamensarbete för masterexamensv
dc.type.uppsokH
local.programmeComputer systems and networks (MPCSN), MSc
Ladda ner
Original bundle
Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
CSE 20-08 Hjort ODR.pdf
Storlek:
1.79 MB
Format:
Adobe Portable Document Format
Beskrivning:
License bundle
Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
license.txt
Storlek:
1.14 KB
Format:
Item-specific license agreed upon to submission
Beskrivning: