Method and system for constructing AKE protocol from error PKE algorithm

By converting the public key encryption algorithm with decryption errors into a key packaging algorithm that can leak errors, and introducing a key consistency confirmation step in the AKE protocol, the insecurity and basis of classical protocols under quantum computer attacks is solved. The decryption error problem of grid algorithm improves the performance and parameter selection flexibility of the protocol.

CN119094098APending Publication Date: 2024-12-06INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410875797.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing classic authentication key exchange protocol is unsafe when facing quantum computer attacks, and the grid-based quantum-resistant algorithm has decryption error problems, resulting in limited parameter selection and poor performance.

Method used

By converting the public key encryption algorithm with decryption errors into a selective error that can be leaked plaintext indistinguishable and secure key encapsulation algorithm, and introducing a key consistency confirmation step in the AKE protocol, only accepting the export password without decryption errors key, otherwise abort or re-execute.

Benefits of technology

It realizes the construction of a secure AKE protocol while tolerating errors, improves the performance and size performance of algorithms and protocols, provides greater flexibility in parameter selection, and reduces the negative impact of decryption errors on performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094098A_ABST
    Figure CN119094098A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for constructing an AKE protocol from a PKE algorithm with errors. The method comprises the following steps of: 1) converting a PKE (Public Key Exchange) which selects plaintext one-way security OW-CPA but has a decryption error into a KEM (Kernel Effect Model) which can leak the error and cannot distinguish the security of the plaintext, and recording the KEM as a KEM of IND-CPAwF, which comprises a key generation algorithm of the KEM, an encapsulation algorithm of the KEM and a de-encapsulation algorithm of the KEM; wherein in the KEM encapsulation algorithm, an encapsulation message m is input into a hash function H (.) to export an encapsulation key K = H (m); in the de-encapsulation algorithm of the KEM, the encapsulation message m'obtained by decryption is input into a hash function H (.) to export an encapsulation key K '= H (m'); and 2) converting the AKE protocol which cannot use the wrong KEM into the AKE protocol which can use the wrong KEM. According to the method, higher parameter selection flexibility is provided for PKE algorithm designers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the cryptography field, relates to anti-quantum cryptography migration, and in particular to a method and system for constructing an authenticated key exchange protocol (AKE) from an erroneous public key encryption algorithm (PKE). Background Art

[0002] The Authenticated Key Exchange (AKE) protocol is an important and widely used cryptographic protocol in reality. For example, the handshake phase of the TLS protocol is essentially an AKE protocol that meets forward security. In short, the basic functional requirements of the AKE protocol are divided into two parts: first, both parties are required to confirm whether the identity of the interacting party is consistent with their own cognition (called "authentication"); second, the two parties who have confirmed each other's identities can "securely" share a secret value (called "confidentiality"). In addition, for practical applications, "forward security" is usually also a security goal that must be considered in the design of the AKE protocol. Forward security means that even if a malicious adversary obtains the long-term private key of one of the parties (used to provide identity proof) during a certain protocol execution, it still cannot know the shared secret generated by the protocol process that has been executed before the communication.

[0003] In order to provide two basic functional requirements and an additional security requirement, the construction of the AKE protocol often uses two cryptographic primitives as components, such as Figure 1 As shown. One primitive is bound to the identity of the participant as a long-term secret to provide authentication; the other primitive generates a temporary secret and implements the derivation of a confidential shared secret, while ensuring forward security. The former can be implemented in a symmetric cryptographic manner, such as pre-sharing a symmetric key in combination with a message authentication code, or in a public key cryptographic manner, such as PKI plus a digital signature algorithm. However, please note that the content of the present invention mainly lies in the second part of the primitives, and this part of the function can be implemented using the key encapsulation (KEM) primitive (classically called key exchange KEX, there are slight differences between the two, specifically, KEX is a smaller concept than KEM, that is, KEX can also be called a KEM; since in most application scenarios, KEM and KEX can achieve the same functions, so for the purpose of this article, no distinction will be made below).

[0004] The research background of the present invention is the research on countering quantum cryptographic migration. Cryptography research, including the security analysis of various algorithms, is based on a series of assumptions about computing power. For example, in classical cryptography research, the assumption of adversary capabilities is based on the classical computer model, that is, a cryptographic scheme that cannot break the corresponding security target in a sufficiently long time by an adversary with powerful classical computer computing power is called a secure cryptographic scheme in the classical sense. However, with the in-depth study of quantum mechanics by physicists, since the concept of quantum computing was proposed in the 1980s, it seems that the use of quantum effects to design and build quantum computers with stronger computing power than classical computers has become a reality that is no longer out of reach. The data storage and computing methods of quantum computers are very different from those of classical computers, so the classical computing model can no longer cover the description of the computing power of quantum computers. This also means that once quantum computers are successfully manufactured, and some "quantum algorithms" that cleverly utilize the special storage and computing characteristics of quantum computing can solve some "mathematically difficult problems" more efficiently than classical algorithms, the problems that were once considered "difficult" in the classical setting will no longer be difficult, so the cryptographic algorithms designed based on such problems will no longer be secure in the quantum setting.

[0005] Specifically, for example, the various key exchange algorithms used in the classical AKE protocol are all based on the difficulty of (different forms of) discrete logarithm problems, such as Diffie-Hellman or ECDH. The introduction of the quantum algorithm "Shor's algorithm" declares that the discrete logarithm problem will no longer be difficult for (sufficiently large) quantum computers, that is, quantum computers can crack all key exchanges in the classical AKE protocol. This means that the adversary can now start monitoring and storing the protocol execution and communication data between its attack targets. Although it is difficult to obtain any useful information from it with current classical computers, once quantum computers are put into practical use, the adversary can use quantum computers to crack the shared secret from the ciphertext of its key exchange phase, and further decrypt the ciphertext data of the communication at that time into plaintext, that is, the "Harvest Now, Decrypt Later" attack.

[0006] In order to resist such attacks, replacing the key exchange algorithm in the AKE protocol with a "quantum-resistant" key encapsulation algorithm designed based on difficult mathematical problems that cannot be efficiently solved by quantum algorithms has become an imminent security upgrade measure. Among the routes of designing cryptographic schemes based on difficult mathematical problems that are currently believed to be promising for quantum resistance, lattice-based cryptography is currently one of the most promising candidates. However, including the "lattice-based" technical route, the quantum-resistant algorithms of several new technical routes have a problem that has never appeared in classical algorithms due to the form of the difficult mathematical problems on which they are based, namely, "decryption errors." This type of algorithm naturally has decryption errors, so if the design of the classical protocol is not modified (i.e., it is intolerant of errors), it can only be ensured that the probability of such errors occurring is extremely small by imposing additional restrictions on parameter selection, and this is also what the work prior to the present invention did, such as Figure 2 The disadvantage is that the parameter selection can only use larger parameters with poor performance and size, that is, the algorithm performance is low, and the use of constructing the AKE protocol will also reduce the performance and size of AKE, that is, Figure 2 The approach shown will result in poor performance size of the public key encryption (PKE) in the middle box, which will result in poor performance size of AKE in the right box.

[0007] It should be noted that Figure 1 The AKE composition structure shown does not include PKE, but KEM. Those skilled in the art can understand the direct conversion relationship between PKE and KEM, such as Figure 3 shown. Summary of the invention

[0008] The object of the present invention is to provide a method for constructing a secure AKE protocol using a passively secure PKE algorithm with decryption errors. The method is a general method, characterized in that it comprises two transformations: the first transformation acts on the PKE algorithm, converting the PKE algorithm with chosen plaintext one-way security (OW-CPA) but with decryption errors into the KEM algorithm with chosen plaintext indistinguishable security (IND-CPAwF, which still has decryption errors but does not disclose sensitive information) that can disclose errors; the second transformation acts on the AKE protocol, additionally introducing a key consistency confirmation step in the conventional AKE protocol steps, and accepting the derived key only when it is confirmed that no decryption errors occur, otherwise the protocol is terminated or waited for re-execution, such as Figure 4 shown.

[0009] The present invention proposes a method for constructing a secure AKE protocol in an error-tolerant manner, thereby providing a greater flexibility in parameter selection for the algorithm designer of PKE. At the same time, since a larger parameter selection range means that the algorithm itself can be optimized (the parameters that were originally abandoned due to the limitation of "requiring extremely small decryption errors"), the algorithm designer can implement an algorithm with better performance and size performance. In addition, the cost of the transformation of the PKE algorithm performed by this method to remove the decryption error limit, and the cost of the additional steps introduced in the AKE protocol design, are often smaller than the original cost imposed on the algorithm performance size due to the decryption error limit. That is to say: the performance size improvement brought about by relaxing and optimizing parameters by allowing larger decryption errors in the PKE algorithm design can still be clearly reflected in the improvement of the performance and size performance of the final AKE protocol after introducing a small amount of overhead according to this method.

[0010] Symbol Definition: In the following, H(·) represents a hash function that satisfies security strength, and PRF(·,·) represents a pseudo-random function that satisfies security strength and is injective.

[0011] The technical solution adopted by the present invention is as follows:

[0012] A method for constructing an AKE protocol from an erroneous PKE algorithm, the steps comprising:

[0013] 1) Convert the chosen-plaintext one-way secure OW-CPA PKE with decryption errors into a chosen-plaintext indistinguishable secure KEM that can disclose errors, denoted as IND-CPAwF KEM;

