Encrypted communication system and method

By introducing components such as registration and cancellation servers and data processing servers in the encrypted communication system, and using multiple shared keys and preset primes to generate user public and private keys, the problem of insufficient metadata protection for encrypted communication systems is solved, obfuscation protection of user communication metadata is achieved, and the system security is improved.

CN119865312BActive Publication Date: 2025-08-22URANUS UNIVERSAL (BEIJING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411973668.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-08-22
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The current encrypted communication system lacks comprehensive protection of metadata, which leads to obvious vulnerability when facing large-scale monitoring, information system vulnerability attacks and internal malicious managers, making it difficult to defend against metadata behavioral analysis attacks, resulting in the leakage of user privacy information.

Method used

By introducing registration and cancellation servers, data processing servers and database servers in the encrypted communication system, multiple shared keys and preset primes generate user public and private keys, message segmentation, splicing and encryption processing are performed, and data merging and calculation and decryption are combined with preset public key algorithms and service serial numbers to achieve obfuscation protection of user communication metadata.

Benefits of technology

It realizes the protection of user communication metadata, prevents attackers from using metadata to analyze user behavior and locate user locations, improves the security of encrypted communication systems, and prevents private information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865312B_ABST
    Figure CN119865312B_ABST
Patent Text Reader

Abstract

The present invention provides an encrypted communication system and method. A first sub-terminal sends the current user's user data to a second sub-terminal to generate a first key, which is then used to generate a public key and a private key using a public key algorithm. The second sub-terminal then sends the public key to a data processing server, which then segments, concatenates, and encrypts pending requests based on their service sequence numbers and the first key. After receiving the processed messages from all users in the first group, the data processing server performs combined calculations, decrypts the messages, and recovers each user's corresponding pending request by service sequence number, which it then sends. The server then receives response messages, encrypts each response message using the user's public key corresponding to the service sequence number, and saves the encrypted response message. The second sub-terminal then sends a query request to retrieve all encrypted response messages, attempts to decrypt them using the user's private key, and obtains the corresponding response message based on the successfully decrypted message. This system can implement obfuscation protection for user communication metadata, improving the security of the encrypted communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an encryption communication system and method. Background Art

[0002] With the development of network and internet applications, people are increasingly concerned about the leakage of personal privacy. This is especially true in applications such as electronic payment, electronic voting, and the Internet of Vehicles. Inadequate protection of private information often hides significant security risks, threatening personal property and life. Various business systems often incorporate a variety of security measures in their designs, with encrypted communication technology playing a central role in information security. However, current encrypted communication systems primarily focus on confidentiality, non-repudiation, identity authentication, and integrity, lacking comprehensive protection for metadata, particularly information such as network addresses and user behavior. This makes current information network systems significantly vulnerable to attacks such as large-scale surveillance, information system vulnerability attacks, and malicious internal administrators. Summary of the Invention

[0003] The object of the present invention is to provide an encrypted communication system and method to improve the security of the encrypted communication system.

[0004] The present invention provides an encryption communication system, which includes: multiple user terminals, a registration and deregistration server, a data processing server, and a database server; wherein each user terminal includes: a first sub-terminal and a second sub-terminal; the network addresses corresponding to the first sub-terminal and the second sub-terminal are different; for each user terminal, the first sub-terminal is used to send a first instruction message to the registration and deregistration server; wherein the first instruction message is a registration request message or a deregistration request message; the registration and deregistration server is used to determine the first group corresponding to the current user according to the first instruction message, and send the number of users in the first group to the corresponding data processing server; and determine the user data corresponding to the current user through the first sub-terminal, and send the user data to the second sub-terminal; wherein the user data includes the service serial number corresponding to the current user, and a plurality of shared keys corresponding to the current user and each other first user in the first group; the second sub-terminal is used to generate a first key corresponding to the current user based on the plurality of shared keys and a preset first prime number; based on a preset public key algorithm, a user public key and a user private key corresponding to the current user are generated; based on The business serial number and the first key send the user public key to the data processing server; based on the business serial number and the first key, the request to be processed is split, spliced ​​and encrypted, and the processed message is sent to the data processing server; the data processing server is used to merge and calculate the processed messages corresponding to all users in the received first group based on the number of users, and decrypt them, and perform data splicing and recovery based on the business serial number to obtain the recovered request to be processed sent by each user in the first group, forward each recovered request to be processed, and receive a response message corresponding to each recovered request to be processed, and use the user public key corresponding to the business serial number to encrypt each response message to obtain each encrypted response message, and save each encrypted response message to the database server; the second sub-terminal is used to send a query request to the database server to obtain each encrypted response message from the database server, and attempt to decrypt each encrypted response message based on the user private key corresponding to the current user, and obtain a response message corresponding to the second sub-terminal based on the successfully decrypted message.

[0005] Furthermore, for each user terminal, the first sub-terminal of the user terminal is used to generate a first random number, and use the first random number as the first private key of the current user; based on the first private key and a preset initialization prime number, the first public key corresponding to the current user is calculated; the first sub-terminal is used to send a first instruction message to the registration and deregistration server; wherein, if the first instruction message is a registration request message, the registration request message includes a registration instruction and the first public key corresponding to the current user; if the first instruction message is a deregistration request message, the deregistration request message includes a deregistration instruction and the first public key corresponding to the current user; the registration and deregistration server is used to determine the first group corresponding to the current user based on the first instruction message; send the second public key corresponding to each other first user in the first group to the first sub-terminal; the first sub-terminal is used to calculate multiple shared keys corresponding to the current user and each other first user in the first group based on the first private key of the current user, the second public key corresponding to each other first user in the first group and the preset initialization prime number.

[0006] Furthermore, the registration and deregistration server is used to determine whether there is user information of other users in the registration and deregistration server if the first instruction information is a registration request information; if the number of other users is less than two, record the first public key corresponding to the current user, determine the user group corresponding to the current user and the other users, the group number corresponding to the user group, and the user number corresponding to each user in the user group; if the number of other users is not less than two, when the number of users in the last user group is greater than the preset number threshold, generate a new user group; wherein the preset number threshold is the preset user group threshold plus one; the new user group includes: users in the last user group whose user numbers are greater than or equal to the user group threshold, and the current user; wherein different user groups correspond to data processing servers with different addresses and / or ports, and different user groups correspond to database servers with different addresses and / or ports; each user in the same user group corresponds to a data processing server with the same address and port, and a database server with the same address and port.

[0007] Furthermore, the first sub-terminal is also used to calculate the initialization key corresponding to the current user based on multiple shared keys in the first group, the preset common information in the first group and the preset first prime number; the first sub-terminal is used to generate a second random number, use the second random number as an index number, query the preset prime number table, and obtain the corresponding first sub-prime number; based on the first sub-prime number, the common information in the second group and the initialization key, calculate the first ciphertext corresponding to the current user; and send the first ciphertext to the registration and deregistration server.

[0008] Furthermore, the registration and deregistration server is used to calculate a first result based on the first ciphertext corresponding to each user in the received first group and a preset first prime number; the registration and deregistration server is used to determine, for each prime number in the preset prime number table, whether the prime number is a factor of the first result, and if the prime number is a factor of the first result, obtain the serial number corresponding to the prime number; sort the multiple serial numbers obtained in ascending order to obtain an ordered list; and send the ordered list to the first sub-terminal so that the current user can determine the service serial number corresponding to the current user based on the serial number of the second random number in the ordered list.

[0009] Furthermore, the second sub-terminal is used to convert the request to be processed into a bit string, and divide the bit string according to a preset length to obtain multiple segments; wherein the preset length is the difference between the preset message block length and the bit length corresponding to the preset number threshold; each segment is sequentially spliced ​​with the business sequence number to obtain a spliced ​​block; wherein the business sequence number is in the high position of the spliced ​​block; a block sequence is determined based on each spliced ​​block; the first spliced ​​block in the block sequence is used as the current spliced ​​block, and the current spliced ​​block is filled into a preset message register; according to the value of the message register, the corresponding second sub-prime number is matched from the preset prime number table; based on the second sub-prime number, the value of the preset counter, the first key and the preset first prime number, a second ciphertext corresponding to the current spliced ​​block is calculated; the second ciphertext is sent to the data processing server to update the value of the counter; the next spliced ​​block in the block sequence is used as the new current spliced ​​block, and the step of filling the current spliced ​​block into the preset message register is repeated until the second ciphertext corresponding to the last spliced ​​block in the block sequence is sent to the data processing server.

[0010] Furthermore, the second sub-terminal is also used to periodically obtain the value in a preset message register, and according to the value of the message register, match the corresponding third sub-prime number from the preset prime number table; calculate the third ciphertext based on the third sub-prime number, the value of the preset counter, the first key and the preset first prime number; send the third ciphertext to the data processing server; update the value of the counter; when there is no pending request, generate a third random number, splice the third random number to the business serial number to obtain the splicing result, and fill the splicing result into the preset message register; repeat the steps of periodically obtaining the value in the preset message register.

[0011] Furthermore, the data processing server is used to receive the target ciphertext according to the address of the second sub-terminal, and store it in the corresponding ciphertext block queue in order according to the address, and each time calculates the second result according to the target ciphertext and the first prime number at the same position in each ciphertext block queue; wherein the target ciphertext is the second ciphertext or the third ciphertext; the data processing server is used to determine for each prime number in the preset prime number table whether the prime number is a factor of the second result, and if the prime number is a factor of the second result, obtain the serial number corresponding to the prime number; the data processing server is used to obtain a decryption result set based on the multiple serial numbers obtained; according to the business serial number, exclude the third random number from the decryption result set, and recover the recovered pending request corresponding to the business serial number.

[0012] Furthermore, the data processing server is communicatively connected with a preset business server; the data processing server is used to send each restored pending request to the business server, and receive a response message corresponding to each restored pending request returned by the business server; according to the business serial number corresponding to each restored pending request, the user public key corresponding to each business serial number is determined, and each response message is encrypted using each user public key to obtain each encrypted response message.

[0013] Furthermore, the second sub-terminal is used to periodically send query requests to the database server; the database server is used to establish a message queue corresponding to the second sub-terminal based on the network address corresponding to the second sub-terminal, and store each encrypted response message in the message queue; all encrypted response messages in the message queue are packaged, and the packaged messages are returned to the second sub-terminal; the second sub-terminal is used to use the user private key corresponding to the current user to attempt to decrypt the packaged message, and obtain the message corresponding to the second sub-terminal based on the successfully decrypted message.

[0014] The present invention provides an encryption communication method, which includes: for each user terminal, the first sub-terminal sends a first instruction message to the registration and deregistration server; wherein the first instruction message is a registration request message or a deregistration request message; the registration and deregistration server determines the first group corresponding to the current user according to the first instruction message, and sends the number of users in the first group to the corresponding data processing server; and determines the user data corresponding to the current user through the first sub-terminal, and sends the user data to the second sub-terminal; wherein the user data includes the service serial number corresponding to the current user, and multiple shared keys corresponding to the current user and each other first user in the first group; the second sub-terminal generates the first key corresponding to the current user based on the multiple shared keys and a preset first prime number; generates the user public key and user private key corresponding to the current user based on a preset public key algorithm; sends the user public key to the data processing server based on the service serial number and the first key; treats the user data based on the service serial number and the first key. The processing request is split, spliced ​​and encrypted, and the processed message is sent to the data processing server; the data processing server combines and calculates the processed messages corresponding to all users in the received first group based on the number of users, decrypts them, performs data splicing and recovery based on the business serial number to obtain the recovered pending request sent by each user in the first group, forwards each recovered pending request, receives a response message corresponding to each recovered pending request, encrypts each response message using the user public key corresponding to the business serial number, obtains each encrypted response message, and saves each encrypted response message to the database server; the second sub-terminal sends a query request to the database server to obtain each encrypted response message from the database server, and attempts to decrypt each encrypted response message based on the user private key corresponding to the current user, and obtains a response message corresponding to the second sub-terminal based on the successfully decrypted message.

[0015] The encryption communication system and method provided by the present invention are as follows: for each user terminal, the first sub-terminal is used to send a first instruction message to the registration and deregistration server; wherein the first instruction message is a registration request message or a deregistration request message; the registration and deregistration server is used to determine the first group corresponding to the current user according to the first instruction message, and send the number of users in the first group to the corresponding data processing server; and determine the user data corresponding to the current user through the first sub-terminal, and send the user data to the second sub-terminal; wherein the user data includes the service serial number corresponding to the current user, and a plurality of shared keys corresponding to the current user and each other first user in the first group; the second sub-terminal is used to generate the first key corresponding to the current user based on the plurality of shared keys and a preset first prime number; based on a preset public key algorithm, generate the user public key and user private key corresponding to the current user; send the user public key to the data processing server based on the service serial number and the first key; treat the service serial number and the first key as the service serial number. The system is configured to split, splice, and encrypt the processing requests and send the processed messages to a data processing server. The data processing server is configured to combine and calculate the processed messages corresponding to all users in the received first group based on the number of users, perform decryption processing, perform data splicing and recovery based on the service sequence number to obtain the recovered pending requests sent by each user in the first group, forward each recovered pending request, receive a response message corresponding to each recovered pending request, encrypt each response message using the user public key corresponding to the service sequence number, obtain each encrypted response message, and save each encrypted response message to a database server. The second sub-terminal is configured to send a query request to the database server to obtain each encrypted response message from the database server, attempt to decrypt each encrypted response message based on the user private key corresponding to the current user, and obtain a response message corresponding to the second sub-terminal based on the successfully decrypted message. This system can implement obfuscation protection for user communication metadata and improve the security of the encrypted communication system. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 A schematic diagram of the principle of a typical encryption communication system in the related art;

[0018] Figure 2 A schematic diagram of the basic architecture of an application system in the related art;

[0019] Figure 3 This is a schematic diagram of a typical attack on an encryption system in related technology;

[0020] Figure 4 A schematic diagram of an encrypted communication system provided by an embodiment of the present invention;

[0021] Figure 5 A schematic diagram of an encrypted communication system provided by an embodiment of the present invention;

[0022] Figure 6 A schematic diagram of the operation flow of the encrypted communication system provided in an embodiment of the present invention;

[0023] Figure 7 A schematic diagram of a user registration / logout process provided by an embodiment of the present invention;

[0024] Figure 8 A schematic diagram of one-way message sending provided by an embodiment of the present invention;

[0025] Figure 9 A schematic diagram of a privacy information query process provided by an embodiment of the present invention;

[0026] Figure 10 A flowchart of an encrypted communication method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0028] With the development of network and internet applications, people are increasingly concerned about the leakage of personal privacy. This is particularly true in applications such as electronic payment, electronic voting, and the Internet of Vehicles (IoV). Inadequate protection of privacy information often hides significant security risks, threatening personal property and life. For example, bank-controlled electronic payment servers can collect information related to a person's network address, including account assets, identity, communications, and account transactions. Once this information is obtained by an illegal organization that has compromised a bank, it becomes a gateway for financial fraud and cyberattacks based on network addresses, threatening property safety. For another example, in the IoV application, if an IoV server controlled by an automobile manufacturer is compromised by an illegal organization, it could potentially obtain specific user's vehicle information and communication network address information through the server, and remotely control the vehicle's network address to cause a car accident. While providing convenience, various business systems have also become a potential threat to property and personal safety in the information age.

