+

CN112182608B - Method and system for regularly sharing alliance chain encryption data - Google Patents

Method and system for regularly sharing alliance chain encryption data Download PDF

Info

Publication number
CN112182608B
CN112182608B CN202011022707.4A CN202011022707A CN112182608B CN 112182608 B CN112182608 B CN 112182608B CN 202011022707 A CN202011022707 A CN 202011022707A CN 112182608 B CN112182608 B CN 112182608B
Authority
CN
China
Prior art keywords
data
contract
user
task
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011022707.4A
Other languages
Chinese (zh)
Other versions
CN112182608A (en
Inventor
黄伟兰
梁循
刘永刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renmin University of China
Original Assignee
Renmin University of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renmin University of China filed Critical Renmin University of China
Priority to CN202011022707.4A priority Critical patent/CN112182608B/en
Publication of CN112182608A publication Critical patent/CN112182608A/en
Application granted granted Critical
Publication of CN112182608B publication Critical patent/CN112182608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The application relates to a method and a system for regularly sharing alliance chain encryption data, wherein the method comprises the following steps: the task users of the k level regularly disclose tasks through the common user nodes, and if the level k is greater than or equal to a set level corresponding to the tasks, 3k public keys corresponding to different common user nodes are distributed to the task users; the task user encrypts and signs the complete data content, randomly breaks the complete data into 3k parts, and transmits the 3k parts to 3k different common users, wherein the common users encrypt and sign the data; transmitting all the information of the encrypted data to an intelligent contract, and setting triggering time by a task user; and periodically checking whether the triggering time is reached in the intelligent contract, and informing the common user of the intelligent contract when the triggering time is reached, decrypting the data on the alliance chain within the specified time and disclosing the data. The method not only ensures the safety and consistency of the data in the unpublished stage, but also can ensure that the data must be publicly shared after the intelligent contract is triggered.

Description

一种联盟链加密数据定期共享方法及系统A method and system for regular sharing of alliance chain encrypted data

技术领域Technical field

本发明涉及一种联盟链加密数据定期共享方法及系统,属于联盟链技术领域。The invention relates to a method and system for regular sharing of alliance chain encrypted data, and belongs to the technical field of alliance chain.

背景技术Background technique

区块链是利用加密链式区块结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用智能合约来编程和操作数据的一种去中心化基础架构与分布式计算范式,区块链有其特有的区块产生、交易产生和验证协议,具有分布式、公开透明、不可更改、不可伪造、可追溯性以及高度信任等特征。区块链的数据是以哈希数据存储的方式进行保存,区块链的非对称加密机制有效的保护了账户隐私和交易数据,使用区块链来存储数据的加密形式,可以有效防止明文数据的泄露,数据已成为企业的重要资产,如何在企业内部对数据的访问权限进行有效控制、在企业之间安全共享数据一直是一个挑战。数据的公开共享对企业,学术研究等都具有重要意义,区块链中的分布式账本可以从某些方面解决上述问题,但是区块链所应用的非对称加密机制仅可进行一对一的安全传输。Blockchain is a decentralized infrastructure and distributed computing paradigm that uses encrypted chain block structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses smart contracts to program and operate data. , the blockchain has its unique block generation, transaction generation and verification protocols, which are distributed, open and transparent, unchangeable, unforgeable, traceable and highly trustworthy. Blockchain data is stored in the form of hash data storage. The asymmetric encryption mechanism of the blockchain effectively protects account privacy and transaction data. Using the blockchain to store the encrypted form of data can effectively prevent plaintext data. With the leakage of data, data has become an important asset of the enterprise. How to effectively control the access rights of data within the enterprise and securely share data between enterprises has always been a challenge. The public sharing of data is of great significance to enterprises, academic research, etc. The distributed ledger in the blockchain can solve the above problems in some aspects, but the asymmetric encryption mechanism applied in the blockchain can only perform one-to-one Secure transmission.

发明内容Contents of the invention

针对上述问题,本发明的目的是提供了一种联盟链加密数据定期共享方法及系统,其既保证了未公开阶段数据的安全性和一致性,又能够保证智能合约触发后数据必须公开共享。In response to the above problems, the purpose of the present invention is to provide a method and system for regular sharing of alliance chain encrypted data, which not only ensures the security and consistency of the data in the undisclosed stage, but also ensures that the data must be shared publicly after the smart contract is triggered.

为实现上述目的,本发明采取以下技术方案:一种联盟链加密数据定期共享方法,包括以下步骤:S1 k级别的任务用户通过普通用户节点定期公开任务,若级别k大于等于任务对应的设定级别,则向任务用户分配3k个不同的普通用户节点对应的公钥;S2任务用户对完整数据内容加密和签名,并将完整数据随机打乱,分成3k个部分,分别传给3k个不同的普通用户,3k个不同的普通用户对其分到的数据进行加密和签名;S3将步骤S2中所有的加密数据的信息发送到智能合约中,任务用户设置触发时间;S4在智能合约中定期检查是否达到触发时间,若达到触发时间,智能合约通知3k个不同的普通用户,其在规定时间内对联盟链上数据进行解密,并公开数据。In order to achieve the above purpose, the present invention adopts the following technical solution: a method for regular sharing of alliance chain encrypted data, including the following steps: S1 k-level task users regularly disclose tasks through ordinary user nodes. If level k is greater than or equal to the setting corresponding to the task level, the task user is assigned the public keys corresponding to 3k different ordinary user nodes; the S2 task user encrypts and signs the complete data content, randomly scrambles the complete data, divides it into 3k parts, and transmits them to 3k different Ordinary users, 3k different ordinary users encrypt and sign their assigned data; S3 sends all the encrypted data information in step S2 to the smart contract, and the task user sets the trigger time; S4 checks regularly in the smart contract Whether the trigger time is reached, if the trigger time is reached, the smart contract notifies 3k different ordinary users, who will decrypt the data on the alliance chain within the specified time and make the data public.

进一步,步骤S2中数据随机打乱,并分成3k个部分,其中3k个部分,只有当大于等于2k个普通用户对用自己公钥加密的部分进行解密后才能够根据数据随机打乱的顺序还原完整数据内容。Furthermore, the data in step S2 is randomly scrambled and divided into 3k parts. Among them, 3k parts can only be restored according to the randomly scrambled order of the data after more than or equal to 2k ordinary users decrypt the parts encrypted with their own public keys. Complete data content.

进一步,步骤S3中的加密数据的信息包括数据内容的随机打乱顺序、数据分配结果和其对应加密公钥顺序。Further, the information of the encrypted data in step S3 includes the random shuffling order of the data content, the data distribution results and the corresponding encryption public key order.

进一步,步骤S3中的智能合约的创建步骤包括:S3.1接收任务用户提交的合约创建申请;S3.2根据合约创建申请生成合约和合约记录;S3.3将合约发送至任务用户,任务用户对合约进行签名;S3.4存储步骤S3.3中经过任务用户签名的合约,在联盟链发布合约的信息。Further, the creation steps of the smart contract in step S3 include: S3.1 receives the contract creation application submitted by the task user; S3.2 generates the contract and contract record according to the contract creation application; S3.3 sends the contract to the task user, and the task user Sign the contract; S3.4 stores the contract signed by the task user in step S3.3, and publishes the contract information in the alliance chain.

进一步,步骤S4中在规定时间内对联盟链上数据进行解密,若普通用户在规定时间公开了联盟链上的数据则获得交易金额奖励,提高用户级别,若普通用户提前解密数据或超时后仍未解密则不能获得交易金额,并降低用户级别。Further, in step S4, the data on the alliance chain is decrypted within the specified time. If the ordinary user discloses the data on the alliance chain within the specified time, the transaction amount will be rewarded and the user level will be improved. If the ordinary user decrypts the data in advance or still fails after timeout, If it is not decrypted, the transaction amount cannot be obtained and the user level will be reduced.

进一步,普通用户节点的初始级别是1级,最高级别是5级,普通用户节点完成智能合约任务次数超过预定次数,级别上升1级,违约超过预定次数,降低1级。Furthermore, the initial level of an ordinary user node is level 1, and the highest level is level 5. If an ordinary user node completes smart contract tasks more than the predetermined number of times, the level will increase by 1 level. If the number of defaults exceeds the predetermined number of times, the level will decrease by 1 level.

进一步,步骤S1中,将普通用户在规定时间内对联盟链上解密的数据按照数据随机打乱的顺序进行还原,将还原后的数据与任务用户的完整数据进行对比,以判断任务用户与普通用户提供的内容是否一致。Further, in step S1, the data decrypted by ordinary users on the alliance chain within the specified time is restored in the order of random shuffling of the data, and the restored data is compared with the complete data of the task user to determine whether the task user is different from the ordinary user. Whether the content provided by the user is consistent.

进一步,步骤S4中智能合约的执行步骤包括:S4.1设置所有智能合约的定期检查,逐条遍历智能合约内容;S4.2当达到触发时间时,创建合约事务记录,将合约事务记录发布至联盟链中,自动通知3k个不同的普通用户在规定时间内进行解密。Further, the execution steps of the smart contract in step S4 include: S4.1 Set up regular inspections of all smart contracts and traverse the content of the smart contract one by one; S4.2 When the trigger time is reached, create a contract transaction record and publish the contract transaction record to the alliance In the chain, 3k different ordinary users are automatically notified to decrypt within the specified time.

进一步,智能合约内容包括智能合约的状态、事务和触发条件。Furthermore, the smart contract content includes the status, transactions and triggering conditions of the smart contract.

本发明公开了一种联盟链加密数据定期共享系统,包括:数据分配模块,用于使k级别的任务用户通过普通用户节点定期公开任务,若级别k大于等于任务对应的设定级别,则向任务用户分配3k个不同的普通用户节点对应的公钥;数据加密模块,用于使任务用户对完整数据内容加密和签名,并将完整数据随机打乱,分成3k个部分,分别传给3k个不同的普通用户,3k个不同的普通用户对其分到的数据进行加密和签名;智能合约模块,用于将步骤S2中所有的加密数据的信息发送到智能合约中,任务用户设置触发时间;解密输出模块,用于在智能合约中定期检查是否达到触发时间,若达到触发时间,智能合约通知3k个不同的普通用户,其在规定时间内对联盟链上数据进行解密,并公开数据。The invention discloses a consortium chain encrypted data regular sharing system, including: a data distribution module, used to enable k-level task users to regularly disclose tasks through ordinary user nodes. If the level k is greater than or equal to the set level corresponding to the task, then The task user allocates the public keys corresponding to 3k different ordinary user nodes; the data encryption module is used to enable the task user to encrypt and sign the complete data content, and randomly scrambles the complete data, divides it into 3k parts, and transmits them to 3k parts respectively. Different ordinary users, 3k different ordinary users encrypt and sign their assigned data; the smart contract module is used to send all the encrypted data information in step S2 to the smart contract, and the task user sets the trigger time; The decryption output module is used to regularly check whether the trigger time is reached in the smart contract. If the trigger time is reached, the smart contract notifies 3k different ordinary users, who will decrypt the data on the alliance chain within the specified time and make the data public.

本发明由于采取以上技术方案,其具有以下优点:Since the present invention adopts the above technical solutions, it has the following advantages:

1、在法律,版权和企业数据应用等领域,存在数据需要隐私保护防止篡改同时需要公开共享的场景,通过建立加密数据定期公开的联盟链,既可以保证保护期内数据不被篡改,不被公开,任务用户可以将当下真实但敏感数据进行上链保存,又可在保证数据在定期时间触发后进行解密。1. In the fields of law, copyright and enterprise data applications, there are scenarios where data needs privacy protection to prevent tampering and needs to be shared publicly. By establishing a consortium chain where encrypted data is regularly disclosed, it can be ensured that the data will not be tampered with during the protection period and will not be Publicly, task users can save current real but sensitive data on the chain, and can decrypt it after ensuring that the data is triggered at a regular time.

2、通过建立智能合约,使定时公开流程透明化,到一定时间触发后,能够通过足够的用户节点进行解密数据,从而进行共享公开。2. By establishing smart contracts, the scheduled disclosure process is made transparent. After a certain time is triggered, the data can be decrypted through enough user nodes to share and disclose it.

附图说明Description of the drawings

图1是本发明一实施例中联盟链加密数据定期共享方法的流程图。Figure 1 is a flowchart of a method for regularly sharing encrypted data on a consortium chain in an embodiment of the present invention.

具体实施方式Detailed ways

为了使本领域技术人员更好的理解本发明的技术方向,通过具体实施例对本发明进行详细的描绘。然而应当理解,具体实施方式的提供仅为了更好地理解本发明,它们不应该理解成对本发明的限制。在本发明的描述中,需要理解的是,所用到的术语仅仅是用于描述的目的,而不能理解为指示或暗示相对重要性。In order to enable those skilled in the art to better understand the technical direction of the present invention, the present invention is described in detail through specific embodiments. However, it should be understood that the specific embodiments are provided only for a better understanding of the present invention, and they should not be construed as limitations of the present invention. In the description of the present invention, it is to be understood that the terms used are for the purpose of description only and are not to be construed as indicating or implying relative importance.

实施例一Embodiment 1

本实施例公开了一种联盟链加密数据定期共享方法,包括以下步骤:This embodiment discloses a method for regular sharing of consortium chain encrypted data, which includes the following steps:

将联盟链节点分为联盟节点和普通用户节点,并设定普通用户节点的级别。普通用户节点的初始级别是1级,最高级别是5级,普通用户节点完成智能合约任务次数超过预定次数,级别上升1级,违约超过预定次数,降低1级。Divide the alliance chain nodes into alliance nodes and ordinary user nodes, and set the level of ordinary user nodes. The initial level of an ordinary user node is level 1, and the highest level is level 5. If an ordinary user node completes smart contract tasks more than the predetermined number of times, the level will increase by 1 level. If the number of defaults exceeds the predetermined number of times, the level will decrease by 1 level.

S1 k级别的任务用户通过普通用户节点定期公开任务,若级别k大于等于任务对应的设定级别,则向任务用户分配3k个不同的普通用户节点对应的公钥。S1 k-level task users regularly publish tasks through ordinary user nodes. If level k is greater than or equal to the set level corresponding to the task, the public keys corresponding to 3k different ordinary user nodes will be assigned to the task user.

S2任务用户对完整数据内容加密和签名,并将完整数据随机打乱,分成3k个部分,分别传给3k个不同的普通用户,3k个不同的普通用户对其分到的数据进行加密和签名。The S2 task user encrypts and signs the complete data content, randomly scrambles the complete data, divides it into 3k parts, and transmits them to 3k different ordinary users respectively. The 3k different ordinary users encrypt and sign the assigned data. .

步骤S2中数据随机打乱,并分成3k个部分,其中3k个部分,只有当大于等于2k个普通用户对用自己公钥加密的部分进行解密后才能够根据数据随机打乱的顺序还原完整数据内容。这样分配可以防止有规定节点到期无法进行解密的情况而不能解释完整文件。In step S2, the data is randomly scrambled and divided into 3k parts. Among the 3k parts, only when more than or equal to 2k ordinary users decrypt the parts encrypted with their own public keys, the complete data can be restored according to the randomly scrambled order of the data. content. This allocation can prevent the complete file from being unable to be interpreted due to a specified node expiration date that cannot be decrypted.

S3将步骤S2中所有的加密数据的信息发送到智能合约中,任务用户设置触发时间。S3 sends all the encrypted data information in step S2 to the smart contract, and tasks the user to set the trigger time.

步骤S3中的加密数据的信息包括数据内容的随机打乱顺序、数据分配结果和其对应加密公钥顺序。The information of the encrypted data in step S3 includes the random shuffling order of the data content, the data distribution result and its corresponding encryption public key order.

步骤S3中的智能合约的创建步骤包括:The creation steps of the smart contract in step S3 include:

S3.1接收任务用户提交的合约创建申请;S3.1 receives the contract creation application submitted by the task user;

S3.2根据合约创建申请生成合约和合约记录;S3.2 Generate contracts and contract records based on the contract creation application;

S3.3将合约发送至任务用户,任务用户对合约进行签名;S3.3 Send the contract to the task user, and the task user signs the contract;

S3.4存储步骤S3.3中经过任务用户签名的合约,在联盟链发布合约的信息。S3.4 stores the contract signed by the task user in step S3.3, and publishes the contract information on the alliance chain.

S4在智能合约中定期检查是否达到触发时间,若达到触发时间,智能合约通知3k个不同的普通用户,其在规定时间内对联盟链上数据进行解密,并公开数据。S4 regularly checks in the smart contract whether the trigger time is reached. If the trigger time is reached, the smart contract notifies 3k different ordinary users, who will decrypt the data on the alliance chain within the specified time and make the data public.

步骤S4中在规定时间内对联盟链上数据进行解密,若普通用户在规定时间公开了联盟链上的数据则获得交易金额奖励,提高用户级别,若普通用户提前解密数据或超时后仍未解密则不能获得交易金额,并降低用户级别。In step S4, the data on the alliance chain is decrypted within the specified time. If the ordinary user discloses the data on the alliance chain within the specified time, the transaction amount will be rewarded and the user level will be improved. If the ordinary user decrypts the data in advance or fails to decrypt it after timeout, Otherwise, the transaction amount cannot be obtained and the user level will be reduced.

步骤S4中,将普通用户在规定时间内对联盟链上解密的数据按照数据随机打乱的顺序进行还原,将还原后的数据与任务用户的完整数据进行对比,以判断任务用户与普通用户提供的内容是否一致。这样做既可判断任务用户是否放数据不一致的文件,也可以判断普通用户节点是否将解密后的数据进行虚假公开。In step S4, the data decrypted by ordinary users on the alliance chain within the specified time is restored in the order of random shuffling of the data, and the restored data is compared with the complete data of the task user to determine whether the task user and the ordinary user provide whether the contents are consistent. This can be used to determine whether the task user has placed files with inconsistent data, and it can also be used to determine whether ordinary user nodes have falsely disclosed decrypted data.

步骤S4中智能合约的执行步骤包括:The execution steps of the smart contract in step S4 include:

S4.1设置所有智能合约的定期检查,逐条遍历智能合约内容,智能合约内容包括智能合约的状态、事务和触发条件。S4.1 Set up regular inspections of all smart contracts and traverse the smart contract content one by one. The smart contract content includes the status, transactions and triggering conditions of the smart contract.

S4.2当达到触发时间时,创建合约事务记录,将合约事务记录发布至联盟链中,自动通知3k个不同的普通用户在规定时间内进行解密。S4.2 When the trigger time is reached, create a contract transaction record, publish the contract transaction record to the alliance chain, and automatically notify 3k different ordinary users to decrypt within the specified time.

实施例二Embodiment 2

基于相同的发明构思,本实施例公开了一种联盟链加密数据定期共享系统,包括:Based on the same inventive concept, this embodiment discloses a consortium chain encrypted data regular sharing system, including:

数据分配模块,用于使k级别的任务用户通过普通用户节点定期公开任务,若级别k大于等于任务对应的设定级别,则向任务用户分配3k个不同的普通用户节点对应的公钥;The data distribution module is used to enable k-level task users to regularly disclose tasks through ordinary user nodes. If level k is greater than or equal to the set level corresponding to the task, public keys corresponding to 3k different ordinary user nodes are allocated to the task user;

数据加密模块,用于使任务用户对完整数据内容加密和签名,并将完整数据随机打乱,分成3k个部分,分别传给3k个不同的普通用户,3k个不同的普通用户对其分到的数据进行加密和签名;The data encryption module is used to enable task users to encrypt and sign the complete data content, randomly scramble the complete data, divide it into 3k parts, and transmit them to 3k different ordinary users respectively, and 3k different ordinary users will divide them into Encrypt and sign data;

智能合约模块,用于将步骤S3中所有的加密数据的信息发送到智能合约中,任务用户设置触发时间;The smart contract module is used to send all the encrypted data information in step S3 to the smart contract, and the task user sets the trigger time;

解密输出模块,用于在智能合约中定期检查是否达到触发时间,若达到触发时间,智能合约通知3k个不同的普通用户,其在规定时间内对联盟链上数据进行解密,并公开数据。The decryption output module is used to regularly check whether the trigger time is reached in the smart contract. If the trigger time is reached, the smart contract notifies 3k different ordinary users, who will decrypt the data on the alliance chain within the specified time and make the data public.

最后应当说明的是:以上实施例仅用以说明本发明的技术方案而非对其限制,尽管参照上述实施例对本发明进行了详细的说明,所属领域的普通技术人员应当理解:依然可以对本发明的具体实施方式进行修改或者等同替换,而未脱离本发明精神和范围的任何修改或者等同替换,其均应涵盖在本发明的权利要求保护范围之内。上述内容仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that the present invention can still be modified. Modifications or equivalent substitutions may be made to the specific embodiments, and any modifications or equivalent substitutions that do not depart from the spirit and scope of the invention shall be covered by the scope of the claims of the invention. The above content is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered. within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (6)

1.一种联盟链加密数据定期共享方法,其特征在于,包括以下步骤:1. A method for regular sharing of consortium chain encrypted data, which is characterized by including the following steps: S1 k级别的任务用户通过普通用户节点定期公开任务,若所述级别k大于等于所述任务对应的设定级别,则向所述任务用户分配3k个不同的普通用户节点对应的公钥;S1 k-level task users regularly publish tasks through ordinary user nodes. If the level k is greater than or equal to the set level corresponding to the task, then the public keys corresponding to 3k different ordinary user nodes are assigned to the task user; S2任务用户对完整数据内容加密和签名,并将所述完整数据随机打乱,分成3k个部分,分别传给3k个不同的普通用户,所述3k个不同的普通用户对其分到的数据进行加密和签名;The S2 task user encrypts and signs the complete data content, randomly scrambles the complete data, divides it into 3k parts, and transmits them to 3k different ordinary users respectively, and the 3k different ordinary users receive their assigned data. Perform encryption and signing; S3将步骤S2中有关加密数据的信息发送到智能合约中,所述任务用户设置触发时间;S3 sends the information about the encrypted data in step S2 to the smart contract, and the task user sets the trigger time; S4在所述智能合约中定期检查是否达到触发时间,若达到触发时间,所述智能合约通知所述3k个不同的普通用户,其在规定时间内对联盟链上数据进行解密,并公开所述数据;S4 regularly checks in the smart contract whether the trigger time is reached. If the trigger time is reached, the smart contract notifies the 3k different ordinary users, who decrypt the data on the alliance chain within the specified time and disclose the data; 所述步骤S3中的加密数据的信息包括数据内容的随机打乱顺序、数据分配结果和其对应加密公钥顺序;The information of the encrypted data in step S3 includes the random shuffling order of the data content, the data distribution results and the corresponding encrypted public key order; 所述步骤S3中的智能合约的创建步骤包括:The creation steps of the smart contract in step S3 include: S3.1接收任务用户提交的合约创建申请;S3.1 receives the contract creation application submitted by the task user; S3.2根据所述合约创建申请生成合约和合约记录;S3.2 Generate contracts and contract records based on the contract creation application; S3.3将所述合约发送至任务用户,所述任务用户对所述合约进行签名;S3.3 Send the contract to the task user, and the task user signs the contract; S3.4存储步骤S3.3中经过任务用户签名的合约,在联盟链发布合约的信息;S3.4 stores the contract signed by the task user in step S3.3, and publishes the contract information on the alliance chain; 所述步骤S4中,将普通用户在规定时间内对联盟链上解密的数据按照数据随机打乱的顺序进行还原,将还原后的数据与任务用户的完整数据进行对比,以判断任务用户与普通用户提供的内容是否一致;In the step S4, the data decrypted by ordinary users on the alliance chain within the specified time is restored in the order of random shuffling of the data, and the restored data is compared with the complete data of the task user to determine whether the task user is different from the ordinary user. Whether the content provided by the user is consistent; 所述步骤S4中智能合约的执行步骤包括:The execution steps of the smart contract in step S4 include: S4.1设置所有智能合约的定期检查,逐条遍历智能合约内容;S4.1 Set up regular inspections of all smart contracts and traverse the contents of smart contracts one by one; S4.2当达到触发时间时,创建合约事务记录,将所述合约事务记录发布至联盟链中,自动通知所述3k个不同的普通用户在规定时间内进行解密。S4.2 When the trigger time is reached, create a contract transaction record, publish the contract transaction record to the alliance chain, and automatically notify the 3k different ordinary users to decrypt within the specified time. 2.如权利要求1所述的联盟链加密数据定期共享方法,其特征在于,所述步骤S2中数据随机打乱,并分成3k个部分,其中所述3k个部分,只有当大于等于2k个普通用户对用自己公钥加密的部分进行解密后才能够根据数据随机打乱的顺序还原完整数据内容。2. The method for regular sharing of consortium chain encrypted data as claimed in claim 1, characterized in that the data in step S2 is randomly scrambled and divided into 3k parts, wherein the 3k parts can only be shared when there are greater than or equal to 2k Ordinary users can restore the complete data content according to the randomly shuffled order of the data after decrypting the part encrypted with their own public key. 3.如权利要求1所述的联盟链加密数据定期共享方法,其特征在于,所述步骤S4中在规定时间内对联盟链上数据进行解密,若所述普通用户在规定时间公开了联盟链上的数据则获得交易金额奖励,提高用户级别,若所述普通用户提前解密数据或超时后仍未解密则不能获得交易金额,并降低用户级别。3. The method for regularly sharing consortium chain encrypted data as claimed in claim 1, characterized in that in step S4, the data on the consortium chain is decrypted within a specified time. If the ordinary user discloses the consortium chain within the specified time, The data on the data will be rewarded with the transaction amount and the user level will be improved. If the ordinary user decrypts the data in advance or fails to decrypt it after timeout, the transaction amount will not be obtained and the user level will be lowered. 4.如权利要求1所述的联盟链加密数据定期共享方法,其特征在于,所述普通用户节点的初始级别是1级,最高级别是5级,普通用户节点完成智能合约任务次数超过预定次数,级别上升1级,违约超过预定次数,降低1级。4. The method for regular sharing of alliance chain encrypted data as claimed in claim 1, characterized in that the initial level of the ordinary user node is level 1, the highest level is level 5, and the number of times the ordinary user node completes smart contract tasks exceeds a predetermined number of times. , the level increases by 1 level, if the number of defaults exceeds the predetermined number of times, the level decreases by 1 level. 5.如权利要求1所述的联盟链加密数据定期共享方法,其特征在于,所述智能合约内容包括智能合约的状态、事务和触发条件。5. The method for regular sharing of consortium chain encrypted data as claimed in claim 1, wherein the smart contract content includes the status, transactions and triggering conditions of the smart contract. 6.一种联盟链加密数据定期共享系统,其特征在于,包括:6. A consortium chain encrypted data regular sharing system, which is characterized by including: 数据分配模块,用于使k级别的任务用户通过普通用户节点定期公开任务,若所述k级别的任务用户大于等于所述任务对应的设定级别,则向所述任务用户分配3k个不同的普通用户节点对应的公钥;The data allocation module is used to enable k-level task users to regularly publish tasks through ordinary user nodes. If the k-level task users are greater than or equal to the set level corresponding to the task, 3k different tasks are assigned to the task users. The public key corresponding to the ordinary user node; 数据加密模块,用于使任务用户对完整数据内容加密和签名,并将所述完整数据随机打乱,分成3k个部分,分别传给3k个不同的普通用户,所述3k个不同的普通用户对其分到的数据进行加密和签名;The data encryption module is used to enable the task user to encrypt and sign the complete data content, randomly scramble the complete data, divide it into 3k parts, and transmit them to 3k different ordinary users respectively. The 3k different ordinary users Encrypt and sign the assigned data; 智能合约模块,用于将所有的加密数据的信息发送到智能合约中,所述任务用户设置触发时间;The smart contract module is used to send all encrypted data information to the smart contract, and the user sets the trigger time for the task; 解密输出模块,用于在所述智能合约中定期检查是否达到触发时间,若达到触发时间,所述智能合约通知所述3k个不同的普通用户,其在规定时间内对联盟链上数据进行解密,并公开所述数据;The decryption output module is used to regularly check whether the trigger time is reached in the smart contract. If the trigger time is reached, the smart contract notifies the 3k different ordinary users to decrypt the data on the alliance chain within the specified time. , and make said data public; 所述加密数据的信息包括数据内容的随机打乱顺序、数据分配结果和其对应加密公钥顺序;The information of the encrypted data includes the random shuffling order of the data content, the data distribution results and the corresponding encryption public key order; 所述智能合约模块中的智能合约的创建步骤包括:The steps to create smart contracts in the smart contract module include: S3.1接收任务用户提交的合约创建申请;S3.1 receives the contract creation application submitted by the task user; S3.2根据所述合约创建申请生成合约和合约记录;S3.2 Generate contracts and contract records based on the contract creation application; S3.3将所述合约发送至任务用户,所述任务用户对所述合约进行签名;S3.3 Send the contract to the task user, and the task user signs the contract; S3.4存储步骤S3.3中经过任务用户签名的合约,在联盟链发布合约的信息;S3.4 stores the contract signed by the task user in step S3.3, and publishes the contract information on the alliance chain; 所述解密输出模块中,将普通用户在规定时间内对联盟链上解密的数据按照数据随机打乱的顺序进行还原,将还原后的数据与任务用户的完整数据进行对比,以判断任务用户与普通用户提供的内容是否一致;In the decryption output module, the data decrypted by ordinary users on the alliance chain within the specified time is restored in the order of random data shuffling, and the restored data is compared with the complete data of the task user to determine whether the task user is the same as the task user. Whether the content provided by ordinary users is consistent; 所述解密输出模块中智能合约的执行步骤包括:The execution steps of the smart contract in the decryption output module include: S4.1设置所有智能合约的定期检查,逐条遍历智能合约内容;S4.1 Set up regular inspections of all smart contracts and traverse the contents of smart contracts one by one; S4.2当达到触发时间时,创建合约事务记录,将所述合约事务记录发布至联盟链中,自动通知所述3k个不同的普通用户在规定时间内进行解密。S4.2 When the trigger time is reached, create a contract transaction record, publish the contract transaction record to the alliance chain, and automatically notify the 3k different ordinary users to decrypt within the specified time.
CN202011022707.4A 2020-09-25 2020-09-25 Method and system for regularly sharing alliance chain encryption data Active CN112182608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011022707.4A CN112182608B (en) 2020-09-25 2020-09-25 Method and system for regularly sharing alliance chain encryption data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011022707.4A CN112182608B (en) 2020-09-25 2020-09-25 Method and system for regularly sharing alliance chain encryption data

Publications (2)

Publication Number Publication Date
CN112182608A CN112182608A (en) 2021-01-05
CN112182608B true CN112182608B (en) 2023-10-20

Family

ID=73943466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011022707.4A Active CN112182608B (en) 2020-09-25 2020-09-25 Method and system for regularly sharing alliance chain encryption data

Country Status (1)

Country Link
CN (1) CN112182608B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979584A (en) * 2016-11-22 2018-05-01 南京银链信息科技有限公司 Block chain information hierarchical sharing method and system
CN108055274A (en) * 2017-12-22 2018-05-18 广东工业大学 A kind of encryption based on alliance's chain storage data and shared method and system
CN109117671A (en) * 2018-08-22 2019-01-01 平安科技(深圳)有限公司 A kind of encryption data sharing method, server and computer readable storage medium
CN109729168A (en) * 2018-12-31 2019-05-07 浙江成功软件开发有限公司 A kind of data share exchange system and method based on block chain
CN110138592A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of management method and system of intelligence contract
CN110457926A (en) * 2019-08-13 2019-11-15 重庆邮电大学 A data sharing method based on data encryption storage in industrial internet of things
CN110688634A (en) * 2019-09-19 2020-01-14 杭州云象网络技术有限公司 Intelligent execution method for alliance chain affairs
CN110826095A (en) * 2019-10-22 2020-02-21 中国人民大学 A blockchain data encryption method and system
CN111177253A (en) * 2019-11-26 2020-05-19 南方电网传媒有限公司 Power big data protection method and system based on identity digital authentication
CN111343001A (en) * 2020-02-07 2020-06-26 复旦大学 Social data sharing system based on block chain

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124278B (en) * 2017-03-30 2021-03-30 腾讯科技(深圳)有限公司 Business processing method, device and data sharing system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979584A (en) * 2016-11-22 2018-05-01 南京银链信息科技有限公司 Block chain information hierarchical sharing method and system
CN108055274A (en) * 2017-12-22 2018-05-18 广东工业大学 A kind of encryption based on alliance's chain storage data and shared method and system
CN109117671A (en) * 2018-08-22 2019-01-01 平安科技(深圳)有限公司 A kind of encryption data sharing method, server and computer readable storage medium
CN109729168A (en) * 2018-12-31 2019-05-07 浙江成功软件开发有限公司 A kind of data share exchange system and method based on block chain
CN110138592A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of management method and system of intelligence contract
CN110457926A (en) * 2019-08-13 2019-11-15 重庆邮电大学 A data sharing method based on data encryption storage in industrial internet of things
CN110688634A (en) * 2019-09-19 2020-01-14 杭州云象网络技术有限公司 Intelligent execution method for alliance chain affairs
CN110826095A (en) * 2019-10-22 2020-02-21 中国人民大学 A blockchain data encryption method and system
CN111177253A (en) * 2019-11-26 2020-05-19 南方电网传媒有限公司 Power big data protection method and system based on identity digital authentication
CN111343001A (en) * 2020-02-07 2020-06-26 复旦大学 Social data sharing system based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于区块链的银行信息互联平台设计与实现;杨渊;《中国优秀硕士学位论文全文数据库 信息科技辑》(第12期);I138-360 *
面向社会网络融合的关联用户挖掘方法综述;梁循 等;《软件学报》;第28卷(第06期);1565-1583 *

Also Published As

Publication number Publication date
CN112182608A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN113114476B (en) Contract-based privacy certificate storage method and device
CN110881063B (en) Storage method, device, equipment and medium of private data
US11831753B2 (en) Secure distributed key management system
CN110417750B (en) Block chain technology-based file reading and storing method, terminal device and storage medium
CN111797415A (en) Block chain based data sharing method, electronic device and storage medium
US8528104B2 (en) Security and ticketing system control and management
WO2021184882A1 (en) Method and apparatus for verifying contract
CN116601912A (en) Provide cryptographically secure post-secret provisioning services
CN111090876A (en) Method and device for calling a contract
CN111090875A (en) Contract deployment method and device
CN111475827A (en) Private data query method and device based on down-link authorization
CN111241557B (en) Service request method and device based on block chain
CN117544296A (en) Controlled release of encrypted private keys
WO2021073170A1 (en) Method and apparatus for data provision and fusion
CN110797099A (en) Medical data sharing method and system based on block chain
CN111523110A (en) Permission query configuration method and device based on chain codes
CN1985466A (en) Method of delivering direct evidence private key to device by signing group using distribution CD
CN108881175A (en) A kind of Juggling-proof electric medical record system based on block chain
CN114091058A (en) Method and system for secure sharing of data between a first area and a second area
CN112669147A (en) Service request method and device based on block chain
KR20130118951A (en) Secure management and personalization of unique code signing keys
WO2021057124A1 (en) Fpga-based privacy block chain implementing method and device
CN115834047A (en) A Blockchain-Based Continuous Trusted Data Sharing Method
TW201824808A (en) Method and system for operating resources in off-line state
CN112182608B (en) Method and system for regularly sharing alliance chain encryption data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载