[0014] 2) Convert the AKE protocol that cannot use the erroneous KEM into the AKE protocol that can use the erroneous KEM.

[0015] Furthermore, the KEM of the IND-CPAwF includes a KEM key generation algorithm, a KEM encapsulation algorithm and a KEM decapsulation algorithm; wherein,

[0016] The key generation algorithm of KEM is: the input is empty, and the output is the public key and private key. The key generation algorithm of PKE is used to generate the public key and private key of the key encapsulation KEM;

[0017] The encapsulation algorithm of KEM is: the input is the public key, and the output is two values ​​c and K. Randomly generate an encapsulated message m in the plaintext space of PKE; use the encryption algorithm of PKE to encrypt the encapsulated message m with the public key of the key encapsulation KEM, and the obtained ciphertext is recorded as the ciphertext value c; input the encapsulated message m into the hash function H(·) to derive the encapsulation key K=H(m);

[0018] The decapsulation algorithm of KEM is: the input is the private key and c, and the output is K' (K'=K in the correct case). Use the PKE decryption algorithm to decrypt the ciphertext value c with the private key of the key-encapsulated KEM to obtain the encapsulated message m'; the decrypted encapsulated message m' is input into the hash function H(·) to derive the encapsulation key K'=H(m').

[0019] Further, the AKE protocol that can use an erroneous KEM is an AKE based on a pre-shared symmetric key; wherein, the party executing the encapsulation algorithm of the KEM uses a pseudo-random function PRF (·,·) to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and includes it in the input data for calculating the message authentication code MAC, and uses the pseudo-random function PRF (·,·) to derive a session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; the party executing the decapsulation algorithm of the KEM uses a pseudo-random function PRF (·,·) to recalculate the key confirmation data chk′=PRF(K′,tag1) according to the encapsulation key K′ and tag1, and compares chk′=? chk with the received key confirmation data, and derives the session key ssk=PRF(K′,tag2) when and only when the comparison is consistent, otherwise the execution of the protocol is terminated; wherein tag1 and tag2 are any unequal character strings agreed upon.

