[go: up one dir, main page]

CN109543434B - Blockchain information encryption method, decryption method, storage method and device - Google Patents

Blockchain information encryption method, decryption method, storage method and device Download PDF

Info

Publication number
CN109543434B
CN109543434B CN201811437176.8A CN201811437176A CN109543434B CN 109543434 B CN109543434 B CN 109543434B CN 201811437176 A CN201811437176 A CN 201811437176A CN 109543434 B CN109543434 B CN 109543434B
Authority
CN
China
Prior art keywords
key
random
user
encryption
public
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
CN201811437176.8A
Other languages
Chinese (zh)
Other versions
CN109543434A (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.)
Yao Yalan
Original Assignee
Shenzhen Mohist Security Technology Co ltd
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 Shenzhen Mohist Security Technology Co ltd filed Critical Shenzhen Mohist Security Technology Co ltd
Priority to CN201811437176.8A priority Critical patent/CN109543434B/en
Publication of CN109543434A publication Critical patent/CN109543434A/en
Application granted granted Critical
Publication of CN109543434B publication Critical patent/CN109543434B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

本发明涉及一种区块链信息加密方法、解密方法、存储方法及装置。区块链信息加密方法,其用于多用户互动信息加密,其包括以下步骤:原始加密步骤,通过一随机密钥对原文进行加密得到密文;密钥生成步骤,生成一对随机公钥和随机私钥,随后随机私钥分别与多于1个的用户公钥采用加密算法进行运算,分别得到单独的共有密钥;二次加密步骤,通过每个共有密钥分别对随机密钥进行加密得到单独的识别密钥;其中,用户公钥、共有密钥和识别密钥为一一相互对应关系。本发明可以实现群聊、论坛、微博等多用户互动形式的保密解密,令到区块链上可以实现更广泛的社交功能,并具有很高的加密安全性、同时保持良好的用户体验。

Figure 201811437176

The invention relates to a block chain information encryption method, decryption method, storage method and device. The blockchain information encryption method, which is used for multi-user interactive information encryption, includes the following steps: an original encryption step, encrypting the original text with a random key to obtain a ciphertext; a key generation step, generating a pair of random public keys and Random private key, and then the random private key is operated with more than one user public key using an encryption algorithm to obtain a separate shared key; in the secondary encryption step, the random key is encrypted by each shared key. Obtain a separate identification key; wherein, the user public key, the common key and the identification key are in a one-to-one correspondence relationship. The invention can realize the secret decryption of multi-user interactive forms such as group chat, forum, microblog, etc., so that wider social functions can be realized on the blockchain, and it has high encryption security and maintains a good user experience at the same time.

Figure 201811437176

Description

区块链信息加密方法、解密方法、存储方法及装置Blockchain information encryption method, decryption method, storage method and device

技术领域technical field

本发明涉及区块链加密技术,尤其涉及一种区块链信息加密方法、解密方法、存储方法及装置。The present invention relates to block chain encryption technology, in particular to a block chain information encryption method, decryption method, storage method and device.

背景技术Background technique

区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。狭义来讲,区块链是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证的不可篡改和不可伪造的分布式账本。广义来讲,区块链技术是利用块链式数据结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用密码学的方式保证数据传输和访问的安全、利用由自动化脚本代码组成的智能合约来编程和操作数据的一种全新的分布式基础架构与计算方式。Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. In a narrow sense, blockchain is a chained data structure that combines data blocks in sequential order according to time sequence, and is cryptographically guaranteed to be an untamperable and unforgeable distributed ledger. Broadly speaking, blockchain technology is the use of blockchain data structures to verify and store data, the use of distributed node consensus algorithms to generate and update data, the use of cryptography to ensure the security of data transmission and access, and the use of automated scripts. A new distributed infrastructure and computing method for programming and manipulating data through smart contracts composed of code.

