Communication method, device, equipment and storage medium
By using preset encryption channels and public key encryption technology in the communication system, the problem of centralized services exposing user privacy is solved and the privacy protection of user communication messages is achieved.
Patent Information
- Application Number
- CN202310152529.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-09
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-02-09
AI Technical Summary
In the existing technology, centralized services have communication records of all users, which almost completely exposes privacy, causing user privacy to be threatened.
Using preset encryption channel and public key encryption technology, the target user encrypts the communication information based on the preset key and public key, and transmits the ciphertext message through the preset encryption channel. Only users in the target group can decrypt and obtain the communication information. Ensure that the message content is not obtained by the central server.
Through encrypted transmission, the privacy of user communication messages in the target group is protected, preventing the central server from obtaining communication content, and ensuring the security of user privacy.
Smart Images

Figure CN116112458B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a communication method, apparatus, device and storage medium. Background Art
[0002] With the development of Internet technology, the Internet can be seen everywhere in people's lives and has become an indispensable part of people's lives. Through the Internet, people can communicate with friends far away in other places, play games, or check information online.
[0003] Communication software is an instant communication software based on the Internet and is widely used in people's lives. The earliest communication software was the Internet pager. This type of software allows people who use computers connected to the Internet to talk to another online netizen who is also connected to the Internet at any time, and even see the other party's real-time image through video. It allows people to communicate freely without worrying about expensive phone bills, and work and communicate at the same time.
[0004] However, this communication method requires all messages to be forwarded through a centralized service, which results in the centralized service having all users' communication records, almost completely exposing privacy. Summary of the invention
[0005] The purpose of this application is to provide a communication method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problem in the prior art that centralized services have communication records of all users, almost completely exposing privacy.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a communication method, which is applied to a server, and the method includes:
[0008] Receiving a ciphertext message sent by a target user in a target group through a preset encryption channel corresponding to the target group; wherein the ciphertext information is information obtained by encrypting the communication information based on a preset key and a public key corresponding to the target user;
[0009] Determining the target user corresponding to the ciphertext message based on the public key corresponding to each user in the target group through the preset encryption channel;
[0010] The ciphertext message is sent to all users in the target group, so that all users determine the communication message corresponding to the ciphertext message based on a preset key and a public key corresponding to the target user.
[0011] In a second aspect, another embodiment of the present application provides a communication device, the device comprising: a receiving module and a determining module, wherein:
[0012] The receiving module is used to receive a ciphertext message sent by a target user in a target group through a preset encryption channel corresponding to the target group; wherein the ciphertext information is information obtained by encrypting the communication information based on a preset key and a public key corresponding to the target user;
[0013] The determination module is used to determine the target user corresponding to the ciphertext message based on the public key corresponding to each user in the target group through the preset encryption channel; and send the ciphertext message to all users in the target group so that all users determine the communication message corresponding to the ciphertext message based on the preset key and the public key corresponding to the target user.
[0014] In the third aspect, another embodiment of the present application provides a communication device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the communication device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.
[0015] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.
[0016] The beneficial effect of the present application is as follows: by adopting the communication method provided by the present application, when the target user in the target group sends a communication message, the communication message is encrypted based on the preset key and the public key corresponding to the target user to obtain a ciphertext message, and then the ciphertext message is transmitted to each user through the preset encryption channel, and the ciphertext message transmitted during the transmission process is encrypted based on the preset key and the public key corresponding to the target user, that is, even if the server forwards the message through the preset encryption channel, it is impossible to know the message content of the ciphertext message, and only after the user in the target group receives the ciphertext message forwarded by the preset encryption channel, can the communication message corresponding to the ciphertext message be determined based on the preset key and the public key corresponding to the target user, that is, by adopting the method provided by the present application, the transmission itself is through the preset encryption channel corresponding to the target group, and users outside the target group cannot obtain the messages transmitted by the users in the target group, and during the transmission process of the preset encryption channel, the ciphertext messages are transmitted, and only after the users in the target group receive the ciphertext message and decrypt it, can they obtain the communication message corresponding to the ciphertext message, thereby ensuring the privacy of the communication messages transmitted by the users. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is a schematic diagram of the structure of a communication system according to an embodiment of the present application;
[0019] Figure 2 A flow chart of a communication method provided in one embodiment of the present application;
[0020] Figure 3 A flow chart of a communication method provided in another embodiment of the present application;
[0021] Figure 4 A flow chart of a communication method provided in another embodiment of the present application;
[0022] Figure 5 A schematic diagram of the structure of a communication device provided in one embodiment of the present application;
[0023] Figure 6 A schematic diagram of the structure of a communication device provided in another embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of a communication device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0026] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0027] In addition, the flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of this application, and can also remove one or more operations from the flowchart.
[0028] Before introducing the communication method provided by this application, the architecture of the communication system designed by this application is first explained. Figure 1 This is a schematic diagram of the structure of a communication system according to an embodiment of the present application. Figure 1 As shown in Figure 1, the communication system mainly includes three modules: peer-to-peer (P2P) module, centralized transmission server and blockchain, among which:
[0029] The p2p communication protocol (p2p network) is used to build a point-to-point communication channel. In the embodiment of the present application, the Kademlia distributed hash table is used to store Ethereum node information; the nodes are interconnected, each node maintains a hash table, and each node is only connected to other three nodes to form a p2p communication network; in the embodiment of the present application, each node is a client with communication software installed, that is, the clients in the present application are connected through a P2P network. If any node is disconnected, the disconnected node will actively connect to the network and synchronize the latest messages; before the communication starts, the nodes will elect a master, and the master election method is the order in which the nodes join the network plus the network rate of each node.
[0030] In an embodiment of the present application, the chat group is established by the group owner, and any chat group member can be added only after the group owner agrees. The chat group is established by the group owner, and then the group owner invites other users to join the chat group as members of the chat group. After the chat group is successfully created, the preset encrypted channel corresponding to the chat group will be determined in the centralized transmission server, and each member of the chat group will be connected to the encrypted channel to complete subsequent communication message transmission. Among them, members who join the chat group will save the registered public key in the preset encrypted channel. When obtaining the key, the key acquisition is first completed in the preset encrypted channel, and then the key distribution of each user member is completed through the p2p network.
[0031] Encrypted centralized transmission service: The encrypted centralized service includes a preset encryption channel. After the user encrypts the communication information, the encrypted ciphertext message is sent to the preset encryption channel. The preset encryption channel completes a layer of decryption based on the pre-stored public keys of each member to determine the target user for sending the ciphertext message. The preset encryption channel then broadcasts the ciphertext message and the target user to all group members. After receiving the ciphertext message, each group member decrypts the ciphertext message and obtains the communication information corresponding to the ciphertext message.
[0032] Blockchain: Obtain the encrypted chat information (ciphertext information) corresponding to each group, and store the encrypted chat information corresponding to each group on the chain according to time periods. Any agreement that can be reached by any group can serve as the final credible evidence.
[0033] like Figure 1 As shown, both client 1 and client 2 are installed with communication software, and the user corresponding to client 1 and the user corresponding to client 2 are in the same target group. The communication messages between client 1 and client 2 will be sent to encryption channel 1 and forwarded by encryption channel 1, that is, each target group has its own corresponding encryption channel to realize the forwarding of messages. In addition, the communication messages will also be stored in the blockchain as security verification storage information.
[0034] A communication method provided in an embodiment of the present application is explained below in combination with multiple specific application examples. Figure 2 A flow chart of a communication method provided in an embodiment of the present application is applied to a server, such as Figure 2 As shown, the method includes:
[0035] S101: receiving a ciphertext message sent by a target user in a target group through a preset encryption channel corresponding to the target group.
[0036] Among them, the ciphertext information is the information after the communication information is encrypted based on the preset key and the public key corresponding to the target user; the preset key can be, for example, a key pre-agreed upon by the target group. After the preset key is generated, it can be directly sent to all user terminals in the target group through the P2P network. Only users in the target group can obtain and know the preset key, thereby preventing the server from knowing the communication message corresponding to the ciphertext message when forwarding the ciphertext message.
[0037] Among them, after joining the target group, each user in the target group will register a public key corresponding to himself in the target group. When each user needs to send a communication message, the communication information will be encrypted by the public key of the target user and the preset key. After the encryption is successful, the encrypted ciphertext information will be sent to the server, and then forwarded by the preset encryption channel corresponding to the target group in the server. This ensures that when the target user in the target group sends communication information, even if the communication message passes through the central server (encrypted centralized transmission service), since the messages are all encrypted ciphertext messages, the communication information in the target group will not be obtained by the central server, that is, the data in the target group will not be leaked, that is, this way of sending information can protect the communication privacy of each user in the target group.
[0038] S102: Determine the target user corresponding to the ciphertext message based on the public key corresponding to each user in the target group through a preset encryption channel.
[0039] Among them, the preset encryption channel determines the target user corresponding to the ciphertext message according to the public key of each user in the target group pre-stored in the channel, wherein the user corresponding to the public key that can successfully decrypt the ciphertext message is the target user, and determining the target user corresponding to the ciphertext message also determines the sender of the ciphertext message; at this point, even if the preset encryption channel decrypts the ciphertext message according to the public key of the target user, the decrypted message is still a message encrypted according to the preset key, rather than an unencrypted communication message, therefore, the preset encryption channel still cannot obtain the communication message corresponding to the ciphertext message, that is, when forwarding the ciphertext message, the server cannot know the communication message corresponding to the ciphertext message, which ensures that during the communication process of the users in the target group, even if the communication messages are forwarded by the server, the server cannot obtain the specific content of the communication messages, thereby ensuring the privacy of each user in the target group during the communication process.
[0040] S103: Send a ciphertext message to all users in the target group.
[0041] In an embodiment of the present application, the server sends the encrypted ciphertext message to each user in the target group in a serial manner through a preset encryption channel, so that all users can determine the communication message corresponding to the ciphertext message based on the preset key and the public key corresponding to the target user.
[0042] It should be understood that when the preset encryption channel forwards ciphertext messages, each ciphertext message is forwarded one by one according to the sending time of each ciphertext message, that is, the ciphertext message with an earlier sending time has an earlier corresponding forwarding time.
[0043] By adopting the communication method provided by the present application, when the target user in the target group sends a communication message, the communication message is encrypted based on the preset key and the public key corresponding to the target user to obtain a ciphertext message, and then transmitted to each user through the preset encryption channel, and the ciphertext messages transmitted during the transmission process are all encrypted based on the preset key and the public key corresponding to the target user, that is, even if the server forwards the message through the preset encryption channel, it is impossible to know the message content of the ciphertext message. Only after the user in the target group receives the ciphertext message forwarded by the preset encryption channel, can the communication message corresponding to the ciphertext message be determined based on the preset key and the public key corresponding to the target user. That is, by adopting the method provided by the present application, the transmission itself is through the preset encryption channel corresponding to the target group, and users outside the target group cannot obtain the messages transmitted by the users in the target group, and during the transmission process of the preset encryption channel, the ciphertext messages are transmitted. Only after the users in the target group receive the ciphertext message and decrypt it, can they obtain the communication message corresponding to the ciphertext message, thereby ensuring the privacy of the communication messages transmitted by the users.
[0044] Optionally, based on the above embodiment, the embodiment of the present application may further provide a communication method, and the implementation process of the above method is illustrated below in conjunction with the accompanying drawings. Figure 3 A flow chart of a communication method provided in another embodiment of the present application is as follows: Figure 3 As shown, before S101, the method may further include:
[0045] S111: receiving a target group creation operation sent by a preset group owner user in the target group.
[0046] In an embodiment of the present application, after receiving the target group creation operation, the preset encryption channel corresponding to the target group can also be determined; wherein each target group corresponds to a preset encryption channel; the method for determining the preset encryption channel can, for example, be: the server pre-creates multiple preset encryption channels, and after receiving the target group creation operation, allocates the corresponding preset encryption channel to it from the multiple preset encryption channels; or, it can also be that the server creates the corresponding preset encryption channel for the target group after receiving the target group creation operation. It should be understood that the above embodiments are only exemplary descriptions, and the specific method for determining the preset encryption channel can be flexibly adjusted according to user needs, and is not limited to the above embodiments.
[0047] Subsequently, based on the preset encryption channel corresponding to the target group, information of the preset encryption channel is sent to all users in the target group, wherein the information of the preset encryption channel is identification information of the preset encryption channel. According to the identification information, the encryption channel corresponding to the target group can be uniquely determined among multiple encryption channels, and communication messages of all users in the target group are forwarded by the preset encryption channel corresponding to the identification information.
[0048] S112: According to the creation operation, the public key of each user in the target group is obtained, and the public key of each user in the target group is stored in the encryption channel.
[0049] In addition, the preset key corresponding to the target group and the public key of each user will also be transmitted among the users in the target group through the P2P network (key exchange), that is, each user in the target group will have the preset key corresponding to the target group and the public keys of all users in the target group. In the subsequent decryption of the ciphertext information, each user first obtains the ciphertext message forwarded by the preset encryption channel, and then determines the public key corresponding to the target user among the public keys corresponding to all users in the target group according to the target user determined by the preset encryption channel, and then decrypts the ciphertext message according to the public key corresponding to the target user and the preset key to obtain the decrypted communication message.
[0050] Optionally, based on the above embodiment, the embodiment of the present application may further provide a communication method, and the implementation process of the above method is illustrated below in conjunction with the accompanying drawings. Figure 4 A flow chart of a communication method provided in another embodiment of the present application is as follows: Figure 4 As shown, the method may also include:
[0051] S121: Store the encrypted message at a preset location on the blockchain.
[0052] This allows users to obtain ciphertext messages from the blockchain and verify the ciphertext messages based on the preset key and the public key corresponding to each user, thereby ensuring the security and non-modifiability of the storage of all ciphertext messages in the target group. The ciphertext messages are stored in a preset location on the blockchain, and when evidence needs to be obtained or part of the ciphertext messages needs to be found in the future, the corresponding preset location on the blockchain can be directly queried and confirmed.
[0053] In an embodiment of the present application, the method of storing encrypted messages may, for example, be: summarizing message packages corresponding to the encrypted messages of the target user in the target group according to time periods; constructing a Merkle tree corresponding to the target user under the target group, and determining the hash value of the Merkle tree root node; the Merkle tree is used to store message packages corresponding to the encrypted messages of the target user in the target group in chronological order.
[0054] In an embodiment of the present application, in order to ensure the integrity of the storage of each message packet, zero-knowledge proof can also be performed on each message packet at regular intervals. The proof method can, for example, be to respond to a trigger operation of the zero-knowledge proof, calculate each message packet according to the zero-knowledge proof algorithm, and determine the zero-knowledge proof string corresponding to each message packet.
[0055] In an embodiment of the present application, the blockchain, as an unalterable ledger, can be used as a storage record of public security proofs. The storage method can be, for example: generating security detection evidence information corresponding to the message packet based on the location identification information of the message packet in the Merkle tree, the hash value of the Merkle tree root node and the zero-knowledge proof string information of the message packet; and sending the security detection evidence information to the blockchain.
[0056] Among them, the triggering method of evidence storage can, for example, be the periodic collection of security detection evidence information, or the generation and collection of evidence information corresponding to the security package every time a message packet is generated; it should be understood that the above embodiments are only exemplary descriptions, and the specific triggering method of evidence storage can be flexibly adjusted according to user needs, and is not limited to the above embodiments.
[0057] If you need to obtain the security detection evidence information stored in the blockchain later, you only need to obtain the hash value information of the Merkle tree root node corresponding to the message packet to be obtained in the blockchain, and after determining the Merkle tree root node based on the hash value information, obtain the message packet based on the position identification information of the message packet in the Merkle tree. Any user in the target group can obtain the corresponding communication message after decrypting the ciphertext message stored in the message packet.
[0058] This method of storing security detection evidence information on the blockchain not only makes the security detection evidence information unchangeable, but also allows the security detection evidence information to be extracted from the blockchain as evidence at any time, thereby not only achieving permanent storage of target group communication messages, but also ensuring the security of the stored communication messages during the storage process. Only after each user in the target group obtains the stored security detection evidence information can they decode each ciphertext information stored in the security detection evidence information to obtain the communication information corresponding to each ciphertext information. That is, by using the method provided by the present application, not only can the target group communication messages be permanently stored and subsequently extracted as evidence at any time, but the privacy of the target group communication messages is also guaranteed during the storage process, thereby maximizing the protection of user privacy.
[0059] By adopting the communication method provided by the present application, since the communication messages between users in the target group will all be forwarded by the server, the server forwards the ciphertext messages corresponding to the encrypted communication messages, and will not obtain the communication message content corresponding to the ciphertext messages. In other words, the communication privacy of each user in the target group is protected. In addition, in order to ensure the storage security of the communication records in the target group, the present application packages multiple ciphertext messages corresponding to the target group to obtain message packages, and stores each message package on the blockchain as credible evidence that cannot be changed or deleted. When it is necessary to obtain evidence in the future, the corresponding communication message content is obtained from the security detection evidence information stored on the blockchain. In other words, by adopting the method provided by the present application, not only the privacy of the communication of each user in the target group can be guaranteed, but also the integrity and immutability of the communication information records in the target group can be guaranteed.
[0060] The following is an explanation of the communication device provided by the present application in conjunction with the accompanying drawings. The communication device can perform the above Figure 1-Figure 4 For any communication method, its specific implementation and beneficial effects are as mentioned above and will not be repeated below.
[0061] Figure 5 A schematic diagram of the structure of a communication device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the device includes: a receiving module 201 and a determining module 202, wherein:
[0062] The receiving module 201 is used to receive a ciphertext message sent by a target user in a target group through a preset encryption channel corresponding to the target group; wherein the ciphertext information is information obtained by encrypting the communication information based on a preset key and a public key corresponding to the target user;
[0063] The determination module 202 is used to determine the target user corresponding to the ciphertext message based on the public key corresponding to each user in the target group through a preset encryption channel; send the ciphertext message to all users in the target group so that all users can determine the communication message corresponding to the ciphertext message based on the preset key and the public key corresponding to the target user.
[0064] Optionally, based on the above embodiment, the embodiment of the present application may also provide a communication device, as follows in conjunction with the accompanying drawings: Figure 5 The implementation process of the given device is described by way of example. Figure 6 A schematic diagram of the structure of a communication device provided in another embodiment of the present application is shown in FIG. Figure 6 As shown, the device also includes: an acquisition module 203 and a sending module 204, wherein:
[0065] The receiving module 201 is specifically used to receive a target group creation operation sent by a preset group owner user in the target group;
[0066] The acquisition module 203 is specifically used to acquire the public key of each user in the target group according to the creation operation, and the public key of each user in the target group is stored in the encryption channel;
[0067] The sending module 204 is specifically configured to send the public key of the target group to all users in the target group through a preset encryption channel.
[0068] Optionally, the determination module 202 is specifically configured to determine a preset encryption channel corresponding to the target group.
[0069] like Figure 6 As shown, the device also includes: a storage module 205, which is specifically used to store the encrypted message at a preset location on the blockchain; so that the user can obtain the encrypted message from the blockchain and verify the encrypted message based on the preset key and the public key corresponding to each user.
[0070] Optionally, the determination module 202 is specifically used to summarize the message packages corresponding to the ciphertext messages of the target user in the target group according to the time period; construct a Merkle tree corresponding to the target user under the target group, and determine the hash value of the Merkle tree root node; the Merkle tree is used to store the message packages corresponding to the ciphertext messages of the target user in the target group according to the time sequence.
[0071] Optionally, the determination module 202 is specifically used to generate security detection evidence information corresponding to the message packet according to the position identification information of the message packet in the Merkle tree, the hash value of the Merkle tree root node and the zero-knowledge proof string information of the message packet;
[0072] The sending module 204 is specifically used to send security detection evidence information to the blockchain.
[0073] Optionally, the determination module 202 is specifically configured to, in response to a triggering operation of the zero-knowledge proof, calculate each message packet according to a zero-knowledge proof algorithm to determine a zero-knowledge proof string corresponding to each message packet.
[0074] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0075] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0076] Figure 7 A schematic diagram of the structure of a communication device provided in one embodiment of the present application, wherein the communication device can be integrated into a terminal device or a chip of the terminal device.
[0077] like Figure 7 As shown, the communication device includes: a processor 501 , a bus 502 and a storage medium 503 .
[0078] The processor 501 is used to store programs. The processor 501 calls the program stored in the storage medium 503 to execute the above Figure 1-Figure 4 The corresponding method embodiment has similar specific implementation methods and technical effects, which will not be described here.
[0079] Optionally, the present application also provides a program product, such as a storage medium, on which a computer program is stored, including a program that, when executed by a processor, executes an embodiment corresponding to the above method.
[0080] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0083] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
Claims
1. A communication method, characterized in that: Applied to a server, the method comprises: Receiving a ciphertext message sent by a target user in a target group through a preset encryption channel corresponding to the target group; wherein the ciphertext message is information obtained by encrypting communication information based on a preset key and a public key corresponding to the target user; wherein the preset key is a key corresponding to the target group; Determining the target user corresponding to the ciphertext message based on the public key corresponding to each user in the target group through the preset encryption channel; Sending the encrypted message to all users in the target group, so that all users determine the communication message corresponding to the encrypted message based on a preset key and a public key corresponding to the target user; Before receiving the ciphertext message sent by the target user in the target group through the preset encryption channel corresponding to the target group, the method further includes: Receiving a creation operation of the target group sent by a preset group owner user in the target group; According to the creation operation, a public key of each user in the target group is obtained, and the public key of each user in the target group is stored in the encryption channel, so that each user in the target group has a preset key corresponding to the target group and the public keys of all users in the target group; After receiving the target group creation operation sent by a preset group owner user in the target group, the method further includes: Determining the preset encryption channel corresponding to the target group; Based on the preset encryption channel, information of the preset encryption channel is sent to all the users in the target group.
2. The method according to claim 1, characterized in that The method further comprises: The encrypted message is stored in a preset location on the blockchain; so that the user obtains the encrypted message from the blockchain, and verifies the encrypted message based on a preset key and a public key corresponding to each user.
3. The method according to claim 2, characterized in that The storing the encrypted message at a preset location on the blockchain includes: Summarize the message packages corresponding to the ciphertext messages of the target user in the target group according to the time period; A Merkle tree corresponding to the target user under the target group is constructed, and a hash value of a root node of the Merkle tree is determined; the Merkle tree is used to store message packets corresponding to the ciphertext messages of the target user in the target group in chronological order.
4. The method according to claim 3, characterized in that The method further comprises: In response to the triggering operation of the zero-knowledge proof, each of the message packets is calculated according to the zero-knowledge proof algorithm to determine the zero-knowledge proof character string corresponding to each of the message packets.
5. The method according to claim 4, characterized in that The method further comprises: Generate security detection evidence information corresponding to the message packet according to the position identification information of the message packet in the Merkle tree, the hash value of the Merkle tree root node and the zero-knowledge proof string information of the message packet; The security detection evidence information is sent to the blockchain.
6. A communication device, characterized in that: The device comprises: a receiving module and a determining module, wherein: The receiving module is used to receive a ciphertext message sent by a target user in a target group through a preset encryption channel corresponding to the target group; wherein the ciphertext message is information obtained by encrypting communication information based on a preset key and a public key corresponding to the target user; wherein the preset key is a key corresponding to the target group; The determination module is used to determine the target user corresponding to the ciphertext message based on the public key corresponding to each user in the target group through the preset encryption channel; send the ciphertext message to all users in the target group, so that all users determine the communication message corresponding to the ciphertext message based on the preset key and the public key corresponding to the target user; The device further comprises: an acquisition module and a sending module, wherein: The receiving module is specifically configured to receive a creation operation of the target group sent by a preset group owner user in the target group; The acquisition module is specifically used to acquire the public key of each user in the target group according to the creation operation, and the public key of each user in the target group will be stored in the encryption channel, so that each user in the target group has the preset key corresponding to the target group and the public keys of all users in the target group; The determination module is further used to determine a preset encryption channel corresponding to the target group; The sending module is specifically configured to send the public key of the target group to all users in the target group through the preset encryption channel.
7. A communication device, characterized in that: The device includes: a processor, a storage medium and a bus, the storage medium stores machine-readable instructions executable by the processor, when the communication device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
Establishment method, device and system for connection of secure sockets layers
CN103763356A
Decryption method and mobile terminal
CN104270516A
End-to-end communication method and device for instant communication
CN106100980A
Instant messaging method and system for user mode encryption
CN106790037A
Mass data right authenticating and evidence storing methods and nodes
CN107292621A