[0020] Further, the AKE protocol that can use an erroneous KEM is an AKE based on digital signature; wherein, the party executing the encapsulation algorithm of KEM uses a pseudo-random function PRF (·,·) to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and includes it in the input data for calculating the digital signature, and uses the pseudo-random function PRF (·,·) to derive a session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; the party executing the decapsulation algorithm of KEM uses a pseudo-random function PRF (·,·) to recalculate the key confirmation data chk′=PRF(K′,tag1) according to the encapsulation key K′ and tag1, and compares chk′=? chk with the received key confirmation data, and derives the session key ssk′=PRF(K′,tag2) when and only when the comparison is consistent, otherwise the execution of the protocol is terminated; wherein tag1 and tag2 are any unequal character strings agreed upon.

[0021] A method for establishing a secure channel based on the AKE protocol of a pre-shared key, the steps of which include:

[0022] 1) Participants A and B participating in the communication determine the pre-shared key psk;

[0023] 2) Participant A calls KEM's key generation algorithm KGen to generate a one-time public and private key pair (epk, esk) for Party A.

[0024] ←KGen, and let the sent data x = epk; where epk is the KEM public key of participant A, and esk is the KEM private key of participant A;

[0025] 3) Party A uses the pre-shared key psk to calculate the MAC value [x] of data x and sends (x, [x]) to Party B;

[0026] 4) Party B uses the pre-shared key psk to calculate the MAC value of the received data x, and verifies whether the MAC value MAC(psk,x) calculated by itself is consistent with the received [x]. If the verification is successful, the key encapsulation algorithm Encap of KEM is called according to the received data x=epk to generate the ciphertext c and the encapsulation key K. Then, the pseudo-random function PRF(·,·) is used to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and the ciphertext c and chk are concatenated to obtain y=(c,chk). The MAC value [x,

[0027] [x], y]; and use the pseudo-random function PRF (·, ·) to derive the session key ssk = PRF (K, tag2) according to the encapsulation key K and tag2; then give (y, [x, [x], y]) to participant A;

[0028] 5) Party A uses the pre-shared key psk to calculate the MAC value of (y, [x, [x], y]) and verifies the MAC value MAC(psk, (x, [x], y)) calculated by itself ? = [x, [x], y]; if the verification is successful, the decapsulation algorithm Decap of KEM is called with the ciphertext c and esk as input to decapsulate the encapsulation key K'; then the pseudo-random function PRF(·, ·) is used to recalculate the key confirmation data chk' = PRF(K', tag1) according to the encapsulation key K' and tag1, and compare it with the received key confirmation data chk' = ? chk. If and only if the comparison is consistent, the session key ssk = PRF(K', tag2) is derived, otherwise the execution of the protocol is terminated; where tag1 and tag2 are any unequal strings agreed upon.

[0029] A method for establishing a secure channel based on the AKE protocol of a digital signature, the steps of which include:

[0030] 1) Participant A calls KEM's key generation algorithm KGen to generate a one-time public and private key pair (epk, esk) for Party A.

[0031] ←KGen, and let the sent data x = epk; where epk is the KEM public key of participant A, and esk is the KEM private key of participant A;

[0032] 2) Participant A uses his own signature private key SK A Calculate the signature value {x} of the sent data x; then convert (x,{x})

[0033] Send to Party B;

[0034] 3) Party B uses Party A’s signature verification public key VK A Verify the signature value {x}. If the verification passes, the data x will be received.

[0035] =epk is used as input to call KEM's key encapsulation algorithm Encap to generate ciphertext c and encapsulation key K; a key confirmation data chk is derived based on the encapsulation key K and tag1 using the pseudo-random function PRF(·,·)

[0036] PRF(K,tag1), concatenates the ciphertext c and chk to get y=(c,chk) and uses its own signature private key SK B Sign (x,{x},y) to obtain the signature value {x,{x},y}; and use the pseudo-random function PRF(·,·) to derive the session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; then give (y,{x,{x},y}) to participant A;

[0037] 4) Participant A uses participant B’s signature verification public key VK B Verify the signature value {x,{x},y}. If the verification is successful, call the KEM decapsulation algorithm Decap with the ciphertext c and esk as input to decapsulate the encapsulation key K'; then use the pseudo-random function PRF(·,·) to recalculate the key confirmation data chk'=PRF(K',tag1) according to the encapsulation key K' and tag1, and compare it with the received key confirmation data chk'=? chk. If and only if the comparison is consistent, derive the session key ssk=PRF(K',tag2), otherwise terminate the execution of the protocol; where tag1 and tag2 are agreed upon arbitrary unequal strings.

[0038] A system for constructing an AKE protocol from an error-carrying PKE algorithm, characterized in that it includes a PKE transformation module and an AKE transformation module; wherein,

[0039] The PKE conversion module is used to convert the chosen plaintext one-way secure OW-CPA but with decryption error PKE into the chosen plaintext indistinguishable secure KEM that can disclose the error, denoted as IND-CPAwF KEM;

[0040] The AKE conversion module is used to convert the AKE protocol that cannot use the erroneous KEM into an AKE protocol that can use the erroneous KEM.

[0041] In order to be able to use Figure 4 The framework shown here allows the actual occurrence of decryption errors to safely construct a more efficient AKE protocol. There are two requirements: first, AKE is required to change from not handling decryption errors to being able to handle decryption errors; second, the PKE with errors is strengthened from satisfying OW-CPA security to satisfying IND-CPAwF security (but still with errors). Through the combination of the two steps, the KEM with errors and satisfying IND-CPAwF security can be used in the AKE protocol that can handle decryption errors, resulting in a secure and more efficient AKE protocol.

