CN112751841A - Encryption communication method and system based on block chain technology - Google Patents
Encryption communication method and system based on block chain technology Download PDFInfo
- Publication number
- CN112751841A CN112751841A CN202011560325.7A CN202011560325A CN112751841A CN 112751841 A CN112751841 A CN 112751841A CN 202011560325 A CN202011560325 A CN 202011560325A CN 112751841 A CN112751841 A CN 112751841A
- Authority
- CN
- China
- Prior art keywords
- key
- user equipment
- symmetric key
- ciphertext
- communication
- 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.)
- Pending
Links
- 230000006854 communication Effects 0.000 title claims abstract description 142
- 238000004891 communication Methods 0.000 title claims abstract description 139
- 238000000034 method Methods 0.000 title claims abstract description 77
- 238000005516 engineering process Methods 0.000 title claims abstract description 34
- 239000012634 fragment Substances 0.000 claims description 15
- 238000012795 verification Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/045—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Power Engineering (AREA)
- Data Mining & Analysis (AREA)
- Storage Device Security (AREA)
Abstract
The application provides an encryption communication method based on a block chain technology, wherein a first user device sends a communication request to a second user device according to decentralized digital identity information of the second user device, and the second user device judges whether the second user device receives the request or not for a receiver of communication information appointed by the first user device; if the second user equipment receives the request, a symmetric key is generated through a key agreement technology; acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key in the first asymmetric key to obtain a first symmetric key ciphertext, and encrypting communication information through the symmetric key to obtain a communication information ciphertext; and sending the communication information cipher text to the second user equipment through a server. The method and the device solve the problems that the personal information of the user is easy to leak and the safety is poor due to the existing instant messaging method.
Description
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to an encryption communication method and system based on blockchain technology.
Background
With the continuous development of internet technology, instant messaging through the internet becomes an essential important part in daily life of people. The method has the advantages that characters, documents, voice and videos can be transmitted in real time to communicate among a plurality of users through the Internet, and the real-time communication provides great convenience for daily life, work and study. The existing instant messenger has serious defects although having a huge user group, and is more and more widely used as the instant messenger is more and more widely used. There is a risk that the privacy of individuals or information is revealed, and people have an increasingly urgent need for protection of information security and privacy of individuals. However, existing instant messaging tools all use a centralized platform as a main part, and there are cases that information is tampered, deleted and maliciously attacked, which seriously threatens the personal privacy and the communication information security of users.
Therefore, there is a need for a method and system for encrypted communication based on the blockchain technique. The problems that personal information of an existing instant messaging user is easy to leak and poor in safety are solved.
Disclosure of Invention
The application provides an encryption communication method and system based on a block chain technology, and aims to solve the problems that personal information of a user is easy to leak and the safety is poor due to an existing instant communication method.
In a first aspect, the present application provides an encryption communication method based on a block chain technique, applied to a first user equipment, including:
sending a communication request to second user equipment according to decentralized digital identity information of the second user equipment, wherein the second user equipment is a receiver of communication information appointed by the first user equipment;
judging whether the second user equipment accepts the request or not;
if the second user equipment receives the request, a symmetric key is generated through a key agreement technology;
acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key of the first asymmetric key to obtain a first symmetric key ciphertext, and storing the first symmetric key ciphertext to the first user equipment;
the first asymmetric key is generated when the first user equipment registers an account number and comprises a public key and a private key;
decrypting the first symmetric key ciphertext through the first asymmetric key to obtain the symmetric key;
encrypting the communication information through the symmetric key to obtain a communication information ciphertext;
and sending the communication information cipher text to the second user equipment through a server.
The method comprises the steps that a server receives login request information sent by user equipment, wherein the login request information comprises decentralized digital identity information;
judging whether the login request information of the user equipment is correct or not according to the decentralized digital identity information;
if the login request information is correct, recording a block chain account address of the user equipment, and writing a login timestamp of the user equipment and the block chain account address into a block chain;
sending login success information to the user equipment;
before receiving a login request carrying user login information sent by user equipment, the method further comprises:
the server receives a registration request carrying identity information sent by user equipment;
writing the identity information into a block chain, and generating a corresponding block chain address and a decentralized digital identity;
generating the asymmetric key of the user equipment by using an asymmetric encryption algorithm, wherein the asymmetric key comprises a public key and a private key, the public key is stored in a block chain, and the private key is stored in the user equipment;
and sending registration success information to the user equipment, and recording a block chain account address, a public key and decentralized identity information corresponding to the user equipment.
The method further comprises the following steps:
the user equipment divides the symmetric key into n key segments and randomly selects n nodes of the block chain network;
the user equipment respectively backs up the key segments to the nodes, and each node saves the backup records to a block chain;
the method further comprises the following steps:
and the user equipment stores the creation time, the Hash value, the decentralized digital identities of the first user and the second user and the validity period of the symmetric key into a block chain.
The method further comprises the following steps:
the user equipment sends a key fragment acquisition request to the node according to the backup record, wherein the key fragment acquisition request comprises the creation time of the symmetric key, a Hash value, decentralized digital identities of the first user and the second user and a validity period;
the node verifies the key fragment acquisition request;
if the verification is passed, the node sends the key fragment to the user equipment;
the user equipment generates the symmetric key according to the key fragment;
and the user equipment verifies the symmetric key through the hash value.
In another aspect, the present application provides an encryption communication method based on a block chain technique, applied to a second user equipment, including:
receiving a communication request from first user equipment, wherein the first user equipment is a sender of communication information of second user equipment;
if the communication request is agreed, a symmetric key is generated through a key negotiation technology;
encrypting the symmetric key through the public key of the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key;
receiving a communication information ciphertext from the first user equipment;
decrypting the second symmetric key ciphertext through the second asymmetric key to obtain the symmetric key;
and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
If the communication request is agreed, a symmetric key is generated through a key negotiation technology, and the method specifically comprises the following steps:
if the communication request is agreed, a symmetric key is generated through a key negotiation technology;
acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key in the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key.
In a third aspect, the present application provides an encrypted communication system based on a block chain technique, including a first user equipment and a second user equipment;
the first user equipment is used for sending a communication request to the second user equipment according to the decentralized digital identity information of the second user equipment and judging whether the second user equipment accepts the request or not;
if the second user equipment receives the request, a symmetric key is generated through a key agreement technology;
acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key in the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key;
decrypting the first symmetric key ciphertext through the first asymmetric key to obtain the symmetric key;
encrypting the communication information through the symmetric key to obtain a communication information ciphertext;
sending the communication information cipher text to the second user equipment through a block chain;
the second user equipment is used for receiving a communication request from the first user equipment;
the first user equipment is a sender of communication information of the second user equipment;
if the communication request is agreed, a symmetric key is generated through a key negotiation technology;
acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key in the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key;
receiving a communication information ciphertext from the first user equipment;
decrypting the second symmetric key ciphertext through the private key of the second asymmetric key to obtain the symmetric key;
and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
According to the technical scheme, the application provides an encryption communication method and system based on a block chain technology, and the method comprises the following steps: sending a communication request to second user equipment according to decentralized digital identity information of the second user equipment, and judging whether the second user equipment accepts the request; if the second user equipment receives the request, a symmetric key is generated through a key agreement technology; acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key of the first asymmetric key to obtain a first symmetric key ciphertext, and storing the first symmetric key ciphertext in the first user equipment; the first asymmetric key is generated when the first user equipment registers an account number and comprises a public key and a private key; acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key of the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the first user equipment; the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key; decrypting the first symmetric key ciphertext through the public key of the first asymmetric key to obtain the symmetric key; encrypting the communication information through the symmetric key to obtain a communication information ciphertext; sending the communication information cipher text to the second user equipment through a server; the second equipment receives a communication information ciphertext sent by the first equipment to acquire the second asymmetric key; decrypting the second symmetric key ciphertext through a private key of a second asymmetric key to obtain the symmetric key; and decrypting the communication information ciphertext through the symmetric key to obtain the communication information. The method and the device solve the problems that the personal information of the user is easy to leak and the safety is poor due to the existing instant messaging method.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an application scenario diagram of an encryption communication method based on a block chain technique according to the present application;
fig. 2 is a flowchart illustrating a working procedure of the first user equipment according to an encrypted communication method based on the blockchain technique of the present application;
fig. 3 is a flowchart illustrating an embodiment of an encrypted communication method based on the blockchain technique according to the present invention;
fig. 4 is a flowchart illustrating a second embodiment of an encryption communication method based on the blockchain technique according to the present application;
fig. 5 is a flowchart illustrating a third embodiment of an encryption communication method based on the blockchain technique according to the present application;
fig. 6 is a flowchart illustrating a fourth embodiment of an encrypted communication method based on the blockchain technique according to the present application;
fig. 7 is a flowchart illustrating the operation of the second user equipment according to an encrypted communication method based on the blockchain technique.
Detailed Description
Reference will now be made in detail to embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following examples do not represent all embodiments consistent with the present application. But merely as exemplifications of systems and methods consistent with certain aspects of the application, as recited in the claims.
Referring to fig. 1, fig. 1 is an application scenario diagram of an encryption communication method based on a block chain technique according to the present application, in which a first user sends a communication request to a second user through decentralized digital identity information of the second user, if the second user agrees to the communication request, a symmetric key is generated through a key agreement technique to obtain a first asymmetric key of the first user equipment, the symmetric key is encrypted through a public key of the first asymmetric key to obtain a first symmetric key ciphertext and stored in the first user equipment, and a second asymmetric key of the second user equipment is obtained at the same time, the symmetric key is encrypted through a public key of the second asymmetric key to obtain a second symmetric key ciphertext and stored in the second user equipment, and the first symmetric key ciphertext is decrypted through the first asymmetric key, and obtaining the symmetric key, then completing encryption of communication information according to the symmetric key to obtain a communication information ciphertext, decrypting the second symmetric key ciphertext through a private key of the second asymmetric key after the second user receives the communication information ciphertext to obtain the symmetric key, and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
Referring to fig. 2, in a first aspect, the present application provides an encryption communication method based on a block chain technique, applied to a first user equipment, including:
s110: sending a communication request to second user equipment according to decentralized digital identity information of the second user equipment, wherein the second user equipment is a receiver of communication information appointed by the first user equipment;
s120: judging whether the second user equipment accepts the request or not;
s130: if the second user equipment receives the request, a symmetric key is generated through a key negotiation technology;
s140: acquiring a first asymmetric key of the first user equipment, wherein the symmetric key is encrypted through a public key of the first asymmetric key to obtain a first symmetric key ciphertext and is stored in the first user equipment, and the first asymmetric key is generated when the first user equipment registers an account and comprises a public key and a private key;
s150: decrypting the second symmetric key ciphertext through the private key of the first asymmetric key to obtain the symmetric key;
s160: encrypting the communication information through the symmetric key to obtain a communication information ciphertext;
s170: and sending the communication information cipher text to the second user equipment through a server.
Referring to fig. 3, before the first user obtains the decentralized digital identity information of the second user, the method further includes:
s201: receiving login request information sent by user equipment, wherein the login request information comprises decentralized digital identity information;
s202: judging whether the login request information of the user equipment is correct or not according to the decentralized digital identity information;
s203: if the login request information is correct, recording a block chain account address of the user equipment, and writing a login timestamp of the user equipment and the block chain account address into a block chain;
s204: and sending login success information to the user equipment.
Specifically, the instant messaging platform matches the user login information with pre-stored user information according to the user login information so as to verify the identity of the user.
Referring to fig. 4, before receiving a login request carrying user login information sent by a user equipment, the method further includes:
s301: receiving a registration request carrying identity information sent by user equipment;
s302: writing the identity information into a block chain, and generating a corresponding block chain address and decentralized digital identity information;
s303: generating the asymmetric key of the user equipment using an asymmetric cryptographic algorithm, the asymmetric key comprising a public key and a private key:
s304: and sending registration success information to the user equipment, and recording a block chain account address, a public key and decentralized identity information corresponding to the user equipment.
The decentralized digital identity information can realize identity anonymity, identity identification uniformity and cross-platform use, and the application range of the method is widened.
The identity information comprises a mobile phone number and a mailbox account. The registration is carried out through various modes, and the use requirements of different users are met.
Specifically, in the registration process of the second user equipment, the second user equipment calls a key generation tool to automatically generate a unique second asymmetric key, the second asymmetric key comprises a pair of public and private keys, the public key is recorded as a part of user registration information and is managed by a server in a unified manner, and the private key is managed by the second user equipment. Similarly, when the first user equipment registers, the first user equipment also calls a key generation tool to automatically generate the unique first asymmetric key, the first asymmetric key comprises a pair of public and private keys, the public key is managed by the platform, and the private key is managed by the first user equipment. After the first user equipment adds the second user equipment as a friend, namely the second user equipment agrees with the communication request of the first user equipment, and the first user equipment and the second user equipment generate a symmetric key through a key agreement technology. The first user records the symmetric keys of all the friend users, and when communication information needs to be sent to the friend users, the information is encrypted by using the symmetric keys of the friend users.
Referring to fig. 5, the method further comprises:
s401: the user equipment divides the symmetric key into n key segments and randomly selects n nodes of the block chain network; more specifically, the nodes are randomly selected according to an algorithm, so that the security of the symmetric key is guaranteed.
S402: and the user equipment respectively backs up the key segments to the nodes, and each node saves the backup records to the block chain.
The method further comprises the following steps:
and the user equipment stores the creation time, the Hash value, the decentralized digital identities of the first user and the second user and the validity period of the symmetric key into a block chain. Retrieval of the symmetric key may be facilitated.
More specifically, the security and recoverability of the symmetric key are ensured. When the symmetric key is lost or damaged, the symmetric key can be found out in time according to the backup block chain link points, and the safety of the communication process is ensured.
Referring to fig. 6, the method further includes:
s501: the user equipment sends a key fragment acquisition request to the node according to the backup record, wherein the key fragment acquisition request comprises the creation time of the symmetric key, a Hash value, decentralized digital identities of the first user and the second user and a validity period;
s502: the node verifies the key fragment acquisition request;
s503: if the verification is passed, the node sends the key fragment to the user equipment;
s504: the user equipment generates the symmetric key according to the key fragment;
s505: and the user equipment verifies the symmetric key through the hash value.
More specifically, the security and recoverability of the symmetric key are ensured. When the symmetric key is lost or damaged, the symmetric key can be found out in time according to the backup block chain link points, and the safety of the communication process is ensured.
The communication information is one or more of text information, audio information and video information. More specifically, various types of communication information can be communicated by the method, so that the use requirements of users in different use environments are met.
In another aspect, referring to fig. 7, the present application provides an encryption communication method based on a block chain technique, applied to a second user equipment, including:
s601: receiving a communication request from first user equipment, wherein the first user equipment is a sender of communication information of second user equipment;
s602: judging whether to approve the communication request;
s603: generating a symmetric key through a key agreement technology;
s604: acquiring a second asymmetric key of the second user equipment, wherein the symmetric key is encrypted through a public key of the second asymmetric key to obtain a second symmetric key ciphertext and is stored in the second user equipment, and the second asymmetric key is generated when the second user equipment registers an account and comprises a public key and a private key;
s605: receiving a communication information ciphertext from the first user equipment;
s606: decrypting the second symmetric key ciphertext through the private key of the second asymmetric key to obtain the symmetric key;
s607: and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
If the communication request is agreed, a symmetric key is generated through a key negotiation technology, and the method specifically comprises the following steps:
if the communication request is agreed, sending communication agreement request information to the first user equipment, and generating a symmetric key through key agreement;
and acquiring a second asymmetric key of the second user equipment, wherein the symmetric key is encrypted through a public key of the second asymmetric key to obtain a second symmetric key ciphertext and is stored in the second user equipment, and the second asymmetric key is generated when the second user equipment registers an account and comprises a public key and a private key.
The invention realizes decentralized distributed storage of the instant messaging information ciphertext by using the block chain. The block chain is composed of a plurality of blocks, each block stores different information, and each communication information ciphertext sent by a user in the communication process is stored in the block chain.
Specifically, the instant messaging information ciphertext is written into the block chain after being subjected to hash processing. Because the data after the hash processing is smaller, compared with the method of directly storing the instant messaging information ciphertext, the hash value of the information data is stored on the chain, the occupation of the storage space on the chain is reduced, the data on the chain is prevented from being too large, and the processing efficiency is improved; meanwhile, the nodes in the block chain can verify whether the hash value changes according to the hash algorithm to verify whether the information data is tampered, so that the verification efficiency is improved.
In the embodiment, decentralized distributed storage of the instant messaging information is realized by using the block chain, and the instant messaging information is stored by using the ciphertext, so that the situations that the communication information is stolen, tampered, deleted and maliciously attacked can be effectively avoided, and the communication privacy security of the user can be better ensured. The problem that the communication privacy of a user is unsafe due to the fact that information of an existing traditional instant communication platform is tampered, deleted and maliciously attacked is solved.
In a third aspect, the present application provides an encrypted communication system based on a block chain technique, including a first user equipment and a second user equipment;
the first user equipment is used for sending a communication request to the second user equipment according to the decentralized digital identity information of the second user equipment and judging whether the second user equipment accepts the request or not;
if the second user equipment receives the request, a symmetric key is generated through a key agreement technology;
acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key of the first asymmetric key to obtain a first symmetric key ciphertext, and storing the first symmetric key ciphertext in the first user equipment;
the first asymmetric key is generated when the first user equipment registers an account number and comprises a public key and a private key;
decrypting the first symmetric key ciphertext through a private key of the first asymmetric key to obtain the symmetric key;
encrypting the communication information through the symmetric key to obtain a communication information ciphertext;
sending the communication information cipher text to the second user equipment through a server;
the second user equipment is used for receiving a communication request from the first user equipment;
the first user equipment is a sender of communication information of the second user equipment;
if the communication request is agreed, a symmetric key is generated through a key negotiation technology;
acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key of the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key
Receiving a communication information ciphertext from the first user equipment;
decrypting the second symmetric key ciphertext through the private key of the second asymmetric key to obtain the symmetric key;
and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
The system in this embodiment may refer to the description in the method embodiment when executing the method, and is not described herein again.
According to the technical scheme, the application provides an encryption communication method and system based on a block chain technology, and the method comprises the following steps: sending a communication request to second user equipment according to decentralized digital identity information of the second user equipment, and judging whether the second user equipment accepts the request; if the second user equipment receives the request, a symmetric key is generated through a key agreement technology; acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key of the first asymmetric key to obtain a first symmetric key ciphertext, and storing the first symmetric key ciphertext in the first user equipment; the first asymmetric key is generated when the first user equipment registers an account number and comprises a public key and a private key; acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key of the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the first user equipment; the second asymmetric key is generated when the second user equipment registers an account number and comprises a public key and a private key; decrypting the first symmetric key ciphertext through the public key of the first asymmetric key to obtain the symmetric key; encrypting the communication information through the symmetric key to obtain a communication information ciphertext; sending the communication information cipher text to the second user equipment through a server; the second equipment receives a communication information ciphertext sent by the first equipment to acquire the second asymmetric key; decrypting the second symmetric key ciphertext through a private key of a second asymmetric key to obtain the symmetric key; and decrypting the communication information ciphertext through the symmetric key to obtain the communication information. The method and the device solve the problems that the personal information of the user is easy to leak and the safety is poor due to the existing instant messaging method.
The embodiments provided in the present application are only a few examples of the general concept of the present application, and do not limit the scope of the present application. Any other embodiments extended according to the scheme of the present application without inventive efforts will be within the scope of protection of the present application for a person skilled in the art.
Claims (10)
1. An encryption communication method based on a block chain technology is applied to a first user equipment, and comprises the following steps:
sending a communication request to second user equipment according to decentralized digital identity information of the second user equipment, wherein the second user equipment is a receiver of communication information appointed by the first user equipment;
judging whether the second user equipment receives a communication request or not;
if the second user equipment receives the communication request, a symmetric key is generated through a key negotiation technology;
acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key in the first asymmetric key to obtain a first symmetric key ciphertext, and storing the first symmetric key ciphertext in the first user equipment;
the first asymmetric key is generated when the first user equipment registers an account number and comprises a public key and a private key;
encrypting the communication information through the symmetric key to obtain a communication information ciphertext;
and sending the communication information cipher text to the second user equipment through a server.
2. The method of claim 1, further comprising, when applied to the first ue, the step of:
the method comprises the steps that a server receives login request information sent by user equipment, wherein the login request information comprises decentralized digital identity information;
judging whether the login request information of the user equipment is correct or not according to the decentralized digital identity information;
if the login request information is correct, recording a block chain account address of the user equipment, and writing a login timestamp of the user equipment and the block chain account address into a block chain;
and sending login success information to the user equipment.
3. The method of claim 2, wherein before the server receives the login request message from the ue, the method further comprises:
the server receives a registration request carrying identity information sent by user equipment;
writing the identity information into a block chain, and generating a corresponding block chain address and a decentralized digital identity;
generating the asymmetric key of the user equipment by using an asymmetric encryption algorithm, wherein the asymmetric key comprises a public key and a private key;
and sending registration success information to the user equipment, and recording a block chain account address, a public key and decentralized identity information corresponding to the user equipment.
4. The method of claim 1, further comprising:
the user equipment divides the symmetric key into n key segments and randomly selects n nodes of the block chain network;
and the user equipment respectively backs up the key segments to the nodes, and each node saves the backup records to the block chain.
5. The method of claim 4, further comprising:
and the user equipment stores the creation time, the Hash value, the decentralized digital identities of the first user and the second user and the validity period of the symmetric key into a block chain.
6. The method of claim 5, further comprising:
the user equipment sends a key fragment acquisition request to the node according to the backup record, wherein the key fragment acquisition request comprises the creation time of the symmetric key, a Hash value, decentralized digital identities of the first user and the second user and a validity period;
the node verifies the key fragment acquisition request;
if the verification is passed, the node sends the key fragment to the user equipment;
the user equipment generates the symmetric key according to the key fragment;
and the user equipment verifies the symmetric key through the hash value.
7. An encryption communication method based on a block chain technology is applied to a second user equipment, and comprises the following steps:
receiving a communication request from first user equipment, wherein the first user equipment is a sender of communication information of second user equipment;
if the communication request is agreed, a symmetric key is generated through a key negotiation technology;
acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key in the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the second user equipment registers an account;
receiving a communication information ciphertext from the first user equipment;
decrypting the second symmetric key ciphertext through a private key in the second asymmetric key to obtain the symmetric key;
and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
8. The method of claim 7, wherein if the communication request is granted, the first ue and the second ue generate a symmetric key through a key agreement technique, comprising: if the communication request is agreed, communication agreement request information is sent to the first user equipment, and the first user equipment and the second user equipment generate a symmetric key through a key agreement technology;
acquiring a first asymmetric key of the first user equipment, encrypting the symmetric key through a public key in the first asymmetric key to obtain a first symmetric key ciphertext, and storing the first symmetric key ciphertext in the first user equipment;
and acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key in the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment.
9. An encryption communication system based on a block chain technology is characterized by comprising a first user device and a second user device;
the first user equipment is used for sending a communication request to the second user equipment according to the decentralized digital identity information of the second user equipment and judging whether the second user equipment accepts the request or not;
if the second user equipment accepts the request, a symmetric key is generated according to a key negotiation technology;
acquiring a first asymmetric key of the first user equipment, wherein the symmetric key is encrypted through a public key of the first asymmetric key to obtain a first symmetric key ciphertext, and the first asymmetric key is generated when the first user equipment registers an account;
acquiring a second asymmetric key of the second user equipment, wherein the symmetric key is encrypted through a public key of the second asymmetric key to obtain a second symmetric key ciphertext;
the second asymmetric key is generated when the second user equipment registers an account;
decrypting the second symmetric key ciphertext through the private key of the first asymmetric key to obtain the symmetric key;
encrypting the communication information through the symmetric key to obtain a communication information ciphertext;
sending the communication information cipher text to the second user equipment through a server;
the second user equipment is used for receiving a communication request from the first user equipment;
the first user equipment is a sender of communication information of the second user equipment;
if the communication request is agreed, a symmetric key is generated through a key negotiation technology, then encryption is carried out through a public key of a second asymmetric key to obtain a second symmetric key ciphertext, and the second symmetric key ciphertext is stored in second user equipment;
the second asymmetric key is generated when the account is registered and comprises a public key and a private key;
receiving a communication information ciphertext from the first user equipment;
decrypting the second symmetric key ciphertext through the private key of the second asymmetric key to obtain the symmetric key;
and decrypting the communication information ciphertext through the symmetric key to obtain the communication information.
10. The blockchain technology based encrypted communication system according to claim 9, wherein the second user equipment is further configured to:
if the communication request is agreed, sending information of agreeing the communication request to the first user equipment, and generating a symmetric key through a key agreement technology;
acquiring a second asymmetric key of the second user equipment, encrypting the symmetric key through a public key of the second asymmetric key to obtain a second symmetric key ciphertext, and storing the second symmetric key ciphertext in the second user equipment;
the second asymmetric key is generated when the account is registered and comprises a public key and a private key.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011560325.7A CN112751841A (en) | 2020-12-25 | 2020-12-25 | Encryption communication method and system based on block chain technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011560325.7A CN112751841A (en) | 2020-12-25 | 2020-12-25 | Encryption communication method and system based on block chain technology |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112751841A true CN112751841A (en) | 2021-05-04 |
Family
ID=75645910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011560325.7A Pending CN112751841A (en) | 2020-12-25 | 2020-12-25 | Encryption communication method and system based on block chain technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112751841A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113595877A (en) * | 2021-07-23 | 2021-11-02 | 永旗(北京)科技有限公司 | Instant communication method based on block chain |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107528688A (en) * | 2017-09-30 | 2017-12-29 | 矩阵元技术(深圳)有限公司 | A kind of keeping of block chain key and restoration methods, device based on encryption commission technology |
CN109245993A (en) * | 2018-09-07 | 2019-01-18 | 中链科技有限公司 | Instant communication method and device based on block chain |
US10601585B1 (en) * | 2016-12-16 | 2020-03-24 | EMC IP Holding Company LLC | Methods and apparatus for blockchain encryption |
CN111565109A (en) * | 2020-07-16 | 2020-08-21 | 百度在线网络技术(北京)有限公司 | Key processing method, device, equipment and medium for block chain |
-
2020
- 2020-12-25 CN CN202011560325.7A patent/CN112751841A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10601585B1 (en) * | 2016-12-16 | 2020-03-24 | EMC IP Holding Company LLC | Methods and apparatus for blockchain encryption |
CN107528688A (en) * | 2017-09-30 | 2017-12-29 | 矩阵元技术(深圳)有限公司 | A kind of keeping of block chain key and restoration methods, device based on encryption commission technology |
CN109245993A (en) * | 2018-09-07 | 2019-01-18 | 中链科技有限公司 | Instant communication method and device based on block chain |
CN111565109A (en) * | 2020-07-16 | 2020-08-21 | 百度在线网络技术(北京)有限公司 | Key processing method, device, equipment and medium for block chain |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113595877A (en) * | 2021-07-23 | 2021-11-02 | 永旗(北京)科技有限公司 | Instant communication method based on block chain |
CN113595877B (en) * | 2021-07-23 | 2022-08-30 | 永旗(北京)科技有限公司 | Instant communication method based on block chain |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109471844B (en) | File sharing method and device, computer equipment and storage medium | |
US7095851B1 (en) | Voice and data encryption method using a cryptographic key split combiner | |
US7016499B2 (en) | Secure ephemeral decryptability | |
US6363480B1 (en) | Ephemeral decryptability | |
US20070014406A1 (en) | Cryptographic key split binding process and apparatus | |
US20070157026A1 (en) | Method and system for key management in voice over internet protocol | |
US20090052660A1 (en) | Method For Encrypting And Decrypting Instant Messaging Data | |
CN109543443A (en) | User data management, device, equipment and storage medium based on block chain | |
CN112804133B (en) | Encryption group chat method and system based on blockchain technology | |
CN107154848A (en) | A kind of data encryption based on CPK certifications and storage method and device | |
CN109962924B (en) | Group chat construction method, group message sending method, group message receiving method and system | |
CN113382002A (en) | Data request method, request response method, data communication system, and storage medium | |
Reshma et al. | Pairing-free CP-ABE based cryptography combined with steganography for multimedia applications | |
CN113365264B (en) | Block chain wireless network data transmission method, device and system | |
CN112751841A (en) | Encryption communication method and system based on block chain technology | |
Sagheer et al. | Sms security for smartphone | |
AU753951B2 (en) | Voice and data encryption method using a cryptographic key split combiner | |
US20230188330A1 (en) | System and method for identity-based key agreement for secure communication | |
CN111541652B (en) | System for improving security of secret information keeping and transmission | |
EP3624393B1 (en) | Key distribution system and method, key generation device, representative user terminal, server device, user terminal and program | |
US20200169541A1 (en) | Systems and methods for encryption | |
CN111865972B (en) | Anonymous communication method and system | |
KR102387911B1 (en) | Secure instant messaging method and attaratus thereof | |
CN115102750B (en) | Private data processing method, system, computer terminal and readable storage medium | |
CN113300841B (en) | Identity-based collaborative signature method and system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210504 |
|
RJ01 | Rejection of invention patent application after publication |