Information interaction method, device, electronic device, storage medium and program product
Through the fusion encryption of the keys of the sender and the receiver, the problem that the service background cannot be decrypted is solved, the security of information interaction is improved, and the confidentiality and integrity of the information during transmission is ensured.
Patent Information
- Application Number
- CN202410431494.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-04-11
AI Technical Summary
In the prior art, the service backend can be encrypted and decrypted during information interaction, resulting in security risks in the service backend in the service backend, and the information security is poor.
By obtaining the keys of the sender and the receiver of the information, the key fusion method is integrated according to the negotiated key, the interactive information is encrypted based on the fusion key, and the encrypted information is sent to the service background to forward it to the receiver, ensuring that The service background cannot decrypt information.
It effectively improves the information security of information interaction, avoids the security risks of information to be interacted in the service backend, and ensures the confidentiality and integrity of the information during transmission.
Smart Images

Figure CN118041695B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information interaction method, device, electronic device, storage medium and program product. Background Art
[0002] Information interaction is the basic activity of information processing and communication, and is the core component of information systems. Information interaction is very important in many fields such as daily life, work, education, and scientific research. It is the basis of human society and modern social functions. With the development of information technology, the way and efficiency of information interaction are also constantly improving, providing people with a more convenient and efficient way of communication.
[0003] In the related art, for information interaction between an information sender and an information receiver, encryption and decryption of the information to be interacted is usually implemented through a service background, so as to ensure information security during the information interaction process. Since the service background can implement encryption and decryption of the information to be interacted, there are security risks in the information to be interacted in the service background, resulting in poor information security of the information interaction. Summary of the invention
[0004] The embodiments of the present application provide an information interaction method, device, electronic device, computer-readable storage medium and computer program product, which can effectively improve the information security of information interaction.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides an information interaction method, including:
[0007] Obtaining a sender key of the information sender and a receiver key of the information receiver;
[0008] According to the key fusion method negotiated and determined with the information receiver, the sender's key and the receiver's key are merged to obtain a merged key;
[0009] Encrypting the information to be interacted based on the fusion key to obtain encrypted interaction information corresponding to the information to be interacted;
[0010] The encrypted interaction information is sent to a service background, so that the service background forwards the encrypted interaction information to the information receiver.
[0011] The present application provides an information interaction device, including:
[0012] An acquisition module, used to acquire a sender key of the information sender and a receiver key of the information receiver;
[0013] A fusion module, used to fuse the sender's key and the receiver's key according to the key fusion method negotiated and determined with the information receiver to obtain a fusion key;
[0014] An encryption module, used for encrypting the information to be interacted based on the fusion key to obtain encrypted interaction information corresponding to the information to be interacted;
[0015] The sending module is used to send the encrypted interaction information to the service background, so that the service background forwards the encrypted interaction information to the information recipient.
[0016] In the above scheme, the above information interaction device also includes: an authentication module, used to obtain multiple authenticated receivers that can have a conversation with the information sender, and obtain at least one candidate receiver corresponding to the information sender; for each candidate receiver, the candidate receiver is compared with each authenticated receiver respectively, and when the comparison result indicates that the candidate receiver exists among the multiple authenticated receivers, the candidate receiver is determined as the information receiver.
[0017] In the above scheme, the above acquisition module is also used to perform the following processing for each of the information receivers: query the receiver key of the information receiver locally at the information sender to obtain the query result; when the query result indicates that the information sender has stored the receiver key of the information receiver locally, send the version number of the receiver key to the service background, receive the return information returned by the service background for the version number, and determine the receiver key of the information receiver based on the return information; when the query result indicates that the information sender does not store the receiver key of the information receiver locally, send a key acquisition request for the information receiver to the service background, and receive the receiver key returned by the service background for the key acquisition request.
[0018] In the above scheme, the above return information includes version indication information for indicating whether the version number is the latest version. The above acquisition module is also used to, when the version indication information indicates that the version number is the latest version, determine the locally stored recipient key as the recipient key of the information recipient; when the version indication information indicates that the version number is not the latest version, determine the recipient key carried in the return information as the recipient key of the information recipient.
[0019] In the above scheme, the above acquisition module is also used to obtain the sender key library, and the sender key library is used for the information sender to store keys; when no version of the sender key is stored in the sender key library, the sender key is generated; when at least one version of the sender key is stored in the sender key library, the latest version of the sender key in the sender key library is determined as the candidate sender key; the storage time of the candidate sender key in the sender key library is obtained, and the sender key of the information sender is determined based on the storage time.
[0020] In the above scheme, the above acquisition module is also used to compare the storage duration with the storage duration threshold to obtain a duration comparison result; when the duration comparison result indicates that the storage duration is greater than or equal to the storage duration threshold, the sender key of the information sender is generated; when the duration comparison result indicates that the storage duration is less than the storage duration threshold, the candidate sender key is determined as the sender key of the information sender.
[0021] In the above scheme, the above acquisition module is also used to store the sender key of the information sender in the sender key library, and obtain the updated key library corresponding to the sender key library; send the sender key of the information sender to the service background, so that the service background sends the sender key to the information receiver.
[0022] In the above scheme, the above-mentioned acquisition module is also used to respond to the information interaction request of the information sender, obtain the reinforcement key obtained by encrypting the sender key of the information sender; send the first encrypted information to the service background, so that the service background decrypts the first encrypted information to obtain the target key used to decrypt the reinforcement key; receive the target key returned by the service background, and decrypt the reinforcement key based on the target key to obtain the sender key of the information sender.
[0023] In the above scheme, the above information interaction device also includes: a reinforcement module, which is used to send a key reinforcement request for the sender key of the information sender to the service background, so that the service background updates the target key and encrypts the updated updated target key to obtain the second encrypted information; receives the updated target key and the second encrypted information returned by the service background, and based on the updated target key, performs key reinforcement on the sender key to obtain the updated reinforced key; updates the reinforcement key to the updated reinforced key, and updates the first encrypted information to the second encrypted information.
[0024] In the above scheme, the sender key includes at least one sub-sender key, the receiver key includes at least one sub-receiver key, and the above-mentioned fusion module is also used to fuse each of the sub-sender keys and each of the sub-receiver keys according to the key fusion method to obtain the fused key; wherein the sum of the number of the sub-sender keys and the number of the sub-receiver keys is positively correlated with the encryption performance of the fused key.
[0025] In the above scheme, the above fusion module is also used to fuse the sub-sender key with each sub-receiver key for each sub-sender key, obtain at least one initial fusion key corresponding to the sub-sender key, and determine the intermediate fusion key corresponding to the sub-sender key based on each initial fusion key; fuse each intermediate fusion key to obtain the fusion key.
[0026] In the above scheme, the above encryption module is also used to generate an initial key, and based on the initial key, encrypt the information to be exchanged to obtain encrypted information; based on the fusion key, encrypt the initial key to obtain the encryption key corresponding to the initial key; fuse the encryption key and the encrypted information to obtain the encrypted interaction information.
[0027] The present application provides an information interaction device, including:
[0028] A receiving module, used to receive the encrypted interactive information sent by the service background, and obtain the receiving key of the information receiver and the sending key of the information sender;
[0029] A fusion module, used to fuse the receiving party's key and the sending party's key according to the key fusion method negotiated and determined with the information receiving party to obtain a fused key;
[0030] The decryption module is used to decrypt the encrypted interaction information based on the fusion key to obtain the information to be interacted corresponding to the encrypted interaction information.
[0031] An embodiment of the present application provides an electronic device, including:
[0032] A memory for storing computer executable instructions or computer programs;
[0033] The processor is used to implement the information interaction method provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.
[0034] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for causing a processor to execute the information interaction method provided in the embodiment of the present application.
[0035] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the information interaction method described in the embodiment of the present application.
[0036] The embodiments of the present application have the following beneficial effects:
[0037] By fusing the sender key and the receiver key according to the key fusion method negotiated and determined with the information receiver, a fusion key is obtained, and based on the fusion key, the information to be interacted is encrypted to obtain the encrypted interaction information corresponding to the information to be interacted, and the encrypted interaction information is sent to the service background so that the service background forwards the encrypted interaction information to the information receiver. In this way, since the key fusion method is negotiated and determined by the information receiver and the information sender, and the key fusion method is private to the information receiver and the information sender, the service background is unaware of the fusion key obtained by fusing the sender key and the receiver key according to the key fusion method negotiated and determined with the information receiver, and the encrypted interaction information corresponding to the information to be interacted is obtained by encrypting the information to be interacted based on the fusion key, the service background cannot decrypt the encrypted interaction information, and the encrypted interaction information is sent to the service background so that the service background forwards the encrypted interaction information to the information receiver, so that in the information interaction process between the information sender and the information receiver, the service background cannot realize the decryption of the information to be interacted, so that there is no security risk in the information to be interacted in the service background, thereby effectively improving the information security of the information interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the architecture of the information interaction system provided in the embodiment of the present application;
[0039] Figure 2 This is a schematic diagram of the structure of an electronic device for information interaction provided in an embodiment of the present application. Figure 1 ;
[0040] Figure 3 This is a schematic diagram of the structure of an electronic device for information interaction provided in an embodiment of the present application. Figure 2 ;
[0041] Figure 4 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 1 ;
[0042] Figure 5This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 2 ;
[0043] Figure 6 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 3 ;
[0044] Figure 7 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 4 ;
[0045] Figure 8 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 5 ;
[0046] Fig. 9 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 6 ;
[0047] Fig.10 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 7 ;
[0048] Fig.11 It is a schematic diagram of an interface for setting encryption members provided in an embodiment of the present application;
[0049] Fig.12 This is a schematic diagram of the principle of client private key security reinforcement provided by the embodiment of the present application Figure 1 ;
[0050] Fig.13 This is a schematic diagram of the principle of client private key security reinforcement provided by the embodiment of the present application Figure 2 ;
[0051] Fig.14 It is a schematic diagram of the principle of the effective list provided in the embodiment of the present application;
[0052] Fig.15 It is a schematic diagram of the principle of key storage provided in an embodiment of the present application;
[0053] Fig.16 It is a schematic diagram of the key update process between the information sender and the service backend provided in the embodiment of the present application;
[0054] Fig.17 It is a schematic diagram of a process for obtaining public key information of an information receiver provided in an embodiment of the present application;
[0055] Fig.18 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 8 ;
[0056] Fig.19It is a schematic diagram of the principle of information interaction among multiple devices provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0058] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0059] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0061] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0062] 1) Information Interaction: refers to the process of exchanging and processing information between two or more entities. These entities can be humans, machines, systems, or any other entities that can process and transmit information. Information interaction is a basic activity of information processing and communication and a core component of information systems. Information interaction is very important in many fields such as daily life, work, education, and scientific research. It is the basis of human society and the functions of modern society. With the development of information technology, the way and efficiency of information interaction are also constantly improving, providing people with a more convenient and efficient way of communication.
[0063] 2) Key: In cryptography, it refers to a code or string used to encrypt or decrypt information. The key is an indispensable component of the encryption algorithm, which is used to convert plaintext (i.e. unencrypted data) to ciphertext (i.e. encrypted data) and vice versa. The length and complexity of the key directly affect the security of encryption.
[0064] 3) Information Recipient: refers to the party that receives information during the information exchange process. The information recipient can be an individual, organization, system or other entity that can process and understand information. The role of the information recipient is to receive, process and respond to the information transmitted by the sender. In information exchange, information recipients play a vital role. They need to be able to receive and process information accurately and in a timely manner to make correct decisions and take effective actions. At the same time, information recipients also need to protect the received information to prevent data leakage and abuse.
[0065] 4) Information Sender refers to the party that initiates information transmission during the information exchange process. The information sender is usually the source of information and is responsible for generating, editing and sending information to the information recipient.
[0066] 5) In response to: used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0067] 6) End-to-end encryption (E2EE): is a type of messaging that keeps messages private to everyone, including the messaging service (i.e. the backend). With end-to-end encryption, messages appear in decrypted form only on the device that sent the message and the device that received it. The sender is one "end" of the conversation, and the receiver is the other "end", hence the name "end-to-end".
[0068] 7) Signal Protocol: It is an end-to-end encryption protocol used to provide encryption protection for text messages, phone calls, and instant messages. The design goal of this protocol is to ensure the security of the content. Even if the data is intercepted during transmission, the attacker cannot read or tamper with the information. The core features of the Signal protocol include: End-to-end encryption: The Signal protocol ensures that the communication content is encrypted on the sender's device and then decrypted on the receiver's device. No plaintext information is leaked during the intermediate transmission process. Key exchange: The protocol uses the Double Ratchet key exchange algorithm to generate and exchange encryption keys to ensure that the communicating parties can securely negotiate the key. Forward secrecy: The key management mechanism of the Signal protocol can achieve forward secrecy, that is, even if the key is leaked, the previous historical communication content cannot be decrypted. Anti-man-in-the-middle attack: The Signal protocol verifies the keys and identities of the communicating parties to ensure that the communicating parties are authentic, thereby resisting man-in-the-middle attacks. Open source: The implementation of the Signal protocol is open source, allowing third parties to review and verify, enhancing users' trust in the security of the protocol.
[0069] 8) DH protocol (Diffie-Hellman Protocol): It is a secure key exchange protocol that allows two entities to negotiate a key in an insecure channel, and this key can be used for subsequent secure communications, such as encrypting and decrypting information. The core features and steps of the DH protocol include: Key negotiation: The DH protocol allows two communicating parties to generate a shared key through an algorithm without directly exchanging keys. Security: The security of the DH protocol is based on the difficulty of the discrete logarithm problem. An attacker cannot infer the shared key from the public exchange process. Steps: The typical steps of the DH protocol include selecting a public basis g and a large prime number p, then each communicating party selects a secret number a and b, calculates public keys A and B respectively, and finally calculates the shared key by exchanging public keys. Application: The DH protocol is widely used in various security protocols and encryption algorithms, such as SSL / TLS, IKE (Internet Key Exchange), etc. The DH protocol is a very critical component of modern cryptography, which makes secure key exchange possible, thereby providing a basis for protecting the content of communication.
[0070] 9) One-Time Pre-Shared Key Pair: It is a security mechanism used to establish a temporary key between two entities, which is used only for one communication session. This key pair is shared before the session starts and destroyed after the session ends to ensure the security and non-traceability of the communication. One-time pre-shared key pairs are very useful in scenarios that require highly secure communications, such as communications, high-level business transactions, and certain encryption protocols. It can help protect the content of communications and prevent them from being intercepted and cracked by unauthorized third parties.
[0071] 10) Key derivation algorithm: In cryptography, a key derivation function (KDF) uses a pseudo-random function to derive one or more keys from a secret value such as a master key or a password. KDF can be used to extend a key into a longer key or obtain a key in a desired format. A commonly used KDF is HKDF based on HMAC (Message Authentication Code).
[0072] 11) Symmetric Encryption Algorithm is an encryption method in which the same key is used for encryption and decryption of data. This means that both the sender and the receiver use the same key to encrypt the data and then use the same key to decrypt the data. Symmetric encryption algorithms are very popular in applications that require high-speed and efficient encryption and decryption, such as encrypted files, encrypted databases, and encrypted communication channels. However, key management and distribution are key challenges in using symmetric encryption algorithms, and the security and confidentiality of the keys need to be ensured.
[0073] During the implementation of the embodiments of the present application, the applicant discovered that the related technology has the following problems:
[0074] In the related art, for information interaction between an information sender and an information receiver, encryption and decryption of the information to be interacted is usually implemented through a service background, so as to ensure information security during the information interaction process. Since the service background can implement encryption and decryption of the information to be interacted, there are security risks in the information to be interacted in the service background, resulting in poor information security of the information interaction.
[0075] The embodiments of the present application provide an information interaction method, device, electronic device, computer-readable storage medium and computer program product, which can effectively improve the information security of information interaction. The following describes an exemplary application of the information interaction system provided by the embodiments of the present application.
[0076] See also Figure 1 , Figure 1It is a schematic diagram of the architecture of the information interaction system 100 provided in an embodiment of the present application. The terminal (terminal 400 is shown as an example) is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0077] The terminal 400 is used for the user to use the client 410 to display the information to be interacted on the graphical interface 410 - 1 (the graphical interface 410 - 1 is shown as an example). The terminal 400 and the server 200 are connected to each other via a wired or wireless network.
[0078] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart TV, a smart watch, a car terminal, etc., but is not limited thereto. The electronic device provided in the embodiments of the present application may be implemented as a terminal or as a server. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0079] In some embodiments, the terminal 400 obtains the sender key and the receiver key, and fuses the sender key and the receiver key according to the key fusion method negotiated and determined with the information recipient to obtain a fusion key; based on the fusion key, the interaction information to be interacted is encrypted to obtain encrypted interaction information corresponding to the interaction information to be interacted, and the encrypted interaction information is sent to the server 200, so that the server 200 forwards the encrypted interaction information to the information recipient.
[0080] In other embodiments, the server 200 obtains the sender key and the receiver key, and fuses the sender key and the receiver key in accordance with the key fusion method negotiated and determined with the information recipient to obtain a fused key; based on the fused key, the interaction information is encrypting to obtain encrypted interaction information corresponding to the interaction information, and the encrypted interaction information is sent to the terminal 400, so that the terminal 400 forwards the encrypted interaction information to the information recipient.
[0081] In other embodiments, the embodiments of the present application can be implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing.
[0082] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources.
[0083] See also Figure 2 , Figure 2 The electronic device 500 for information interaction provided in the embodiment of the present application is schematically shown in FIG. Figure 1 ,in, Figure 2 The electronic device 500 shown may be Figure 1 The server 200 or the terminal 400 in Figure 2 The electronic device 500 shown includes: at least one processor 430, a memory 450, and at least one network interface 420. The various components in the electronic device 500 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .
[0084] The processor 430 may be an integrated circuit chip having signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor may be a microprocessor or any conventional processor, etc.
[0085] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 430.
[0086] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0087] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0088] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0089] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB).
[0090] In some embodiments, the information interaction device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 The information interaction device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, including the following software modules: an acquisition module 4551, a fusion module 4552, an encryption module 4553, and a sending module 4554. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0091] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device for information interaction provided in an embodiment of the present application. Figure 2 ,in, Figure 3 The electronic device 600 shown may be Figure 1 The server 200 or the terminal 400 in Figure 3 The electronic device 600 shown includes: at least one processor 530, a memory 550, and at least one network interface 520. The various components in the electronic device 600 are coupled together via a bus system 540. It is understood that the bus system 540 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 540 is not described in detail. Figure 3 Various buses are labeled as bus system 540 .
[0092] The processor 530 may be an integrated circuit chip having signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor may be a microprocessor or any conventional processor, etc.
[0093] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 550 may optionally include one or more storage devices that are physically remote from the processor 530.
[0094] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiment of the present application is intended to include any suitable type of memory.
[0095] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0096] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0097] The network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520. Exemplary network interfaces 520 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB).
[0098] In some embodiments, the information interaction device provided in the embodiments of the present application can be implemented in a software manner. Figure 3 The information interaction device 555 stored in the memory 550 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a receiving module 5551, a fusion module 5552, and a decryption module 5553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0099] In other embodiments, the information interaction device provided in the embodiments of the present application can be implemented in hardware. As an example, the information interaction device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the information interaction method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.
[0100] In some embodiments, the terminal or server can implement the information interaction method provided in the embodiments of the present application by running a computer program or a computer executable instruction. For example, the computer program can be a native program (e.g., a dedicated information interaction program) or a software module in the operating system, for example, an information interaction module that can be embedded in any program (such as an instant messaging client, a photo album program, an electronic map client, a navigation client); for example, it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run. In short, the above-mentioned computer program can be an application, module or plug-in in any form.
[0101] The information interaction method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server or terminal provided in the embodiment of the present application.
[0102] See also Figure 4 , Figure 4 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 1 , will combine Figure 4 Steps 101 to 105 are shown for illustration. The information interaction method provided in the embodiment of the present application can be implemented by a server or a terminal alone, or by a server and a terminal in collaboration. The following will be described as an example in which the terminal is implemented alone and applied to the information sender.
[0103] In step 101, a sender key of the information sender is obtained.
[0104] In some embodiments, the information sender is the party that initiates information transmission during the information interaction process. The information sender is usually the source of information and is responsible for generating, editing and sending information to the information recipient.
[0105] In some embodiments, the sender key is a key generated by the information sender and unique to the information sender itself.
[0106] In some embodiments, see Figure 5 , Figure 5 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 2 Before executing the above step 101, you can also Figure 5 Steps 106 to 107 are shown to determine the recipient of the information.
[0107] In step 106, a plurality of authenticated recipients that can have a conversation with the information sender are obtained, and at least one candidate recipient corresponding to the information sender is obtained.
[0108] In some embodiments, the authenticated receiver that can communicate with the information sender is a receiver that can communicate securely with the information sender and has correct authentication and authorization. Multiple authenticated receivers that can communicate with the information sender are entities that can communicate with the information sender in encrypted and authenticated manner in secure communication, and each entity has corresponding identity authentication and authorization.
[0109] In some embodiments, the information to be interacted between the information sender and the information receiver may be various information types such as text information, video information, etc. The information type of the information to be interacted between the information sender and the information receiver does not constitute a limitation on the embodiments of the present application.
[0110] As an example, in an application scenario within an enterprise or organization, the authenticated receiver can be an enterprise employee who is authorized to communicate with a specific sender. The authenticated receivers have their own identity authentication and authorization mechanisms to ensure that only authenticated receivers, i.e., authenticated receivers, can participate in the session.
[0111] As an example, in a business environment, a sender may need to communicate with multiple partners or customers. These receivers must also be properly authenticated and authorized to ensure that only approved entities can participate in the session.
[0112] In some embodiments, the candidate recipient is the recipient with which the information sender currently expects to interact. The candidate recipient is considered to be a potential recipient during the current communication process of the information sender, that is, the entity with which the sender expects to interact and receive information.
[0113] In step 107, for each candidate receiver, the candidate receiver is compared with each authenticated receiver respectively, and when the comparison result indicates that the candidate receiver exists among multiple authenticated receivers, the candidate receiver is determined as the information receiver.
[0114] In some embodiments, the above-mentioned information receiver refers to a candidate receiver for the authenticated receiver, that is, a receiver that can communicate securely with the information sender, has correctly authenticated and authorized information to be interacted with, and the information sender's current information to be interacted with is expected to interact with.
[0115] As an example, for candidate receiver A, candidate receiver A is compared with authentication receiver A, authentication receiver B and authentication receiver C respectively. When the comparison result indicates that candidate receiver A exists among multiple authentication receivers, candidate receiver A is determined as the information receiver.
[0116] As an example, for candidate receiver D, candidate receiver D is compared with authentication receiver A, authentication receiver B and authentication receiver C respectively. When the comparison result indicates that candidate receiver A does not exist among multiple authentication receivers, candidate receiver D is not determined as the information receiver.
[0117] In this way, multiple authenticated receivers that can have conversations with the information sender are obtained, and at least one candidate receiver corresponding to the information sender is obtained. For each candidate receiver, the candidate receiver is compared with each authenticated receiver respectively. When the comparison result indicates that there is a candidate receiver among multiple authenticated receivers, the candidate receiver is determined as the information receiver. By ensuring that only authenticated receivers can have conversations with the sender, the security of communications can be significantly improved, which helps prevent unauthorized access and data leakage. The mechanism of authenticating receivers can help protect the privacy of users and ensure that the information to be interacted is only seen by authorized receivers, thereby effectively improving the information security of information interaction.
[0118] In some embodiments, see Figure 6 , Figure 6 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 3 , Figure 4 Step 101 shown may be performed by executing Figure 6 Steps 1011A to 1014A are implemented as shown.
[0119] In step 1011A, the sender key library is obtained, and the sender key library is used for the information sender to store keys.
[0120] In some embodiments, the sender's key store refers to a database installed locally on the sender of information for the sender to store keys. The sender's key store can store different versions of the sender's key and is updated as the sender's key version is updated. The sender's key store is a secure data structure or component for storing and managing the keys used by the sender of information in encrypted communications. These keys are used to ensure the confidentiality and integrity of information during transmission.
[0121] In step 1012A, when no version of the sender key is stored in the sender key store, a sender key is generated.
[0122] In some embodiments, when no version of the sender key is stored in the sender key library, it means that the information sender has never generated any version of the sender key, and the first version of the sender key can be generated at this time.
[0123] In some embodiments, the sender key may be generated by a random number generation method, a quantum key distribution generation method, etc. The specific generation method of the sender key does not constitute a limitation on the embodiments of the present application. For example, a random number generation method is used to create a random number by using a pseudo-random number generator (PRNG) or a true random number generator (TRNG). This random number is used as a key. To ensure security, the generated random number should have sufficient length and entropy; the quantum key distribution generation method uses the measurement results of the quantum state to create a secret key that only the communicating parties know. Any attempt to identify the quantum key distribution will be detected, thereby ensuring the security of the key.
[0124] In step 1013A, when at least one version of the sender key is stored in the sender key library, the sender key of the latest version in the sender key library is determined as the candidate sender key.
[0125] In some embodiments, when only one version of the sender key is stored in the sender key library, the sender key in the sender key library is determined as a candidate sender key; when at least one version of the sender key is stored in the sender key library, the latest version of the sender key in the sender key library is determined as a candidate sender key.
[0126] As an example, the sender key library stores the sender key of the first version, the sender key of the second version, and the sender key of the third version, and the sender key of the third version is determined as the candidate sender key.
[0127] In step 1014A, the storage duration of the candidate sender key in the sender key library is obtained, and based on the storage duration, the sender key of the information sender is determined.
[0128] In some embodiments, the storage duration of the above-mentioned candidate sender key in the sender key library is negatively correlated with the size of the version number of the candidate sender key in the sender key library. The above-mentioned storage duration refers to the length of time between the time when the candidate sender key is stored in the sender key library and the current time.
[0129] In some embodiments, the above-mentioned determination of the sender key of the information sender based on the storage duration can be achieved in the following manner: the storage duration is compared with the storage duration threshold to obtain a duration comparison result; when the duration comparison result indicates that the storage duration is greater than or equal to the storage duration threshold, the sender key of the information sender is generated; when the duration comparison result indicates that the storage duration is less than the storage duration threshold, the candidate sender key is determined as the sender key of the information sender.
[0130] In some embodiments, the storage duration threshold is used to indicate the version update time of the sender key in the sender key library. When the duration comparison result indicates that the storage duration is greater than or equal to the storage duration threshold, it is necessary to perform a version update of the sender key, and the sender key of the information sender can be generated. When the duration comparison result indicates that the storage duration is less than the storage duration threshold, it is temporarily unnecessary to perform a version update of the sender key, and the candidate sender key can be directly determined as the sender key of the information sender.
[0131] In this way, by comparing the storage time with the storage time threshold, a time comparison result is obtained; when the time comparison result indicates that the storage time is greater than or equal to the storage time threshold, a sender key of the information sender is generated; when the time comparison result indicates that the storage time is less than the storage time threshold, the candidate sender key is determined as the sender key of the information sender. By dynamically generating a new key based on the comparison between the storage time and the threshold, it can be ensured that the key will not become insecure due to long-term storage. This helps to improve the security of communication because even if the key is leaked, it will not be exposed to potential attackers for a long time. Allowing the system to adjust the storage time threshold according to actual conditions, thereby providing a flexible key management strategy. Different applications and environments may require different security measures and key update frequencies. When the storage time is less than the threshold, unnecessary key generation and replacement can be avoided, thereby saving computing resources and time.
[0132] In some embodiments, after the sender key of the information sender is generated as above, the following processing can also be performed: the sender key of the information sender is stored in the sender key library, and the updated key library corresponding to the sender key library is obtained; the sender key of the information sender is sent to the service background, so that the service background sends the sender key to the information receiver.
[0133] In some embodiments, after generating a new version of the sender key of the information sender, the sender key of the information sender is stored in the sender key library, and an updated key library corresponding to the sender key library is obtained, thereby realizing the version update of the sender key in the sender key library.
[0134] In this way, by regularly generating new versions of keys and updating the keystore, key rotation can be achieved, which helps improve the security of communications. Even if a key is cracked, it is difficult for attackers to use the same key to attack multiple communication sessions due to the frequent replacement of keys. Updating the keystore ensures that the keys used are always kept in their optimal security state. With the development of cryptography and the advancement of attack technology, the use of the latest encryption standards and methods can improve the ability to resist future attacks. In some cases, even if the key is not leaked, using the same key for a long time may make it no longer secure. By regularly updating the keystore, the freshness of the key can be maintained and the security risks caused by key fatigue can be reduced.
[0135] In some embodiments, after generating a new version of the sender's key of the information sender, the sender's key of the information sender is sent to the service background, so that the service background sends the sender key to the information receiver, thereby realizing key sharing between the information sender and the information receiver, and ensuring the normal information interaction.
[0136] In this way, after generating a new version of the sender's key of the information sender, the sender's key of the information sender is sent to the service background, so that the service background sends the sender key to the information receiver. By distributing the key through the service background as an intermediary, the key transmission process can be simplified, especially when the sender and receiver are located in different networks or need to cross an insecure network. The service background can support multiple senders and receivers, provide flexible key services, and be able to expand its capacity and processing capabilities as needed. The service background can automate the key distribution and update process, reduce the need for manual intervention, and improve the efficiency and reliability of the system.
[0137] In some embodiments, see Figure 7 , Figure 7 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 4 , Figure 4 Step 101 shown may be performed by executing Figure 7Steps 1011B to 1013B are implemented as shown.
[0138] In step 1011B, in response to the information exchange request of the information sender, a reinforcement key obtained by encrypting the sender key of the information sender is obtained.
[0139] In some embodiments, a hardened key is an encrypted form of a sender's key of an information sender. A hardened key refers to a key obtained by encrypting the sender's key of an information sender. This encryption method can increase the security of the key and ensure the security of the key during storage and transmission.
[0140] As an example, see Fig.13 , Fig.13 This is a schematic diagram of the principle of client private key security reinforcement provided by the embodiment of the present application Figure 2 , the hardening key can be Fig.13 The encrypted private key data shown in the figure is obtained by obtaining the reinforcement key locally from the sender of the information, so that the reinforcement key can be subsequently decrypted to obtain the sender's key, and the sender's key is stored in the information sender using the reinforcement key, thereby effectively improving the storage security of the sender's key.
[0141] In step 1012B, the first encrypted information is sent to the service background so that the service background decrypts the first encrypted information to obtain a target key for decrypting the reinforcement key.
[0142] In some embodiments, the first encrypted information is an encrypted form of the target key used to decrypt the reinforced key. The first encrypted information refers to the information that the sender first encrypts and sends to the service background during the encrypted communication process. This information is the starting point of the encrypted communication chain, and it usually contains the necessary information for the subsequent decryption process.
[0143] As an example, see Fig.13 , the sender of the information ( Fig.13 The client terminal shown in ) sends the first encrypted information ( Fig.13 ), so that the service backend decrypts the first encrypted information through the backend key, and obtains the target key ( Fig.13 ).
[0144] In step 1013B, the target key returned by the service backend is received, and based on the target key, the reinforcement key is decrypted to obtain the sender key of the information sender.
[0145] In some embodiments, the information sender receives the target key returned by the service backend. Since the target key is used to decrypt the reinforcement key, the reinforcement key is decrypted based on the target key to obtain the sender key of the information sender.
[0146] As an example, see Fig.13 , receive the target key returned by the service backend ( Fig.13 The random key shown), and based on the target key, the hardened key ( Fig.13 ) to decrypt the encrypted random key shown in the figure to obtain the sender's key ( Fig.13 The random key shown).
[0147] In this way, by responding to the information exchange request of the information sender, the reinforcement key obtained by encrypting the sender key of the information sender is obtained, and the first encrypted information is sent to the service background, so that the service background decrypts the first encrypted information, obtains the target key for decrypting the reinforcement key, receives the target key returned by the service background, and decrypts the reinforcement key based on the target key to obtain the sender key of the information sender. The double-layer encryption mechanism of the reinforcement key and the target key significantly improves the security of the key. Even if the reinforcement key is leaked, the target key and the attacker cannot decrypt the key. Dividing the key into two parts, the reinforcement key and the target key, can reduce the risk of key leakage. The segmented storage and transmission of the key can reduce the risk of the key being leaked at one time. The management and distribution of the key through the service background can provide a more flexible key management strategy. The service background can centrally manage the key and ensure the safe storage and distribution of the key. The service background decrypts the first encrypted information to ensure the security of the key during transmission. Even if the key is intercepted during transmission, the attacker cannot decrypt the key without the target key.
[0148] In step 102, a receiver key of the information receiver is obtained.
[0149] In some embodiments, the recipient key refers to a key generated at the information recipient and unique to the information recipient. The number of the above-mentioned information recipients may be at least one, and the above-mentioned acquisition of the recipient key of the information recipient may be acquisition of the recipient key of each information recipient, and the above-mentioned information recipients correspond to the recipient keys one by one.
[0150] In some embodiments, see Figure 8 , Figure 8 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 5 , Figure 4 Step 102 shown can be performed for each information recipient. Figure 8Steps 1021 to 1023 are implemented as shown.
[0151] In step 1021, the information sender locally queries the recipient key of the information recipient to obtain a query result.
[0152] In some embodiments, the query result is used to indicate whether the information sender has the recipient key of the information receiver stored locally.
[0153] In some embodiments, the information sender queries the recipient key of the information receiver locally, and the information sender can quickly determine the existence and detailed information of the recipient key, thereby effectively managing the key and providing secure communication services.
[0154] In step 1022, when the query result indicates that the information sender has the information receiver's recipient key stored locally, the version number of the recipient key is sent to the service background, and the return information returned by the service background regarding the version number is received. Based on the return information, the recipient key of the information receiver is determined.
[0155] In some embodiments, when the query result indicates that the information sender has the information receiver's receiver key stored locally, since it is impossible to determine whether the information receiver's receiver key stored locally by the information sender is the latest version of the receiver key, the version number of the locally stored receiver key can be sent to the service backend, so that the service backend compares the version of the information receiver's receiver key stored locally by the information sender with the latest version, and returns return information regarding the version number, thereby determining whether the information receiver's receiver key stored locally by the information sender is the latest version of the receiver key.
[0156] In some embodiments, the above-mentioned returned information includes version indication information for indicating whether the version number is the latest version.
[0157] In some embodiments, the above-mentioned determination of the recipient key of the information recipient based on the return information can be achieved in the following way: when the version indication information indicates that the version number is the latest version, the locally stored recipient key is determined as the recipient key of the information recipient; when the version indication information indicates that the version number is not the latest version, the recipient key carried in the return information is determined as the recipient key of the information recipient.
[0158] In some embodiments, when the version indication information indicates that the version number is the latest version, it means that the recipient key of the information recipient stored locally by the information sender is the latest version of the recipient key. Then the locally stored recipient key can be directly determined as the recipient key of the information recipient.
[0159] In some embodiments, when the version indication information indicates that the version number is not the latest version, it means that the recipient key of the information recipient stored locally by the information sender is not the latest version of the recipient key. In this case, the recipient key carried in the returned information will be determined as the recipient key of the information recipient, thereby ensuring that the determined recipient key is the latest version.
[0160] In this way, when the version indication information indicates that the version number is the latest version, the locally stored recipient key is determined as the recipient key of the information recipient; when the version indication information indicates that the version number is not the latest version, the recipient key carried in the returned information is determined as the recipient key of the information recipient. When the version indication information indicates that the version number is not the latest version, the information sender can directly use the recipient key instead of requesting a new key from the service background, which reduces the amount of data transmission and improves communication efficiency. Ensuring that the information recipient uses the latest key version can reduce security risks caused by outdated key versions. Although the recipient key can be stored locally, it can still be centrally managed and updated through the service background to ensure the security and consistency of the key.
[0161] In step 1023, when the query result indicates that the information sender does not store the recipient key of the information receiver locally, a key acquisition request for the information receiver is sent to the service background, and the service background returns the recipient key in response to the key acquisition request.
[0162] In some embodiments, when the query result indicates that the information sender does not locally store the recipient key of the information receiver, the information sender can only obtain the recipient key from the service background. It can send a key acquisition request for the information receiver to the service background, and receive the recipient key returned by the service background in response to the key acquisition request.
[0163] In this way, by querying the receiver key of the information receiver locally at the information sender, the query result is obtained. When the query result indicates that the information sender has the receiver key of the information receiver stored locally, the version number of the receiver key is sent to the service background, and the return information returned by the service background for the version number is received. Based on the return information, the receiver key of the information receiver is determined. When the query result indicates that the information sender does not store the receiver key of the information receiver locally, a key acquisition request for the information receiver is sent to the service background, and the receiver key returned by the service background for the key acquisition request is received. By querying the version number of the receiver key and sending it to the service background, the version control of the receiver key can be achieved. This helps to ensure that the information sender uses the latest key version, thereby improving the security of communication. Combining local storage and key management of remote service backgrounds, a flexible key management strategy can be provided. Local storage can quickly access keys, while the service background can centrally manage and update keys. When the query result indicates that the information sender has the receiver key of the information receiver stored locally, the locally stored key can be directly used, reducing the need to send a key request to the service background, thereby reducing the amount of data transmission. Ensuring that the sender of the information is using the latest key version can reduce the security risks caused by outdated key versions.
[0164] In step 103, the sender's key and the receiver's key are merged according to the key fusion method negotiated and determined with the information receiver to obtain a merged key.
[0165] In some embodiments, the sender key includes at least one sub-sender key, and the receiver key includes at least one sub-receiver key. The key fusion method can be obtained by the information receiver and the information sender information exchange management party, and the information exchange management party will not send the key fusion method to the service background.
[0166] In some embodiments, the above step 103 can be implemented in the following manner: according to the key fusion method, each sub-sender key and each sub-receiver key are merged to obtain a merged key.
[0167] In some embodiments, the sum of the number of the above-mentioned sub-sender keys and the number of sub-receiver keys is positively correlated with the encryption performance of the fusion key. The above-mentioned encryption performance refers to the encryption strength of the fusion key for encrypted information. The greater the encryption strength, the higher the security performance of the encrypted interactive information encrypted with the fusion key when facing powerful computing resources and complex attack methods.
[0168] In some embodiments, the above-mentioned key fusion method is used to fuse each sub-sender key and each sub-receiver key to obtain a fused key, which can be achieved in the following way: for each sub-sender key, the sub-sender key is respectively fused with each sub-receiver key to obtain at least one initial fused key corresponding to the sub-sender key, and based on each initial fused key, the intermediate fused key corresponding to the sub-sender key is determined; each intermediate fused key is fused to obtain a fused key.
[0169] In some embodiments, the above-mentioned determination of the intermediate fusion key corresponding to the sub-sender key based on each initial fusion key can be achieved in the following way: when the number of initial fusion keys is one, the initial fusion key is determined as the intermediate fusion key corresponding to the sub-sender key; when the number of initial fusion keys is multiple, each initial fusion key is merged to obtain the intermediate fusion key corresponding to the sub-sender key.
[0170] As an example, the sub-sender keys include sub-sender key A, sub-sender key B and sub-sender key C, and the sub-receiver keys include sub-receiver key D and sub-receiver key E. For sub-sender key A, the sub-sender key is merged with each sub-receiver key respectively to obtain the initial fusion key AD and the initial fusion key AE corresponding to the sub-sender key. For each initial fusion key, the intermediate fusion key ADAE corresponding to the sub-sender key is determined. For sub-sender key B, the sub-sender key is merged with each sub-receiver key respectively to obtain the initial fusion key BD and the initial fusion key BE corresponding to the sub-sender key. For sub-sender key C, the sub-sender key is merged with each sub-receiver key respectively to obtain the initial fusion key CD and the initial fusion key CE corresponding to the sub-sender key; each intermediate fusion key is merged to obtain the fusion key ADAEBDBECDCE.
[0171] In this way, for each sub-sender key, the sub-sender key is merged with each sub-receiver key respectively to obtain at least one initial fusion key corresponding to the sub-sender key, and based on each initial fusion key, the intermediate fusion key corresponding to the sub-sender key is determined; the intermediate fusion keys are merged to obtain a fusion key. Since the key fusion method is determined by negotiation between the information receiver and the information sender, the key fusion method is private to the information receiver and the information sender. Therefore, according to the key fusion method negotiated and determined with the information receiver, the fusion key obtained by merging the sender key and the receiver key is unaware of the fusion key by the service background.
[0172] In step 104, the information to be interacted is encrypted based on the fusion key to obtain encrypted interaction information corresponding to the information to be interacted.
[0173] In some embodiments, the encrypted interactive information is information obtained by encrypting the information to be interacted with based on the fusion key, thereby ensuring the confidentiality and integrity of the information to be interacted with during transmission.
[0174] In some embodiments, see Fig. 9 , Fig. 9 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 6 , Figure 4 Step 104 shown may be performed by executing Fig. 9 Steps 1041 to 1043 are implemented as shown.
[0175] In step 1041, an initial key is generated, and based on the initial key, information to be interacted is encrypted to obtain encrypted information.
[0176] In some embodiments, the above-mentioned initial key can be a randomly generated key. The specific generation method of the above-mentioned initial key does not constitute a limitation on the embodiments of the present application. The above-mentioned encrypted information is information obtained after encrypting the information based on the initial key.
[0177] In step 1042, the initial key is encrypted based on the merged key to obtain an encryption key corresponding to the initial key.
[0178] In some embodiments, the encryption key is a key obtained by encrypting the initial key based on the fusion key. By encrypting the initial key based on the fusion key to obtain the encryption key, the fusion key cannot be stolen, and the encrypted information cannot be decrypted, thereby effectively ensuring the information security of the information to be interacted.
[0179] In step 1043, the encryption key and the encryption information are fused to obtain encrypted interaction information.
[0180] In some embodiments, the above-mentioned encrypted interaction information includes an encryption key and encrypted information, so that by only knowing the fusion key, the encryption key can be decrypted by the fusion key to obtain the initial key, and then the encrypted information can be decrypted by the initial key to obtain the information to be interacted, thereby realizing information interaction between the two parties of information interaction.
[0181] In step 105, the encrypted interaction information is sent to the service background so that the service background forwards the encrypted interaction information to the information receiver.
[0182] In some embodiments, the service background is unaware of the fusion key obtained by fusing the sender's key and the receiver's key in accordance with the key fusion method negotiated and determined with the information receiver. The service background is unaware of the fusion key, and the encrypted interaction information corresponding to the information to be interacted is obtained by encrypting the information to be interacted based on the fusion key. The service background is unable to decrypt the encrypted interaction information. The encrypted interaction information is sent to the service background so that the service background forwards the encrypted interaction information to the information receiver. In this way, during the information interaction process between the information sender and the information receiver, the service background cannot decrypt the interaction information, so that there is no security risk in the information to be interacted in the service background, thereby effectively improving the information security of the information interaction.
[0183] In some embodiments, after executing the above step 105, key reinforcement can be performed in the following manner: sending a key reinforcement request for the sender key of the information sender to the service background, so that the service background updates the target key, and encrypts the updated target key obtained by the update to obtain the second encrypted information; receiving the updated target key and the second encrypted information returned by the service background, and based on the updated target key, reinforcing the sender key to obtain the updated reinforced key; updating the reinforced key to the updated reinforced key, and updating the first encrypted information to the second encrypted information.
[0184] In some embodiments, based on the updated target key, the sender key is key-reinforced to obtain an updated reinforced key, that is, the sender key is key-encrypted by updating the target key to obtain an updated reinforced key.
[0185] In some embodiments, a key reinforcement request for the sender key of the information sender is sent to the service background, so that the service background updates the target key and encrypts the updated target key to obtain second encrypted information; the updated target key and the second encrypted information returned by the service background are received, and the sender key is reinforced based on the updated target key to obtain an updated reinforced key, thereby achieving the use of different keys to encrypt the sender key in each round of conversation, thereby effectively improving the storage security of the sender key locally at the information sender.
[0186] In this way, by updating the target key through the service background and encrypting the updated key, it can be ensured that the key is always kept up to date and in the most secure state. This helps to improve the security of communications and prevent the key from being cracked. The service background encrypts the updated key to obtain the second encrypted information to ensure the security of the key during transmission. Even if the key is intercepted during transmission, the attacker cannot use or crack the key without the correct decryption method. Based on the updated target key, the sender key is reinforced to obtain an updated reinforced key. This reinforcement process can further enhance the security of the key, making it more difficult to crack.
[0187] In this way, the sender key and the receiver key are merged according to the key fusion method negotiated and determined with the information receiver to obtain a fusion key, and the information to be interacted is encrypted based on the fusion key to obtain the encrypted interaction information corresponding to the information to be interacted, and the encrypted interaction information is sent to the service background so that the service background forwards the encrypted interaction information to the information receiver. In this way, since the key fusion method is negotiated and determined by the information receiver and the information sender, and the key fusion method is private to the information receiver and the information sender, the service background is unaware of the fusion key obtained by merging the sender key and the receiver key according to the key fusion method negotiated and determined with the information receiver, and the encrypted interaction information corresponding to the information to be interacted is obtained by encrypting the information to be interacted based on the fusion key, and the service background cannot decrypt the encrypted interaction information, and the encrypted interaction information is sent to the service background so that the service background forwards the encrypted interaction information to the information receiver, so that in the information interaction process between the information sender and the information receiver, the service background cannot realize the decryption of the information to be interacted, so that there is no security risk in the information to be interacted in the service background, thereby effectively improving the information security of the information interaction.
[0188] See also Fig.10 , Fig.10 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 7 , will combine Fig.10 Steps 601 to 603 are shown for illustration. The information interaction method provided in the embodiment of the present application can be implemented by a server or a terminal alone, or by a server and a terminal in collaboration. The following will be described as an example in which the terminal is implemented alone and applied to an information recipient.
[0189] In step 601, the encrypted interaction information sent by the service background is received, and the receiver's key of the information receiver and the sender's key of the information sender are obtained.
[0190] In some embodiments, the sender key refers to a key generated by the information sender and unique to the information sender itself, and the receiver key refers to a key generated by the information receiver and unique to the information receiver itself.
[0191] In step 602, the receiving party's key and the sending party's key are merged according to the key fusion method negotiated and determined with the information receiving party to obtain a merged key.
[0192] In some embodiments, since the key fusion method is determined by negotiation between the information receiver and the information sender, and the key fusion method is private to the information receiver and the information sender, therefore, at the information receiver and the information sender, according to the key fusion method determined by negotiation with the information receiver, the fusion key obtained by fusing the sender's key and the receiver's key is the same.
[0193] In step 603, the encrypted interaction information is decrypted based on the fusion key to obtain the information to be interacted corresponding to the encrypted interaction information.
[0194] In some embodiments, since the key fusion method is negotiated and determined by the information receiver and the information sender, the key fusion method is private to the information receiver and the information sender. Therefore, at the information receiver and the information sender, according to the key fusion method negotiated and determined with the information receiver, the fusion key obtained by fusing the sender's key and the receiver's key is the same. Therefore, the information sender can encrypt the encrypted information, and the information receiver can decrypt the encrypted information.
[0195] In this way, the encrypted interactive information sent by the service background is received, and the receiving key of the information receiver and the sending key of the information sender are obtained. According to the key fusion method negotiated and determined with the information receiver, the receiving key and the sending key are merged to obtain the fusion key. Based on the fusion key, the encrypted interactive information is decrypted to obtain the information to be interacted corresponding to the encrypted interactive information. In this way, since the key fusion method is negotiated and determined by the information receiver and the information sender, and the key fusion method is private to the information receiver and the information sender, the service background is unaware of the fusion key, and the encrypted interactive information is decrypted by the fusion key to obtain the information to be interacted corresponding to the encrypted interactive information. The service background cannot decrypt the encrypted interactive information. By sending the encrypted interactive information to the service background, the service background forwards the encrypted interactive information to the information receiver, so that the service background cannot realize the decryption of the interactive information during the information interaction process between the information sender and the information receiver, so that there is no security risk in the information to be interacted in the service background, thereby effectively improving the information security of the information interaction.
[0196] The following is an explanation of an exemplary application of the embodiments of the present application in an actual information interaction application scenario.
[0197] Information interaction is the basic activity of information processing and communication, and is the core component of information systems. Information interaction is very important in many fields such as daily life, work, education, and scientific research. It is the basis of human society and modern social functions. With the development of information technology, the way and efficiency of information interaction are also constantly improving, providing people with a more convenient and efficient way of communication.
[0198] The information interaction method provided by the embodiment of the present application can simplify the basic process while ensuring security, and quickly implement end-to-end encryption of messages in engineering. In terms of security, each message is an independently negotiated message key, which is forward and backward secure, and only the sending and receiving devices can interpret the message. In terms of performance, on-demand message distribution reduces the size of the message body, and the key reuse optimization strategy reduces performance overhead.
[0199] In some embodiments, see Fig.11 , Fig.11 is a schematic diagram of an interface for setting up encryption members provided in an embodiment of the present application, and one can choose to turn on / off the end-to-end encryption function (for example, Fig.11 ), and can set the scope of use. For example, the encrypted members include member A, member B and member C. It supports end-to-end encryption for single chat, end-to-end encryption for group chat, and offline end-to-end encrypted chat, that is, when the receiver is not online, the sender can also send messages with it through end-to-end encryption; after the receiver comes online, the message can be decrypted normally. It supports simultaneous use of multiple devices, that is, multiple devices of each person can encrypt / decrypt messages normally. For example, when member A sends a message to member B, multiple devices of member B can receive the encrypted message and decrypt it.
[0200] In some embodiments, see Fig.12 , Fig.12 This is a schematic diagram of the principle of client private key security reinforcement provided by the embodiment of the present application Figure 1 , Fig.12 What is shown is the situation where the client does not have an encrypted random key locally and requests a random key and an encrypted random key. The client sends a private key data reinforcement request to the service background. The service background generates a random key, encrypts the random key with the background key, obtains the encrypted random key, and sends the encrypted random key and the random key to the client. The client encrypts the private key data with the random key, obtains the encrypted private key data, and stores the encrypted private key data and the random key on disk.
[0201] In some embodiments, see Fig.13 , Fig.13 This is a schematic diagram of the principle of client private key security reinforcement provided by the embodiment of the present application Figure 2 , Fig.13 The picture shows that the client has an encrypted random key locally (not used for the first time, but obtained before), and it carries the encrypted random key locally to request the backend to decrypt the random key and obtain the latest encrypted random key. The client sends the encrypted random key to the service backend, and the service backend decrypts the encrypted random key using the backend key to obtain the random key, and sends the random key and the re-encrypted random key to the client. The client decrypts the encrypted private key data using the random key to obtain the private key data.
[0202] In some embodiments, see Fig.14 , Fig.14 This is a schematic diagram of the principle of the effective list provided in the embodiment of the present application. Each enterprise stores function switches and also stores an effective list (including member list, department list, and label list). Any member that hits the list is within the effective range. Since it contains a department list and a label list, it is very costly to determine whether a member is in a department / label. Therefore, an effective list (including member 1, member 2, member 3 to member n) is introduced here to store members after the effective range is broken up (member list, department list->member list, label list->member list). The effective list is updated regularly by regularly reading and detecting data changes in the effective range storage layer.
[0203] In some embodiments, to determine whether a person is within the effective range: read the enterprise function switch, if it is off, it is considered not to be there. Then read the effective list after the breakup (which stores the list of members after the breakup), if not, it is considered not to be there. If the above check is passed, it is considered to be within the effective range. User A needs to upload relevant public key information (IK, SPK, OPKs) so that his contacts, such as user B, can obtain the user's public key from the background without the need for user A to be online in real time, and can initiate encrypted chat.
[0204] In some embodiments, see Fig.15 , Fig.15 This is a schematic diagram of the principle of key storage provided by the embodiment of the present application. The user id (vid) is used as the key, and the value stores the public key information uploaded by the user. The version number is increased every time the public key information of the user changes. It is used for the subsequent client to check whether the local and background data are outdated. IK, SPK, OPK are Fig.15 The keys A1, A2 and A3, keys B1, B2 and B3, as well as the client device information and device identification are shown in FIG.
[0205] In some embodiments, see Fig.16 , Fig.16 The key update between the information sender and the service backend provided in the embodiment of the present application is a schematic diagram of the process flow. The key update between the information sender and the service backend can be performed by Fig.16 Steps 201 to 214 are shown to be implemented.
[0206] In step 201, the information sender checks and updates its own public key information.
[0207] In some embodiments, the information sender checking and updating its own public key information means that the information sender checks its public key information regularly or irregularly to ensure that its public key is up to date and consistent with the service backend or key distribution center.
[0208] In step 202, the information sender sends a request to read the version number to the service backend.
[0209] In some embodiments, the information sender sends a request to read the version number to the service backend, so that the service backend determines whether the public key information of the information sender is the latest version.
[0210] In step 203, the service backend reads the version number.
[0211] In some embodiments, the service backend reads the version number of the latest version of the public key information.
[0212] In step 204, the service backend returns the key to the information sender.
[0213] In some embodiments, the service backend returns the latest version of the public key information, ie, the key, to the information sender.
[0214] In step 205, the information service provider checks whether to update the local key.
[0215] In some embodiments, when there is no storage in the local database, curve25519 is used to generate IKa, SPKa, OPKa, and DKa; when there is storage in the local database, check whether IK, SPK, OPK, and DK are outdated, and generate IKa, SPKa, OPKa, and DKa on demand. If SPK and OPK expire, they will be regenerated - the old key pair will be retained for the extra_save_interval time; if regeneration is not required, return.
[0216] In step 206, when an update is required, the local database updates and returns the version number to the information sender.
[0217] In some embodiments, when no update is needed, the process ends. The local database performs an update version number query, and the local database signature corresponding to the version number is:
[0218] DKSign(DKa_s,{IKa_p,OPKa_p)selfCreds=(IKa_p,SPKa_p,list(OPKa_p),DKa_p,DK_Sign), req =(seq, selfCreds).
[0219] In step 207, the information sender requests the local database to obtain the stored data.
[0220] In some embodiments, the information sender requests the local database to obtain the stored data, that is, the information sender reads the stored data from the local database.
[0221] In step 208, the local database returns the stored data.
[0222] In some embodiments, the local database checks the SPK and OPK that need to be deleted and updates the private key:
[0223] secretSelfCreds= Encrypt(storekey,(IKa-s,list(SPKa_s),list(OPKa_s)});
[0224] Update the public key:
[0225] publicSelfCreds={Ka_p,list(SPKa_p),list(OPKa_p);
[0226] In step 209, the device is stored on the ground.
[0227] In some embodiments, the disk data:
[0228] storeSelfCreds=(seq, secretSelfCreds, publicSelfCreds, DK, storeKeyinfo).
[0229] In step 210, the public key information is updated.
[0230] In some embodiments, the information sender updates the public key information of the service backend.
[0231] In step 211, the service backend performs a validity check.
[0232] In some embodiments, the service background checks the validity of the signature, checks SPK_ver and OPK_ver under the same IK, improves seq, and subsequent friends / group members regularly update and compare the version number to pull the latest data, save: seq, IKa_p, SPK_a, list(OPKa_p), DK_a, and return the version number and the latest related configuration items.
[0233] In step 212, the service backend returns the public key information to the information sender.
[0234] In some embodiments, the service backend returns the latest version of the public key information to the information sender.
[0235] In step 213, the local database is updated.
[0236] In some embodiments, the local database updates the version number and marks the key as available.
[0237] In step 214, the stored data is retrieved and stored locally.
[0238] In some embodiments, the following describes the process of obtaining the public key information of the information receiver. The X3DH protocol key negotiation requires knowing the IP_p, SPK_p, and OPK_p of the receiver. Each single chat message needs to be sent once for X3DH, and a group chat message needs to be sent n (group number - 1) times for X3DH. There are two ways to obtain the relevant public key information of the receiver, see Table 1 below, which is a schematic diagram of the scheme of obtaining the public key information of the information receiver provided in the embodiment of the present application.
[0239] Table 1 Schematic diagram of the process of obtaining the public key information of the information receiver
[0240]
[0241] In some embodiments, the above-mentioned solution 2 is taken as an example to illustrate the process of obtaining the public key information of the information receiver in the embodiment of the present application, see Fig.17 , Fig.17 This is a schematic diagram of the process of obtaining the public key information of the information receiver provided in the embodiment of the present application. Fig.17 Steps 301 to 309 are shown for explanation.
[0242] In step 301, the message sender enters a single chat / group chat session for regular updates.
[0243] In some embodiments, the message sender periodically updates the single chat, and the message sender periodically updates the group chat.
[0244] In step 302, the information sender obtains the version number from the local database.
[0245] In some embodiments, the information sender obtains the version number of the latest local version from a local database.
[0246] In step 303, the local database is queried for the version number.
[0247] In some embodiments, the public key information of the memberlist members stored locally is obtained in sequence (if there is no seq, fill in 0):
[0248] contactCred=(member_vid, seq, list(IKb_p, SPKb_ver, OPKb_ver, device_type, device_id));
[0249] contactCreds.add(contactCred);
[0250] req = (contactCreds).
[0251] In step 304, the information sender sends the encrypted random key to the service backend.
[0252] In some embodiments, the information sender sends an encrypted random key to the service background. The information sender sends an encrypted random key to the service background. The information sender generates a random key in a secure environment, then uses a certain encryption algorithm to encrypt the random key, and finally sends the encrypted key to the service background.
[0253] In step 305, the service backend verifies the relationship.
[0254] In some embodiments, single chat verifies friend relationships, circles, group structures, and other relationships (refer to chat verification relationship); group chat verifies that head_vid and member_vid in contactCreds are both in the group.
[0255] In step 306, the public key data that needs to be updated is incrementally calculated.
[0256] In some embodiments, it is checked in sequence whether the data seq of contactCreds is behind; and the incremental updated contactCredsUpdate=list(vid, seq, list(ik_p, SPK_p, list(OPK_p), device_type, device_id)) is calculated.
[0257] In step 307, the updated random key is returned.
[0258] In some embodiments, the service backend returns an updated random key to the message sender.
[0259] In step 308, the information sender updates the reinforcement key.
[0260] In some embodiments, the information sender updates the reinforcement key, thereby effectively ensuring the update frequency of the reinforcement key and effectively improving the security performance of the reinforcement key.
[0261] In step 309, the local database returns the hardened key and stores it locally.
[0262] In some embodiments, see Fig.18 , Fig.18 This is a flow diagram of the information interaction method provided in the embodiment of the present application. Figure 8 The information interaction method provided in the embodiment of the present application can be Fig.18 Steps 401 to 425 are shown to be implemented.
[0263] In step 401, the information sender uploads / updates the key to the service backend.
[0264] In some embodiments, the information sender uploads / updates the key to the service background, and the service background returns the key to the information sender.
[0265] In step 402, information recipient A uploads / updates the key to the service backend.
[0266] In some embodiments, information recipient A uploads / updates the key to the service background, and the service background returns the key to information recipient A.
[0267] In step 403, information recipient B uploads / updates the key to the service backend.
[0268] In some embodiments, information recipient B uploads / updates the key to the service background, and the service background returns the key to information recipient B.
[0269] In step 404, the information sender obtains the session member key from the service backend.
[0270] In some embodiments, the information sender and other devices of the information sender obtain the session member key from the service background.
[0271] In step 405, the service backend returns the session member key to the information sender.
[0272] In some embodiments, the service backend returns the recipient key of the information recipient to the information sender.
[0273] In step 406, when some session members do not have valid keys, non-encrypted chat is performed.
[0274] In some embodiments, when some session members do not have a valid key, there is no need to encrypt the interactive information, and an unencrypted chat is conducted.
[0275] In step 407, the information sender randomly generates a message key.
[0276] In some embodiments, the information sender may randomly generate a message key or adopt other methods to generate the message key. The specific method of generating the message key does not constitute a limitation on the embodiments of the present application.
[0277] In step 408, an encrypted message is generated.
[0278] In some embodiments, an encrypted message encryptMsg=aes_gcm(senderkey,msg) is generated.
[0279] In step 409, a negotiated key is generated.
[0280] In some embodiments, a negotiated key is generated:
[0281] key=KDF(X3DH(IKpri_a,EK_pri_a,IK_pub_b,SPK_pub_b,OPK_pub_b)
[0282] In step 410, an encryption key is generated.
[0283] In some embodiments, an encryption key is generated: encrypt_senderkey=aes_hcm(key,senderkey).
[0284] In step 411, information encryption is performed.
[0285] In some embodiments, information encryption is performed:
[0286] receiver_creds.add(vidb,Ik_pub_b,SPK_ver_b,OPK_ver_b,encrypt_senderkey,device_b).
[0287] In step 412, the information sender sends an encrypted message to the service backend.
[0288] In some embodiments, the information sender sends an encrypted message to the service background so that the service background forwards the encrypted message.
[0289] In step 413, the service backend inserts the sender storage.
[0290] In some embodiments, the service backend stores the encrypted information sent by the information sender.
[0291] In step 414, asynchronous diffusion is performed.
[0292] In some embodiments, the information sender diffuses the information to be interacted to multiple devices corresponding to the information sender.
[0293] In step 415, the information receiver returns the information.
[0294] In some embodiments, the information recipient returns the information to the service backend.
[0295] In step 416, the information recipient returns the information.
[0296] In some embodiments, the service backend returns the information returned by the information receiver to the information sender.
[0297] In step 417, the key information of the own vid is filtered from receiver_creds.
[0298] In some embodiments, filtering the key information of the own vid from receiver_creds means that when processing the receiver credential (receiver_creds), only the key information related to the own virtual identifier (vid) is selected.
[0299] In step 418, the recipient storage is inserted.
[0300] In some embodiments, the information recipient stores the key information locally.
[0301] In step 419, information recipient A pulls the message.
[0302] In some embodiments, information recipient A obtains the message.
[0303] In step 420, the end-to-end encrypted messages in the message list are traversed, and the key of the specified deviceid is filtered (null if none).
[0304] In step 421, the service backend returns information.
[0305] In some embodiments, the service backend returns a message to information recipient A.
[0306] In step 422, check whether IK, SPK_ver, OPK_ver exist; if not, decryption fails.
[0307] In some embodiments, the information receiver checks whether IK, SPK_ver, OPK_ver exist. If they do not exist, the decryption of the information receiver fails.
[0308] In step 423, a negotiated key is calculated.
[0309] In some embodiments, the sender key and the receiver key are merged according to a fusion method determined by negotiation to obtain a negotiated key.
[0310] In some embodiments, the negotiated key is calculated:
[0311] key=KDF(X3DH(IK_pub,EK_pub_a,IK_pri_b,SPK_pri_b,OPK_pri_b)).
[0312] Step 424: Decrypt the message key.
[0313] In some embodiments, the message key is decrypted:
[0314] senderkey=aes_gcm_decrypt(key,encrypt_senderkey).
[0315] Step 425: Decrypt the message.
[0316] In some embodiments, decrypt the message: msg = aes_gcm_decrypt(senderkey, encrypt_msg).
[0317] In some embodiments, see Fig.19 , Fig.19 This is a schematic diagram of the principle of information interaction among multiple devices provided in an embodiment of the present application. It supports multiple devices (one main device and multiple auxiliary devices) to log in and use at the same time, so it is necessary to support end-to-end encrypted chat among multiple devices at the same time. Multiple devices of the sender (device A) can send and receive end-to-end encrypted messages. Multiple devices of the receiver (device B) can receive end-to-end encrypted messages. When sending a message, you can also treat your other devices as recipients and negotiate encryption diffusion with them. Maintenance of the number of devices. For each user, the background saves the public key information of a maximum of a specified number of devices to avoid unlimited expansion. When the number exceeds the limit, select offline devices and select older devices by time to eliminate them. Device A sends a message to device B, and the message can be diffused to device 1 and device 2 in device A and device 3 and device 4 in device B.
[0318] In this way, enterprises can specify members to use end-to-end encryption. The encrypted members' devices will generate and store message keys by themselves. Any third party other than the chat members (including the background) cannot obtain the keys and decrypt the messages, so as to more comprehensively ensure the security of messages during transmission and storage.
[0319] It is understandable that in the embodiments of the present application, when it involves data related to information to be interacted with, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0320] The following is a description of an exemplary structure of the information interaction device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the information interaction device 455 of the memory 450 may include: an acquisition module, used to obtain the sender key of the information sender and the receiver key of the information receiver; a fusion module, used to fuse the sender key and the receiver key according to the key fusion method negotiated and determined with the information receiver to obtain a fusion key; an encryption module, used to encrypt the interaction information to be interacted based on the fusion key to obtain encrypted interaction information corresponding to the interaction information to be interacted; a sending module, used to send the encrypted interaction information to the service background, so that the service background forwards the encrypted interaction information to the information receiver.
[0321] In some embodiments, the above-mentioned information interaction device also includes: an authentication module, used to obtain multiple authenticated receivers that can converse with the information sender, and obtain at least one candidate receiver corresponding to the information sender; for each candidate receiver, the candidate receiver is compared with each authenticated receiver respectively, and when the comparison result indicates that there is a candidate receiver among the multiple authenticated receivers, the candidate receiver is determined as the information receiver.
[0322] In some embodiments, the above-mentioned acquisition module is also used to perform the following processing for each information recipient: query the recipient key of the information recipient locally at the information sender to obtain the query result; when the query result indicates that the information sender has stored the recipient key of the information recipient locally, send the version number of the recipient key to the service background, and receive the return information returned by the service background for the version number, and determine the recipient key of the information recipient based on the return information; when the query result indicates that the information sender does not store the recipient key of the information recipient locally, send a key acquisition request for the information recipient to the service background, and receive the recipient key returned by the service background for the key acquisition request.
[0323] In some embodiments, the above-mentioned return information includes version indication information for indicating whether the version number is the latest version. The above-mentioned acquisition module is also used to determine the locally stored recipient key as the recipient key of the information recipient when the version indication information indicates that the version number is the latest version; when the version indication information indicates that the version number is not the latest version, the recipient key carried in the return information is determined as the recipient key of the information recipient.
[0324] In some embodiments, the above-mentioned acquisition module is also used to obtain the sender key library, which is used for key storage by the information sender; when no version of the sender key is stored in the sender key library, a sender key is generated; when at least one version of the sender key is stored in the sender key library, the latest version of the sender key in the sender key library is determined as a candidate sender key; the storage time of the candidate sender key in the sender key library is obtained, and the sender key of the information sender is determined based on the storage time.
[0325] In some embodiments, the above-mentioned acquisition module is also used to compare the storage time with the storage time threshold to obtain a time comparison result; when the time comparison result indicates that the storage time is greater than or equal to the storage time threshold, the sender key of the information sender is generated; when the time comparison result indicates that the storage time is less than the storage time threshold, the candidate sender key is determined as the sender key of the information sender.
[0326] In some embodiments, the above-mentioned acquisition module is also used to store the sender key of the information sender in the sender key library, and obtain the updated key library corresponding to the sender key library; send the sender key of the information sender to the service background, so that the service background sends the sender key to the information receiver.
[0327] In some embodiments, the above-mentioned acquisition module is also used to respond to the information interaction request of the information sender, obtain the reinforcement key obtained by encrypting the sender key of the information sender; send the first encrypted information to the service background, so that the service background decrypts the first encrypted information and obtains the target key used to decrypt the reinforcement key; receive the target key returned by the service background, and decrypt the reinforcement key based on the target key to obtain the sender key of the information sender.
[0328] In some embodiments, the above-mentioned information interaction device also includes: a reinforcement module, which is used to send a key reinforcement request for the sender key of the information sender to the service background, so that the service background updates the target key and encrypts the updated updated target key to obtain the second encrypted information; receives the updated target key and the second encrypted information returned by the service background, and based on the updated target key, performs key reinforcement on the sender key to obtain the updated reinforced key; updates the reinforced key to the updated reinforced key, and updates the first encrypted information to the second encrypted information.
[0329] In some embodiments, the sender key includes at least one sub-sender key, and the receiver key includes at least one sub-receiver key. The above-mentioned fusion module is also used to fuse each sub-sender key and each sub-receiver key in a key fusion manner to obtain a fused key; wherein the sum of the number of sub-sender keys and the number of sub-receiver keys is positively correlated with the encryption performance of the fused key.
[0330] In some embodiments, the above-mentioned fusion module is also used to fuse the sub-sender key with each sub-receiver key for each sub-sender key, obtain at least one initial fusion key corresponding to the sub-sender key, and determine the intermediate fusion key corresponding to the sub-sender key based on each initial fusion key; fuse each intermediate fusion key to obtain a fusion key.
[0331] In some embodiments, the above-mentioned encryption module is also used to generate an initial key, and based on the initial key, encrypt the interactive information to obtain encrypted information; based on the fusion key, encrypt the initial key to obtain the encryption key corresponding to the initial key; fuse the encryption key and the encrypted information to obtain encrypted interactive information.
[0332] The following further describes an exemplary structure of the information interaction device 555 provided in the embodiment of the present application implemented as a software module. In some embodiments, for example Figure 3 As shown, the software modules stored in the information interaction device 555 of the memory 550 may include: a receiving module, used to receive the encrypted interaction information sent by the service background, and obtain the receiver's key of the information receiver and the sender's key of the information sender; a fusion module, used to fuse the receiver's key and the sender's key according to the key fusion method negotiated and determined with the information receiver to obtain a fusion key; a decryption module, used to decrypt the encrypted interaction information based on the fusion key to obtain the information to be interacted corresponding to the encrypted interaction information.
[0333] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the information interaction method described in the embodiment of the present application.
[0334] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will execute the information interaction method provided by the embodiment of the present application, for example, Figure 4 The information interaction method shown.
[0335] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various electronic devices including one or any combination of the above memories.
[0336] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0337] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0338] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0339] In summary, the embodiments of the present application have the following beneficial effects:
[0340] (1) According to the key fusion method negotiated and determined with the information receiver, the sender key and the receiver key are merged to obtain a fusion key, and the information to be interacted is encrypted based on the fusion key to obtain the encrypted interaction information corresponding to the information to be interacted, and the encrypted interaction information is sent to the service backend so that the service backend forwards the encrypted interaction information to the information receiver. In this way, since the key fusion method is negotiated and determined by the information receiver and the information sender, and the key fusion method is private to the information receiver and the information sender, the service backend is unaware of the fusion key obtained by merging the sender key and the receiver key according to the key fusion method negotiated and determined with the information receiver. The service backend is unable to decrypt the encrypted interaction information obtained by encrypting the information to be interacted based on the fusion key. The encrypted interaction information is sent to the service backend so that the service backend forwards the encrypted interaction information to the information receiver, thereby making it impossible for the service backend to decrypt the information to be interacted during the information interaction process between the information sender and the information receiver, so that there is no security risk in the information to be interacted in the service backend, thereby effectively improving the information security of the information interaction.
[0341] (2) Obtain multiple authenticated receivers that can converse with the information sender, and obtain at least one candidate receiver corresponding to the information sender. For each candidate receiver, compare the candidate receiver with each authenticated receiver. When the comparison result indicates that there is a candidate receiver among the multiple authenticated receivers, determine the candidate receiver as the information receiver. By ensuring that only authenticated receivers can converse with the sender, the security of communication can be significantly improved, which helps prevent unauthorized access and data leakage. The mechanism of authenticating receivers can help protect the privacy of users and ensure that the information to be interacted is only seen by authorized receivers, thereby effectively improving the information security of information interaction.
[0342] (3) By comparing the storage time with the storage time threshold, a time comparison result is obtained; when the time comparison result indicates that the storage time is greater than or equal to the storage time threshold, a sender key of the information sender is generated; when the time comparison result indicates that the storage time is less than the storage time threshold, the candidate sender key is determined as the sender key of the information sender. By dynamically generating a new key based on the comparison between the storage time and the threshold, it can be ensured that the key will not become insecure due to long-term storage. This helps to improve the security of communication because even if the key is leaked, it will not be exposed to potential attackers for a long time. Allowing the system to adjust the storage time threshold according to actual conditions, thereby providing a flexible key management strategy. Different applications and environments may require different security measures and key update frequencies. When the storage time is less than the threshold, unnecessary key generation and replacement can be avoided, thereby saving computing resources and time.
[0343] (4) By regularly generating new versions of keys and updating the keystore, key rotation can be achieved, which helps improve the security of communications. Even if a key is cracked, it is difficult for an attacker to use the same key to attack multiple communication sessions due to the frequent replacement of keys. Updating the keystore ensures that the keys used are always kept in their optimal security state. With the development of cryptography and the advancement of attack technology, the use of the latest encryption standards and methods can improve the ability to resist future attacks. In some cases, even if the key has not been leaked, using the same key for a long time may make it no longer secure. By regularly updating the keystore, the freshness of the key can be maintained and the security risks caused by key fatigue can be reduced.
[0344] (5) After generating a new version of the sender's key, send the sender's key to the service backend so that the service backend sends the sender's key to the information receiver, thereby realizing key sharing between the information sender and the information receiver and ensuring the normal information interaction.
[0345] (6) After generating a new version of the sender's key, the sender's key of the information sender is sent to the service background so that the service background sends the sender key to the information receiver. By distributing the key through the service background as an intermediary, the key transmission process can be simplified, especially when the sender and receiver are located in different networks or need to cross an insecure network. The service background can support multiple senders and receivers, provide flexible key services, and be able to expand its capacity and processing capabilities as needed. The service background can automate the key distribution and update process, reduce the need for manual intervention, and improve the efficiency and reliability of the system.
[0346] (7) By obtaining the reinforcement key locally from the information sender, the reinforcement key can be subsequently decrypted to obtain the sender's key, and the sender's key can be stored in the information sender using the reinforcement key, thereby effectively improving the storage security of the sender's key.
[0347] (8) In response to the information exchange request of the information sender, the hardening key obtained by encrypting the sender key of the information sender is obtained, and the first encrypted information is sent to the service background so that the service background decrypts the first encrypted information to obtain the target key for decrypting the hardening key, receives the target key returned by the service background, and decrypts the hardening key based on the target key to obtain the sender key of the information sender. The double-layer encryption mechanism of the hardening key and the target key significantly improves the security of the key. Even if the hardening key is leaked, the target key and the attacker cannot decrypt the key. Dividing the key into two parts, the hardening key and the target key, can reduce the risk of key leakage. The segmented storage and transmission of the key can reduce the risk of the key being leaked at one time. The management and distribution of the key through the service background can provide a more flexible key management strategy. The service background can centrally manage the key and ensure the secure storage and distribution of the key. The service background decrypts the first encrypted information to ensure the security of the key during transmission. Even if the key is intercepted during transmission, the attacker cannot decrypt the key without the target key.
[0348] (9) When the version indication information indicates that the version number is the latest version, the locally stored receiver key is determined as the receiver key of the information receiver; when the version indication information indicates that the version number is not the latest version, the receiver key carried in the returned information is determined as the receiver key of the information receiver. When the version indication information indicates that the version number is not the latest version, the information sender can directly use the receiver key instead of requesting a new key from the service background. This reduces the amount of data transmission and improves communication efficiency. Ensuring that the information receiver uses the latest key version can reduce the security risks caused by outdated key versions. Although the receiver key can be stored locally, it can still be centrally managed and updated through the service background to ensure the security and consistency of the key.
[0349] (10) The information sender queries the receiver key of the information receiver locally to obtain the query result. When the query result indicates that the information sender has the receiver key of the information receiver stored locally, the version number of the receiver key is sent to the service backend, and the return information returned by the service backend for the version number is received. Based on the return information, the receiver key of the information receiver is determined. When the query result indicates that the information sender does not store the receiver key of the information receiver locally, a key acquisition request for the information receiver is sent to the service backend, and the receiver key returned by the service backend for the key acquisition request is received. By querying the version number of the receiver key and sending it to the service backend, the version control of the receiver key can be achieved. This helps to ensure that the information sender uses the latest key version, thereby improving the security of communication. Combining local storage and remote service backend key management can provide a flexible key management strategy. Local storage can quickly access the key, while the service backend can centrally manage and update the key. When the query result indicates that the information sender has the receiver key of the information receiver stored locally, the locally stored key can be directly used, reducing the need to send a key request to the service backend, thereby reducing the amount of data transmission. Ensuring that the sender of the information is using the latest key version can reduce the security risks caused by outdated key versions.
[0350] (11) Enterprises can designate members to use end-to-end encryption. The encryption members' devices will generate and store message keys on their own. No third party (including the backend) other than the chat members can obtain the keys or decrypt the messages, so as to more comprehensively protect the security of messages during transmission and storage.
[0351] (12) Sending a key reinforcement request for the sender key of the information sender to the service background, so that the service background updates the target key and encrypts the updated target key to obtain the second encrypted information; receiving the updated target key and the second encrypted information returned by the service background, and based on the updated target key, reinforcing the sender key to obtain the updated reinforced key, thereby realizing the use of different keys to encrypt the sender key in each round of conversation, thereby effectively improving the storage security of the sender key locally at the information sender.
[0352] (13) By updating the target key through the service background and encrypting the updated key, it can be ensured that the key is always kept up to date and in the most secure state. This helps to improve the security of communication and prevent the key from being cracked. The service background encrypts the updated key to obtain the second encrypted information to ensure the security of the key during transmission. Even if the key is intercepted during transmission, without the correct decryption method, the attacker cannot use or crack the key. Based on the updated target key, the sender key is reinforced to obtain an updated reinforced key. This reinforcement process can further enhance the security of the key, making it more difficult to crack.
[0353] (13) Since the key fusion method is negotiated and determined by the information receiver and the information sender, and the key fusion method is private to the information receiver and the information sender, the fusion key obtained by merging the sender's key and the receiver's key in accordance with the key fusion method negotiated and determined with the information receiver is the same. Therefore, the information sender can encrypt the encrypted information, and the information receiver can decrypt the encrypted information.
[0354] (14) Receive the encrypted interactive information sent by the service background, and obtain the receiver's key of the information receiver and the sender's key of the information sender. According to the key fusion method agreed upon with the information receiver, fuse the receiver's key and the sender's key to obtain the fusion key. Based on the fusion key, decrypt the encrypted interactive information to obtain the information to be interacted corresponding to the encrypted interactive information. In this way, since the key fusion method is negotiated and determined by the information receiver and the information sender, the key fusion method is private to the information receiver and the information sender. Therefore, according to the key fusion method negotiated and determined with the information receiver, the fusion key obtained by fusion of the sender key and the receiver key is unaware of the fusion key. The encrypted interaction information is decrypted by using the fusion key to obtain the information to be interacted corresponding to the encrypted interaction information. The service background cannot decrypt the encrypted interaction information. By sending the encrypted interaction information to the service background, the service background forwards the encrypted interaction information to the information receiver, thereby making the information interaction process between the information sender and the information receiver, the service background cannot decrypt the interaction information, so that there is no security risk in the information to be interacted in the service background, thereby effectively improving the information security of the information interaction.
[0355] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. An information interaction method, It is characterized in that Applied to the information sender, the method comprises: Acquire multiple authenticated recipients that can have a conversation with the information sender, and acquire at least one candidate recipient corresponding to the information sender; For each of the candidate receivers, compare the candidate receiver with each of the authenticated receivers respectively, and when the comparison result indicates that the candidate receiver exists among the multiple authenticated receivers, determine the candidate receiver as the information receiver; Obtaining a sender key of the information sender, and querying the receiver key of each information receiver locally at the information sender to obtain a query result; When the query result indicates that the information sender does not store the receiver key of the information receiver locally, sending a key acquisition request for the information receiver to the service background, and receiving the receiver key returned by the service background in response to the key acquisition request; When the query result indicates that the information sender has the receiver key of the information receiver stored locally, the version number of the receiver key is sent to the service backend, and the return information returned by the service backend for the version number is received, wherein the return information includes version indication information indicating whether the version number is the latest version; When the version indication information indicates that the version number is not the latest version, determining the receiver key carried in the returned information as the receiver key of the information receiver; According to the key fusion method negotiated and determined with the information receiver, the sender key and the receiver key are merged to obtain a merged key, wherein the key fusion method is private to the information receiver and the information sender, and the service backend is unaware of the merged key; Encrypting the information to be interacted based on the fusion key to obtain encrypted interaction information corresponding to the information to be interacted; The encrypted interaction information is sent to the service background, so that the service background forwards the encrypted interaction information to the information receiver.
2. The method according to claim 1, It is characterized in that After receiving the return information returned by the service backend for the version number, the method further includes: When the version indication information indicates that the version number is the latest version, the locally stored receiver key is determined as the receiver key of the information receiver.
3. The method according to claim 1, It is characterized in that The obtaining of a sender key of the information sender includes: Acquire a sender key library, where the sender key library is used for the information sender to store keys; When no version of the sender key is stored in the sender key library, generating the sender key; When at least one version of the sender key is stored in the sender key library, determining the sender key of the latest version in the sender key library as the candidate sender key; The storage duration of the candidate sender key in the sender key library is obtained, and based on the storage duration, the sender key of the information sender is determined.
4. The method according to claim 3, It is characterized in that The determining, based on the storage duration, a sender key of the information sender includes: Compare the storage duration with a storage duration threshold to obtain a duration comparison result; When the duration comparison result indicates that the storage duration is greater than or equal to the storage duration threshold, generating a sender key of the information sender; When the duration comparison result indicates that the storage duration is less than the storage duration threshold, the candidate sender key is determined as the sender key of the information sender.
5. The method according to claim 4, It is characterized in that After generating the sender key of the information sender, the method further includes: The sender key of the information sender is stored in the sender key library, and an updated key library corresponding to the sender key library is obtained; The sender key of the information sender is sent to the service background, so that the service background sends the sender key to the information receiver.
6. The method according to claim 1, It is characterized in that The obtaining of a sender key of the information sender includes: In response to an information exchange request from the information sender, obtaining a reinforcement key obtained by encrypting a sender key of the information sender; Sending the first encrypted information to the service backend, so that the service backend decrypts the first encrypted information to obtain a target key for decrypting the reinforcement key; The target key returned by the service backend is received, and based on the target key, the reinforcement key is decrypted to obtain the sender key of the information sender.
7. The method according to claim 6, It is characterized in that After sending the encrypted interaction information to the service background so that the service background forwards the encrypted interaction information to the information recipient, the method further includes: Sending a key reinforcement request for the sender key of the information sender to the service background, so that the service background updates the target key, and encrypts the updated target key obtained by the update to obtain second encrypted information; Receiving the updated target key and the second encrypted information returned by the service backend, and performing key reinforcement on the sender key based on the updated target key to obtain an updated reinforced key; The reinforcement key is updated to the updated reinforcement key, and the first encryption information is updated to the second encryption information.
8. The method according to claim 1, It is characterized in that The sender key includes at least one sub-sender key, the receiver key includes at least one sub-receiver key, and the sender key and the receiver key are merged according to the key fusion method negotiated and determined with the information receiver to obtain the merged key, including: According to the key fusion method, the sub-sender key and the sub-receiver key are merged to obtain the merged key; The sum of the number of the sub-sender keys and the number of the sub-receiver keys is positively correlated with the encryption performance of the fusion key.
9. The method according to claim 8, It is characterized in that The step of fusing the sub-sender keys and the sub-receiver keys according to the key fusing method to obtain the fused key includes: For each of the sub-sender keys, merge the sub-sender keys with each of the sub-receiver keys to obtain at least one initial merged key corresponding to the sub-sender key, and determine an intermediate merged key corresponding to the sub-sender key based on each of the initial merged keys; The intermediate fusion keys are fused to obtain the fusion key.
10. The method according to claim 1, It is characterized in that The step of encrypting the information to be interacted based on the fusion key to obtain encrypted interaction information corresponding to the information to be interacted includes: Generate an initial key, and encrypt the information to be exchanged based on the initial key to obtain encrypted information; Based on the merged key, encrypt the initial key to obtain an encryption key corresponding to the initial key; The encryption key and the encryption information are fused to obtain the encrypted interaction information.
11. An information interaction method, It is characterized in that Applied to the information receiving party, the method comprises: Receive the encrypted interactive information sent by the service background, and obtain the receiver key of the information receiver and the sender key of the information sender, the information receiver obtains multiple authentication receivers that can communicate with the information sender for the information sender, and obtains at least one candidate receiver corresponding to the information sender; for each candidate receiver, compare the candidate receiver with each authentication receiver respectively, and when the comparison result indicates that the candidate receiver exists among the multiple authentication receivers, determine based on the candidate receiver; Wherein, the information sender obtains a query result by querying the receiver key of the information receiver locally at the information sender; when the query result indicates that the information sender does not store the receiver key of the information receiver locally, the information sender sends a key acquisition request for the information receiver to the service background, and receives the receiver key returned by the service background in response to the key acquisition request; when the query result indicates that the information sender has stored the receiver key of the information receiver locally, the version number of the receiver key is sent to the service background, and the return information returned by the service background in response to the version number is received, wherein the return information includes version indication information indicating whether the version number is the latest version; when the version indication information indicates that the version number is not the latest version, the receiver key carried in the return information is determined as the receiver key of the information receiver; According to the key fusion method negotiated and determined with the information receiver, the receiver's key and the sender's key are merged to obtain a merged key, wherein the key fusion method is private to the information receiver and the information sender, and the service backend is unaware of the merged key; The encrypted interaction information is decrypted based on the fusion key to obtain the information to be interacted corresponding to the encrypted interaction information.
12. An information interaction device, It is characterized in that Applied to the information sender, the device comprises: An acquisition module is used to acquire multiple authentication receivers that can communicate with an information sender, and acquire at least one candidate receiver corresponding to the information sender; for each candidate receiver, compare the candidate receiver with each authentication receiver respectively, and when the comparison result indicates that the candidate receiver exists among the multiple authentication receivers, determine the candidate receiver as the information receiver; acquire the sender key of the information sender, and for each information receiver, query the receiver key of the information receiver locally at the information sender to obtain the query result; when the query result indicates that the information sender does not store the receiver key of the information receiver locally When the information sender has stored the receiver's key locally, the service backend sends a key acquisition request for the information receiver to the service backend, and receives the receiver's key returned by the service backend in response to the key acquisition request; when the query result indicates that the information sender has stored the receiver's key of the information receiver locally, the service backend sends the version number of the receiver's key to the service backend, and receives the return information returned by the service backend in response to the version number, wherein the return information includes version indication information indicating whether the version number is the latest version; when the version indication information indicates that the version number is not the latest version, the receiver's key carried in the return information is determined as the receiver's key of the information receiver; A fusion module, used to fuse the sender key and the receiver key according to the key fusion method negotiated and determined with the information receiver to obtain a fusion key, wherein the key fusion method is private to the information receiver and the information sender, and the service backend is unaware of the fusion key; An encryption module, used for encrypting the information to be interacted based on the fusion key to obtain encrypted interaction information corresponding to the information to be interacted; The sending module is used to send the encrypted interaction information to the service background, so that the service background forwards the encrypted interaction information to the information recipient.
13. An information interaction device, It is characterized in that Applied to an information receiving party, the device comprises: A receiving module, used to receive encrypted interactive information sent by a service background, and obtain a receiver key of the information receiver and a sender key of the information sender, wherein the information receiver obtains multiple authentication receivers that can communicate with the information sender for the information sender, and obtains at least one candidate receiver corresponding to the information sender; for each candidate receiver, the candidate receiver is compared with each authentication receiver respectively, and when the comparison result indicates that the candidate receiver exists among the multiple authentication receivers, based on the determination of the candidate receiver; wherein the information sender obtains a query result by querying the receiver key of the information receiver locally at the information sender, and when the query result indicates that the information When the sender does not store the receiver key of the information receiver locally, the sender sends a key acquisition request for the information receiver to the service background, and receives the receiver key returned by the service background in response to the key acquisition request; when the query result indicates that the information sender has stored the receiver key of the information receiver locally, the sender sends the version number of the receiver key to the service background, and receives the return information returned by the service background in response to the version number, wherein the return information includes version indication information indicating whether the version number is the latest version; when the version indication information indicates that the version number is not the latest version, the receiver key carried in the return information is determined as the receiver key of the information receiver; A fusion module, used to fuse the receiving party's key and the sending party's key according to a key fusion method negotiated and determined with the information receiving party to obtain a fused key, wherein the key fusion method is private to the information receiving party and the information sending party, and the service backend is unaware of the fused key; The decryption module is used to decrypt the encrypted interaction information based on the fusion key to obtain the information to be interacted corresponding to the encrypted interaction information.
14. An electronic device, It is characterized in that The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, configured to implement the information interaction method according to any one of claims 1 to 11 when executing computer executable instructions stored in the memory.
15. A computer-readable storage medium storing computer-executable instructions, It is characterized in that When the computer executable instructions are executed by a processor, the information interaction method according to any one of claims 1 to 11 is implemented.
16. A computer program product comprising computer executable instructions, It is characterized in that When the computer executable instructions are executed by a processor, the information interaction method according to any one of claims 1 to 11 is implemented.