[0042] Therefore, a method for constructing an AKE protocol from an error-carrying PKE algorithm includes the following components:

[0043] 1. PKE transformation: Convert OW-CPA PKE with decryption errors into IND-CPAwF KEM.

[0044] 2.AKE conversion. Convert the AKE that cannot use the KEM with errors into an AKE that can use the KEM with errors.

[0045] Among them, the second part of AKE transformation is divided into two types:

[0046] 2.1 AKE based on pre-shared symmetric keys.

[0047] 2.2 AKE based on digital signature.

[0048] Specifically, the above PKE transformation is as follows:

[0049] KEM key generation algorithm: The key generation algorithm of KEM is the same as that of PKE, that is, the key generation algorithm of PKE is used to generate the public key and private key of the key encapsulation KEM.

[0050] KEM packaging algorithm:

[0051] (1) Randomly generate an encapsulated message m in the PKE plaintext space;

[0052] (2) Use the PKE encryption algorithm to encrypt and encapsulate the message m with the public key, and the resulting ciphertext is recorded as ciphertext value c;

[0053] (3) Input the encapsulated message m into the hash function H(·) to derive the encapsulation key K=H(m).

[0054] KEM's decapsulation algorithm:

[0055] (1) Use the PKE decryption algorithm to decrypt the ciphertext value c with the private key to obtain the encapsulated message m′ (a decryption error may occur, resulting in m′≠m);

[0056] (2) The decrypted encapsulated message m′ is input into the hash function H(·) to derive the encapsulation key K′=H(m′).

[0057] The innovation of the present invention lies in the use of the hash function H(·) in step (3) of the encapsulation algorithm and step (2) of the decapsulation algorithm. The previous transformation of the passively secure PKE into the passively secure KEM does not require this step.

[0058] Next, the above two AKE transformations are as follows:

[0059] 1.AKE based on pre-shared symmetric key:

[0060] In this type of AKE, identity authentication is implemented using a message authentication code (MAC) using a symmetric key.

[0061] The party that encapsulates the KEM ciphertext (i.e., the party that executes the above-mentioned KEM encapsulation algorithm Encap) additionally uses the pseudo-random function PRF(·,·) to input the encapsulation key K and tag1 to derive a key confirmation data chk=PRF(K,tag1), and includes it in the input data for calculating the message authentication code. At the same time, the pseudo-random function PRF(·,·) is used to input the encapsulation key K and tag2 to derive the session key ssk=PRF(K,tag2).

[0062] The party that decapsulates the KEM ciphertext (i.e., the party that executes the above-mentioned KEM decapsulation algorithm Decap) performs an additional confirmation operation after decapsulating and obtaining the encapsulation key K′, namely: using the pseudo-random function PRF(·,·) to input the encapsulation key K′ and tag1 to recalculate the key confirmation data chk′=PRF(K′,tag1), and compares it with the received key confirmation data chk′=?chk. If and only if the comparison is consistent, continue to execute the protocol and derive the session key ssk=PRF(K′,tag2) in the same way, otherwise terminate the execution of the protocol.

[0063] Among them, tag1≠tag2 can be any unequal fixed character string agreed upon by the protocol, which is used for differentiated PRF usage.

[0064] 2. AKE based on digital signature:

[0065] For this type of AKE, identity authentication is implemented using a digital signature using an asymmetric key.

[0066] The party that encapsulates the KEM ciphertext additionally uses the pseudo-random function PRF(·,·) to input the encapsulation key K and tag1 to derive a key confirmation data chk=PRF(K,tag1), and includes it in the input data for calculating the digital signature. At the same time, the pseudo-random function PRF(·,·) is used to input the encapsulation key K and tag2 to derive the session key ssk=PRF(K,tag2).

[0067] The party that decapsulates the KEM ciphertext performs an additional confirmation operation after decapsulating and obtaining the encapsulation key K′, namely: using the pseudo-random function PRF(·,·) to input the encapsulation key K′ and tag1 to recalculate the key confirmation data chk′=PRF(K′,tag1), and compares it with the received key confirmation data chk′=?chk. If and only if the comparison is consistent, continue to execute the protocol and derive the session key ssk′=PRF(K′,tag2) in the same way, otherwise terminate the execution of the protocol.

[0068] Among them, tag1≠tag2 can be any unequal fixed character string agreed upon by the protocol, which is used for differentiated PRF usage.

[0069] It should be noted that in any of the above methods, since there is a non-negligible probability of decryption errors in the encryption and decapsulation process, the decapsulation key may be inconsistent with the one before encapsulation (K′≠K). However, at this time, the comparison step of the key confirmation data chk′ and chk added by the above method will require the protocol to terminate in this situation; further, if chk′ and chk are consistent, it means that K′=K, so the protocol continues to execute and will derive a consistent session key ssk′=ssk.

[0070] The innovation of the present invention lies in the step of calculating and comparing chk by the pseudo-random function PRF (·,·), that is, the introduction of consistency confirmation and error termination steps. This step allows the decapsulation party to know whether a decryption error occurs, and avoid using the "insecure session key" for subsequent cryptographic operations when an error occurs, but directly discards and terminates, thereby avoiding the occurrence of data security issues.