[0029] Various business systems often use a variety of security measures in their design, among which encryption communication technology plays the most core role in information security. Figure 1 The following diagram shows a typical encrypted communication system, where A and S are communicating. To prevent direct interception of the communication content, A and S can establish an encrypted channel using a symmetric encryption algorithm or a public key encryption algorithm with pre-distributed keys, and then encapsulate and transmit the communication content within the encrypted channel. A typical encrypted communication system ensures confidentiality of information transmission, non-repudiation of the communicating parties, user identity authentication, and message integrity through message verification. Confidentiality, non-repudiation, identity authentication, and integrity are the main functions typically implemented by encrypted communication systems. A typical encryption encapsulation and message decryption process can be simplified as follows:

[0030] C=Enc(K,M), M=Dec(K,C);

[0031] Among them, M is the plaintext message to be transmitted, K is the encryption key shared by both parties, and Enc is a symmetric encryption algorithm. C is a ciphertext calculated by one party, encapsulating the network addresses of the sender and receiver, and then transmitting it to the other party according to the network address. The other party uses the decryption algorithm Dec and the shared key K to restore M, thus completing a message transmission. For a system that uses a public key encryption algorithm, a pair of pre-generated public and private keys (K pub , K pri ).

[0032] During encrypted communication, messages from both parties A and S include the sender and receiver addresses, as well as the ciphertext M being transmitted to the other party. Detecting the presence of ciphertext in the communication channel reveals which addresses are involved in encrypted communication. By continuously observing the timing and length of ciphertext transmissions, it is possible to establish a correlation between the actions of each party.

[0033] Based on the above encryption communication system principle, we can build Figure 2 The following figure shows the basic architecture of an application system. In this figure, S is the service server, and A, B, and C are the user terminals of the service system. A, B, and C interact with S to establish an encrypted communication channel. Typical examples include HTTPS (Hypertext Transfer Protocol Secure) websites and the applications built on them, such as online bank payments, Internet of Vehicles applications, and social networking applications. Typical applications may also use multi-layered nested encrypted communication systems.

[0034] Metadata refers to information describing communication characteristics and attributes, including communication addresses, communication times, communication frequencies, communication durations, and message lengths. It typically does not include the actual content of the communication. Metadata can be used in network management to monitor network traffic and diagnose network issues. It can also be used to track user behavior and identify patterns in target activity. With the widespread adoption of information security technologies centered around encrypted communication, targeted attack techniques are also evolving. Metadata-based user privacy information collection, for example, allows for further statistical analysis and discovery of specific user behaviors based on collected metadata without cracking the encrypted communication system. This allows for the correlation between encrypted communication and user behavior, ultimately achieving the goal of collecting user privacy information. Therefore, current encrypted communication systems, focusing solely on confidentiality, non-repudiation, authentication, and integrity, are insufficient. The lack of metadata protection technology has become a prominent security issue that urgently needs to be addressed.

[0035] Currently, the main attack methods used by attackers to steal and collect user privacy information using metadata can generally be classified into three types: large-scale network monitoring, information system vulnerability exploitation, and internal malicious administrator theft. Figure 3 The following diagram illustrates a typical attack scenario against an encryption system. In the diagram, E1 represents a large-scale network eavesdropper, E2 represents a hacker group exploiting information system vulnerabilities to intrude, and E3 represents a malicious administrator who has gained access to the business system. The following sections illustrate the three typical attack scenarios, demonstrating the vulnerability of existing encrypted communication systems to behavioral analysis attacks leveraging metadata, potentially leading to user privacy breaches and even more serious consequences.

[0036] (1) There is large-scale monitoring of the network. Based on the public information that has been disclosed, whether it is governments, network operators, cloud service providers, or community mobile communication base stations, they all have the ability to monitor encrypted communication channels. Although the monitor E1 may not be able to crack the encrypted channel and directly obtain the private information transmitted by the channel, it can use a technical method similar to the encrypted channel behavior identification method. Based on the two-way encrypted channel communication information between A and S, it can reveal the statistical laws of communication between A and S, thereby matching the specific business behavior carried internally. It can also further match the network address to the real-world physical address to provide a more detailed portrait of the real user.

[0037] For example, address S represents a bank's online business system. Because this system is public, any depositor can log in. If an attacker studies the system's communication patterns and discovers that the system sends different information to depositors with high assets than to regular depositors, they could exploit this pattern and, based on statistical analysis of the volume and frequency of encrypted messages exchanged between the user address and the bank address over the encrypted channel, identify a specific network address as corresponding to a depositor with high assets, without decrypting the information. This network address could then become the target of further cyberattacks.

[0038] The encrypted channel behavior analysis attack method is based on the connection time, number of calls, communication data volume, etc. that occur on the network address of two-way interaction. Without invading the encryption system or encrypted channel, it can use statistical characteristics and predicted information to identify the network address information of encrypted communication, and further use the telecom operator data to trace the network address to the physical address, extending the network attack to reality.

[0039] (2) Information network systems have exploitable vulnerabilities. Given the current frequent occurrence of security incidents, most information network systems may be subject to such risks. A typical security incident is the Log4J vulnerability in 2021, which put a large number of network business systems around the world at risk of being invaded, including financial institutions, government websites, etc. There is a possibility of being invaded, and whether the invasion has led to the leakage of a large amount of user information is no longer traceable.

