| In recent years,distributed applications(DAPP)based on smart contract technology have emerged in large numbers.They are mainly applied in the fields of healthcare,Internet of Things,supply chain tracing and copyright protection.In these application scenarios,smart contracts inevitably need to interact with the outside world.As a key technology which enable smart contracts to access the data off-chain,distributed oracle protocol faces two vital problems:1)The distributed oracle protocol cannot return the final output aggregated by the answers submitted by the oracle nodes within a specified time,thereby losing its availability.2)As a key bridge for publishing the off-chain identities of oracle nodes to the blockchain,commercial institutions can associate all on-chain behaviors of the oracle node with its private information maintained off-chain,thereby losing privacy.To solve two problems mentioned above,this thesis respectively proposes a distributed oracle protocol for time-sensitive scenarios and a distributed identity protocol with revocable anonymity.Two protocols are constructed based on blockchain smart contracts,zero-knowledge proofs and timed commitment scheme to enhance the availability of distributed oracles and protect the privacy of the oracle node.Specifically,the main research contents and work of the thesis are summarized as follows:In response to the first problem,the thesis first proposes an architecture of distributed oracle protocol in time sensitive scenario.The architecture not only describes the overall workflow of the protocol in time-sensitive scenario,but also formally defines five requirements in time-sensitive scenario.Based on the above architecture,a new distributed oracle protocol in time-sensitive scenarios is proposed in which the commitment of one oracle node can be revealed by any other node,even if it goes offline.The protocol uses timed commitment scheme to improve the availability of the distributed oracle protocol,while ensuring the security and decentralization of the protocol.Finally,a prototype program is implemented to evaluate additional cost caused by the new protocol.The verification result demonstrates that computation cost of answer deposit subprotocol is acceptable.The computation cost of Pedersen commitment scheme we used in our distributed oracle contract on chain is roughly equivalent to the one of salt hash based on SHA3-CRHF.In response to the second problem,the thesis proposes a distributed identity protocol with revocable anonymity.The protocol is comprised of four subprotocols:DID initialization,VC application&generation,VP generation&binding and anonymous revocation.This protocol hides the relationship between the off-chain VC generation process and the on-chain VP binding process by using a zero-knowledge proof of signature knowledge constructed by Sigma protocol.The use of secret sharing,ElGamal encryption ensures that the relationship that is hidden under the normal condition can be revealed by the authority. |