目前,在区块链上做社交工具都会遇到隐私问题,因为数据一旦上链,就是公开数据,会被所有人看到。如果希望在区块链存储的社交工具(例如即时聊天工具、论坛等等)上面的数据不被未授权第三方看到,就必须将数据加密存储,而现在最大问题是区块链无法对多人互动信息进行有效的加密。因此有必要在区块链上开发一种能够给互动信息有效加密、解密的技术。At present, social tools on the blockchain will encounter privacy problems, because once the data is on the chain, it is public data and will be seen by everyone. If you want the data on the social tools (such as instant chat tools, forums, etc.) stored in the blockchain not to be seen by unauthorized third parties, the data must be encrypted and stored, and now the biggest problem is that the blockchain cannot Human interaction information is effectively encrypted. Therefore, it is necessary to develop a technology that can effectively encrypt and decrypt interactive information on the blockchain.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于为克服现有技术的缺陷,而提供一种区块链信息加密方法、解密方法、存储方法及装置。The purpose of the present invention is to provide a block chain information encryption method, decryption method, storage method and device in order to overcome the defects of the prior art.

为实现上述目的,本发明采用以下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

区块链信息加密方法,其用于多用户互动信息加密,其包括以下步骤:A blockchain information encryption method, which is used for multi-user interactive information encryption, includes the following steps:

原始加密步骤,通过一随机密钥对原文进行加密得到密文;The original encryption step is to encrypt the original text with a random key to obtain the ciphertext;

密钥生成步骤,生成一对随机公钥和随机私钥,随后随机私钥分别与参与互动的每个用户的用户公钥采用加密算法进行运算,分别得到单独的共有密钥;In the key generation step, a pair of random public keys and random private keys are generated, and then the random private keys and the user public keys of each user participating in the interaction are calculated using an encryption algorithm to obtain separate shared keys;

二次加密步骤,通过每个共有密钥分别对随机密钥进行加密得到单独的识别密钥;In the second encryption step, the random key is encrypted by each common key to obtain a separate identification key;

其中,用户公钥、共有密钥和识别密钥为一一相互对应关系。Among them, the user public key, the shared key and the identification key are in a one-to-one correspondence relationship.

进一步地,密钥生成步骤中,生成一对ECDH的随机公钥和随机私钥,随后随机私钥分别与多于1个用户公钥采用ECDH算法进行运算,分别得到单独的共有密钥。Further, in the key generation step, a pair of ECDH random public key and random private key are generated, and then the random private key and more than one user public key are respectively operated with the ECDH algorithm to obtain separate shared keys.

进一步地,用户公钥为以太坊公钥,与用户公钥成对的是用户私钥。Further, the user's public key is the Ethereum public key, and the user's private key is paired with the user's public key.

本发明还公开了区块链信息解密方法,其用于解密以上区块链信息加密方法所得到的密文;信息解密方法包括以下步骤:获取用户公钥所对应的用户私钥,采用加密算法分别对随机公钥与用户私钥进行解密运算,得到单独的共有密钥;用所得到的共有密钥对识别密钥解密,得到随机密钥;将得到的随机密钥对密文进行解密。The invention also discloses a block chain information decryption method, which is used for decrypting the ciphertext obtained by the above block chain information encryption method; the information decryption method includes the following steps: obtaining the user private key corresponding to the user public key, and using an encryption algorithm Decrypt the random public key and the user's private key respectively to obtain a separate common key; decrypt the identification key with the obtained common key to obtain a random key; decrypt the ciphertext with the obtained random key.

本发明还公开了另一种区块链信息解密方法,其用于解密以上的区块链信息加密方法所得到的密文;信息解密方法包括以下步骤:获取用户公钥所对应的用户私钥,采用ECDH算法分别对随机公钥与用户私钥进行解密运算,得到共有密钥;用所得到的共有密钥对识别密钥解密,得到随机密钥;将得到的随机密钥对密文进行解密。The invention also discloses another blockchain information decryption method, which is used for decrypting the ciphertext obtained by the above blockchain information encryption method; the information decryption method includes the following steps: obtaining the user's private key corresponding to the user's public key , using the ECDH algorithm to decrypt the random public key and the user's private key respectively to obtain a common key; decrypt the identification key with the obtained common key to obtain a random key; decrypt.