[0040] use Figure 3 In the middle model, E2 represents an attacker capable of invading information systems. In the worst-case scenario, E2 can control S and analyze the historical records in S to locate and track user A's network address and reveal the daily behavior corresponding to the network address.

[0041] Taking a multi-layered nested VPN (Virtual Private Network) system as a specific example, A may not reveal his or her real network address to S. However, when E2 controls S, based on the interaction between A's address and S, E2 only needs to add certain channel characteristics based on two-way interaction, such as time, duration, and communication volume, to the information S replies to A's address. In this way, E2 can collude with E1 to trace and locate A's real network address, and then trace it back to the real individual by combining it with the telecom operator's data.

[0042] (3) There are malicious administrators in the business system. A typical event is that a department can order a company to hand over certain user data on the server. At this time, the company becomes a malicious administrator for anyone who uses the company's business system, and all users on it may be harmed. Specifically, the malicious administrator E3 can achieve full control of the business system by colluding with E2 and E1. Without destroying the information integrity of A and S, the privacy of the encrypted channel, user identity verification, and user non-repudiation, the communication content of address A is continuously monitored, and the address A is linked to the telecom operator database to locate individuals in the real world. Although this is reasonable from the administrator's perspective in some cases, it has seriously violated user privacy. It is not ruled out that in some extreme cases, malicious administrators may endanger the personal life and property safety of each user through the same method.

[0043] Another typical example is that the person in charge of network management in a banking group may access the bank's business system log records and then discover that a commonly accessed address corresponds to a user with a net worth of over 100 million yuan. He or she may then conspire with a hacker organization to carry out network attacks and online fraud against this user's network address.

[0044] In summary, current encrypted communication systems focus solely on confidentiality, non-repudiation, identity authentication, and integrity, but lack comprehensive protection for metadata, particularly information such as network addresses and user behavior. This makes current information network systems vulnerable to attacks such as large-scale surveillance, information system vulnerability exploits, and malicious internal administrators, making them difficult to effectively protect. Therefore, embodiments of the present invention provide an encrypted communication system and method that can be applied to applications requiring encrypted communication.

[0045] To facilitate understanding of this embodiment, an encryption communication system disclosed in an embodiment of the present invention is first introduced. Figure 4As shown, the system includes: multiple user terminals 40, a registration and deregistration server 41, a data processing server 42, and a database server 43; wherein, each user terminal 40 includes: a first sub-terminal 401 and a second sub-terminal 402; the network addresses corresponding to the first sub-terminal 401 and the second sub-terminal 402 are different; each of the above-mentioned user terminals 40 can be divided into two parts, namely the first sub-terminal 401 and the second sub-terminal 402, wherein the first sub-terminal 401 is mainly used for user registration, deregistration, group query, etc., and does not involve any business information. The first sub-terminal 401 can also be called a registration terminal, and the network address used is called a registration address; the second sub-terminal 402 is mainly used for sending and receiving business data. The second sub-terminal 402 can also be called a business terminal, and the network address used is called a business address.

[0046] For each user terminal 40, the first sub-terminal 401 is used to send a first instruction message to the registration and deregistration server 41; wherein the first instruction message is registration request information or deregistration request information; in actual implementation, the user can use the registration address corresponding to the first sub-terminal 401 to access the registration and deregistration server 41, and submit registration request information such as a certificate and a registration instruction to register; or, the user can use the registration address corresponding to the first sub-terminal 401 to access the registration and deregistration server 41, and submit deregistration request information such as a certificate and a deregistration instruction to deregister.

[0047] The registration / deregistration server 41 is configured to determine the first group corresponding to the current user based on the first instruction information and send the number of users in the first group to the corresponding data processing server 42; determine user data corresponding to the current user through the first sub-terminal 401, and send the user data to the second sub-terminal 402; the user data includes the service serial number YWid corresponding to the current user and multiple shared keys corresponding to the current user and each other first user in the first group;

[0048] The above-mentioned business serial number YWid can be used to identify the current user. Different users correspond to different business serial numbers, that is, the user and the business serial number are in a one-to-one correspondence; the above-mentioned shared key is usually determined based on the user private key of the current user and the second public key of each other first user in the first group. The user private key can be calculated with the second public key of each first user according to the preset calculation method to obtain multiple shared keys corresponding to the current user and each other first user; in actual implementation, the registration and deregistration server 41 usually receives instruction information sent by multiple users. Therefore, after receiving the first instruction information sent by the current user, the current user and other users can be grouped to determine the first group corresponding to the current user, and the number of users in the first group can be sent to the corresponding data processing server 42; the first sub-terminal 401 can also determine the business serial number YWid corresponding to the current user, as well as the multiple shared keys corresponding to the current user and each other first user in the first group, and send this information to the corresponding second sub-terminal 402.

[0049] The second sub-terminal 402 is used to generate a first key S corresponding to the current user based on multiple shared keys and a preset first prime number P. i ; Based on the preset public key algorithm, generate the user public key pubKey corresponding to the current user i and user private key priKey i ; Based on the business serial number YWid and the first key S i The user's public key pubKey i Sent to the data processing server 42; based on the business serial number YWid and the first key S i Splitting, concatenating and encrypting the requests to be processed, and sending the processed messages to the data processing server 42;

[0050] The above public key algorithm can be implemented by using RSA algorithm (an asymmetric encryption algorithm); in actual implementation, the second sub-terminal can perform corresponding calculations based on the received multiple shared keys and the preset first prime number P to generate the first key S corresponding to the current user. i ; You can also use public key algorithms such as RSA algorithm to generate user public key pubKey i and user private key priKey i Before sending the pending request to the data processing server 42, it is usually based on the business serial number YWid and the first key S i The user's public key pubKey i Sent to the data processing server 42; then based on the business serial number YWid and the first key S iThe requests to be processed are segmented, concatenated and encrypted to obtain processed messages, which are sent to the data processing server 42. The processed messages are usually multiple encrypted concatenated blocks corresponding to the requests to be processed.

[0051] The data processing server 42 is used to combine and calculate the processed messages corresponding to all users in the received first group based on the number of users, perform decryption processing, perform data splicing and recovery based on the business serial number YWid to obtain the recovered pending request sent by each user in the first group, forward each recovered pending request, and receive a response message corresponding to each recovered pending request, encrypt each response message using the user public key pubKeyi corresponding to the business serial number YWid to obtain each encrypted response message, and save each encrypted response message to the database server 43;

[0052] In actual implementation, since the data processing server 42 receives processed messages corresponding to all users in the first group, and the processed messages corresponding to each user are usually multiple encrypted spliced ​​blocks, it is necessary to merge and calculate these received processed messages, decrypt them, and splice the data belonging to the same business serial number according to the business serial number YWid to restore the restored pending requests corresponding to each user in the first group. Each restored pending request can be sent to the business server connected to it, and the response message corresponding to each restored pending request returned by the business server is received. The user public key corresponding to the business serial number is selected to encrypt each received response message, and each encrypted response message is sent to the database server 43 for storage.

[0053] The second sub-terminal 402 is used to send a query request to the database server 43 to obtain each encrypted response message from the database server 43 and to obtain the encrypted response message based on the user private key priKey corresponding to the current user. i An attempt is made to decrypt each encrypted response message, and a response message corresponding to the second sub-terminal is obtained based on the successfully decrypted message.

[0054] The second sub-terminal 402 can periodically send a query request to the database server 43 to request the latest message in the database server 43. After receiving the query request, the database server 43 can return each encrypted response message to the second sub-terminal 402. The second sub-terminal 402 can be based on the user private key priKey of the current user. iTry to decrypt each encrypted response message. Since each encrypted response message received by the second sub-terminal 402 includes not only the response message required by itself but also the response messages required by other users in the first group, the second sub-terminal 402 uses the user private key priKey i Only the response message required by itself can be successfully decrypted, and the response messages corresponding to other users will fail to be decrypted. Finally, the successfully decrypted message can be used as the response message belonging to the second sub-terminal 402.

[0055] For easier understanding, see Figure 5 The diagram shows a schematic diagram of an encrypted communication system. This system builds upon the existing star-shaped encryption system structure by adding three components: RegS (corresponding to the registration and deregistration server mentioned above), Agent (corresponding to the data processing server mentioned above), and DB (Data Base; corresponding to the database server mentioned above). S remains the original service server and remains unchanged. The diagram includes three user terminals, each of which is divided into two parts. One part, such as A, B, and C in the diagram, is still used for sending and receiving service data. These terminals are called service terminals (corresponding to the second sub-terminal mentioned above), and their network addresses are service addresses. The other part, such as Aˋ, Bˋ, and Cˋ in the diagram, is used for user registration, deregistration, group query, etc., and does not involve any service information. These terminals are called registration terminals (corresponding to the registration terminal mentioned above), and their network addresses are registration addresses.

[0056] Figure 5 The first stage is called the user registration / deregistration stage. Users register by accessing RegS using their registered address and submitting their credentials and registration instructions. Alternatively, users deregister by accessing RegS using their registered address and submitting their credentials and deregistration instructions. RegS then sets user groups and the corresponding Agent and DB information for each group based on the actual number of users and the grouping threshold. It then provides the public key information of each user in the group.

[0057] like Figure 5 The second stage is called the initialization stage. The user uses the registered address to interact with RegS. After the interaction, RegS also synchronizes the interaction results to the Agent, thus completing the initialization of the system key information.

[0058] like Figure 5 The third stage is called the one-way sending stage. The user uses the business address to send the pending request to S, which is then divided, encapsulated, encrypted, and sent to the Agent in one direction.

[0059] like Figure 5The fourth stage is called the aggregation calculation stage. The Agent receives the ciphertext blocks sent by each user in one direction, and extracts the synchronized ciphertext blocks in sequence to perform the combined calculation and decrypt the information.

[0060] like Figure 5 Phase ⑤ is the fifth phase, called the request recovery phase. The Agent assembles the block information sent by each user to recover the original pending request sent by the user to S.

[0061] like Figure 5 The sixth stage is called the simulated communication stage. The Agent simulates the user, sends a request to S after recovery, and receives a response message from S.

[0062] like Figure 5 The seventh stage is called the response storage stage. The Agent processes the response message returned by S and sends it to the DB for storage.