[0071] At the same time, the two transformations of the present invention are related. Specifically, simply performing the AKE transformation for the purpose of using a KEM with a large decryption error does not ensure that the protocol using the KEM is safe. This is because the KEM with a large decryption error first needs to meet the IND-CPAwF security (which is not always true), and then combined with the AKE transformation provided by the present invention to ensure security. Therefore, the first transformation starts from the PKE with a large decryption error, first constructs a KEM with a large decryption error and IND-CPAwF security, and then this KEM can be used for the transformed AKE protocol. In other words, there is a sequence and a strong connection between the PKE transformation and the AKE transformation provided by the present invention.

[0072] Compared with the prior art, the present invention has the following positive effects:

[0073] The present invention can use a passively secure PKE with decryption errors to construct a secure AKE method and system. Specifically, the method firstly transforms the OW-CPA PKE with decryption errors into a KEM of IND-CPA and the error information does not affect its indistinguishable security (hereinafter referred to as IND-CPAwF) by a simple transformation; secondly, an additional confirmation step is introduced in the conventional authenticated key exchange protocol design, and the derived key is accepted only when it is confirmed that no decryption error occurs, otherwise the protocol is terminated or waited for re-execution.

[0074] This method can be used to relax the parameter selection of a certain type of PKE algorithm during design. This type of algorithm naturally has decryption errors (determined by the underlying mathematical difficulty problem). Therefore, if it is to be used in an error-intolerant protocol, it can only be used to impose additional restrictions on parameter selection to ensure that the probability of such errors is extremely small. The present invention proposes a method for constructing a secure AKE protocol in an error-tolerant manner, thereby providing the PKE algorithm designer with greater flexibility in parameter selection. At the same time, since a larger parameter selection range means that the algorithm itself can be optimized (originally abandoned by the restriction of "requiring extremely small decryption errors"), the algorithm designer can implement an algorithm with better performance and size performance. In addition, the cost of the transformation performed on the PKE algorithm by this method to remove the decryption error restriction and the introduction of additional steps in the AKE protocol design are often smaller than the original cost imposed on the algorithm performance size due to the decryption error restriction. That is to say: the performance size improvement brought about by relaxing and optimizing parameters by allowing larger decryption errors in the PKE algorithm design can still be clearly reflected in the improvement of the performance and size performance of the final AKE protocol after introducing a small amount of overhead according to this method. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1There are two constructions of the AKE protocol;

[0076] (a) AKE based on pre-shared symmetric key, (b) AKE based on digital signature.

[0077] Figure 2 Design a flow chart for the existing AKE.

[0078] Figure 3 This is the relationship diagram between PKE and KEM.

[0079] Figure 4 Design flow chart for AKE of the present invention.

[0080] Figure 5 The AKE transformation provided by the present invention is applied to an embodiment of an AKE protocol based on a pre-shared key.

[0081] Figure 6 The AKE transformation provided by the present invention is applied to an embodiment of an AKE protocol based on digital signature. DETAILED DESCRIPTION

[0082] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below through specific embodiments and drawings.

[0083] Figure 5 , Figure 6 These are modifications performed when the KEM transformed by the present invention is applied to AKE, and are specific embodiments when applied to AKE protocols based on pre-shared keys and digital signatures, respectively.

[0084] This transformation takes an existing PKE as input and outputs a KEM. Note that both the PKE and KEM before and after the transformation can have non-negligible decryption errors. Specifically, the PKE algorithm, which includes the key generation algorithm KGen, the encryption algorithm Enc, and the decryption algorithm Dec, is transformed into a KEM algorithm, which includes the key generation algorithm KGen, the encapsulation algorithm Encap, and the decapsulation algorithm Decap.

[0085] The specific steps have been described in the previous article and will not be repeated here.

[0086] Figure 5 The AKE transformation provided by the present invention is applied to an embodiment of an AKE protocol based on a pre-shared key.

[0087] It uses the KEM (with non-negligible decryption error) obtained by the transformation of the present invention, and adds extra steps to ensure the security of the protocol when applying it to the AKE based on the pre-shared key. This type of AKE protocol assumes that the communicating parties A and B have pre-shared the key psk in advance, and how to achieve the sharing of psk is not included in the discussion.

[0088] Specifically, the modified AKE protocol process is as follows:

[0089] Participant A (initiator):

[0090] (1) Call KEM's key generation algorithm KGen to generate a one-time public and private key pair (epk, esk) for participant A.

[0091] ←KGen, and send data x=epk to participant B;

[0092] (2) Use the pre-shared key psk between participants A and B to calculate the MAC value [x] for the sent data

[0093] =MAC(psk,x);

[0094] Then send the data (x, [x]) to participant B.

[0095] Party B (Responder):

[0096] (3) Using the pre-shared key psk between participants A and B, the received data x is calculated and verified

[0097] MAC value MAC(psk,x)? = [x];

[0098] (4) If the verification is successful, the received data x = epk is used as input, and the key encapsulation algorithm Encap of KEM is called to generate the ciphertext and the encapsulation key (c, K) ← Encap (epk). Here, Party B uses the epk received from Party A as input and calls the Encap algorithm to independently generate (c, K). This step does not require additional interaction with Party A.

[0099] (5) Using the encapsulation key K generated in step (4), derive the key confirmation data chk = PRF (K, tag1);

[0100] (6) Let the reply data be equal to the concatenation of c generated in step (4) and chk generated in step (5), y = (c, chk), and use psk to calculate the MAC value [x, [x], y] = MAC (psk, (x, [x], y)) for the concatenation of the received and reply data;

[0101] (7) Using the encapsulation key K generated in step (4), derive the session key ssk = PRF(K, tag2);

[0102] Then the data (y,[x,[x],y]) is returned to participant A.

[0103] Participant A (initiator):