本发明还公开了区块链信息存储方法,其在区块链中存储以上区块链信息加密方法得到的密文、识别密钥和随机公钥。每一个随机公钥的存储位后面/前面设置了校验码,用于校验随机密钥。密文的存储位后面/前面设置了校验码,用于校验原文。The invention also discloses a block chain information storage method, which stores the ciphertext, identification key and random public key obtained by the above block chain information encryption method in the block chain. A check code is set behind/before the storage bit of each random public key to verify the random key. A check code is set behind/before the storage bit of the ciphertext to verify the original text.

本发明还公开了一种电子设备,包括:处理器;以及存储器,存储器上存储有计算机可读指令,计算机可读指令被处理器执行时实现以上的加密方法、解密方法和存储方法。The invention also discloses an electronic device, comprising: a processor; and a memory, where computer-readable instructions are stored, and the computer-readable instructions are executed by the processor to implement the above encryption method, decryption method and storage method.

本发明还公开了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以上的加密方法、解密方法和存储方法。The present invention also discloses a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above encryption method, decryption method and storage method are implemented.

本发明与现有技术相比的有益效果是:通过共有密钥对加密原文的随机密钥进行加密,而共有密钥是通过随机私钥与参与互动的每一个用户公钥运算得来,在区块链上保存时只需要保存密文、随机公钥和所有识别密钥,在其他人无法得知用户私钥的情况下,只截取区块链上保存的数据,非授权第三方无法看到密文内容。通过这样的方式,实现了在区块链上针对多用户同时一次性保存密文、解密密文,可以实现群聊、论坛、微博等多用户互动形式的保密解密,令到区块链上可以实现更广泛的社交功能,并具有很高的加密安全性、同时保持良好的用户体验。Compared with the prior art, the present invention has the beneficial effects of: encrypting the random key of the encrypted original text with a common key, and the common key is obtained by calculating the random private key and the public key of each user participating in the interaction, When saving on the blockchain, only the ciphertext, random public key and all identification keys need to be saved. When other people cannot know the user's private key, only the data saved on the blockchain is intercepted, and unauthorized third parties cannot view it. to the ciphertext content. In this way, the ciphertext can be saved and decrypted at the same time for multiple users on the blockchain, and the confidential decryption in the form of multi-user interaction such as group chats, forums, Weibo, etc. A wider range of social functions can be implemented with high encryption security while maintaining a good user experience.

附图说明Description of drawings

图1为本发明区块链信息加密方法流程示意图。FIG. 1 is a schematic flowchart of a method for encrypting blockchain information according to the present invention.

图2为本发明区块链信息存储方法示意图。FIG. 2 is a schematic diagram of a method for storing blockchain information according to the present invention.

具体实施方式Detailed ways

为了更充分理解本发明的技术内容,下面结合具体实施例对本发明的技术方案作进一步介绍和说明。In order to more fully understand the technical content of the present invention, the technical solutions of the present invention will be further introduced and described below with reference to specific embodiments.

本实施例的区块链信息加密方法可以对多用户互动信息进行加密,以使得其能应用在区块链技术上。本实施例的区块链信息加密方法包括原始加密步骤、密钥生成步骤和二次加密步骤。原始加密步骤和密钥生成步骤不分先后,可以同时进行,而二次加密步骤需要等到其他两个步骤都完成后才能进行。The blockchain information encryption method of this embodiment can encrypt multi-user interactive information, so that it can be applied to the blockchain technology. The blockchain information encryption method of this embodiment includes an original encryption step, a key generation step and a secondary encryption step. The original encryption step and the key generation step are in no particular order and can be performed at the same time, while the secondary encryption step needs to wait until the other two steps are completed.