[0063] like Figure 5 The eighth stage is called the privacy query stage. The user uses the business address to query the latest response message of the DB. After decryption, each user obtains the corresponding response message of S.

[0064] like Figure 6 The diagram below illustrates the operational flow of an encrypted communication system, describing its eight main phases. Initialization is required whenever a user registers or deregisters. Under normal communication, communication between the user terminal and the S server proceeds in a request / response fashion. Each request message begins with a one-way send phase, progressing through aggregation calculation, request recovery, simulated communication, result storage, and private transmission. Ultimately, the user terminal receives a response message from S, completing the entire communication loop. The one-way send-to-aggregation calculation is performed periodically, regardless of whether the user actually sends a message. This means that each user simultaneously and periodically encrypts and sends data in a one-way manner. The agent performs aggregate calculations in batches, decrypting the data and extracting and recovering the request information. If the agent's aggregate calculation fails, it indicates a loss of synchronization in the one-way transmission. The user group is then disbanded, resources are recycled, and all users re-register.

[0065] The aforementioned encrypted communication system obfuscates user communication metadata, enhancing its security. This system protects user communication metadata, including service communication time, duration, and data volume, and disassociates user addresses from their service communication information. This prevents attackers from exploiting metadata to analyze user behavior, collect user privacy, or locate users.

[0066] Furthermore, for each user terminal, the first sub-terminal of the user terminal is used to generate a first random number, and the first random number is used as the first private key InitX of the current user. i ; According to the first private key InitX i And the preset initialization prime number InitP, calculate the first public key InitYi corresponding to the current user;

[0067] The following first describes the setting method of some key parameters of the system:

[0068] The user grouping threshold set by the system is yN, which is the maximum number of users in each group;

[0069] The system's preset first prime number for message encryption is P, and the bit length is LenP;

[0070] The preset initialization prime number used for system initialization is InitP;

[0071] The length of the system message block is L bits;

[0072] The system sets a preset prime number table PT, which is filled with prime numbers 2, 3, 5, etc. in natural numbers, with a total number of 2. L indivual;

[0073] The bit length of the last prime number in the preset prime number table PT is recorded as LLast, then yN should be less than LenP / LLast, and the bit length of yN should be less than L divided by 2.

[0074] If the preset first prime number P used for message encryption is 1024 bits in length, L is 24, and the estimated LLast length is less than 30 bits, yN can be between [3, 34].

[0075] The above preset initialization prime number InitP is a prime number selected by the system, and the optional length is generally 2048 bits. Similarly, InitX i The length should be consistent with InitP; Figure 7 The diagram of a user registration / logout process shown in FIG. 1 is a diagram of a user registration / logout process shown in FIG. 1 . In actual implementation, Figure 7 ⑨ in the process is the user information submission sub-stage. In this sub-stage, each user's first sub-terminal generates a first random number InitX by itself. i , and calculate the first public key InitY based on the preset initialization prime number InitP i , which can be calculated according to the following formula:

[0076]

[0077] Among them, mod represents the modulo operation, that is, the remainder operation.

[0078] Each user saves their own corresponding (InitX i ,InitY i ).

[0079] The first sub-terminal is used to send a first instruction message to the registration and deregistration server; wherein, if the first instruction message is a registration request message, the registration request message includes the registration instruction and the first public key InitY corresponding to the current user i If the first instruction information is a logout request information, the logout request information includes a logout instruction and the first public key InitY corresponding to the current user i ;