[0104] (8) Using the pre-shared key psk between A and B, concatenate the sent data (x, [x]) and the received data y, and then calculate and verify the MAC value MAC(psk, (x, [x], y))? = [x, [x], y];

[0105] (9) If the verification is successful, the ciphertext c extracted from the received data y and the esk of A in step (1) are used as input, and the KEM decapsulation algorithm Decap is called to decapsulate the encapsulation key K' = Decap (esk, c);

[0106] (10) Extract chk from the received data y, use the encapsulation key K' decrypted in step (9), recalculate the key confirmation data and verify PRF(K',tag1)? =chk;

[0107] (11) If the verification succeeds, the encapsulation key K' extracted in step (9) is used to derive the session key ssk = PRF(K', tag2); otherwise, the protocol is terminated.

[0108] It should be noted that tag1 and tag2 in steps (5), (7), (10), and (11) in the above process are arbitrary unequal fixed strings defined by the protocol itself and should be regarded as protocol parameter constants.

[0109] In the embodiment, steps (5) and (10) are steps added by the AKE transformation provided by the present invention. After deleting these two steps, the remaining steps constitute an AKE protocol based on a pre-shared key that cannot handle decryption errors.

[0110] Combined with the previous description of AKE transformation, in this embodiment, the "party that encapsulates the KEM ciphertext" is the responder B, and the "party that decapsulates the KEM ciphertext" is the initiator A; and in the embodiment, "including the key confirmation data chk in the input data for calculating the message authentication code" is reflected in chk as part of the reply data y, and making MAC input in the calculation of the message authentication code [x, [x], y].

[0111] It should be noted that this embodiment is only an example for illustrating the AKE transformation step of the present invention. There is more than one AKE protocol based on pre-shared keys, and the protocol flow and details may have various differences. The AKE transformation step in the present invention is not only applicable to the protocol flow of the embodiment, but also applicable to any AKE protocol with KEM as a construction element.

[0112] Figure 6 The AKE transformation provided by the present invention is applied to an embodiment of an AKE protocol based on digital signature.

[0113] It uses the KEM (with non-negligible decryption error) obtained by the transformation of the present invention, and adds additional steps to ensure the security of the protocol when applying it to the AKE based on digital signature. This type of AKE protocol assumes the existence of a public key infrastructure (PKI), that is, it assumes that the communicating parties A and B each have their own signature / verification public and private key pairs (VK, SK), and can obtain the other party's verification public key (for example, through the certificate sent with the protocol message flow) and verify the legitimacy of the public key. The private key SK of the participant A is A A generates it himself and requests the CA to issue him a signature public key VK A A's certificate, so anyone can obtain A's signature verification public key VK through this certificate A , and trust the certificate issued by the CA. For the private key SK of party B B With the signature public key VK B Same reason.

[0114] Specifically, the modified AKE protocol process is as follows:

[0115] Participant A (initiator):

[0116] (1) Call KEM's key generation algorithm KGen to generate a one-time public and private key pair (epk, esk) for participant A.

[0117] ←KGen, and let the sent data x=epk;

[0118] (2) Use your own signature private key SK A , calculate the signature value {x} = Sign(SK A ,x);

[0119] (Then send data x,{x})

[0120] Party B (Responder):

[0121] (3) Use the signature verification public key VK of participant A A , verify the signature value Ver(VK A ,x,{x})?=1;

[0122] (4) If the verification is successful, the received data x = epk is used as input, and the key encapsulation algorithm Encap of KEM is called to generate the ciphertext and the encapsulation key (c, K)←Encap(epk). Here, Party B uses the epk received from Party A as input and calls the Encap algorithm to independently generate (c, K). This step does not require additional interaction with Party A. The ciphertext c is the ciphertext encrypted with the encapsulation key K using epk.

[0123] (5) Using the encapsulation key K generated in step (4), derive the key confirmation data chk = PRF (K, tag1);

[0124] (6) Let the reply data be the concatenation of c generated in step (4) and chk generated in step (5) y = (c, chk), and use your own signature private key SK B , calculate the signature value {x,{x},y} for the concatenation of the received and replied data =

[0125] Sign(SK B ,(x,{x},y));

[0126] (7) Using the encapsulation key K generated in step (4), derive the session key ssk = PRF(K, tag2);

[0127] The data (y,{x,{x},y}) is then returned to participant A.

[0128] Participant A (initiator):

[0129] (8) Use the signature verification public key VK of participant B B , concatenate the sent data and the received data y to verify the signature value Ver(VK B ,(x,{x},y),{x,{x},y})? =1; that is, using the signature verification public key VK of participant B B Verify the signature value {x,{x},y};

[0130] (9) If the verification is successful, c and esk are used as inputs to call the KEM decapsulation algorithm Decap to decapsulate the encapsulation key K' = Decap (esk, c);

[0131] (10) Use the encapsulation key K' extracted in step (9) to recalculate the key confirmation data and verify

[0132] PRF(K',tag1)?=chk;

[0133] (11) If the verification succeeds, the encapsulation key K' extracted in step (9) is used to derive the session key ssk = PRF(K', tag2); otherwise, the protocol is terminated.

[0134] Similar to the embodiment based on pre-shared key, tag1 and tag2 in steps (5), (7), (10), and (11) in the above process are any unequal fixed strings defined by the protocol itself and should be regarded as protocol parameter constants. Different from the embodiment based on pre-shared key, the signature verification public key VK in steps (3) and (8) is A , VK B All are provided by PKI, that is, it is assumed that a CA provides certificates containing the identities of participant A and participant B and their corresponding signature verification public keys. For simplicity, it is assumed that participant A and participant B have downloaded and verified each other's certificates. It should be noted that the certificates of participant A and participant B can also be included in the above protocol flow for transmission, but the signed data needs to additionally include the certificate data itself: for example, the data transmitted by participant A in step (2) becomes (x,cert_A,{x,cert_A}), where cert_A is a certificate issued by a CA trusted by B containing the identity of participant A and VK A The certificate of the data x is a signature of the certificate cert_A, that is, Sign(SK A ,x||cert_A), the certificate data also needs to be added for verification during signature verification; similarly, the data sent by participant B in step (6) can be added with participant B’s certificate cert_B, and this part of data is also added to the signature data.