原始加密步骤的目的是先对原文进行加密。本实施例信息加密方法可应用在多人互动社交方面,原文可以是聊天信息或者发送的文件。原始加密步骤中先生成一个随机密钥,然后通过这个随机密钥对原文进行加密得到密文。一个原文对应只有一个随机密钥,随机密钥对原文的加密可以采用对称加密、非对称加密或者Hash算法。本实施例中随机密钥对原文的加密采用对称加密算法中的AES算法。在解密的时候,只要有密文和对应的随机密钥,便可以将原文解密出来。The purpose of the original encryption step is to encrypt the original text first. The information encryption method in this embodiment can be applied to multi-person interaction and social interaction, and the original text can be chat information or a sent file. In the original encryption step, a random key is generated first, and then the original text is encrypted by this random key to obtain the ciphertext. An original text corresponds to only one random key, and the encryption of the original text with the random key can be symmetric encryption, asymmetric encryption or Hash algorithm. In this embodiment, the encryption of the original text by the random key adopts the AES algorithm in the symmetric encryption algorithm. When decrypting, as long as the ciphertext and the corresponding random key are available, the original text can be decrypted.

密钥生成步骤的目的是生成一个共有密钥,用于对随机密钥进行加密。密钥生成步骤中,需要先生成一对随机公钥和随机私钥,随后随机私钥分别与多人互动的社交中每个用户的用户公钥采用加密算法进行运算,分别得到单独的共有密钥,此时每个共有密钥与每个用户一一对应。以太坊的每个账户都由一对钥匙定义,一个私钥(Private Key)和一个公钥(Public Key)。而本实施例中,用户公钥即为以太坊公钥,与用户公钥成对的即为用户私钥。本实施例的密钥生成步骤采用了ECDH算法,也即是:先临时生成一对ECDH的随机公钥和随机私钥,随后采用ECDH算法对随机私钥与每个互动用户的用户公钥进行运算,得到与用户公钥对应的共有密钥。ECDH是一个已有算法,在已有一对私钥、公钥情况下,临时生成一对随机私钥和随机公钥,那么随机私钥与已有的公钥进行ECDH运算所得结果相同于随机公钥与已有私钥进行ECDH运算所得结果。这个共有密钥也可以通过随机公钥与用户私钥进行ECDH运算得到,这便是解密时候所采用的方式。The purpose of the key generation step is to generate a common key that is used to encrypt the random key. In the key generation step, a pair of random public key and random private key need to be generated first, and then the random private key is used to calculate the user public key of each user in the social interaction with multiple people using an encryption algorithm to obtain a separate shared key. , at this time each shared key corresponds to each user one-to-one. Each account in Ethereum is defined by a pair of keys, a private key and a public key. In this embodiment, the user's public key is the Ethereum public key, and the pair with the user's public key is the user's private key. The key generation step in this embodiment adopts the ECDH algorithm, that is, first temporarily generate a pair of ECDH random public keys and random private keys, and then use the ECDH algorithm to perform the ECDH algorithm on the random private key and the user public key of each interactive user. operation to obtain the public key corresponding to the user's public key. ECDH is an existing algorithm. When a pair of private key and public key exists, a pair of random private key and random public key are temporarily generated. Then the result of ECDH operation between the random private key and the existing public key is the same as the random public key. The result of ECDH operation between the private key and the existing private key. This shared key can also be obtained by performing an ECDH operation on the random public key and the user's private key, which is the method used for decryption.

