Information encryption transmission method and device based on Shamir three-way protocol
By encrypting the ciphertext multiple times with the asymmetric encryption algorithm in the three delivery stages of the Shamir three-way protocol, a super ciphertext that is difficult to reconstruct is generated, which solves the problem of information leakage caused by XOR attacks and improves the efficiency of information transmission. Security.
Patent Information
- Application Number
- CN202310870915.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2024-10-18
AI Technical Summary
The existing Shamir three-way protocol can easily lead to information leakage under XOR attacks and cannot effectively prevent ciphertext from being reconstructed into plaintext.
In the three delivery stages of the three-way protocol, the ciphertext encrypted in each stage is further encrypted based on an asymmetric encryption algorithm to generate a super ciphertext, and through multiple encryption and decryption processes, the super ciphertext is difficult to reconstruct through XOR operations. For plain text.
It improves the security of information transmission, prevents XOR attacks, ensures that information is difficult to reconstruct into plaintext when super ciphertext cannot be deciphered, and enhances communication security.
Smart Images

Figure CN118802183A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication security technology, and in particular to an information encryption transmission method and device based on the Shamir three-way protocol. Background Art
[0002] The three-way protocol scheme was developed by Israeli professor Adi Shamir around 1980. The protocol has a three-track framework for transmitting information or data. The protocol also allows both parties to exchange information securely without having to exchange keys, which can well solve the key distribution problem existing in symmetric algorithms.
[0003] In the three-way protocol scheme, when user terminal A needs to send information to user terminal B, user terminal A will use the key K it has A Encrypt the plaintext (i.e. information) M to generate ciphertext A, and then send ciphertext A to user terminal B. After receiving ciphertext A, user terminal B uses the key K it has B Ciphertext A is encrypted again to generate ciphertext AB, and user terminal B sends ciphertext AB back to user terminal A. User terminal A uses key K A Decrypt ciphertext AB to generate ciphertext B and send ciphertext B back to user terminal B. User terminal B uses key K B The ciphertext B is decrypted to generate the plaintext M, thus completing the information transmission. During the information transmission process, no key exchange occurs between the user terminal A and the user terminal B.
[0004] However, if the conversation between user terminal A and user terminal B is successfully intercepted and ciphertext A, ciphertext AB and ciphertext B are obtained, then the plaintext M can be reconstructed by performing an XOR operation on ciphertext A, ciphertext AB and ciphertext B, causing the three-way protocol scheme designed for secure communication to fail, thereby causing information leakage. Summary of the invention
[0005] The embodiment of the present application provides an information encryption transmission method and device based on the Shamir three-way protocol, which is used to solve the technical problems of security communication failure and information leakage caused by the existing three-way protocol under XOR attack.
[0006] In a first aspect, an embodiment of the present application provides an information encryption transmission method based on the Shamir three-way protocol, comprising:
[0007] Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0008] Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0009] The super ciphertext AB' is decrypted twice based on the second private key in the second key pair, the initial ciphertext AB after the second decryption is decrypted thrice based on the first random key to obtain the initial ciphertext B, the initial ciphertext B is encrypted five times based on the third public key, and the super ciphertext B' after the five encryption is sent to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0010] In one embodiment, the first asymmetric encryption algorithm, the second asymmetric encryption algorithm, and the third asymmetric encryption algorithm are all different asymmetric encryption algorithms.
[0011] In one embodiment, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are the same asymmetric encryption algorithm, and the second asymmetric encryption algorithm is an asymmetric encryption algorithm different from the first asymmetric encryption algorithm.
[0012] In one embodiment, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are ELGamal encryption algorithms, and the second asymmetric encryption algorithm is RSA encryption algorithm;
[0013] Or, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are RSA encryption algorithms, and the second asymmetric encryption algorithm is ELGamal encryption algorithm.
[0014] In one embodiment, the encryption and decryption process of the ELGamal encryption algorithm is as follows:
[0015] Generate a random large prime number p, random numbers g and x, where g <p,1≤x≤p-2;
[0016] Generate a key pair, the public key in the key pair is (y,g,p), and the private key in the key pair is (x,g,p), where y=g x modp, mod is the mod function;
[0017] Encrypt the plaintext M to obtain the ciphertext (a, b):
[0018] a=g k modp
[0019] b=y k M modp
[0020] Where k is a random number and 1≤k≤p-2;
[0021] Decrypt the ciphertext to obtain the plaintext M:
[0022] M=bc modp
[0023] Where c = a p-1-x modp.
[0024] In one embodiment, the encryption and decryption process of the RSA encryption algorithm is as follows:
[0025] Generate random large prime numbers p and q, and calculate the system modulus n = p × q;
[0026] Determine the encryption key e:
[0027]
[0028] in, represents e and The greatest common factor of
[0029] Determine the decryption key d:
[0030]
[0031] Among them, mod is the mod function;
[0032] Determine the key pair, the public key in the key pair is (e,n), and the private key in the key pair is (d,n);
[0033] For the i-th character M in the plaintext i Encrypt to obtain the ciphertext C corresponding to the i-th character i :
[0034]
[0035] For ciphertext C i Decrypt to get the i-th character M in the plaintext i :
[0036]
[0037] In a second aspect, an embodiment of the present application provides an information encryption transmission device based on the Shamir three-way protocol, comprising:
[0038] The first module is used to encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0039] The second module is used to receive the super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0040] The third module is used to perform a second decryption on the super ciphertext AB' based on the second private key in the second key pair, decrypt the initial ciphertext AB after the second decryption three times based on the first random key to obtain the initial ciphertext B, encrypt the initial ciphertext B five times based on the third public key, and send the super ciphertext B' encrypted five times to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0041] In a third aspect, an embodiment of the present application provides a terminal, including a memory, a transceiver, and a processor;
[0042] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0043] Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0044] Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0045] The super ciphertext AB' is decrypted twice based on the second private key in the second key pair, the initial ciphertext AB after the second decryption is decrypted thrice based on the first random key to obtain the initial ciphertext B, the initial ciphertext B is encrypted five times based on the third public key, and the super ciphertext B' after the five encryption is sent to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0046] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the information encryption transmission method based on the Shamir three-way protocol described in the first aspect or the second aspect are implemented.
[0047] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the information encryption transmission method based on the Shamir three-way protocol described in the first aspect or the second aspect.
[0048] The information encryption transmission method and device based on the Shamir three-way protocol provided in the embodiment of the present application further encrypts the encrypted ciphertexts in each stage based on an asymmetric encryption algorithm to generate super ciphertexts in the three delivery stages of the three-way protocol. On the one hand, it is difficult to reconstruct the plaintext by performing an XOR operation on the super ciphertexts. On the other hand, for the super ciphertexts in the three delivery stages, if the super ciphertexts in any delivery stage cannot be deciphered into the initial ciphertext, that is, when the super ciphertexts in the three delivery stages cannot be deciphered into the initial ciphertexts, it is difficult to reconstruct the plaintext by performing an XOR operation. Therefore, it can better resist XOR attacks, thereby improving the security of information transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 It is a schematic diagram of the information encryption process of the Shamir three-way protocol in the prior art;
[0051] Figure 2 This is one of the flow charts of the information encryption transmission method based on the Shamir three-way protocol provided in the embodiment of the present application;
[0052] Figure 3 This is the second flow chart of the information encryption transmission method based on the Shamir three-way protocol provided in the embodiment of the present application;
[0053] Figure 4 It is a schematic diagram of the processing time ratio of text information of different lengths provided by the embodiment of the present application and the existing method;
[0054] Figure 5 It is a structural schematic diagram of an information encryption transmission device based on the Shamir three-way protocol provided in an embodiment of the present application;
[0055] Figure 6 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0056] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] Figure 1 FIG. 1 is a schematic diagram of the information encryption process of the Shamir three-way protocol in the prior art. In the prior art, the Shamir three-way protocol includes three delivery stages. When user terminal A needs to send information to user terminal B, such as Figure 1 As shown:
[0059] (1) First delivery stage: User terminal A generates key K AFor encryption and decryption, the key K A Without being disclosed or distributed, user terminal A uses the key K A The plaintext to be sent is encrypted, and after encryption, the generated ciphertext A is sent to user terminal B.
[0060] (2) Second delivery phase: User terminal B generates a key K B For encryption and decryption, the key K B It is not open or distributed. User terminal B uses the key K B The ciphertext A received from the user terminal A is encrypted, and after encryption, the generated ciphertext AB is sent back to the user terminal A.
[0061] (3) The third delivery phase: After receiving the ciphertext AB, terminal A uses the key K A Decrypt ciphertext AB to obtain ciphertext B. User terminal A sends ciphertext B back to user terminal B, which uses key K B Decrypt ciphertext B to obtain plaintext.
[0062] However, based on the encrypted transmission of information in the above three delivery stages, if the conversation between user terminal A and user terminal B is successfully intercepted, ciphertext A, ciphertext AB and ciphertext B are obtained, then the plaintext M can be reconstructed by performing an XOR operation on ciphertext A, ciphertext AB and ciphertext B, as shown in the following formula:
[0063]
[0064] in, Represents the XOR operator, and E{} represents encryption.
[0065] In view of the problem that the existing Shamir three-way protocol is easily attacked by XOR, an embodiment of the present application provides an information encryption transmission method based on the Shamir three-way protocol, which is applied to the first information interaction terminal. Figure 2 One of the flow charts of the information encryption transmission method based on the Shamir three-way protocol provided in the embodiment of the present application, refer to Figure 2 As shown, the method may include:
[0066] S201: Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0067] S202: Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained by the second information interaction terminal decrypting the super ciphertext A' once based on the first private key in the first key pair, encrypting the initial ciphertext A after the decryption once three times based on the second random key, and encrypting the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0068] S203: Decrypt the super ciphertext AB' twice based on the second private key in the second key pair, decrypt the initial ciphertext AB after the second decryption three times based on the first random key to obtain the initial ciphertext B, encrypt the initial ciphertext B five times based on the third public key, and send the super ciphertext B' encrypted five times to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0069] Specifically, the method of this embodiment also includes three delivery stages:
[0070] First delivery phase:
[0071] The first information interaction terminal encrypts the plaintext M once based on the first random key to obtain the initial ciphertext A, and encrypts the once encrypted initial ciphertext A twice based on the first public key to obtain the super ciphertext A', and the first information interaction terminal sends the super ciphertext A' to the second information interaction terminal.
[0072] The first random key may be generated based on a one-time ciphertext algorithm, and the first public key is obtained by the first information interaction terminal from the second information interaction terminal. When the second information interaction terminal learns that the first information interaction terminal needs to transmit information, it generates a first key pair through a first asymmetric encryption algorithm, and sends the first public key in the first key pair to the first information interaction terminal, so that the first information interaction terminal can perform secondary encryption on the ciphertext A based on the first public key. The second information interaction terminal retains the first private key in the first key pair.
[0073] Second delivery phase:
[0074] After the second information interaction terminal obtains the super ciphertext A', it decrypts the super ciphertext A' once based on the first private key in the first key pair to obtain the initial ciphertext A. The second information interaction terminal encrypts the initial ciphertext A three times based on the second random key to obtain the initial ciphertext AB, and encrypts the initial ciphertext AB four times based on the second public key to obtain the super ciphertext AB', and the second information interaction terminal sends the super ciphertext AB' to the first information interaction terminal.
[0075] The second random key can be generated based on a one-time ciphertext algorithm, and the second public key is obtained by the second information interaction terminal from the first information interaction terminal. After the first information interaction terminal generates the super ciphertext A', it can immediately generate a second key pair through a second asymmetric encryption algorithm, and send the second public key in the second key pair and the super ciphertext A' to the second information interaction terminal, so that the second information interaction terminal can encrypt the initial ciphertext AB four times based on the second public key to obtain the super ciphertext AB'. The first information interaction terminal retains the second private key in the second key pair.
[0076] The third delivery phase:
[0077] After the first information interaction terminal obtains the super ciphertext AB', it decrypts the super ciphertext AB' twice based on the second private key in the second key pair to obtain the initial ciphertext AB, and the first information interaction terminal decrypts the initial ciphertext AB three times based on the first random key to obtain the initial ciphertext B. The first information interaction terminal encrypts the initial ciphertext B five times based on the third public key to obtain the super ciphertext B', and sends the super ciphertext B' to the second information interaction terminal.
[0078] After receiving the super ciphertext B', the second information interaction terminal decrypts the super ciphertext B' four times based on the third private key to obtain the initial ciphertext B, and decrypts the initial ciphertext B five times based on the second random key to obtain the plaintext M.
[0079] The third public key is obtained by the first information interaction terminal from the second information interaction terminal. After the second information interaction terminal generates the super ciphertext AB', it can immediately generate a third key pair through a third asymmetric encryption algorithm, and send the third public key in the third key pair and the super ciphertext AB' to the first information interaction terminal, so that the first information interaction terminal can encrypt the initial ciphertext B five times based on the third public key to obtain the super ciphertext B'. The second information interaction terminal retains the third private key in the third key pair.
[0080] It is understandable that after an information interaction end generates a public key and sends it to the other end, if the public key is not used by the other end in a timely manner, the risk of the key being obtained is increased. Therefore, the time when an information interaction end sends the public key to the other end needs to be as close as possible to the time when the other end uses the public key, so as to improve the security of the public key.
[0081] One-time pad (OTP) is also called unbreakable algorithm or holy grail algorithm. The working process of OTP algorithm can use classic or modern workflow. The classic workflow can be completed by creating a coding table to convert characters into decimal places for encryption and decryption. The modern workflow can be completed by XORing each plaintext character with the corresponding key through XOR technology, as shown in the following formula:
[0082]
[0083]
[0084] Among them, M i is the i-th character of the plaintext, C i is the ciphertext corresponding to the i-th character, K i is the key corresponding to the i-th character, Represents the exclusive OR operator.
[0085] Asymmetric encryption algorithms require two keys: a public key (publickey: abbreviated as public key) and a private key (privatekey: abbreviated as private key). The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key. Because two different keys are used for encryption and decryption, this algorithm is called an asymmetric encryption algorithm. The basic process of asymmetric encryption algorithms to achieve confidential information exchange is: Party A generates a pair of keys and makes the public key public. Other roles (Party B) who need to send information to Party A use the key (Party A's public key) to encrypt the confidential information and then send it to Party A; Party A then uses its own private key to decrypt the encrypted information. When Party A wants to reply to Party B, the opposite is true. Party B's public key is used to encrypt the data. Similarly, Party B uses its own private key to decrypt it.
[0086] The information encryption transmission method based on the Shamir three-way protocol provided in the embodiment of the present application further encrypts the encrypted ciphertexts in each stage based on an asymmetric encryption algorithm to generate super ciphertexts in the three delivery stages of the three-way protocol. On the one hand, it is difficult to reconstruct the plaintext by performing an XOR operation on the super ciphertexts. On the other hand, for the super ciphertexts in the three delivery stages, if the super ciphertexts in any delivery stage cannot be deciphered into the initial ciphertext, that is, when the super ciphertexts in the three delivery stages cannot be deciphered into the initial ciphertexts, it is difficult to reconstruct the plaintext by performing an XOR operation. Therefore, it can better resist XOR attacks, thereby improving the security of information transmission.
[0087] In some embodiments, the first asymmetric encryption algorithm, the second asymmetric encryption algorithm, and the third asymmetric encryption algorithm are all different asymmetric encryption algorithms.
[0088] Optionally, for the three delivery stages of the three-way protocol, the asymmetric encryption algorithms used in each stage can be different asymmetric encryption algorithms. For example, the first asymmetric encryption algorithm is the ELGamal encryption algorithm, the second asymmetric encryption algorithm is the RSA encryption algorithm, and the third asymmetric encryption algorithm is the Rabin algorithm; or, the first asymmetric encryption algorithm is the RSA encryption algorithm, the second asymmetric encryption algorithm is the Rabin algorithm, and the third asymmetric encryption algorithm is the ELGamal encryption algorithm, and so on.
[0089] It is understandable that the three delivery stages use three completely different asymmetric encryption algorithms for the information encryption transmission process, and the information (plain text) transmission is more secure. However, when the first asymmetric encryption algorithm, the second asymmetric encryption algorithm and the third asymmetric encryption algorithm are all different asymmetric encryption algorithms, the second information interaction terminal that uses the first asymmetric encryption algorithm and the third asymmetric encryption algorithm needs to be configured with two different asymmetric encryption algorithms, and the storage requirements for the second information interaction terminal are relatively high.
[0090] In some embodiments, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are the same asymmetric encryption algorithm, and the second asymmetric encryption algorithm is an asymmetric encryption algorithm different from the first asymmetric encryption algorithm.
[0091] Optionally, for the three delivery stages of the three-way protocol, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm may be the same asymmetric encryption algorithm, and the second asymmetric encryption algorithm may be an asymmetric encryption algorithm different from the first asymmetric encryption algorithm.
[0092] It is understandable that the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are applied to the second information interaction terminal, that is, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm need to be configured on the second information interaction terminal. In this case, compared with the case where the first asymmetric encryption algorithm, the second asymmetric encryption algorithm and the third asymmetric encryption algorithm are all different, the first information interaction terminal and the second information interaction terminal only need to configure one asymmetric encryption algorithm, and the storage requirements for the second information interaction terminal are relatively low. In addition, two asymmetric encryption algorithms are used in the three delivery stages, and the security of information (plaintext) transmission is also very high.
[0093] Therefore, when setting the asymmetric encryption algorithm for the three delivery stages, it can be set based on comprehensive considerations such as the encryption security requirements and the storage performance of the information interaction end.
[0094] In one embodiment, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are ELGamal encryption algorithms, and the second asymmetric encryption algorithm is RSA encryption algorithm;
[0095] Or, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are RSA encryption algorithms, and the second asymmetric encryption algorithm is ELGamal encryption algorithm.
[0096] Optionally, for the three delivery stages of the three-way protocol, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm can adopt the ELGamal encryption algorithm, and the second asymmetric encryption algorithm can adopt the RSA encryption algorithm, or the first asymmetric encryption algorithm and the third asymmetric encryption algorithm can adopt the RSA encryption algorithm, and the second asymmetric encryption algorithm can adopt the ELGamal encryption algorithm.
[0097] In a specific embodiment, Figure 3 As shown, taking the random key generated by the OTP algorithm, taking the first asymmetric encryption algorithm and the third asymmetric encryption algorithm as the ELGamal encryption algorithm, and the second asymmetric encryption algorithm as the RSA encryption algorithm as an example, the three delivery stages of information encryption transmission are described:
[0098] First delivery phase:
[0099] The first information interaction terminal generates a first random key K based on the OTP algorithm A The first information interaction terminal is based on the first random key K A The plaintext M is encrypted once to obtain the initial ciphertext A. The first information interaction terminal performs a second encryption on the initial ciphertext A based on the first public key B1st to obtain a super ciphertext A', and sends the super ciphertext A' to the second information interaction terminal.
[0100] The first public key B1st is obtained by the first information interaction terminal from the second information interaction terminal. When the second information interaction terminal learns that the first information interaction terminal needs to transmit information, it generates a first key pair through the ELGamal encryption algorithm and sends the first public key B1st in the first key pair to the first information interaction terminal, so that the first information interaction terminal can perform secondary encryption on the ciphertext A based on the first public key B1st. The second information interaction terminal retains the first private key B1st' in the first key pair.
[0101] Second delivery phase:
[0102] After the second information interaction terminal obtains the super ciphertext A', it decrypts the super ciphertext A' based on the first private key B1st' in the first key pair to obtain the initial ciphertext A. The second information interaction terminal generates a second random key K based on the OTP algorithm B , and use the second random key K BThe initial ciphertext A is encrypted three times to obtain the initial ciphertext AB, and the initial ciphertext AB is encrypted four times based on the second public key A2nd to obtain the super ciphertext AB'. The second information interaction terminal sends the super ciphertext AB' to the first information interaction terminal.
[0103] The second public key A2nd is obtained by the second information interaction terminal from the first information interaction terminal. After the first information interaction terminal generates the super ciphertext A', it can immediately generate a second key pair through the RSA encryption algorithm, and send the second public key A2nd and the super ciphertext A' in the second key pair to the second information interaction terminal, so that the second information interaction terminal can encrypt the initial ciphertext AB four times based on the second public key A2nd to obtain the super ciphertext AB'. The first information interaction terminal retains the second private key A2nd' in the second key pair.
[0104] The third delivery phase:
[0105] After the first information interaction terminal obtains the super ciphertext AB', the first information interaction terminal performs a secondary decryption on the super ciphertext AB' based on the second private key A2nd' in the second key pair to obtain the initial ciphertext AB. A The initial ciphertext AB is decrypted three times to obtain the initial ciphertext B. The first information interaction terminal encrypts the initial ciphertext B five times based on the third public key B3rd to obtain the super ciphertext B', and sends the super ciphertext B' to the second information interaction terminal.
[0106] After receiving the super ciphertext B', the second information interaction terminal decrypts the super ciphertext B' four times based on the third private key B3rd' to obtain the initial ciphertext B. The second information interaction terminal decrypts the super ciphertext B' four times based on the third private key B3rd' to obtain the initial ciphertext B. B Decrypt the initial ciphertext B five times to obtain the plaintext M.
[0107] The third public key B3rd is obtained by the first information interaction terminal from the second information interaction terminal. After the second information interaction terminal generates the super ciphertext AB', it can immediately generate a third key pair through the ELGamal encryption algorithm, and send the third public key B3rd in the third key pair and the super ciphertext AB' to the first information interaction terminal, so that the first information interaction terminal can encrypt the initial ciphertext B five times based on the third public key B3rd to obtain the super ciphertext B'. The second information interaction terminal retains the third private key B3rd' in the third key pair.
[0108] The above specific embodiment was tested. During the test, 10 text messages (i.e., plain text) of different lengths were used, and the processing time of the entire transmission process was recorded, as shown in Table 1:
[0109] Table 1 Comparison of processing time for text messages of different lengths
[0110] length Method of this embodiment (milliseconds) Current three-way protocol transmission (milliseconds) 10 0.0072388648986816 0.0027339458465576 20 0.0093448162078857 0.0039491653442383 50 0.015640020370483 0.0069119930267334 100 0.042346954345703 0.022449970245361 200 0.087727069854736 0.036191940307617 500 0.15630197525024 0.10586500167847 1000 0.32381987571716 0.20496797561646 2000 0.58216500282288 0.3674521446228 5000 1.6609079837799 1.2502000331879 10000 4.309779882431 3.801255941391
[0111] As can be seen from Table 1, when the text message is short, there is a certain gap between the processing time of the method of this embodiment and the processing time of the three-way protocol in the prior art. However, because the text message is short, the processing time itself is also short, so even if there is a time difference, it is very short. When the text message is long, the processing time of the method of this embodiment is smaller than that of the three-way protocol in the prior art, and Figure 4 It can be seen that as the text information continues to grow, the ratio of the processing time of the method of this embodiment to the processing time of the prior art three-way protocol approaches 1. Further, on the basis of being able to greatly improve the security of text information, increasing the processing time to a shorter level is also very feasible.
[0112] An XOR attack is performed on the encryption transmission method in this embodiment, as shown in Table 2:
[0113] Table 2 XOR result comparison
[0114]
[0115] The blocks in Table 2 represent the division of the plaintext into blocks and the comparison of the blocks. It can be seen from Table 2 that each bit pattern corresponding to the 11 blocks of the plaintext is different from the bit pattern in the result obtained after the XOR operation. This shows that it is difficult to reconstruct the plaintext by the XOR operation of the three super ciphertexts.
[0116] Table 3 Module 2 8 XOR result comparison
[0117] piece <![CDATA[Modulo 2 8 Exclusive OR operation result]]> Plain text 0 01000110 01001001 1 00011011 01101110 2 00010101 01100110 3 10100101 01101111 4 00000000 01110010 5 10000110 01101101 6 00111111 01100001 7 11111010 01110100 8 00000000 01101001 9 00100110 01101011 10 01000011 01100001
[0118] It can be seen from Table 3 that module 2 8 The result of the XOR operation is also different from the plaintext. It can be seen that the method in the present application is very effective in resisting XOR attacks and has a high security level.
[0119] For the encrypted transmission method in the above embodiment, if it is necessary to obtain the plaintext, the three super plaintexts (i.e., super plaintext A, super plaintext AB, and super plaintext B) need to be decrypted into the initial ciphertext, so that the plaintext can be reconstructed through the XOR operation, which requires cryptanalysis to penetrate the RSA encryption algorithm and the ELGamal encryption algorithm, but the RSA encryption algorithm and the ELGamal encryption algorithm are currently extremely difficult to be decrypted. In addition, if only one or two super ciphertexts are decrypted into the initial ciphertext, the plaintext is still protected and difficult to be decrypted into the keyless plaintext. The following three equations describe the situation where only two super ciphertexts are decrypted:
[0120] (1) The situation where super ciphertext A' and super ciphertext AB' are deciphered:
[0121]
[0122] (2) The situation where super ciphertext A' and super ciphertext B' are deciphered:
[0123]
[0124] (3) The situation where super ciphertext AB' and super ciphertext B' are deciphered:
[0125]
[0126] It can be seen from the above three equations that when only two super ciphertexts are deciphered and two initial ciphertexts are obtained, it is difficult to reconstruct the plaintext M through XOR operation.
[0127] In one embodiment, the encryption and decryption process of the ELGamal encryption algorithm is as follows:
[0128] Generate a random large prime number p, random numbers g and x, where g <p,1≤x≤p-2;
[0129] Generate a key pair, the public key in the key pair is (y,g,p), and the private key in the key pair is (x,g,p), where y=g x modp, mod is the mod function;
[0130] Encrypt the plaintext M to obtain the ciphertext (a, b):
[0131] a=g k modp
[0132] b=y k M modp
[0133] Where k is a random number and 1≤k≤p-2;
[0134] Decrypt the ciphertext to obtain the plaintext M:
[0135] M=bc modp
[0136] Where c = a p-1-x modp.
[0137] In one embodiment, the encryption and decryption process of the RSA encryption algorithm is as follows:
[0138] Generate random large prime numbers p and q, and calculate the system modulus n = p × q;
[0139] Determine the encryption key e:
[0140]
[0141] in, represents e and The greatest common factor of
[0142] Determine the decryption key d:
[0143]
[0144] Among them, mod is the mod function;
[0145] Determine the key pair, the public key in the key pair is (e,n), and the private key in the key pair is (d,n);
[0146] For the i-th character M in the plaintext i Encrypt to obtain the ciphertext C corresponding to the i-th character i :
[0147]
[0148] For ciphertext C i Decrypt to get the i-th character M in the plaintext i :
[0149]
[0150] Specifically, the ELGamal encryption algorithm is an asymmetric encryption algorithm based on the Diffie-Hellman key exchange, which was proposed by Tahir Gaimor in 1985. The RSA encryption algorithm was proposed by Ronald Rivest, Adi Shamir and Leonard Adleman in 1977, and the algorithm relies on the complexity of discrete algorithms to solve different integer integrals. The RSA encryption algorithm or the ELGamal encryption algorithm with large prime numbers is extremely difficult to decipher, and there is currently no sufficiently effective method to solve the ciphertext of the RSA encryption algorithm or the ELGamal encryption algorithm with large prime numbers. The large prime number in the above embodiment refers to a decimal number of more than 100 digits, and the encryption based on the large prime number is extremely difficult to decipher.
[0151] The following describes an information encryption transmission device based on the Shamir three-way protocol provided in an embodiment of the present application. The information encryption transmission device based on the Shamir three-way protocol described below and the information encryption transmission method based on the Shamir three-way protocol described above can be referenced to each other.
[0152] like Figure 5As shown in , the information encryption transmission device 500 based on the Shamir three-way protocol includes: a first module 501, a second module 502 and a third module 503.
[0153] The first module 501 is used to encrypt the plaintext once based on the first random key, to encrypt the initial ciphertext A after the once encryption twice based on the first public key, and to send the super ciphertext A' after the twice encryption to the second information interaction terminal, where the first public key is in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm.
[0154] The second module 502 is used to receive the super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained by the second information interaction terminal decrypting the super ciphertext A' once based on the first private key in the first key pair, encrypting the initial ciphertext A after the decryption once three times based on the second random key, and encrypting the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm.
[0155] The third module 503 is used to perform a second decryption on the super ciphertext AB' based on the second private key in the second key pair, perform a third decryption on the initial ciphertext AB after the second decryption based on the first random key to obtain the initial ciphertext B, perform five encryption on the initial ciphertext B based on the third public key, and send the super ciphertext B' encrypted five times to the second information interaction terminal for decryption by the second information interaction terminal to obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0156] In some embodiments, the first asymmetric encryption algorithm, the second asymmetric encryption algorithm, and the third asymmetric encryption algorithm are all different asymmetric encryption algorithms.
[0157] In some embodiments, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are the same asymmetric encryption algorithm, and the second asymmetric encryption algorithm is an asymmetric encryption algorithm different from the first asymmetric encryption algorithm.
[0158] In some embodiments, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are ELGamal encryption algorithms, and the second asymmetric encryption algorithm is an RSA encryption algorithm;
[0159] Or, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are RSA encryption algorithms, and the second asymmetric encryption algorithm is ELGamal encryption algorithm.
[0160] In some embodiments, the encryption and decryption process of the ELGamal encryption algorithm is as follows:
[0161] Generate a random large prime number p, random numbers g and x, where g <p,1≤x≤p-2;
[0162] Generate a key pair, the public key in the key pair is (y,g,p), and the private key in the key pair is (x,g,p), where y=g x modp, mod is the mod function;
[0163] Encrypt the plaintext M to obtain the ciphertext (a, b):
[0164] a=g k modp
[0165] b=y k M modp
[0166] Where k is a random number and 1≤k≤p-2;
[0167] Decrypt the ciphertext to obtain the plaintext M:
[0168] M=bc modp
[0169] Where c = a p-1-x modp.
[0170] In some embodiments, the encryption and decryption process of the RSA encryption algorithm is as follows:
[0171] Generate random large prime numbers p and q, and calculate the system modulus n = p × q;
[0172] Determine the encryption key e:
[0173]
[0174] in, represents e and The greatest common factor of
[0175] Determine the decryption key d:
[0176]
[0177] Among them, mod is the mod function;
[0178] Determine the key pair, the public key in the key pair is (e,n), and the private key in the key pair is (d,n);
[0179] For the i-th character M in the plaintext i Encrypt to obtain the ciphertext C corresponding to the i-th characteri :
[0180]
[0181] For ciphertext C i Decrypt to get the i-th character M in the plaintext i :
[0182]
[0183] The information encryption transmission device based on the Shamir three-way protocol provided in the embodiment of the present application generates a super ciphertext by further encrypting the encrypted ciphertext in each stage based on an asymmetric encryption algorithm in the three delivery stages of the three-way protocol. On the one hand, it is difficult to reconstruct the plaintext by performing an XOR operation on the super ciphertext; on the other hand, for the super ciphertexts of the three delivery stages, if the super ciphertext of any delivery stage cannot be deciphered into the initial ciphertext, that is, when the super ciphertexts of the three delivery stages cannot be deciphered into the initial ciphertext, it is difficult to reconstruct the plaintext by performing an XOR operation. Therefore, it can better resist XOR attacks, thereby improving the security of information transmission.
[0184] The terminal involved in the embodiments of the present application may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem, etc. In different systems, the name of the terminal device may also be different. For example, in a 5G system, the terminal device may be called a user equipment (UE).
[0185] Figure 6 is a schematic diagram of the structure of a terminal according to an embodiment of the present application, referring to Figure 6 , the embodiment of the present application further provides a terminal, which may include: a memory 610, a transceiver 620 and a processor 630;
[0186] The memory 610 is used to store computer programs; the transceiver 620 is used to send and receive data under the control of the processor 630; the processor 630 is used to read the computer program in the memory 610 and perform the following operations:
[0187] Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0188] Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0189] The super ciphertext AB' is decrypted twice based on the second private key in the second key pair, the initial ciphertext AB after the second decryption is decrypted thrice based on the first random key to obtain the initial ciphertext B, the initial ciphertext B is encrypted five times based on the third public key, and the super ciphertext B' after the five encryption is sent to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0190] Among them, Figure 6 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 630 and various circuits of memory represented by memory 610 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 620 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 640 may also be an interface capable of externally connecting to the required internal devices.
[0191] The processor 630 is responsible for managing the bus architecture and general processing, and the memory 610 can store data used by the processor 630 when performing operations.
[0192] The processor 630 is used to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions by calling the computer program stored in the memory 610. The processor and the memory may also be arranged physically separately.
[0193] It should be noted here that the terminal provided in the embodiment of the present application can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0194] The information encryption transmission terminal based on the Shamir three-way protocol provided in the embodiment of the present application generates a super ciphertext by further encrypting the encrypted ciphertext in each stage based on an asymmetric encryption algorithm in the three delivery stages of the three-way protocol. On the one hand, it is difficult to reconstruct the plaintext by performing an XOR operation on the super ciphertext; on the other hand, for the super ciphertexts of the three delivery stages, if the super ciphertext of any delivery stage cannot be deciphered into the initial ciphertext, that is, when the super ciphertexts of the three delivery stages cannot be deciphered into the initial ciphertext, it is difficult to reconstruct the plaintext by performing an XOR operation. Therefore, it can better resist XOR attacks, thereby improving the security of information transmission.
[0195] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call a computer program in the memory 730 to execute the steps of the information encryption transmission method based on the Shamir three-way protocol, for example including:
[0196] Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0197] Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0198] The super ciphertext AB' is decrypted twice based on the second private key in the second key pair, the initial ciphertext AB after the second decryption is decrypted thrice based on the first random key to obtain the initial ciphertext B, the initial ciphertext B is encrypted five times based on the third public key, and the super ciphertext B' after the five encryption is sent to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0199] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0200] On the other hand, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the steps of the information encryption transmission method based on the Shamir three-way protocol provided in the above embodiments, for example, including:
[0201] Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0202] Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0203] The super ciphertext AB' is decrypted twice based on the second private key in the second key pair, the initial ciphertext AB after the second decryption is decrypted thrice based on the first random key to obtain the initial ciphertext B, the initial ciphertext B is encrypted five times based on the third public key, and the super ciphertext B' after the five encryption is sent to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0204] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the steps of the information encryption transmission method based on the Shamir three-way protocol provided in the above embodiments, for example, including:
[0205] Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm;
[0206] Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained after the second information interaction terminal decrypts the super ciphertext A' once based on the first private key in the first key pair, encrypts the initial ciphertext A after the decryption once three times based on the second random key, and encrypts the initial ciphertext AB after the three encryptions four times based on the second public key; the second public key is in the second key pair generated by the first information interaction terminal based on the second asymmetric encryption algorithm;
[0207] The super ciphertext AB' is decrypted twice based on the second private key in the second key pair, the initial ciphertext AB after the second decryption is decrypted thrice based on the first random key to obtain the initial ciphertext B, the initial ciphertext B is encrypted five times based on the third public key, and the super ciphertext B' after the five encryption is sent to the second information interaction terminal for the second information interaction terminal to decrypt and obtain the plaintext; the third public key is in the third key pair generated by the second information interaction terminal based on the third asymmetric encryption algorithm.
[0208] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0209] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0210] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0211] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An information encryption transmission method based on the Shamir three-way protocol, applied to a first information interaction terminal, characterized in that: include: Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm; Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained by decrypting the super ciphertext A' once by the second information interaction terminal based on the first private key in the first key pair, encrypting the decrypted initial ciphertext A three times based on the second random key, and encrypting the three-encrypted initial ciphertext AB four times based on the second public key; The second public key is a key in a second key pair generated by the first information interaction terminal based on a second asymmetric encryption algorithm; Decrypting the super ciphertext AB' twice based on the second private key in the second key pair, decrypting the initial ciphertext AB after the second decryption three times based on the first random key to obtain the initial ciphertext B, encrypting the initial ciphertext B five times based on the third public key, and sending the super ciphertext B' after the five encryption to the second information interaction terminal, so that the second information interaction terminal can decrypt and obtain the plaintext; The third public key is a member of a third key pair generated by the second information interaction terminal based on a third asymmetric encryption algorithm.
2. The information encryption transmission method based on the Shamir three-way protocol according to claim 1 is characterized in that: The first asymmetric encryption algorithm, the second asymmetric encryption algorithm and the third asymmetric encryption algorithm are all different asymmetric encryption algorithms.
3. The information encryption transmission method based on the Shamir three-way protocol according to claim 1 is characterized in that: The first asymmetric encryption algorithm and the third asymmetric encryption algorithm are the same asymmetric encryption algorithm, and the second asymmetric encryption algorithm is an asymmetric encryption algorithm different from the first asymmetric encryption algorithm.
4. The information encryption transmission method based on the Shamir three-way protocol according to claim 1 or 3, characterized in that: The first asymmetric encryption algorithm and the third asymmetric encryption algorithm are ELGamal encryption algorithms, and the second asymmetric encryption algorithm is RSA encryption algorithm; Or, the first asymmetric encryption algorithm and the third asymmetric encryption algorithm are RSA encryption algorithms, and the second asymmetric encryption algorithm is ELGamal encryption algorithm.
5. The information encryption transmission method based on the Shamir three-way protocol according to claim 4 is characterized in that: The encryption and decryption process of the ELGamal encryption algorithm is as follows: Generate a random large prime number p, random numbers g and x, where g <p,1≤x≤p-2; Generate a key pair, the public key in the key pair is (y,g,p), and the private key in the key pair is (x,g,p), where y=g x modp, mod is the mod function; Encrypt the plaintext M to obtain the ciphertext (a, b): a=g k modp b=y k M modp Where k is a random number and 1≤k≤p-2; Decrypt the ciphertext to obtain the plaintext M: M=bc modp Where c = a p-1-x modp.
6. The information encryption transmission method based on the Shamir three-way protocol according to claim 4 is characterized in that: The encryption and decryption process of the RSA encryption algorithm is as follows: Generate random large prime numbers p and q, and calculate the system modulus n = p × q; Determine the encryption key e: in, represents e and The greatest common factor of Determine the decryption key d: Among them, mod is the mod function; Determine the key pair, the public key in the key pair is (e,n), and the private key in the key pair is (d,n); For the i-th character M in the plaintext i Encrypt to obtain the ciphertext C corresponding to the i-th character i : For ciphertext C i Decrypt to get the i-th character M in the plaintext i :
7. An information encryption transmission device based on Shamir three-way protocol, characterized in that: include: The first module is used to encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm; The second module is used to receive the super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained by the second information interaction terminal decrypting the super ciphertext A' once based on the first private key in the first key pair, encrypting the initial ciphertext A after the one decryption three times based on the second random key, and encrypting the initial ciphertext AB after the three encryptions four times based on the second public key; The second public key is a key in a second key pair generated by the first information interaction terminal based on a second asymmetric encryption algorithm; The third module is used to perform a second decryption on the super ciphertext AB' based on the second private key in the second key pair, perform a third decryption on the initial ciphertext AB after the second decryption based on the first random key to obtain an initial ciphertext B, perform a fifth encryption on the initial ciphertext B based on the third public key, and send the super ciphertext B' after the five encryptions to the second information interaction terminal, so that the second information interaction terminal can perform a decryption to obtain the plaintext; The third public key is a member of a third key pair generated by the second information interaction terminal based on a third asymmetric encryption algorithm.
8. A terminal, characterized in that: Including memory, transceiver, processor; Memory for storing computer programs; a transceiver, configured to transmit and receive data under the control of the processor; and a processor, configured to read the computer program in the memory and perform the following operations: Encrypt the plaintext once based on the first random key, encrypt the initial ciphertext A after the once encryption twice based on the first public key, and send the twice-encrypted super ciphertext A' to the second information interaction terminal, where the first public key is a key in the first key pair generated by the second information interaction terminal based on the first asymmetric encryption algorithm; Receive a super ciphertext AB' sent by the second information interaction terminal, where the super ciphertext AB' is obtained by decrypting the super ciphertext A' once by the second information interaction terminal based on the first private key in the first key pair, encrypting the decrypted initial ciphertext A three times based on the second random key, and encrypting the three-encrypted initial ciphertext AB four times based on the second public key; The second public key is a key in a second key pair generated by the first information interaction terminal based on a second asymmetric encryption algorithm; Decrypting the super ciphertext AB' twice based on the second private key in the second key pair, decrypting the initial ciphertext AB after the second decryption three times based on the first random key to obtain the initial ciphertext B, encrypting the initial ciphertext B five times based on the third public key, and sending the super ciphertext B' after the five encryption to the second information interaction terminal, so that the second information interaction terminal can decrypt and obtain the plaintext; The third public key is a member of a third key pair generated by the second information interaction terminal based on a third asymmetric encryption algorithm.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the information encryption transmission method based on the Shamir three-way protocol described in any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the information encryption transmission method based on the Shamir three-way protocol described in any one of claims 1 to 6 are implemented.