[0135] In the embodiment, steps (5) and (10) are steps added by the AKE transformation provided by the present invention. After deleting these two steps, the remaining steps constitute an AKE protocol based on digital signatures that cannot handle decryption errors.

[0136] Combined with the previous description of AKE transformation, in this embodiment, the "party that encapsulates the KEM ciphertext" is the responder B, and the "party that decapsulates the KEM ciphertext" is the initiator A; and in the embodiment, "including the key confirmation data chk in the input data for calculating the digital signature" is reflected in chk as part of the reply data y, and as the signed message input in the calculation of the digital signature {x,{x},y}.

[0137] It should be noted that this embodiment is only an example to illustrate the AKE transformation step of the present invention. There is more than one AKE protocol based on digital signature, and the protocol flow and details can have various differences. The AKE transformation step in the present invention is not only applicable to the protocol flow of the embodiment, but also applicable to any AKE protocol with KEM as a construction element.

[0138] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.

Claims

1. A method for constructing an AKE protocol from an erroneous PKE algorithm, the steps comprising: 1) Convert the chosen-plaintext one-way secure OW-CPA PKE with decryption errors into a chosen-plaintext indistinguishable secure KEM that can disclose errors, denoted as IND-CPAwF KEM; 2) Convert the AKE protocol that cannot use the erroneous KEM into the AKE protocol that can use the erroneous KEM.

2. The method according to claim 1, characterized in that The KEM of the IND-CPAwF includes a KEM key generation algorithm, a KEM encapsulation algorithm and a KEM decapsulation algorithm; wherein, The key generation algorithm of KEM is: using the key generation algorithm of PKE to generate the public key and private key of the key encapsulation KEM; The encapsulation algorithm of KEM is as follows: randomly generate an encapsulated message m in the plaintext space of PKE; use the encryption algorithm of PKE to encrypt the encapsulated message m with the public key of the key encapsulated KEM, and the obtained ciphertext is recorded as the ciphertext value c; input the encapsulated message m into the hash function H(·) to derive the encapsulation key K=H(m); The decapsulation algorithm of KEM is: use the PKE decryption algorithm to decrypt the ciphertext value c with the private key of the key-encapsulated KEM to obtain the encapsulated message m′; the decrypted encapsulated message m′ is input into the hash function H(·) to derive the encapsulation key K′=H(m′).

3. The method according to claim 2, characterized in that The AKE protocol that can use an erroneous KEM is an AKE based on a pre-shared symmetric key; wherein, the party executing the encapsulation algorithm of the KEM uses a pseudo-random function PRF (·,·) to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and includes it in the input data for calculating the message authentication code MAC, and uses the pseudo-random function PRF (·,·) to derive a session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; the party executing the decapsulation algorithm of the KEM uses a pseudo-random function PRF (·,·) to recalculate the key confirmation data chk′=PRF(K′,tag1) according to the encapsulation key K′ and tag1, and compares chk′=? chk with the received key confirmation data, and derives the session key ssk=PRF(K′,tag2) when and only when the comparison is consistent, otherwise the execution of the protocol is terminated; wherein tag1 and tag2 are any unequal character strings agreed upon.

4. The method according to claim 2, characterized in that: The AKE protocol that can use an erroneous KEM is an AKE based on digital signatures; wherein, the party executing the encapsulation algorithm of KEM uses a pseudo-random function PRF (·,·) to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and includes it in the input data for calculating the digital signature, and uses the pseudo-random function PRF (·,·) to derive a session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; the party executing the decapsulation algorithm of KEM uses a pseudo-random function PRF (·,·) to recalculate the key confirmation data chk′=PRF(K′,tag1) according to the encapsulation key K′ and tag1, and compares chk′=? chk with the received key confirmation data, and derives the session key ssk′=PRF(K′,tag2) when and only when the comparison is consistent, otherwise the execution of the protocol is terminated; wherein, tag1 and tag2 are any unequal character strings agreed upon.