二次加密步骤中,通过每个共有密钥分别对同一个随机密钥进行加密得到多个单独的识别密钥,用户公钥、共有密钥和识别密钥为一一相互对应关系。共有密钥对随机密钥的加密方式可以采用对称加密、非对称加密或者Hash算法。本实施例中共有密钥对随机密钥的加密采用对称加密算法中的AES_CBC算法。在解密的时候,只要有识别密钥和对应的共有密钥,便可以将随机密钥解密出来。解密得到的随机密钥应进行一次校验,没有通过校验的直接退出并提示打开失败。另外,参与互动的每个用户在解密过程中都需要解密随机密钥,其中即使有某些用户解密失败也不会影响其他用户对随机密钥的解密。In the secondary encryption step, a plurality of individual identification keys are obtained by encrypting the same random key by each common key, and the user public key, the common key and the identification key are in a one-to-one correspondence relationship. The encryption method of the public key pair with the random key can be symmetric encryption, asymmetric encryption or Hash algorithm. In this embodiment, the encryption of the random key with the shared key adopts the AES_CBC algorithm in the symmetric encryption algorithm. When decrypting, as long as there is an identification key and a corresponding shared key, the random key can be decrypted. The random key obtained by decryption should be verified once, and if it does not pass the verification, it will exit directly and prompt that the opening fails. In addition, each user participating in the interaction needs to decrypt the random key during the decryption process, and even if some users fail to decrypt, it will not affect the decryption of the random key by other users.

对应的,本实施例的区块链信息解密方法用于解密本实施例的区块链信息加密方法所得到的密文。信息解密方法包括以下步骤:先获取每个互动用户的用户公钥所对应的用户私钥,采用加密算法对随机公钥与每个用户私钥分别进行解密运算,得到单独的共有密钥;随后用所得到的共有密钥分别对识别密钥解密,得到随机密钥;最后将得到的随机密钥对密文进行解密。Correspondingly, the blockchain information decryption method in this embodiment is used to decrypt the ciphertext obtained by the blockchain information encryption method in this embodiment. The information decryption method includes the following steps: firstly obtaining the user private key corresponding to the user public key of each interactive user, and using an encryption algorithm to decrypt the random public key and each user private key respectively to obtain a separate shared key; then Decrypt the identification key with the obtained common key to obtain a random key; finally, decrypt the ciphertext with the obtained random key.

在本实施例中,用户公钥是以太坊公钥,因此对应的用户私钥便为以太坊私钥。而本实施例加密方法采用了ECDH算法,因此获取了每个互动用户的用户私钥之后,采用ECDH算法对随机公钥与用户私钥进行运算,得到每个用户对应的共有密钥。本实施例加密方法采用的AES_CBC对随机密钥进行加密,因此在解密方法中也对应采用AES_CBC模式、通过共有密钥对识别密钥解密还原出原来的随机密钥。本实施例加密方法采用AES对原文进行加密,因此在解密方法时也采用AES模式、通过还原的随机密钥对密文进行解密还原。解密还原后的得到的原文需要进行校验,没有通过校验的直接退出并提示打开失败。In this embodiment, the user public key is the Ethereum public key, so the corresponding user private key is the Ethereum private key. However, the encryption method in this embodiment adopts the ECDH algorithm. Therefore, after obtaining the user private key of each interactive user, the ECDH algorithm is used to perform an operation on the random public key and the user's private key to obtain a common key corresponding to each user. The AES_CBC used in the encryption method in this embodiment encrypts the random key, so the AES_CBC mode is also used in the decryption method, and the original random key is restored by decrypting the identification key with the shared key. The encryption method in this embodiment uses AES to encrypt the original text, so the AES mode is also used in the decryption method, and the ciphertext is decrypted and restored by using the restored random key. The original text obtained after decryption and restoration needs to be verified, and those that do not pass the verification directly exit and prompt that the opening fails.