[0080] When the current user needs to register, he can submit a registration request message to the registration and deregistration server through the first sub-terminal. The registration request message includes (registration instruction, InitY i When the current user needs to log out, he can submit a logout request message to the registration and logout server through the first sub-terminal. The logout request message includes (logout instruction, InitY i ). The registration instruction and the deregistration instruction can also be replaced by letters, numbers or identifiers.

[0081] The registration and deregistration server is used to determine the first group corresponding to the current user according to the first instruction information; and send the second public key corresponding to each other first user in the first group to the first sub-terminal;

[0082] The first sub-terminal is used to determine the first private key InitX of the current user. i , the second public key corresponding to each other first user in the first group and the preset initialization prime number InitP, calculate the multiple shared keys InitK corresponding to the current user and each other first user in the first group ij .

[0083] In actual implementation, the registration and deregistration server can determine the first group to which the current user belongs based on the first instruction information, and each other first user in the first group can determine their corresponding second public key in the above manner. The registration and deregistration server can send the second public key corresponding to each first user to the first sub-terminal of the current user. For example, the registration and deregistration server can publicly publish the updated information of each group through the Web service provided by the registration and deregistration server. The current user can access the Web server page in time and log in according to the first public key InitY submitted by himself. i , query the first group to which the user belongs and the second public key corresponding to each other first user in the first group, and download the second public keys of all first users in the first group to the local computer.

[0084] After the current user knows the first group to which he belongs, assuming that the number of users in the first group is n, each user in the first group uses the following sequencing algorithm to reconstruct the service sequence number. First, the shared key InitK needs to be calculated. ij Specifically, the current user i can use his first private key InitX i , and the second public key InitYj of other first users j (j≠i) in the group, calculate the shared key InitK ij , which can be calculated according to the following formula:

[0085]

[0086] Furthermore, the registration and deregistration server is used to determine whether there is user information of other users in the registration and deregistration server if the first instruction information is a registration request information; if the number of other users is less than two, record the first public key InitY corresponding to the current user i , determine the user group corresponding to the current user and other users, the group number corresponding to the user group, and the user number corresponding to each user in the user group;

[0087] If the number of other users is not less than two, when the number of users in the last user group is greater than a preset number threshold, a new user group is generated; wherein the preset number threshold is the preset user group threshold plus one; the new user group includes: users in the last user group whose user numbers are greater than or equal to the user group threshold, and the current user;

[0088] Among them, different user groups correspond to data processing servers with different addresses and / or ports, and different user groups correspond to database servers with different addresses and / or ports; each user in the same user group corresponds to a data processing server with the same address and port, and a database server with the same address and port.

[0089] like Figure 7 ⑩ in the figure is the user grouping stage in the process, which is executed after the registration and deregistration server receives the first instruction information. If the first instruction information is a registration request information, the following algorithm can be used to group users:

[0090] Step 0: Executed only when system resources change or the system is initialized. Number the addresses of Agent and DB resources in the system, starting from 0, and the sequence number corresponds to the groupid.

[0091] Step 1: If there are no users or fewer than two users in the current RegS system, only the new user's public key is registered, and a group ID and user ID within the user group are assigned, starting at 0. After the first user is registered, the RegS system generates a record (0, 0, Agent address and / or port, DB address and / or port), associating the user with the Agent and DB resources using the group ID.

[0092] If the number of users in the ResS system is greater than or equal to 2, execute Step 2.

[0093] Step 2: In this embodiment, each group needs to contain at least three users. If the userid of the last record in the current RegS system is greater than (yN+1), a new group is established and a new group number is assigned incrementally by 1, that is, new_groupid is equal to the groupid of the last record+1. New members are assigned to the new group, including users in the previous group whose userid is greater than or equal to yN, and the corresponding Agent address and DB address are assigned. In actual implementation, when the number of users is small, all users can be grouped in one group and use the same Agent and DB. Taking into account the actual limitations of computing resources, when the number of users is large, users need to be grouped. Grouping can achieve the effect of enhancing network stability. Different user groups correspond to data processing servers with different addresses and / or ports, and database servers with different addresses and / or ports.

[0094] Step 3: If the userid of the last record in the current RegS is not greater than (yN+1), then add a new data record, where the groupid is equal to the groupid of the last record, the userid is the userid+1, and the address is equal to the Agent address and DB address in the above record.

[0095] The registration / deregistration server is configured to change the group information using the following algorithm if the first instruction information is a deregistration request information:

[0096] Step 0: According to (groupid, userid), start from (0, 0) and query the data records corresponding to the registered users in RegS in sequence, and match and confirm them one by one according to the public key information that needs to be cancelled. If there is no match, the subsequent steps will not be executed.

[0097] Step 1: If the public key information under a certain (groupid, userid) entry is matched, the entry will be deleted, and the values ​​of all userids in the group that are greater than the current entry will be adjusted, and reduced by 1 respectively.

[0098] Step 2: If the user IDs of all users in the current group after adjustment are all less than 2, then all entries in the group will be deleted simultaneously, and re-registration is required. Also, the Agent address and DB address will be returned to the end of the address sorting, waiting to be re-allocated for use. The algorithm given in this embodiment only has a security effect when the number of users in the group is greater than or equal to 3. Therefore, if the number of users is less than or equal to 2, that is, the group numbers are all less than 2, then the group will be disbanded and communication cannot be carried out according to the subsequent algorithm. After the group is disbanded, the Agent and DB resources originally corresponding to the group can be recycled and re-allocated for use.

[0099] After registration and cancellation, the updated data records will be publicly released through the Web service provided by RegS.

[0100] Furthermore, the first sub-terminal is also used to calculate the initialization key InitS corresponding to the current user based on multiple shared keys InitK within the first group ij , the preset first group common information InitInfo1, and the preset first prime number P. i ;

[0101] The above-mentioned first group common information InitInfo1 can be groupid, the address information of RegS, the Agent and DB address information allocated to the group, or a combination of these common information, etc., which can be uniformly set by the system. In order to reconstruct the service serial number, after calculating the above-mentioned shared key InitK ij , the first sub-terminal can calculate the initialization key InitS corresponding to the current user based on multiple shared keys InitK within the first group ij , the preset first group common information InitInfo1, and the preset first prime number P according to the following calculation formula i :

[0102]

[0103] The above-mentioned PRF (Pseudo-Random Function) is a pseudo-random generation algorithm. When j > i, it is true, and this expression is equal to 1; when j < i, it is false, and this expression is equal to 0; substituting into the above formula (-1) j>i , in the case of j > i, it is equal to -1; in the case of j < i, it is equal to 1.

[0104] The first sub-terminal is used to generate a second random number Comp with a bit length less than L i , and use the second random number Comp i as the index serial number to query the preset prime number table PT to obtain the corresponding first sub-prime number P i1 ; Based on the first sub-prime number Pi1 , the second group has the common information InitInfo2 and the initialization key InitS i , calculate the first ciphertext E(P i1 ); the first ciphertext E(P i1 )Send registration and deregistration to the server.

[0105] The above preset prime number table PT is filled with prime numbers 2, 3, 5, etc. in natural numbers in sequence, and the total number is 2 L Where L corresponds to the message block length L bits; the first sub-terminal can generate a second random number Comp i , whose length does not exceed the message block length L bits; the second random number Comp i As the index number, query the preset prime number table PT to get the corresponding first sub-prime number P i1 , based on the shared information InitInfo2 in the second group, the first ciphertext E(P i1 ):

[0106]

[0107] The second intra-group shared information InitInfo2 may include groupid, address information of RegS, Agent assigned to the group, DB address information, etc. This embodiment provides a setting in which the first intra-group shared information InitInfo1 and the second intra-group shared information InitInfo2 are the same. In practice, in a specific implementation, the first intra-group shared information InitInfo1 and the second intra-group shared information InitInfo2 may be completely different. This is usually a setting built into the software and may be public information. Information shared within the group does not affect subsequent security and is only used in the multi-party collaborative computing process.

[0108] Each other first user in the first group can calculate and obtain the corresponding first ciphertext according to the above method.

[0109] Furthermore, the registration and deregistration server is used to calculate a first result M1 based on the first ciphertext corresponding to each user in the received first group and the preset first prime number P; the registration and deregistration server is used to determine, for each prime number in the preset prime number table, whether the prime number is a factor of the first result M1, and if the prime number is a factor of the first result M1, obtain the serial number corresponding to the prime number; sort the obtained multiple serial numbers in ascending order to obtain an ordered list R; and send the ordered list to the first sub-terminal so that the current user can select the first result M1 according to the second random number Comp i The serial number in the ordered list determines the service serial number YWid corresponding to the current user.

[0110] In actual implementation, after the registration / deregistration server receives the first ciphertext corresponding to each user in the first group, it can calculate the first result M1 according to the following formula:

[0111]

[0112] The registration and deregistration server uses the prime numbers in the preset prime number table PT to calculate the first result M1 one by one, and detects whether the prime number is a factor of the first result M1. If so, the serial number corresponding to the prime number is used as a decryption result to obtain a set of serial numbers. This set is sorted from small to large, and the final decryption result is an ordered list R.

[0113] If the number of elements in the finally obtained ordered list R is n (corresponding to the number of users in the first group), RegS publishes the ordered list R on the Web page; otherwise, it does not publish it.

[0114] The user queries the ordered list R published on RegS. If there is one, the current user i downloads the ordered list R and queries the second random number Comp generated by himself. i The serial number in the ordered list R is used as the service serial number YWid corresponding to the current user; if it is not published, all users in the first group re-execute the first sub-terminal for generating the second random number Comp i steps until RegS publishes the ordered list R on the Web page.

[0115] The following needs to synchronize the number of users, such as Figure 7 In the example, RegS submits the number of users in the group corresponding to each Agent address to the Agent. If the number of users in the group remains unchanged, no submission is made to the corresponding Agent. The submission process can also be published through the RegS web page, and the Agent can periodically query the latest user count.

[0116] The following describes the initialization process. Each user completes the initialization on their own second sub-terminal and does not need to interact with other terminals or modules. The initialization algorithm is:

[0117] Step 1: The current user i will share the key InitK ij Transferring from the first sub-terminal to the second sub-terminal for use, secure transfer methods include manual input, CD burning and other offline methods.

[0118] Step 2: The current user i uses the shared InitK on the second sub-terminal ij As input, calculate the first key S i The specific calculation can be done using the following formula:

[0119]

[0120] PRF is a pseudo-random generation algorithm, and its input can be InitKij, or a combination of InitKij and public information within the group, such as groupid.

[0121] This S i That is, it is the first key used when the user sends data in one direction.

[0122] Step 3: The user generates an RSA public-private key pair (priKey i ,pubKey i In actual implementation, the RSA2048 algorithm may be uniformly adopted, or the ECC (Elliptic Curve Cryptography) algorithm may be adopted.

[0123] Furthermore, the second sub-terminal is configured to convert the request to be processed into a bit string, and segment the bit string according to a preset length to obtain a plurality of segmented blocks; wherein the preset length is the difference between a preset message block length L and a bit length corresponding to a preset number threshold; sequentially concatenate each segmented block with the service sequence number YWid to obtain a concatenated block; wherein the service sequence number YWid is in a high order bit of the concatenated block; and determine a block sequence based on each concatenated block;

[0124] The first splicing block in the block sequence is used as the current splicing block, and the current splicing block is filled into the preset message register RM; according to the value of the message register RM, the corresponding second sub-prime number P is matched from the preset prime number table PT. i2 ; Based on the second sub-prime number P i2 , the value of the preset counter, the first key S i and the preset first prime number P, calculate the second ciphertext E(P i2 ); the second ciphertext E(P i2 ) is sent to the data processing server to update the value of the counter; the next splicing block in the block sequence is used as the new current splicing block, and the step of filling the current splicing block into the preset message register is repeated until the second ciphertext E(P) corresponding to the last splicing block in the block sequence is obtained. i2 ) is sent to the data processing server.

[0125] Furthermore, the second sub-terminal is also used to periodically obtain the value in the preset message register, and according to the value of the message register, obtain the corresponding third sub-prime number P from the preset prime number table. i3 ; Based on the third prime number P i3 , the value of the preset counter T, the first key S iAnd the preset first prime number P, calculate the third ciphertext E(P i3 ); Send the third ciphertext E(P i3 ); update the value of the counter; when there is no pending request, generate a third random number, splice the third random number to the business serial number YWid, obtain a splicing result, and fill the splicing result into the preset message register; repeat the step of periodically obtaining the value in the preset message register.

[0126] In actual implementation, Figure 8 The figure shows a schematic diagram of a one-way message transmission process. This figure shows a user message transmission diagram in a one-way transmission process. All users will send periodic messages to the agent in a one-way transmission process. The one-way transmission process is divided into two parts: one is the one-way transmission sub-process, and the other is the message segmentation sub-process.

[0127] The following first describes the one-way sending sub-process:

[0128] The one-way sending sub-process is executed independently and cyclically in a separate process to ensure uninterrupted sending in a timed and quantitative manner. The program is executed on the second sub-terminal.

[0129] The system is pre-set with a heartbeat value hearttime, which can be set to 10 milliseconds without loss of generality to ensure that each node can effectively complete the process calculation and processing.

[0130] The system sets a message register RM of Lbit length and sets RM to 0 initially. The system sets a counter and sets the counter value to 65537 initially. The system also sets a time register.

[0131] Step 1: Query the current system time systime. If systime – time is greater than or equal to hearttime, execute Step 2. Otherwise, loop through Step 1. systime is the current actual time, and time is the time when data was last sent to the data processing server.

[0132] Step 2: According to the value of the message register RM, match the row number in the preset prime number table PT, and query the prime number of the corresponding row, which is the third sub-prime number P i3 .

[0133] Step 3: The current user i uses the following formula to calculate the third ciphertext E(P i3 ):

[0134]

[0135] Step 4: The current user i uses the second sub-terminal to convert the third ciphertext E(Pi3 ) is sent to the Agent.

[0136] Step 5: The counter value T for the current user i is incremented by 1, and time is updated to equal systime. T can also be set to other values ​​each time it is incremented, as long as it is consistent across all users in the group.

[0137] Step 6: Generate a third random number and fill it with the message register RM together with YWid. You can use a direct concatenation method, with the high bit being YWid and the low bit being the third random number. Loop back to Step 1.

[0138] The hash function can be selected from commonly used cryptography algorithms such as SHA1 (Secure Hash Algorithm), SHA256, SHA512, etc., or a hash algorithm with a salt value can be used, for example, the Agent address or DB address shared within the group can be used as the salt value.

[0139] The following describes the message segmentation sub-process:

[0140] Before sending a pending request for the first time, you need to first send the current user's public key pubKey i Send it to the Agent and run the message splitting sub-process in the following steps to complete the user public key pubKey i The data is processed in blocks and sent through a one-way sending sub-process.

[0141] Furthermore, for each pending request Req to the business server S, a message splitting sub-process needs to be run separately to complete the block processing of the pending request, and the sending is completed through the one-way sending sub-process.

[0142] The message segmentation sub-process steps are as follows:

[0143] Step 1: Convert the pending request to be sent into a bit string and divide it into multiple blocks according to the preset length SL, where the preset length SL is the message block length L minus the preset number threshold (yN+1) in bits.

[0144] Step 2: Concatenate each segmented block with the current user's service sequence number YWid in sequence, with the high bit being YWid and the low bit being the segmented block, to construct a new block sequence.

[0145] Step 3: Take the first block in the block sequence as the current block, fill the current block into the message register RM, and record the current counter value. Follow the steps in the above one-way sending sub-process, match the row number in the preset prime number table PT according to the value of the message register RM, and query to get the prime number of the corresponding row, which is the second sub-prime number P. i2 , according to the calculation method in the above formula 2, the second sub-prime number P i2 Replace the third sub-prime number P in Formula 2 i3 , calculate and get the second ciphertext E(P i2 ), and the second ciphertext E(P i2 ) is sent to the Agent. If the block sequence has reached the end, the process is exited.

[0146] Step 4: If the block sequence has not reached the last one, check the current counter value T. If the counter value T has increased by 1, it means that a message has been sent to the data processing server, and then loop through Step 3. If the counter value T does not change, loop through Step 4.

[0147] Furthermore, the data processing server is used to receive the target ciphertext according to the address of the second sub-terminal, and store it in the corresponding ciphertext block queue in order according to the address, and each time calculate the second result M2 according to the target ciphertext at the same position in each ciphertext block queue and the first prime number P; wherein the target ciphertext is the second ciphertext E(P i2 ) or the third ciphertext E(P i3 );

[0148] The data processing server is used to determine whether each prime number in the preset prime number table PT is a factor of the second result M2, and if the prime number is a factor of the second result M2, obtain the serial number corresponding to the prime number; the data processing server is used to obtain a decryption result set based on the multiple serial numbers obtained; according to the business serial number YWid, exclude the third random number from the decryption result set, and recover the recovered pending request corresponding to the business serial number YWid.

[0149] After completing the above one-way sending process, the data processing server performs an aggregate calculation processing process. The data processing server only needs to know the number of users in the first group. The number of users is synchronized by the registration and deregistration server after the user registers.

[0150] The data processing server needs to set up three groups of queues for each user according to the number of users. The first group of queues QEi is used to store the second ciphertext E(P i2); the second queue QRi is used to store the splicing blocks of the current user i; the third queue QMi is used to store the recovered pending requests of the current user i to be sent to the service server S. At the same time, the data processing server sets a public key list corresponding to the service sequence number YWid.

[0151] Step 1: The data processing server takes out a second ciphertext E(P i2 ). If some queues are empty, you need to wait until all queues are not empty.

[0152] Step 2: The data processing server calculates the second result M2 according to the following formula. It should be noted that the second ciphertext sent synchronously by the users in the group is required here, and the synchronized second ciphertext is used for calculation.

[0153]

[0154] Step 3: The data processing server uses the prime numbers in the preset prime number table PT to calculate the second result M2 one by one, and detects whether the prime number is a factor of the second result M2. If so, the serial number corresponding to the prime number is taken as a decryption result and recorded in the decryption result set.

[0155] Step 4: The data processing server loops through each element in the decryption result set. If the YWid corresponding to the high-order portion is repeated, it indicates that the system has lost synchronization. Alternatively, it can be understood that the YWid corresponding to each user in the first group is different. If there is a duplicate, it indicates an anomaly. At this point, the data processing server can feedback to the registration and deregistration server to cancel the group, recycle the Agent and DB resources, and exit the process. If the verification passes, the process continues to loop.

[0156] After completing the aggregation calculation processing, the request recovery processing can be performed. Specifically, for each element Info in the decryption result set, YWid is taken out according to the high-order part of Info, and the second group of queues QRi is indexed according to the corresponding YWid and i. An element is added to the end of the second group of queues QRi. The added element is equal to Info minus the low-order part of YWid.

[0157] The data processing server needs to cyclically check the second queue QRi. Once it can reconstruct the complete pending request in bit order starting from the first segment, it will store the pending request in the corresponding third queue QMi and remove the reconstructed segment from the second queue QRi.

[0158] The first message sent by the current user to the data processing server through the second sub-terminal will be the current user's user public key pubKey i , each user's public key corresponds to the user's business serial number one by one, and the user's public key pubKey can be reassembled through the above steps according to the business serial number YWid i Then, store it in the public key list. i It should be used to encrypt the subsequent response message corresponding to the YWid sequence number.

[0159] Furthermore, the data processing server is communicatively connected with a preset business server; the data processing server is used to send each restored pending request to the business server, and receive a response message corresponding to each restored pending request returned by the business server; according to the business serial number YWid corresponding to each restored pending request, the user public key pubKeyi corresponding to each business serial number YWid is determined, and each response message is encrypted using each user public key pubKeyi to obtain each encrypted response message.

[0160] The data processing server checks the messages in each third group queue QMi, and starts the communication program in sequence according to the messages in each third group queue, simulating the user sending the restored pending request to the business server S, and receiving the response message Resp at the same time.

[0161] The above simulated communication process, i.e., utilizing the user's pending request to complete the request-response communication process to the service server S, can be designed individually according to the service server S. For details, please refer to the service server S interface and the disclosed technical methods.

[0162] Based on the simulated communication process described above, each response message can be mapped to its corresponding service serial number YWid. The service serial number YWid is indexed into the public key list, and the corresponding user public key is retrieved to encrypt each corresponding response message. For specific public key encryption methods, reference can be made to publicly available technical methods and will not be detailed here. The corresponding message after public key encryption is transmitted and stored in the database server.

[0163] Furthermore, the second sub-terminal is used to periodically send query requests to the database server; the database server is used to establish a message queue corresponding to the second sub-terminal according to the network address corresponding to the second sub-terminal, and store each encrypted response message in the message queue; all encrypted response messages in the message queue are packaged and returned to the second sub-terminal; the second sub-terminal is used to use the user private key priKey corresponding to the current user i The packaged message is decrypted attempively, and a message corresponding to the second sub-terminal is obtained based on the successfully decrypted message.

[0164] like Figure 9 The following diagram shows a private information query process. Each user in the group can periodically query the database server for the latest messages. The database server follows the following steps to ensure that all the latest messages are sent to each user in the group.

[0165] Step 1: The database server records each newly visited address and creates a new message queue based on the new address. Specifically, a separate message queue can be created for each second sub-terminal's address, with each message queue storing the same content. In actual implementation, considering that different users in the same group have varying query frequencies, setting up separate message queues allows each user to access their own message queue, thus preventing missed messages.

[0166] Step 2: Every time the data processing server sends a new encrypted response message to the database server, the database server copies the latest encrypted response message to the end of each message queue.

[0167] Step 3: If the user follows Figure 8 As shown in ①, a query request is sent to the database server through the second sub-terminal, and the database server packages all encrypted response messages in the message queue corresponding to the address of the second sub-terminal and sends the packaged messages to the second sub-terminal at one time, as shown in Figure 9 As shown in ②. After sending, the message queue corresponding to the address is cleared.

[0168] Step 4: After receiving the packaged message, each user verifies whether they can use their own private key to decrypt each encrypted response message in the packaged message. If not, the encrypted response message does not belong to them. If they can decrypt it, they recover the response message from the decryption result.

[0169] In this embodiment, during the privacy query phase, in order to ensure that an eavesdropper cannot distinguish between each user, the second sub-terminal of each user should use the same cycle to regularly execute message queries from the second sub-terminal to the database server.

[0170] The following describes an application scenario for protecting user IP address information during interactions with a bank website. During implementation, a RegS website is set up to accept user registrations, register the user's public key information, and initialize the IP address information. A group of (Agent, DB) servers is set up to provide computing resources. After the user registers on the RegS website, the user can send the business request message to the bank website to the Agent according to the method in this technical solution, and the Agent will act on behalf of the user to complete the interaction with the real bank website. The user obtains the public key encrypted response result by querying the DB server, and attempts to decrypt it using his own user private key. The truly matching user private key can correctly decrypt it, thus completing a business interaction. The user continues to send business request messages to the Agent, thereby completing multiple business interactions. After the user completes this business interaction, the business terminal will continue to run to ensure that all users in the group send corresponding information to the Agent.

[0171] This data encryption system can provide more comprehensive protection than current encrypted communication systems. However, when deploying this system, it is still necessary to ensure that data processing and database servers cannot be controlled by attackers to improve system security and ensure operational efficiency. Although data processing and database servers cannot analyze metadata and cannot identify and distinguish user business addresses, bank websites should also add audits and constraints to the RegS website to ensure that computing resources truly serve users in need.

[0172] The following describes the alternative solutions to this application:

[0173] 1. Users can be grouped together; instead, all users are grouped together. When there are many users, a larger preset first prime number P is required to satisfy the fundamental theorem of arithmetic.

[0174] 2. User grouping algorithms can be replaced;

[0175] An alternative solution is to randomly insert new users into each group, and RegS (i.e., the registration and deregistration server) re-divides the user groups according to the user group threshold;

[0176] Another alternative is to group Agents (data processing servers) and DBs (database servers) based on their computing power, not by thresholds, but by resource support capabilities.

[0177] Another alternative is to group users by pre-defined business types, such as visits to facebook.com and icbc.com.cn. The users are then selected when their registered address accesses the RegS website and submits their public key. This approach allows for specialized agent deployment, meaning that the same agent can be used for several business types.

[0178] 3. For the privacy query process, an alternative solution is to adopt a privacy information extraction algorithm based on ID (Identity Document). For details, please refer to relevant technologies and will not be repeated here.

[0179] 4. For the message segmentation in the one-way sending process, an alternative solution is to use message verification codes, message compression codes, etc. in the generation or reassembly of the sending message.

[0180] 5. In the one-way sending sub-process, for the filling value in the message register RM, an alternative solution is to fill it with a fixed message, such as 0, and the prime number corresponding to this message is the first prime number 2 in the preset prime number table PT.

[0181] 6. The above embodiments use the DH algorithm (Diffie-Hellman algorithm, a method for ensuring the secure transmission of shared keys across insecure networks) and the RSA algorithm. The DH algorithm can be replaced by ECDH (Elliptic Curve Diffie-Hellman, a key exchange protocol based on elliptic curves). RSA can also be replaced by a combination of a public key algorithm and a symmetric encryption algorithm. For related technical solutions, please refer to existing literature.

[0182] 7. According to this technical solution, the second sub-terminal will continue to send random messages regardless of whether any user in the group requests it, to protect the normal use of other users in the group. An alternative solution is to set a longer online time requirement, that is, at least one day of online time after registration, to ensure that all group members have a relatively stable communication environment.

[0183] 8. Since the DB has high requirements for communication bandwidth but low requirements for computing, a DB with sufficient bandwidth can actually serve multiple agents. As an alternative, the DB can further differentiate and establish message storage queues under different agent addresses based on the agent addresses.

[0184] 9. In this technical solution, the user terminal is divided into a first sub-terminal and a second sub-terminal, and the addresses of the two sub-terminals are different. This makes it more difficult for an attacker to associate service communications with network addresses. In fact, if the addresses of the first and second sub-terminals are the same, according to the principles of this technical solution, it is also difficult for an attacker to associate service communications with the addresses.

[0185] 10. RegS, Agent, and DB may actually be running on the same server, or two of them may be running on the same server.

[0186] 11. In this technical solution, all business communication contents of the user are unrelated to the user's network address.

[0187] An alternative solution is that the user terminal uses three addresses, namely registration address, business address, and query address. Among them, the registration address only completes the publication of the user's public key and the random number used for sequencing; the business address only completes one-way transmission; and the query address completes the query to RegS or DB.

[0188] Another alternative is to use a dynamic address for each query to DB and RegS, while the business address is relatively fixed.

[0189] 12. The handling plan after the aggregation calculation fails can be replaced. One alternative is that the Agent informs the RegS module that the user has queried the aggregation calculation failure information, and then each user resets the counter in the one-way sending sub-process.

[0190] In the above-mentioned encrypted communication system, the second sub-terminal divides the user's public key and pending request into blocks, concatenates them with the service sequence number, encrypts the concatenated blocks based on the first key, the first prime number, and a preset prime number table, and sends them to the data processing server. After receiving the messages from all users in the first group, the data processing server performs concatenation calculations, decrypts them, and recovers the user's public key and the actual pending request based on the service sequence number. The data processing server sends a service request in accordance with the actual pending request and receives a response message. The response message is encrypted using the user's public key corresponding to the service sequence number and stored in the database server. The second sub-terminal retrieves all encrypted response messages from the database server and attempts to decrypt them using the user's private key. From the response messages that can be successfully decrypted, the response message belonging to the user is obtained. This system can implement obfuscation protection for user communication metadata, improving the security of the encrypted communication system.

[0191] This solution protects user network addresses, communication times, and communication lengths, specifically ensuring that network addresses are untraceable. This solution proposes an encrypted messaging system built using a one-way, non-interactive channel, adaptable to current typical encrypted business systems. By comprehensively protecting metadata, it ensures that user network addresses are untraceable and that user behavior information is not leaked. This solution can ensure the security of end-user information in business systems, even in the face of large-scale surveillance, information system vulnerabilities, and malicious internal administrators. It holds the potential to revolutionize current typical encrypted communication business systems.

[0192] The system proposes one-way transmission, aggregated computation, and request recovery algorithms, ensuring that even in the presence of n-2 untrusted users and untrusted Regs, Agents, and DBs, these untrusted parties cannot, through collusion, trace the original address of the user's content. The system also proposes a supporting multi-party computation and negotiation algorithm, eliminating the need for a centralized key generation and distribution mechanism, allowing users within the group to independently complete subsequent communications. Each encrypted communication in this system is completed with the participation of multiple parties. While this wastes bandwidth, it can mask each user's communication behavior, making it impossible for attackers to trace the relationship between behavior and addresses. The system also proposes a communication method that is not bound to an address, separating user registration addresses from business addresses, enhancing untraceability.

[0193] The above-mentioned encrypted communication system is designed to use a communication architecture for sending business requests in a non-interactive one-way manner, and at the same time uses privacy query technology to build a corresponding request / response transceiver circuit. It has the characteristics of different round-trip information transmission and non-interactive transmission, which can effectively protect the user's business address from being distinguished.

[0194] This system has designed a novel cryptographic algorithm based on the disorder of factorization and the discrete logarithm problem. It utilizes mechanisms such as synchronous sending, scheduled sending, and broadcast reply to ensure efficient encryption and decryption. A key initialization algorithm based on multi-party computation has been designed to enable trusted key initialization even when the recipient or some users within the group are untrustworthy. An agent-based interface has been designed to simulate user behavior and connect to the original service server. This allows for rapid deployment without changing the original service server, thus addressing the shortcomings of the original system in protecting user metadata. An agent-based queue has been designed to simultaneously receive and cache all user messages, and an operating mode has been designed in which all user messages at a given moment must be calculated simultaneously to decrypt all messages. The system has designed an automatic operation mechanism based on its own system time and counters, without the need for time synchronization. A message-to-prime encoding method has been designed using a preset prime number table. Agents have been designed to be classified based on computing resources or service types. Registration, service, and query addresses have been separated. A communication architecture has been designed to support fully dynamic address changes. That is, it uses user sequencing algorithm and message segmentation algorithm to support message reorganization and response query.

[0195] Compared with existing technologies, the encrypted communication system in this solution has the following advantages:

[0196] Advantage 1: It can resist encrypted channel behavior analysis in a large-scale monitoring environment, protect the user's business IP address, and also protect metadata information such as communication time, communication frequency, and message length.

[0197] First, the user dual-address network architecture and one-way sending sub-process design protect the business address.

[0198] A user's registration address can be obtained through other means, such as using a temporary VPN (Virtual Private Network) channel or VPS (Virtual Private Server) server. After completing the initial registration with other users, the address can be no longer used. Furthermore, the registration address can be changed continuously without affecting business operations.

[0199] Both the business address and the registered address can change constantly. However, since businesses may involve numerous interactions, even if they remain unchanged, the following analysis can ensure that the business address does not constitute a traceable relationship with the specific business.

[0200] When the agent receives messages from users, each message is encrypted. Based on the disorder of prime number decomposition and the difficulty of solving discrete logarithms, referring to the above formulas 1, 2, and 3, the following conclusions are drawn:

[0201] Σs i =0 mod(P-1);

[0202]

[0203] Furthermore, since P i The length limit of all P i The sum of the lengths is less than the length of P, so we end up with

[0204] M=ΠP i ;

[0205] According to the Fundamental Theorem of Arithmetic, M has a unique prime factorization method. Therefore, by querying the preset prime number table PT, M can be used to uniquely recover a set of plaintext. The prime numbers recovered by decomposing M are disordered. As long as at least two of the n users are honest and reliable, that is, they do not collude with each other, it is impossible to distinguish which honest and reliable user's business address sent a particular service request data.

[0206] Second, the one-way sending sub-process protects information such as the sending time and the amount of data sent.

[0207] When an agent receives the mth message from a single user, it must buffer it for a period of time until all mth messages from other users have arrived. Only then can it perform a consolidated calculation on the messages from all users in the group. Even for users without service requests, their second sub-terminals periodically send random numbers. Otherwise, the system will lose synchronization and resources will be reclaimed. Therefore, it is impossible to associate specific service address information based on communication metadata such as the time a specific user's service request message was sent or the amount of data sent.

[0208] Similarly, during the response information acquisition phase, thanks to the use of a private query algorithm based on public key encryption, every user receives every encrypted response message. Therefore, it is virtually impossible to distinguish users based on their responses. Finally, thanks to the protection of public key encryption, only the legitimate user can decrypt their own response message.

[0209] Finally, based on the pattern of each user periodically sending random messages and periodically sending privacy query requests, it is impossible to collect metadata information that can distinguish behavior like conventional encryption systems.

[0210] Advantage 2: It can ensure that the user's business address information is not leaked when the business server S, data processing server Agent, database server DB, registration and deregistration server RegS, etc. are all invaded by the system.

[0211] In the event of a large-scale system intrusion, conventional encryption systems will face the risk of business data loss, business process disruption, user tracing, etc. However, in this case, the communication system in this solution can still play a role in protecting user business address information.

[0212] As mentioned above, the business system IP address cannot be associated with specific business requests or responses on the connected agent or database. Furthermore, the business system IP address is not directly connected to the business server S. Furthermore, this solution utilizes a separate registration IP address for user registration, deregistration, and algorithm initialization based on multi-party computation. The initialized shared key information can actually be imported offline from the local machine to the user terminal using the business address. Therefore, at no point in the process is a specific business activity explicitly associated with the user's business IP address.

[0213] Especially in a system with a large number of business users, the business IP address of any user is masked among a large number of indistinguishable business IP addresses and cannot be effectively distinguished.

[0214] For the same reason, in the case of internal malicious administrators, the system does not have the risk of leaking user business IP addresses.

[0215] Advantage 3: This system does not rely on centralized key management and is more secure.

[0216] In fact, whether it is the sender protection algorithm or the privacy query algorithm, there is no key center and no centralized trust relationship. This decentralized key generation can avoid the risks brought by conventional key distribution centers.

[0217] In conventional encrypted communication systems, a key center controls everyone's keys, or a service server (S) controls and holds the communication keys for all service communications. This makes it easy for malicious administrators within the system or external intruders to use the keys they possess to decrypt and monitor almost all service data at any time.

[0218] According to the conclusions derived from Formula 1, Formula 2, and Formula 3, as well as the difficulty of the discrete logarithm problem, during the operation of this system, no party can independently decrypt any message related to a user's business address.

[0219] In addition, each user has the first key S in the sender protection algorithm i , is calculated by multiple parties on the user side through collaboration and two-way communication. No party can steal or forge it. Therefore, this system design achieves decentralized key distribution.

[0220] Advantage 4: This system cannot implement real user tracking by implanting traffic fingerprints based on controlled business servers.

[0221] In conventional encrypted communication systems, malicious internal administrators or attackers who have successfully compromised the system can embed traffic fingerprints in feedback information and ultimately locate the user's service IP address by tracing the traffic fingerprints. These traffic fingerprints are typically a set of packets of a specific length.

[0222] However, this system adopts a response message query technology based on privacy query. Even if an attacker or malicious administrator controls the Agent and can implant a traffic watermark in the response message, since each user actually receives the public key encryption result of each response message, it is impossible to determine which user corresponds to which business response message, thus rendering the traffic fingerprint invalid.

[0223] In summary, this solution, through the design of a network architecture using a one-way transmission channel, employing a sender protection algorithm to protect the service sending address, and using a privacy query algorithm to establish a closed message loop, can effectively protect metadata such as user service IP address information, communication time, communication frequency, and message length. This improves the security of the encryption system in complex adversarial environments such as large-scale surveillance, system vulnerability attacks, and internal malicious administrators. This system adapts to the need to enhance the privacy protection capabilities of the encryption system, taking into account the potential risks faced by information systems to the greatest extent possible. While providing information encryption protection, it also effectively protects communication metadata. This can provide more secure and effective encryption protection technology for national-level network security confrontations, reducing the security risks of key core businesses.

[0224] The embodiment of the present invention also provides an encrypted communication method, such as Figure 10 As shown, the method includes the following steps:

[0225] Step S1001: For each user terminal, the first sub-terminal sends a first instruction message to the registration / deregistration server; wherein the first instruction message is a registration request message or a deregistration request message;

[0226] Step S1002: The registration / deregistration server determines the first group corresponding to the current user based on the first instruction information, and sends the number of users in the first group to the corresponding data processing server. The registration / deregistration server then determines user data corresponding to the current user through the first sub-terminal, and sends the user data to the second sub-terminal. The user data includes a service serial number corresponding to the current user, and multiple shared keys corresponding to the current user and each other first user in the first group.

[0227] In step S1003, the second sub-terminal generates a first key corresponding to the current user based on the multiple shared keys and a preset first prime number; generates a user public key and a user private key corresponding to the current user based on a preset public key algorithm; sends the user public key to the data processing server based on the service serial number and the first key; splits, concatenates, and encrypts the request to be processed based on the service serial number and the first key, and sends the processed message to the data processing server;

[0228] In step S1004, the data processing server combines and decrypts the processed messages corresponding to all users in the received first group based on the number of users, performs data splicing and recovery based on the service sequence number to obtain the recovered pending request sent by each user in the first group, forwards each recovered pending request, receives a response message corresponding to each recovered pending request, encrypts each response message using the user public key corresponding to the service sequence number, obtains each encrypted response message, and saves each encrypted response message to the database server.

[0229] In step S1005, the second sub-terminal sends a query request to the database server to obtain each encrypted response message from the database server, and attempts to decrypt each encrypted response message based on the user private key corresponding to the current user, and obtains the response message corresponding to the second sub-terminal based on the successfully decrypted message.

[0230] The above-mentioned encrypted communication method can achieve obfuscation protection of user communication metadata and improve the security of the encrypted communication system.

[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An encrypted communication system, characterized in that: The system includes: multiple user terminals, a registration and deregistration server, a data processing server, and a database server; wherein each of the user terminals includes: a first sub-terminal and a second sub-terminal; the first sub-terminal and the second sub-terminal have different corresponding network addresses; For each of the user terminals, the first sub-terminal is used to send a first instruction message to the registration / deregistration server; wherein the first instruction message is a registration request message or a deregistration request message; The registration / deregistration server is configured to determine, based on the first instruction information, a first group corresponding to the current user, and send the number of users in the first group to a corresponding data processing server; and determine, through the first sub-terminal, user data corresponding to the current user, and send the user data to the second sub-terminal; wherein the user data includes a service serial number corresponding to the current user, and a plurality of shared keys corresponding to the current user and each other first user in the first group; The second sub-terminal is configured to generate a first key corresponding to the current user based on the multiple shared keys and a preset first prime number; generate a user public key and a user private key corresponding to the current user based on a preset public key algorithm; send the user public key to the data processing server based on the service serial number and the first key; split, concatenate, and encrypt the request to be processed based on the service serial number and the first key, and send the processed message to the data processing server; The data processing server is configured to combine and calculate the processed messages corresponding to all users in the first group received based on the number of users, perform decryption processing, perform data splicing and recovery based on the service sequence number to obtain the recovered pending request sent by each user in the first group, forward each of the recovered pending request, receive a response message corresponding to each of the recovered pending request, encrypt each of the response messages using the user public key corresponding to the service sequence number to obtain each encrypted response message, and save each of the encrypted response messages to the database server; The second sub-terminal is used to send a query request to the database server to obtain each of the encrypted response messages from the database server, and attempt to decrypt each of the encrypted response messages based on the user private key corresponding to the current user, and obtain a response message corresponding to the second sub-terminal based on the successfully decrypted message.

2. The system according to claim 1, wherein: For each of the user terminals, the first sub-terminal of the user terminal is used to generate a first random number, and use the first random number as a first private key of the current user; and calculate a first public key corresponding to the current user based on the first private key and a preset initialization prime number; The first sub-terminal is used to send a first instruction message to the registration / deregistration server; wherein, if the first instruction message is the registration request message, the registration request message includes a registration instruction and a first public key corresponding to the current user; if the first instruction message is the deregistration request message, the deregistration request message includes a deregistration instruction and the first public key corresponding to the current user; The registration / deregistration server is configured to determine the first group corresponding to the current user according to the first instruction information; and send the second public key corresponding to each other first user in the first group to the first sub-terminal; The first sub-terminal is used to calculate multiple shared keys corresponding to the current user and each other first user in the first group based on the first private key of the current user, the second public key corresponding to each other first user in the first group and the preset initialization prime number.

3. The system according to claim 1, wherein: The registration / deregistration server is configured to determine whether user information of other users exists in the registration / deregistration server if the first instruction information is registration request information; If the number of the other users is less than two, record the first public key corresponding to the current user, determine the user group corresponding to the current user and the other users, the group number corresponding to the user group, and the user number corresponding to each user in the user group; If the number of the other users is not less than two, when the number of users in the last user group is greater than a preset number threshold, a new user group is generated; wherein the preset number threshold is a preset user group threshold plus one; the new user group includes: users in the last user group whose user numbers are greater than or equal to the user group threshold, and the current user; Among them, different user groups correspond to data processing servers with different addresses and / or ports, and different user groups correspond to database servers with different addresses and / or ports; Each user in the same user group corresponds to a data processing server with the same address and port, and a database server with the same address and port.

4. The system according to claim 3, characterized in that The first sub-terminal is further configured to calculate an initialization key corresponding to the current user based on the multiple shared keys in the first group, the preset first group common information, and a preset first prime number; The first sub-terminal is used to generate a second random number, use the second random number as an index number, query a preset prime number table, and obtain a corresponding first sub-prime number; Calculate and obtain a first ciphertext corresponding to the current user based on the first sub-prime number, the second intra-group shared information, and the initialization key; Send the first ciphertext to the registration / deregistration server.

5. The system according to claim 4, characterized in that The registration / deregistration server is configured to calculate a first result based on the received first ciphertext corresponding to each user in the first group and the preset first prime number; The registration and deregistration server is configured to determine, for each prime number in the preset prime number table, whether the prime number is a factor of the first result, and if the prime number is a factor of the first result, obtain a sequence number corresponding to the prime number; Sort the obtained multiple serial numbers in ascending order to obtain an ordered list; send the ordered list to the first sub-terminal so that the current user can determine the service serial number corresponding to the current user according to the serial number of the second random number in the ordered list.

6. The system according to claim 5, characterized in that The second sub-terminal is configured to convert the request to be processed into a bit string, and segment the bit string into a plurality of segments according to a preset length, wherein the preset length is a difference between a preset message segment length and a bit length corresponding to the preset number threshold; Sequentially concatenate each of the split blocks with the service serial number to obtain a concatenated block; wherein the service serial number is in the high position of the concatenated block; determining a block sequence based on each of the tiles; Taking the first splicing block in the block sequence as the current splicing block, and filling the current splicing block into a preset message register; According to the value of the message register, a corresponding second sub-prime number is matched from the preset prime number table; based on the second sub-prime number, the value of the preset counter, the first key and the preset first prime number, a second ciphertext corresponding to the current spliced ​​block is calculated; The second ciphertext is sent to the data processing server, and the value of the counter is updated; the next splicing block in the block sequence is used as a new current splicing block, and the step of filling the current splicing block into a preset message register is repeated until the second ciphertext corresponding to the last splicing block in the block sequence is sent to the data processing server.

7. The system according to claim 6, characterized in that The second sub-terminal is further configured to periodically obtain a value in a preset message register, match a corresponding third sub-prime number from the preset prime number table based on the value of the message register, and calculate a third ciphertext based on the third sub-prime number, the value of a preset counter, the first key, and the preset first prime number; Sending the third ciphertext to the data processing server; updating the value of the counter; When there is no pending request, generate a third random number, concatenate the third random number to the service sequence number to obtain a concatenation result, and fill the concatenation result into a preset message register; repeat the step of periodically obtaining the value in the preset message register.

8. The system according to claim 7, characterized in that The data processing server is configured to receive target ciphertexts according to the address of the second sub-terminal, and store the target ciphertexts in a corresponding ciphertext block queue in a sequential order according to the address, and to calculate a second result each time based on the target ciphertext at the same position in each ciphertext block queue and the first prime number; wherein the target ciphertext is the second ciphertext or the third ciphertext; The data processing server is configured to determine, for each prime number in a preset prime number table, whether the prime number is a factor of the second result, and if the prime number is a factor of the second result, obtain a sequence number corresponding to the prime number; The data processing server is used to obtain a decryption result set according to the obtained multiple serial numbers; According to the service serial number, the third random number is excluded from the decryption result set, and the restored pending request corresponding to the service serial number is restored.

9. The system according to claim 1, wherein: The data processing server is in communication with a preset business server; The data processing server is used to send each of the restored pending requests to the business server, and receive a response message corresponding to each of the restored pending requests returned by the business server; According to the service serial number corresponding to each of the restored pending requests, the user public key corresponding to each of the service serial numbers is determined, and each of the response messages is encrypted using each of the user public keys to obtain each encrypted response message.

10. The system according to claim 1, wherein: The second sub-terminal is used to periodically send query requests to the database server; The database server is used to establish a message queue corresponding to the second sub-terminal according to the network address corresponding to the second sub-terminal, and store each of the encrypted response messages in the message queue; Packing all encrypted response messages in the message queue and returning the packed messages to the second sub-terminal; The second sub-terminal is used to attempt to decrypt the packaged message using the user private key corresponding to the current user, and obtain a response message corresponding to the second sub-terminal based on the successfully decrypted message.

11. An encrypted communication method, characterized in that: The method comprises: For each user terminal, the first sub-terminal sends a first instruction message to the registration and deregistration server; wherein the first instruction message is a registration request message or a deregistration request message; The registration / deregistration server determines, based on the first instruction information, a first group corresponding to the current user, and sends the number of users in the first group to a corresponding data processing server; determines, through the first sub-terminal, user data corresponding to the current user, and sends the user data to the second sub-terminal; wherein the user data includes a service serial number corresponding to the current user, and a plurality of shared keys corresponding to the current user and each other first user in the first group; The second sub-terminal generates a first key corresponding to the current user based on the multiple shared keys and a preset first prime number; generates a user public key and a user private key corresponding to the current user based on a preset public key algorithm; sends the user public key to the data processing server based on the service serial number and the first key; splits, concatenates, and encrypts the request to be processed based on the service serial number and the first key, and sends the processed message to the data processing server; The data processing server combines and calculates the processed messages corresponding to all users in the first group based on the number of users, performs decryption processing, performs data splicing and recovery based on the service sequence number to obtain the recovered pending request sent by each user in the first group, forwards each of the recovered pending request, receives a response message corresponding to each of the recovered pending request, encrypts each of the response messages using the user public key corresponding to the service sequence number to obtain each encrypted response message, and saves each of the encrypted response messages to the database server; The second sub-terminal sends a query request to the database server to obtain each of the encrypted response messages from the database server, and attempts to decrypt each of the encrypted response messages based on the user private key corresponding to the current user, and obtains a response message corresponding to the second sub-terminal based on the successfully decrypted message.

Citation Information

Patent Citations

  • Private key pool-based anti-quantum computing point-to-point message transmission method and system

    CN109951274A

  • Quantum communication encryption system and method for realizing mobile communication quantum encryption transmission

    CN111865589A