5. A method for establishing a secure channel based on the AKE protocol of a pre-shared key, the steps comprising: 1) Participants A and B participating in the communication determine the pre-shared key psk; 2) Party A calls KEM's key generation algorithm KGen to generate a one-time public-private key pair (epk, esk)←KGen for Party A, and sets the sent data x=epk; where epk is Party A's KEM public key, and esk is Party A's KEM private key; 3) Party A uses the pre-shared key psk to calculate the MAC value [x] of data x and sends (x, [x]) to Party B; 4) Party B uses the pre-shared key psk to calculate the MAC value of the received data x, and verifies whether the MAC value MAC(psk,x) calculated by itself is consistent with the received [x]. If the verification is successful, the key encapsulation algorithm Encap of KEM is called according to the received data x=epk to generate the ciphertext c and the encapsulation key K. Then, the pseudo-random function PRF(·,·) is used to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, the ciphertext c and chk are concatenated to obtain y=(c,chk), and the pre-shared key psk is used to calculate the MAC value [x,[x],y] of (x,[x],y). The pseudo-random function PRF(·,·) is used to derive the session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2. Then (y,[x,[x],y]) is given to Party A. 5) Party A uses the pre-shared key psk to calculate the MAC value of (y, [x, [x], y]) and verifies the MAC value MAC(psk, (x, [x], y)) calculated by itself ? = [x, [x], y]; if the verification is successful, the decapsulation algorithm Decap of KEM is called with the ciphertext c and esk as input to decapsulate the encapsulation key K'; then the pseudo-random function PRF(·, ·) is used to recalculate the key confirmation data chk' = PRF(K', tag1) according to the encapsulation key K' and tag1, and compare it with the received key confirmation data chk' = ? chk. If and only if the comparison is consistent, the session key ssk = PRF(K', tag2) is derived, otherwise the execution of the protocol is terminated; where tag1 and tag2 are any unequal strings agreed upon.

6. A method for establishing a secure channel based on the AKE protocol of a digital signature, the steps of which include: 1) Party A calls KEM's key generation algorithm KGen to generate a one-time public-private key pair (epk, esk)←KGen for Party A, and sets the sent data x=epk; where epk is Party A's KEM public key, and esk is Party A's KEM private key; 2) Participant A uses his own signature private key SK A Calculate the signature value {x} of the sent data x; then send (x,{x}) to participant B; 3) Party B uses Party A’s signature verification public key VK A Verify the signature value {x}. If the verification is successful, the received data x = epk is used as input to call KEM's key encapsulation algorithm Encap to generate ciphertext c and encapsulation key K. Use the pseudo-random function PRF (·, ·) to derive a key confirmation data chk = PRF (K, tag1) based on the encapsulation key K and tag1, concatenate the ciphertext c and chk to get y = (c, chk) and use your own signature private key SK B Sign (x,{x},y) to obtain the signature value {x,{x},y}; and use the pseudo-random function PRF(·,·) to derive the session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; then give (y,{x,{x},y}) to participant A; 4) Participant A uses participant B’s signature verification public key VK B Verify the signature value {x,{x},y}. If the verification is successful, call the KEM decapsulation algorithm Decap with the ciphertext c and esk as input to decapsulate the encapsulation key K'; then use the pseudo-random function PRF(·,·) to recalculate the key confirmation data chk'=PRF(K',tag1) according to the encapsulation key K' and tag1, and compare it with the received key confirmation data chk'=? chk. If and only if the comparison is consistent, derive the session key ssk=PRF(K',tag2), otherwise terminate the execution of the protocol; where tag1 and tag2 are agreed upon arbitrary unequal strings.

7. A system for constructing an AKE protocol from an error-carrying PKE algorithm, characterized in that: It includes PKE transformation module and AKE transformation module; wherein, The PKE conversion module is used to convert the chosen plaintext one-way secure OW-CPA but with decryption error PKE into the chosen plaintext indistinguishable secure KEM that can disclose the error, denoted as IND-CPAwF KEM; The AKE conversion module is used to convert the AKE protocol that cannot use the erroneous KEM into an AKE protocol that can use the erroneous KEM.

8. The system according to claim 7, characterized in that The KEM of the IND-CPAwF includes a KEM key generation algorithm, a KEM encapsulation algorithm and a KEM decapsulation algorithm; wherein, The key generation algorithm of KEM is: using the key generation algorithm of PKE to generate the public key and private key of the key encapsulation KEM; The encapsulation algorithm of KEM is as follows: randomly generate an encapsulated message m in the plaintext space of PKE; use the encryption algorithm of PKE to encrypt the encapsulated message m with the public key of the key encapsulated KEM, and the obtained ciphertext is recorded as the ciphertext value c; input the encapsulated message m into the hash function H(·) to derive the encapsulation key K=H(m); The decapsulation algorithm of KEM is: use the PKE decryption algorithm to decrypt the ciphertext value c with the private key of the key-encapsulated KEM to obtain the encapsulated message m′; the decrypted encapsulated message m′ is input into the hash function H(·) to derive the encapsulation key K′=H(m′).

9. The system according to claim 8, characterized in that The AKE protocol that can use an erroneous KEM is an AKE based on a pre-shared symmetric key; wherein, the party executing the encapsulation algorithm of the KEM uses a pseudo-random function PRF (·,·) to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and includes it in the input data for calculating the message authentication code MAC, and uses the pseudo-random function PRF (·,·) to derive a session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; the party executing the decapsulation algorithm of the KEM uses a pseudo-random function PRF (·,·) to recalculate the key confirmation data chk′=PRF(K′,tag1) according to the encapsulation key K′ and tag1, and compares chk′=? chk with the received key confirmation data, and derives the session key ssk=PRF(K′,tag2) when and only when the comparison is consistent, otherwise the execution of the protocol is terminated; wherein tag1 and tag2 are any unequal character strings agreed upon.

10. The system according to claim 8, characterized in that The AKE protocol that can use an erroneous KEM is an AKE based on digital signatures; wherein, the party executing the encapsulation algorithm of KEM uses a pseudo-random function PRF (·,·) to derive a key confirmation data chk=PRF(K,tag1) according to the encapsulation key K and tag1, and includes it in the input data for calculating the digital signature, and uses the pseudo-random function PRF (·,·) to derive a session key ssk=PRF(K,tag2) according to the encapsulation key K and tag2; the party executing the decapsulation algorithm of KEM uses a pseudo-random function PRF (·,·) to recalculate the key confirmation data chk′=PRF(K′,tag1) according to the encapsulation key K′ and tag1, and compares chk′=? chk with the received key confirmation data, and derives the session key ssk′=PRF(K′,tag2) when and only when the comparison is consistent, otherwise the execution of the protocol is terminated; wherein, tag1 and tag2 are any unequal character strings agreed upon.