本实施例的区块链信息存储方法用于在区块链中存储本实施例的区块链信息加密方法得到的密文、识别密钥和随机公钥,本实施例的信息加密方法的其他信息不保存,如共有密钥、随机私钥、原文、用户私钥、用户公钥等。如图2所示,每一个随机公钥的存储位后面/前面设置了校验码,用于校验随机密钥,而密文的存储位后面/前面设置了校验码,用于校验原文,任一处没有通过校验需要直接退出并提示打开失败。校验方法可以采用MD5算法。The blockchain information storage method of this embodiment is used to store the ciphertext, identification key and random public key obtained by the blockchain information encryption method of this embodiment in the blockchain. Other aspects of the information encryption method of this embodiment are Information is not saved, such as shared key, random private key, original text, user private key, user public key, etc. As shown in Figure 2, a check code is set behind/before the storage bit of each random public key to verify the random key, while a check code is set after/before the storage bit of the ciphertext for verification In the original text, if any part fails to pass the verification, you need to exit directly and prompt that the opening fails. The verification method can use the MD5 algorithm.

本实施例还包括一种电子设备,其包括:处理器;以及存储器,存储器上存储有计算机可读指令,计算机可读指令被处理器执行时实现本实施例的信息加密方法、信息解密方法和信息存储方法。This embodiment also includes an electronic device, which includes: a processor; and a memory, where computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the information encryption method, information decryption method and Information storage method.

本实施例还包括一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现本实施例的信息加密方法、信息解密方法和信息存储方法。计算机介质指的是能存储信息的任意物质,包括不限于各种ROM、RAM、机械存储器、固体存储器、便携式存储器等等。This embodiment also includes a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the information encryption method, information decryption method and information storage method of this embodiment. Computer media refers to any substance capable of storing information, including without limitation various ROM, RAM, mechanical memory, solid state memory, portable memory, and the like.

以上陈述仅以实施例来进一步说明本发明的技术内容,以便于读者更容易理解,但不代表本发明的实施方式仅限于此,任何依本发明所做的技术延伸或再创造,均受本发明的保护。The above statement only uses examples to further illustrate the technical content of the present invention, so as to facilitate the readers to understand more easily, but it does not mean that the embodiments of the present invention are limited to this. Protection of Inventions.

Claims (7)

