Smart contracts are programs stored on blockchain that can be automatically executed according to the predetermined terms of contracts.It provides a basis for building a self-controllable,efficient and easy-monitoring transaction platform.However,in recent years,blockchain security incidents caused by smart contracts have occurred frequently and brought huge economic losses.These security risks expose that the smart contract program codes are facing many challenges in terms of effectiveness,reliability and privacy-protection,thereby attracting extensive attention from academia and industry.The leakage of sensitive information in smart contracts,such as private data and the identity of the parties,has become a serious obstacle to the realization of secure transactions.Based on this,the thesis carries out researches on cryptographic technologies oriented at smart contract privacy protection.These researches will provide theoretical and technical bases for the effective application of cryptographic security protocols in smart contracts.By combining cryptographical security protocol construction technology with the privacy requirements of blockchain smart contracts,this thesis conducts researches on broadcast encryption for transaction privacy,attribute-based encryption for transaction data security sharing,and set membership proof for specific contracts scenarios.The main contributions of this thesis are as follows:1)A dual-mode identity-based broadcast encryption(DM-IBBE)scheme is proposed.There are two types of privacy requirements for sensitive data in smart contract,that is,access to sensitive data is limited to the designated people and nonconflict people.By selecting different interpolation points on the designated set and conflict set as well as these points on the reconstructed curve under the Lagrangian interpolation,this thesis proposed the DM-IBBE scheme with selective and exclusive encryption mode to meet the above privacy requirements,respectively.Then,an architecture of smart contracts with privacy protection is introduced under smart legal contract language SPESC.In this architecture,the sensitive transaction data are declared in the form of contract terms and protected by the compiler linking predefined DM-IBBE algorithms into smart contract programs.Moreover,under the decisional Difffie-Hellman assumption,this scheme is proved to be semantically secure and selective encryption mode is anonymous.Compared with other broadcast encryption schemes,DM-IBBE has more varied encryption modes to meet the different privacy requirements of smart contracts.2)A decentralized key and scripted ciphertext mechanism for attribute-based encryption is proposed.First,aiming at the problem of the conflict between the decentralization of blockchain and the centralized key management of attributebased encryption,this thesis proposed a ciphertext-policy decentralized-key attribute-based encryption(CP-DK-ABE)scheme by combining two types of secure multi-party compution with additive homomorphism.Furthermore,the blockchain’s script system is extended by adding key query and ciphertext logic opcodes,and complex access policy logic in ciphertext are scripted in the encryption process.In addition,this scheme is proved to be private in key generatiuon and semantically secure under the DBDH and DLDH assumptions,respectively.CP-DK-ABE realizes the decentralized management of master key,the cooperative generation of user private key,and the automatic decryption of scripted-ciphertext by script interpreter.3)A zero-knowledge dual-membership proof(ZKDMP)protocol is proposed.Aiming at decision of dynamic group members and the problem of user privacy disclosure in the authentication process,this thesis constructed two aggregation functions to compact an arbitrarily-sized subset into an element in a cryptographic space and reach the theoretical lower limit for the representation size of subsets.Also,the concept of secure aggregation function(SAF)is introduced to transform the problem of set mermbership decision into solving the aggregation function under element deletion and insertion.In addition,this thesis provided detailed security proof of this protocol,including positive completeness,negative completeness,soundness and zero-knowledge.The ZKDMP protocol supports dynamic element addition and deletion,unlimited number of set elements and more strict set membership proof.All these researches show that the DM-IBBE and CP-DK-ABE are efficient methods to protect the transaction privacy.Furthermore,the ZKDMP protects the identity privacy of parties in the authentication process.These results will provide theoretical and practical supports for more secure and efficient cryptographic technologies in smart contracts. |