1.区块链信息加密方法,其特征在于,其用于多用户互动信息加密,其包括以下步骤:1. Blockchain information encryption method, is characterized in that, it is used for multi-user interactive information encryption, and it comprises the following steps: 原始加密步骤,通过一随机密钥对原文进行加密得到密文;The original encryption step is to encrypt the original text with a random key to obtain the ciphertext; 密钥生成步骤,生成一对ECDH的随机公钥和随机私钥,随后所述随机私钥分别与参与互动的每个用户的用户公钥采用ECDH算法进行运算,分别得到单独的共有密钥;The key generation step is to generate a pair of ECDH random public keys and random private keys, and then the random private keys are operated with the user public keys of each user participating in the interaction using the ECDH algorithm, respectively, to obtain separate shared keys; 二次加密步骤,通过每个共有密钥分别对所述随机密钥进行加密得到单独的识别密钥;In the secondary encryption step, the random key is encrypted by each shared key to obtain a separate identification key; 其中,用户公钥、共有密钥和识别密钥为一一相互对应关系;Among them, the user public key, the shared key and the identification key are in a one-to-one correspondence; 所述用户公钥为以太坊公钥,与用户公钥成对的是用户私钥,用户私钥为以太坊私钥。The user's public key is the Ethereum public key, the user's private key is paired with the user's public key, and the user's private key is the Ethereum private key. 2.区块链信息解密方法,其特征在于,其用于解密权利要求1的区块链信息加密方法所得到的密文;所述信息解密方法包括以下步骤:2. The block chain information decryption method is characterized in that, it is used for decrypting the ciphertext obtained by the block chain information encryption method of claim 1; the information decryption method comprises the following steps: 获取用户公钥所对应的用户私钥,采用ECDH算法分别对所述随机公钥与所述用户私钥进行解密运算,得到所述共有密钥;Obtain the user's private key corresponding to the user's public key, and perform a decryption operation on the random public key and the user's private key by using the ECDH algorithm to obtain the shared key; 用所得到的共有密钥对所述识别密钥解密,得到所述随机密钥;Decrypt the identification key with the obtained common key to obtain the random key; 将得到的所述随机密钥对密文进行解密。Decrypt the ciphertext with the obtained random key. 3.区块链信息存储方法,其特征在于,其在区块链中存储权利要求1任一项区块链信息加密方法得到的所述密文、所述识别密钥和所述随机公钥。3. The blockchain information storage method, characterized in that it stores the ciphertext, the identification key and the random public key obtained by the blockchain information encryption method of claim 1 in the blockchain . 4.如权利要求3所述的区块链信息存储方法,其特征在于,每一个所述随机公钥的存储位后面/前面设置了校验码,用于校验所述随机密钥。4 . The blockchain information storage method according to claim 3 , wherein a check code is set behind/before the storage bit of each of the random public keys, which is used to verify the random key. 5 . 5.如权利要求3所述的区块链信息存储方法,其特征在于,所述密文的存储位后面/前面设置了校验码,用于校验所述原文。5 . The method for storing blockchain information according to claim 3 , wherein a check code is set behind/before the storage bit of the ciphertext for verifying the original text. 6 . 6.一种电子设备,其特征在于,包括:6. An electronic device, characterized in that, comprising: 处理器;以及processor; and 存储器,所述存储器上存储有计算机可读指令,所述计算机可读指令被所述处理器执行时实现根据权利要求1至5中任一项所述的方法。a memory having computer readable instructions stored thereon, the computer readable instructions implementing the method according to any one of claims 1 to 5 when executed by the processor. 7.一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现根据权利要求1至5中任一项所述的方法。7. A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5.
CN201811437176.8A 2018-11-28 2018-11-28 Blockchain information encryption method, decryption method, storage method and device Active CN109543434B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811437176.8A CN109543434B (en) 2018-11-28 2018-11-28 Blockchain information encryption method, decryption method, storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811437176.8A CN109543434B (en) 2018-11-28 2018-11-28 Blockchain information encryption method, decryption method, storage method and device

Publications (2)

Publication Number Publication Date
CN109543434A CN109543434A (en) 2019-03-29
CN109543434B true CN109543434B (en) 2020-10-09

Family

ID=65850972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811437176.8A Active CN109543434B (en) 2018-11-28 2018-11-28 Blockchain information encryption method, decryption method, storage method and device

Country Status (1)

Country Link
CN (1) CN109543434B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336774B (en) * 2019-04-17 2021-07-27 中国联合网络通信集团有限公司 Hybrid encryption and decryption method, device and system
CN110059503B (en) * 2019-04-24 2023-03-24 成都派沃特科技股份有限公司 Traceable social information anti-leakage method
CN110084599B (en) * 2019-04-28 2021-04-20 百度在线网络技术(北京)有限公司 Key processing method, device, equipment and storage medium
CN110750803B (en) * 2019-10-18 2021-04-09 支付宝(杭州)信息技术有限公司 Method and device for providing and fusing data
CN110889128A (en) * 2019-11-27 2020-03-17 上海禾一网络科技有限公司 Input method and device based on block chain storage and encryption key exchange
CN111294203B (en) * 2020-01-22 2022-02-11 腾讯科技(深圳)有限公司 Information transmission method
CN116055048B (en) * 2023-03-31 2023-05-30 成都四方伟业软件股份有限公司 Method and device for storing and restoring scattered keys

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202158A (en) * 2014-09-22 2014-12-10 浪潮电子信息产业股份有限公司 Data symmetric and asymmetric hybrid encryption and decryption method based on cloud computing
CN104868996A (en) * 2014-02-25 2015-08-26 中兴通讯股份有限公司 Data encryption and decryption method, device thereof, and terminal

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7426745B2 (en) * 2003-04-24 2008-09-16 International Business Machines Corporation Methods and systems for transparent data encryption and decryption
CN103618607B (en) * 2013-11-29 2016-07-06 北京信长城技术研究院 A kind of Security Data Transmission and key exchange method
IN2014CH00681A (en) * 2014-02-13 2015-08-14 Infosys Ltd
CN104394155B (en) * 2014-11-27 2017-12-12 暨南大学 It can verify that multi-user's cloud encryption keyword searching method of integrality and completeness
CN104967516B (en) * 2015-07-24 2018-04-24 四川理工学院 Multi-user's encryption data may compare encryption method and encryption data comparative approach
US20170178127A1 (en) * 2015-12-18 2017-06-22 International Business Machines Corporation Proxy system mediated legacy transactions using multi-tenant transaction database
CN107979584B (en) * 2016-11-22 2019-08-13 南京银链信息科技有限公司 Block chain information hierarchical sharing method and system
CN107038578B (en) * 2017-04-19 2020-10-16 浙江数秦科技有限公司 Multi-signature transaction information processing method in blockchain-based data transaction platform
CN107426170B (en) * 2017-05-24 2019-08-09 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain
CN108768988B (en) * 2018-05-17 2021-01-05 深圳前海微众银行股份有限公司 Block chain access control method, block chain access control equipment and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104868996A (en) * 2014-02-25 2015-08-26 中兴通讯股份有限公司 Data encryption and decryption method, device thereof, and terminal
CN104202158A (en) * 2014-09-22 2014-12-10 浪潮电子信息产业股份有限公司 Data symmetric and asymmetric hybrid encryption and decryption method based on cloud computing

Also Published As

Publication number Publication date
CN109543434A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109543434B (en) Blockchain information encryption method, decryption method, storage method and device
US10616213B2 (en) Password manipulation for secure account creation and verification through third-party servers
US11184164B2 (en) Secure crypto system attributes
WO2020259635A1 (en) Method and apparatus for sharing blockchain data
US10142107B2 (en) Token binding using trust module protected keys
US6125185A (en) System and method for encryption key generation
JP5562687B2 (en) Securing communications sent by a first user to a second user
CN109246098B (en) A Method for Supporting Synchronous Ciphertext Comparison of Backup Servers
CN107070948A (en) Signature and verification method based on hybrid encryption algorithm in cloud storage
US20170142081A1 (en) Parallelizable Encryption Using Keyless Random Permutations And Authentication Using Same
JP7250960B2 (en) User authentication and signature device using user biometrics, and method thereof
CN106104562A (en) Safety of secret data stores and recovery system and method
CN113711564A (en) Computer-implemented method and system for encrypting data
TWI597960B (en) Key splitting
KR20200055672A (en) Encryption systems and method using permutaion group based cryptographic techniques
TW201409990A (en) Communication method utilizing fingerprint information for authentication
CN106878322B (en) A kind of encryption and decryption method of fixed length ciphertext and key based on attribute
CN110378138A (en) Data encryption, decryption method, neural network training method and device
CN104410493A (en) Data security storage and reading method based on distributed system infrastructure
CN110336673A (en) A blockchain design method based on privacy protection
US12056549B1 (en) Method and apparatus for activating a remote device
Sekar et al. Comparative study of encryption algorithm over big data in cloud systems
CN106230840B (en) A kind of command identifying method of high security
Tahir et al. A scheme for the generation of strong icmetrics based session key pairs for secure embedded system applications
WO2020042023A1 (en) Instant messaging data encryption method and apparatus

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
TR01 Transfer of patent right

Effective date of registration: 20250402

Address after: No. 38 Xianyun Road, East Coast Community, Meisha Street, Yantian District, Shenzhen City, Guangdong Province 518000, China

Patentee after: Yao Yalan

Country or region after: China

Address before: Room C718, Languang technology building, 27 Gaoxin North 6th Road, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000

Patentee before: SHENZHEN MOHIST SECURITY TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right