Method and apparatus for authenticated lattice-based key agreement or key encapsulation

Through noise multiplication technology and final seed calculation, the problem of lack of authentication and computational burden in the key agreement protocol is solved, and efficient and secure key agreement is achieved, which is suitable for quantum security scenarios and resists man-in-the-middle attacks.

CN114008967BActive Publication Date: 2024-10-18KONINKLIJKE PHILIPS NV

Patent Information

Application Number
CN202080044558.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-11
Publication Date
2024-10-18
Estimated Expiration
2040-06-11

AI Technical Summary

Technical Problem

Existing key agreement protocols lack effective authentication mechanisms when faced with man-in-the-middle attacks and quantum security requirements, and impose a heavy computational burden on resource-constrained devices. The public key needs to be kept confidential, which affects the efficiency and effectiveness of the protocol. Security.

Method used

By using noise multiplication techniques to derive the public key from a pre-shared private key, and by calculating the final seed to reduce the number of hash function calculations, implicit authentication and channel authentication are achieved, allowing for asymmetric digital signatures to be performed without the need for Explicit authentication and allows the public key to not need to be kept secret.

Benefits of technology

It improves the security and efficiency of the key agreement protocol, reduces the demand for resources, enhances resistance to man-in-the-middle attacks, and reduces the confidentiality requirements of the public key, making it suitable for quantum security scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114008967B_ABST
    Figure CN114008967B_ABST
Patent Text Reader

Abstract

Some embodiments relate to a system having a first cryptographic device (10) and a second cryptographic device (20). The devices can calculate a final seed based on a pre-shared secret known to the devices and a pre-seed exchanged between them. The final seed can be used to derive a public object (a).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The presently disclosed subject matter relates to a first cryptographic device, a second cryptographic device, a first cryptographic method, a second cryptographic method, and a computer-readable medium. Background Art

[0002] In cryptography, a key agreement protocol is a protocol by which two or more parties can agree on such a key. The agreed upon key can then be used to protect further communications between the parties, e.g., to authenticate and / or encrypt further communications. An attacker who eavesdrops on all communications between the two parties should learn nothing about the key. However, while an attacker who sees the same communications knows nothing or very little, the parties themselves can deduce the shared key.

[0003] Practical key agreement protocols were introduced in 1976, when Whitfield Diffie and Martin Hellman introduced the concept of public key cryptography. They proposed a system for key agreement between two parties that exploited the apparent difficulty of computing logarithms over a finite field GF(q) with q elements. Using this system, two users can agree on a symmetric key.

[0004] Key agreement protocols are useful in many applications of multi-party communication, for example, in application areas such as the Internet of Things, ad hoc wireless networks, etc. Key agreement can be used to protect links between devices. Another example is the communication between a reader and an electronic tag (such as a card reader and a smart card) or a tag reader and a tag (such as an RFID tag or an NFC tag).

[0005] To facilitate secure communications between parties, key agreement protocols are sometimes further subdivided into cryptographic key exchange (KEX) and cryptographic key encapsulation (KEM) schemes. Cryptographic key encapsulation (KEM) schemes use asymmetric cryptography to establish a shared secret between two parties, using publicly known (e.g., public keys) and secretly possessed (e.g., secret keys) values ​​of each party.

[0006] KEX schemes involve each party exchanging a public key that is then used solely by the other party along with its own secret key to compute a common shared secret. A well-known example of a KEX scheme is the Diffie-Hellman key exchange mentioned above, whose security is based on solving the discrete logarithm problem. In general, both parties can influence the outcome, so neither party can force the choice of the key. An interesting feature of some KEX schemes is that in fact the final shared secret is never exchanged between the two parties, not even in encrypted form, but is instead computed independently by the parties at each end. This leads to a desirable feature called forward secrecy, ensuring that even if a future attacker compromises one party's long-term key, the confidentiality of encrypted messages exchanged in the past cannot be compromised.

[0007] The KEM scheme establishes a shared secret between two entities or parties using asymmetric cryptography by one party (usually the initiator of the communication) to encrypt using the public key of the other party and transmit the shared secret to the other party (called the responder), which can then decrypt using her secret key and then use it to communicate securely with the initiator. The KEM scheme cannot achieve forward secrecy because any attacker who compromises the key of a party's past session and records all messages exchanged between the parties in that session can recover the shared secret for that particular session.

[0008] Since the publication of Diffie and Hellman's paper, new concerns have been raised. Due to the increased security requirements of the IoT, key exchange schemes also need to achieve high efficiency and low communication or bandwidth requirements. In addition, key agreement protocols should preferably be secure against classical as well as quantum-capable adversaries.

[0009] Furthermore, a disadvantage of these key agreement protocols is that they do not authenticate the parties. This makes them vulnerable to man-in-the-middle (MITM) attacks. In a man-in-the-middle attack, an attacker may place himself between a first party and a second party. The attacker may then negotiate a first shared key with the first party and a second shared key with the second party. Thus, the attacker is able to decrypt everything. Typically, both KEX and KEM type protocols require, for example, digital signatures to avoid this problem. Signatures are an operation that is also typically avoided in lightweight protocols.

[0010] One way to solve this is the so-called authenticated key exchange (AKE). The AKE protocol can negotiate keys and authenticate the identities of the communicating parties at the same time. A particularly important AKE is the password-based AKE (PAKE). PAKE uses a cryptographically insecure human-memorable password (or passphrase) to authenticate and negotiate symmetric session keys. In PAKE, the password can be shared in advance by both parties.

[0011] In the paper “Efficient Implementation of Password-Based Authenticated Key Exchange from RLWE and Post-Quantum TLS” by Xinwei Gao et al., which is hereby incorporated by reference, Figure 2 A post-quantum cryptography-based authenticated key exchange (PAKE) protocol called RLWE-PPK is proposed in this paper.

[0012] RLWE-PPK is a protocol between two parties (party i and party j) with a pre-shared password pwd. Each party calculates two different hashes based on the shared password: γ1=H1(pwd) and γ2=H2(pwd), which are used to mask and unmask the public keys of each party before and after transmission to the other party. In order to calculate the shared key, each party needs to calculate further hashes, bringing the total number of hashes to three per party. RLWE-PPK is a two-round implicitly authenticated key protocol. Implicit authentication means that no explicit confirmation of authentication can be calculated, but if the authentication fails, the parties will not be able to obtain the same key, which in turn can protect the communication from being leaked to an unauthenticated party.

[0013] The known protocol has several disadvantages. For example, it requires three hashes to be calculated for each key agreement. This is a burden for resource-constrained devices. In addition, the known protocol requires the public key to remain confidential because cryptographic hashes can be calculated based on the knowledge of the public key and eavesdropping on the communication. Summary of the invention

[0014] It would be advantageous to have an apparatus and / or method for improved authenticated key agreement.Cryptographic apparatus and methods are described and claimed herein to address these and other problems.

[0015] Existing key agreement protocols, even quantum-safe ones, are typically not implicitly or explicitly authenticated. It would be advantageous if existing key agreement protocols could be extended to authenticated key agreement protocols. Authenticated key agreement protocols are more suitable for use in real-world scenarios where two parties need to verify a communication channel.

[0016] The presently disclosed subject matter includes a first cryptographic device, a second cryptographic device, a first cryptographic method, a second cryptographic method, and a computer-readable medium. The first and second cryptographic devices can be configured to calculate a final seed based on a pre-shared secret (e.g., a password) and form a pre-seed that is exchanged between the devices. The final seed can be used to calculate a public object, which in turn can be used to calculate a public key, such as to perform a key agreement protocol.

[0017] Embodiments help avoid man-in-the-middle attacks. Since a first cryptographic device (also referred to as a first party) and a second cryptographic device (also referred to as a second party) have a pre-shared secret, they can derive a common object from which a public key can be derived. The attacker does not have access to the cryptography and therefore cannot compute the public object. Therefore, he cannot insert himself into the communication between the parties, as the public object is required to perform correct computations. Interestingly, the strength of the cryptography is mainly related to the strength of the authentication; the strength of the derived shared key may not be affected. In particular, a key agreement protocol according to an embodiment may be as strong as without authentication, e.g., quantum-resistant.

[0018] Furthermore, embodiments may be implemented efficiently. For example, in embodiments, the parties may compute as little as a single hash function, e.g., to compute a final seed. If desired, explicit authentication may be obtained without asymmetric digital signatures. Furthermore, there is no requirement that the public key be secret. Note that, depending on embodiments, all or most candidates based on the NIST Post-Quantum Cryptography (PQC) lattice may be suitable for authentication.

[0019] In an embodiment, the pre-seed may be communicated in plain text over the communication channel, while the pre-shared secret is not transmitted over the channel or in plain text. For example, the communication channel may also be used for other data exchanged between devices in a key agreement protocol.

[0020] Aspects of the presently disclosed subject matter include cryptographic methods.

[0021] Embodiments of the method may be implemented as a computer-implemented method on a computer, or in dedicated hardware, or in a combination of both. Executable code for embodiments of the method may be stored on a computer program product. Examples of computer program products include memory devices, optical storage devices, integrated circuits, servers, online software, etc. Preferably, the computer program product includes non-transient program code stored on a computer-readable medium for executing embodiments of the method when the program product is run on a computer.

[0022] In an embodiment, the computer program comprises computer program code adapted to perform all or part of the steps of an embodiment of the method when the computer program is run on a computer.Preferably, the computer program is embodied on a computer readable medium.

[0023] Another aspect of the presently disclosed subject matter provides a method of making a computer program available for download. This aspect will be used when the computer program is uploaded to, for example, Apple's App Store, Google's Play Store, or Microsoft's Windows Store, and when the computer program is available for download from such stores. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Further details, aspects and embodiments will be described by way of example with reference to the accompanying drawings. The elements in the drawings are illustrated for simplicity and clarity and are not necessarily drawn to scale. In the drawings, elements corresponding to elements already described may have the same reference numerals. In the drawings,

[0025] Figure 1 schematically illustrates an example of an embodiment of the KEX protocol,

[0026] Figure 2schematically illustrates an example of an embodiment of the KEM protocol,

[0027] Figure 3 schematically illustrates an example of an embodiment of the protocol,

[0028] Figure 4 schematically illustrates an example of a cryptographic system according to an embodiment,

[0029] Figure 5a schematically illustrates an example of a cryptographic method according to an embodiment,

[0030] Figure 5b schematically illustrates an example of a cryptographic method according to an embodiment,

[0031] Figure 6a schematically shows a computer-readable medium having a writable portion comprising a computer program according to an embodiment,

[0032] Figure 6b A representation of a processor system according to an embodiment is schematically shown.

[0033] List of reference numerals:

[0034] 10 First Cryptographic Device

[0035] 20 Second password device

[0036] 10.1-10.3 Password Operations

[0037] 11.1 Cryptographic Messages

[0038] 20.1-20.2 Password Operations

[0039] 21.1、21.2 Cryptographic Messages

[0040] 13 Outside communications

[0041] 14-15 Key Agreement Protocol

[0042] 16-17 News

[0043] 31 Registration Phase

[0044] 32 Key negotiation phase

[0045] 33 Use phase

[0046] 300 First Cryptographic Device

[0047] 301 Password System

[0048] 305 Communication Interface

[0049] 315 Public / Private Key Generator

[0050] 325 Original Key Generator

[0051] 335 Blending Unit

[0052] 340 Decapsulation Unit

[0053] 350 Second password device

[0054] 355 Communication Interface

[0055] 360 Public Key Acquisition Tool

[0056] 365 Public / Private Key Generator

[0057] 375 Original Key Generator

[0058] 385 Harmony Data Generator

[0059] 390 Encapsulator

[0060] 1000 Computer readable medium

[0061] 1010 Writable part

[0062] 1020 Computer Programs

[0063] 1110 Integrated Circuit

[0064] 1120 Processing Unit

[0065] 1122 Memory

[0066] 1124 (One or more) ASIC

[0067] 1126 Communication Components

[0068] 1130 Interconnect

[0069] 1140 Processor System DETAILED DESCRIPTION

[0070] While the presently disclosed subject matter is susceptible of embodiment in many different forms, one or more specific embodiments are shown in the drawings and will be described in detail herein, it being understood that this disclosure is to be considered as an exemplification of the principles of the disclosed subject matter and is not intended to be limited to the specific embodiments shown and described.

[0071] Hereinafter, for the sake of understanding, the elements of the embodiments are described in operation. However, it is obvious that the various elements are arranged to perform the functions described as being performed by them.

[0072] Furthermore, the presently disclosed subject matter is not restricted to the embodiments, since features described herein or recited in mutually different dependent claims may be combined.

[0073] Various embodiments are disclosed below. Figure 1-3 , various protocols are described for which the first cryptographic device 10 and the second cryptographic device 20 may be configured. In particular, the first cryptographic device 10 and the second cryptographic device 20 may be arranged for a key agreement protocol, in particular for an authenticated key agreement protocol, more particularly for a password authenticated key agreement protocol, or password authenticated key exchange (PAKE).

[0074] Embodiments may be based on so-called noisy multiplication. For example, in order to derive a public key from a private key, the first cryptographic device 10 and the second cryptographic device 20 may be configured to multiply a public object (a) with the private key to obtain a public key using noisy multiplication. Many examples of noisy multiplication are known, for example, used in cryptographic key agreement protocols such as Round5, Saber, Kyber, NewHope and Frodo. These are examples of lattice-based key exchange and / or key encapsulation mechanisms that allow two parties to agree on a public key. In those schemes, the parameter a (which is typically public) can be used to obtain the public key components b and u from the secrets r and s of device 10 and device 20, respectively. At least two key agreement variants can be used: the KEX protocol and the KEM protocol. In Figure 1-2 The following symbols are used:

[0075] a represents a common object known to the first cryptographic device 10 and the second cryptographic device 20. For example, the common object may be, for example, a polynomial in a given ring, such as the ring used in RLWE or RLWR, or a matrix with integer entries, such as the matrix used in LWE or LWR, or a matrix with polynomial entries,

[0076] r and s represent the secrets of each party (eg, devices 10 and 20).

[0077] b and u represent the public keys or public key shares of each party. For example, obtained as the noise product of a*r or a*s. The * operation can represent noise multiplication. Noise multiplication is a one-way function of the underlying cryptographic problem, such as (R)LWE or (R)LWR or their modular versions, etc.

[0078] For example, when referring to LWR a*r, it can be implemented as Round((Ar(mod q)),p,q). This can be the product r, which is a vector of length n multiplied by an n×n square matrix A modulo q. The result is then rounded to integers p and q by performing p / q(Ar)(mod q), where p <q。

[0079] c represents the encapsulated data

[0080] h represents auxiliary data, including the harmonization bit

[0081] The function sd is configured to produce a final seed τ according to its input, and to generate a common object a according to the final seed τ.

[0082] The function grc is a function that generates reconciliation data for its input. For example, the function grc(k) can be configured to return the reconciliation bits from the original key k. The function grc can also be called get_reconciliation(k).

[0083] Function rc is a function that reconciles the original key using the reconciliation data. For example, rc(k',h) may be a function that reconciles the original key k given the reconciliation bit h. Function rc may also be called reconciliate(k',h).

[0084] The function ecp is a function that encapsulates data using the original key. For example, ecp(k,K) can represent that the transmission key K is encapsulated with the original key k. For example, the encapsulation function can mask the key K with the key k so that an error in k has a limited effect on m, such as a linear effect. For example, if k is Z q If the key K is an element on Z, such as a vector, matrix, or polynomial, then the key K can also be in Z q Indicated in.

[0085] The encapsulation may be performed component by component, for example, c=k+K·(q / 2)(mod q). The modulus q may be an even number, and in particular may be a power of 2. The transmission key K may be a key that may be used as a result of a key agreement protocol. For example, the transmission key may be used to protect further messages between the parties. Further protection may be authentication and / or encryption of further messages.

[0086] The function dcp is a function for decapsulating encapsulated data, for example, dcp(c,k') can decapsulate data c using the original key k' and return, for example, a bit string K. The function dcp can also be called decapsulate(c,k'). For example, k' can be subtracted for decapsulation and rounded to the nearest multiple of q / 2.

[0087] In an embodiment, additional information specific to each party is used to derive the final seed τ, which is referred to as context information. The context information may include secret information p, for example, a secret for untrusted parties, such as parties other than the first cryptographic device 10 and the second cryptographic device 20, or parties other than the first cryptographic device 10 and the second cryptographic device 20 and multiple trusted parties (e.g., manufacturers). The context information may be non-confidential, such as public. Using context information to derive the final seed can improve the assurance of the authenticity and freshness of its communication channel. A distinction is made between non-secret information shared in the key agreement protocol (e.g., pre-seed σ) and other information z that is not secret but not shared in the key agreement protocol itself. Examples of other information z include network configuration data, public random beacons, and the like.

[0088] For example, to obtain a password authenticated key exchange (PAKE), the parties may share a secret p, such as a password, such as a PIN. The parties may compute a parameter a for their communication link as a = drbg(hash(σ, p)), where σ is a pre-seed, also called a public seed, such as a seed that may be exchanged during the protocol, even in plain text. The pre-seed may be used as an input to derive a final seed τ therefrom. The public object may be derived from the final seed τ.

[0089] With this construction, if the parties share the same p (which is at least implicitly authenticated), they will establish a secure connection. The public components b and u exchanged do not provide information about p, since s and r are also secret. In particular, if s and r are chosen randomly, it can be highly guaranteed that b and u do not provide information about p. Note that the security of the link does not depend on the amount of entropy in p, such as in a PIN, because the confidentiality guarantees in the key K do not depend on the confidentiality of the public object. Advantages of this approach include: (i) fewer hashes need to be computed to obtain PAKE, and (ii) easier integration into the existing NIST PQC proposal, which computes a public object a from a seed, e.g., a=drbg(seed). Integration can include changing the way the seed is obtained.

[0090] For example, in an embodiment, the parties are configured to:

[0091] - Obtain a public pre-seed σ. For example, the first party may generate a pre-seed, such as by using a random number generator. The first party may send the pre-seed to the second party. In this sense, the pre-seed may be considered public because it may be shared without cryptographic protection.

[0092] -Obtain context-dependent input, such as secret p, such as a password, and / or other information z, based on which the final seed τ can be calculated. For example, τ = Hash(σ|p), for example, τ = Hash(σ|p|z), etc., where hash() represents a hashing function and | represents concatenation. The final seed τ is used to obtain a common object a at each of the two parties. For example, the context-dependent common object can be applied, for example, by applying a drbg, for example, a deterministic random bit generator, or a PRNG, etc.,

[0093] For example, a = drbg(τ).

[0094] Interestingly, context-dependent common objects can be used, for example, specific to the current key agreement. This can be used to provide implicit authentication, for example, when using a pre-shared secret. This can be used to increase resistance to man-in-the-middle attacks. This can be used to increase resistance to pre-computation attacks on the common object.

[0095] Many noise multiplications are known in many different fields or rings. For example, noise multiplication can be achieved by performing a true multiplication and adding a noise source. For example, the noise can be explicit noise generated, for example, from a noise source, or implicit noise obtained, for example, by rounding the result. For example, to round a modulo q multiplication, one can scale from a mod q element to a mod p element, where p < q, for example, multiply by p / q and round the result. Various choices for rounding the result are possible, for example, rounding down, rounding up to the nearest integer, and rounding can include adding a value, for example, to reduce bias, etc. The noise source can also or alternatively include adding explicit noise, such as Gaussian noise, to the multiplication result.

[0096] For example, the first and second public keys, the first and second private keys, the first and second original keys, and the common object can be matrices or vectors over a finite field or ring. For example, the first and second public keys, the first and second private keys, the first and second original keys, and the common object can be polynomials over a finite field or ring.

[0097] By binding the common object a in the key agreement protocol to the context information shared by the parties, channel authentication can be introduced into standard KEX and KEM protocols, such as Round5, Kyber, Frodo, etc. Channel authentication helps avoid MitM or impersonation attacks.

[0098] Note that in an embodiment, the parameter a used by the parties can be secret. This is different from traditional key agreement protocols where the common object is usually a public parameter. Advantageously, this further reduces the information available to an attacker who wants to break the cryptosystem.

[0099] Figure 1An example of an embodiment of the KEX protocol is schematically shown. Figure 1-3 , time increases from the top to the bottom of the graph.

[0100] Figure 1 The KEX in allows the first and second parties to agree on a key that has a low probability of failure because the first and second parties exchange many reconciled bits.

[0101] Figure 1 There is shown a first cryptographic device 10 configured to communicate with a second cryptographic device 20. The first cryptographic device 10 is configured to perform a cryptographic operation 10.1.

[0102] The cryptographic operation 10.1 of the device 10 may include selecting a pre-seed σ. For example, the pre-seed may be randomly generated. The public object a may be derived in part from the pre-seed. Thus, the entropy in the public object may be controlled by the pre-seed; for example, the public object may be at least as random as the pre-seed. Figure 1 and Figure 2 In the example, the random source is marked with $.

[0103] The cryptographic operation 10.1 of the device 10 may include calculating a final seed τ from a pre-seed σ and a pre-shared secret p. Calculating the final seed τ from two or more inputs (e.g., in this case, the pre-seed σ and the pre-shared secret p) may be accomplished by applying a function (e.g., a seed function, such as a hash, a key derivation function, etc.).

[0104] For example, the pre-shared secret p may have been pre-shared between the second cryptographic device and the first cryptographic device. For example, the pre-shared secret p may be shared between the devices via an out-of-bounds communication channel. For example, the protocol may be configured to communicate between the devices via a first communication channel (e.g., an electronic communication channel, such as a wired or wireless communication channel). The pre-shared secret p may be communicated in a different manner, for example, via a second communication channel that is different from the first communication channel.

[0105] In an embodiment of the second communication channel, the secret p is preprogrammed in one or both of the first device 10 and the second device 20, for example by the manufacturer. For example, the secret p may be preprogrammed in one of the first device 10 and the second device 20, or generated there. For example, the user may enter the secret into the other of the first and second devices via a user interface. For example, the secret may be displayed on a display, or may be visible in an internet browser, or may be displayed on a sticker on the device, after which, for example, the user enters (e.g. types) the secret p into the other device, for example via a user interface. In order to calculate the final seed τ from multiple inputs (e.g., from a pre-seed σ and a shared secret p), a hash function, or a key derivation function, etc. may be applied. The hash function may also be applied to further information z.

[0106] Once the final seed is calculated, operation 10.1 may include calculating a public object a from the final seed τ. For example, a deterministic random number generator may be used for this purpose. For example, the public object a may be a matrix or a polynomial whose coefficients are randomly calculated from the final seed τ. Figure 1 In the example, the combination of computing the final seed and generating the public object is combined in the function sd. For example, the function sd can be implemented as a combination of hashing and dbrg, for example, to combine the pre-seed and other inputs into the final seed, and derive the public object based on the final seed.

[0107] In an embodiment, the public object, the public key, and the private key include one or more polynomials. The degree of the polynomial may be, for example, at least 128, at least 256, at least 512, etc. The coefficients of the public object and / or the private key may be modulo integers of at least 2^8, at least 2^9, at least 2^10, etc. The coefficients of the private key may be modulo integers of at least 2^5, at least 2^6, at least 2^7, etc.

[0108] Operation 10.1 may also include obtaining a first private key r associated with the first cryptographic device.

[0109] The private key (also called a secret key) can be randomly selected, for example drawn from a random source, because this can increase the security of the protocol, for example by further obfuscating the connection between the corresponding public key and the public object. However, it is not necessary to randomly generate a private key, such as a first private key r, for each protocol. In an embodiment, a new private key is used by one or both parties to calculate the key. However, the private key can be reused, for example, for this particular communicating party, or for multiple cryptographic devices that can run the protocol. Various restrictions can be imposed on the private key to reduce its size, for example, the number of non-zero coefficients in the private key can be limited. The latter is optional and not necessary.

[0110] Once the first private key r has been obtained (eg generated, eg retrieved from a storage device (eg local storage device of the device)), operation 10.1 comprises calculating a first public key b from the first private key r. Calculating the public key comprises multiplying the private key with the public object a, eg using noise multiplication.

[0111] The first public key b and the pre-seed σ are transmitted to the second cryptographic device 20 . Figure 1 A communication 11.1 is shown from the first device 10 to the second device 20. The communication 11.1 may comprise a first public key b and a pre-seed σ.

[0112] Figure 1 A second cryptographic device 20 is shown which is configured to communicate with the first cryptographic device 10. The second cryptographic device 20 may be configured to perform a cryptographic operation 20.1.

[0113] The second cryptographic device 20 is configured to receive the first public key b and the pre-seed σ transmitted from the cryptographic device 10. The second cryptographic device 20 is configured to retrieve the shared secret p, for example from a storage device of the device 20, for example in the same manner as described above.

[0114] Operation 20.1 may include calculating a final seed from a pre-seed σ received from the first cryptographic device 10 and from a pre-shared secret p, for example, by applying the same seed function as device 10. Operation 20.1 may be configured such that device 10 and device 20 obtain the same final seed τ. Operation 20.1 may include calculating the same public object a from the final seed. Operation 20.1 may be configured such that device 10 and device 20 obtain the same public object a.

[0115] Note that the common object does not need to be shared on the communication channel (e.g., the first communication channel) between the first device 10 and the second device 20. Furthermore, the shared information (e.g., σ, b) is not sufficient to calculate the common object. This means that an eavesdropper does not know the common object used.

[0116] Operation 20.1 may comprise obtaining a second private key(s) associated with the second cryptographic device. As the device 10, there are the same options to obtain it, e.g. generate it, e.g. randomly generate it, e.g. retrieve it, etc. The first public key b associated with the first cryptographic device is obtained from the first device 10, e.g. received.

[0117] Operation 20.1 may include calculating a second public key u from the second private key s. The second private key s may be calculated in the same manner as the first public key b, for example, calculating the second public key u may include multiplying the second private key s with the public object a.

[0118] Operation 20.1 may include calculating a second original shared key k, sometimes denoted k*, from the first public key b and the second private key s. Calculating the second original shared key may include a multiplication between the second private key s and the first public key b, which may be the same type of multiplication but need not be a noise multiplication.

[0119] The second public key u is sent to the first device 10. Using the second public key u, the first device 10 can calculate a first original key that is almost identical to the second original key. Sometimes, the first and second original keys may be equal, but they may not be equal. In order to reduce the potential difference between the first and second original keys, various elements may be added to the protocol. For example, Figure 1 An example in which blending is used is shown.

[0120] For example, in an embodiment, operation 20.1 may include generating reconciliation data h for at least part of the coefficients of the original shared key. The reconciliation data h may include information allowing to reduce the difference between the first original key and the second original key derived at the first and second devices, respectively.

[0121] Finally, operation 20.1 may comprise generating a transmission key K from the second original shared key k*. This may comprise applying a hash function.

[0122] The second public key u and the reconciliation data h are transmitted to the first device 10 . Figure 1 A communication 21.1 is shown. For example, the communication 21.1 may include the second public key u and the reconciliation data h.

[0123] The first cryptographic device 10 is configured to receive the second public key u and the reconciliation data h transmitted from the second cryptographic device 20. The first cryptographic device 10 may be configured to perform a cryptographic operation 10.2.

[0124] The cryptographic operation 10.2 of the device 10 may include calculating the first original shared key k' from the second public key u and the first private key r. This may be done in the same way as at the second device 20, but using different keys, for example, calculating the first original shared key may include a multiplication between the second public key (u) and the first private key (r). The result is that the first and second original keys may be close to each other.

[0125] The cryptographic operation 10.2 of the device 10 may comprise applying the reconciliation data h in the reconciliation function to at least some of the coefficients in the first original shared key k'. The result of this is that the reconciled first original key is likely to be equal to the second original key. The same transmission key K can now be obtained from the reconciled first original shared key (k'). If only some of the coefficients of the original keys are reconciled, the first and second devices can use the reconciled coefficients to calculate the transmission key and the unreconciled coefficients can be ignored. There is still a small variation that the two devices will not get the same transmission key, but this probability can be managed and reduced if necessary.

[0126] Cryptographic operations 10.1, 20.1 and 10.2 may be performed in this order.

[0127] Possible methods for calculating the harmonic data are explained in the patent application entitled "REACHINGAGREEMENT ON A SECRET VALUE" filed by the same applicant with the European Patent Office on November 4, 2016, application number 16197277.3; for example, in the embodiments, the harmonics can be performed using the method on pages 7-10. Variants disclosed elsewhere in the cited patent application may also be used. In this application, the following notation applies to the following three functions:

[0128] 1. Rounding function For q,b h ,B∈Z,b h ≥1,B <log2q-b h ,make

[0129] but,

[0130]

[0131] Intuitively, extract The B most significant bits of the symbol v are extracted, where the second component is the rounding factor to ensure unbiased rounding errors. B represents the number of bits extracted from the symbol v, and b h In an embodiment, q may be a power of 2.

[0132] 2. Cross-rounding function For q,b h ,B∈Z,b h >1,B <log2q-b h ,make but,

[0133]

[0134] Intuitively, Extract v's (B+b h ) most significant bit of b h The least significant bit.

[0135] 3. Harmonic function rec(w,b):

[0136] For q,b h ,B∈Z,b h ≥1,B <log2q-b h ,w∈Z q ,

[0137]

[0138] Among them, v is the element closest to w, such that The nearest element w can be taken according to the Lee distance, for example, min(|vw|,q-|vw|).

[0139] These three functions can be applied coefficient by coefficient to polynomials or matrices, etc. The harmonic function cited above is used as an example here. As mentioned above, the harmonic method in the application cited above can also be used. A cross rounding function can be applied to obtain harmonic data, and a rounding function can be applied to obtain the harmonic data. When the harmonic data is later used in the harmonic function, the harmonic data is restored. In other words: Assume v and w are within a threshold distance of each other.

[0140] In an embodiment, the first and second public keys, the first and second private keys, and the original key are multiple polynomials over a finite field or ring, and the public key is obtained from the private key by noise multiplication with multiple shared polynomials (a). For example, multiple polynomials can be used in a module-lattice in which the elements of the lattice are polynomials.

[0141] Figure 2 An example of an embodiment of the KEM protocol is schematically shown. Figure 2 The protocol shown in the figure is Figure 1 The protocol is roughly similar, except that the original keys are used for wrapping and the probability of possible differences between the original keys is reduced in different ways. Figure 2 The advantage of the protocol is that it allows the second party to encapsulate a random key of his own choice given the public key b of the first party. This allows active security to be achieved.

[0142] In accordance with Figure 1 In the embodiment of the present invention, the first device 10 may first perform cryptographic operations, which may be Figure 1 The communication 11.1 from device 10 to device 20 may be performed with Figure 1 The same as in.

[0143] Figure 2 Cryptographic operation 20.2 may then be performed after receiving the pre-seed σ and the public key b. Cryptographic operation 20.2 may be identical to operation 20.1, except that the reconciliation data is not calculated. Instead, operation 20.2 may include generating a transmission key K. Figure 1 and Figure 2 The difference is that for Figure 2 , it is possible to control what the final transmission key is, for example, the second device 20 may select it. The selection may be randomly generated, but it may also be the result of other algorithms.

[0144] Instead of conciliating the data, the transmission is encapsulated with at least a portion of the second original shared key by applying an encapsulation function, such as the function ecp, thereby obtaining encapsulated data c.

[0145] The encapsulated data c are transmitted to the first cryptographic device, for example together with the second public key u. For example, the second device 20 may send a communication 21 . 2 to the first device 10 .

[0146] The first device 10 may be configured to receive the encapsulated data c transmitted from the second cryptographic device 20, for example, together with the second public key u. The first device 10 may be configured to perform a cryptographic operation 10.3. Operation 10.3 is similar to operation 10.2, except that encapsulation is used instead of reconciliation to reduce the difference between the first and second original keys.

[0147] For example, operation 10.3 may include decapsulating the encapsulated data c using at least a portion of the first original shared key k' to obtain the transmission key K.

[0148] In an embodiment, the transmission key K is random and / or ephemeral and / or symmetric and / or independent of the first public key (b).

[0149] For example, the transmission key K can be generated independently of the first private key, the first public key, the second private key and the second public key, i.e., the transmission key K can be independent of the first and second original keys. Note that the original keys do depend on the public key and the private key. For example, the transmission key can be generated at least partially randomly. Independent keys are more likely to achieve active security. The randomness of the calculation key (e.g., private key or transmission key) can be obtained from a traditional random number generator (preferably, a true random number generator).

[0150] In an embodiment, the public object and the private key are polynomials of degree n with coefficients modulo q. The public key may be a polynomial of degree n modulo p.

[0151] A wide range of parameters are possible, usually constrained by the requirement that the resulting key agreement protocol generates sufficiently large keys with sufficiently low probability of failure. The latter two parameters can be observed empirically or calculated theoretically. Acceptable values ​​depend on the application.

[0152] Can be combined Figure 2 The KEM protocol used is particularly advantageous in the NIST proposal "Round5: KEM and PKE based on (Ring) Learning with Rounding, Thursday 28 th The KEM protocol is described in the "Proposal for the Implementation of the KEM Protocol" in March, 2019, which is incorporated herein by reference. For example, Sections 2.9.5 and 2.9.7 give example parameters that apply to various situations. For example, the above paper provides examples of encapsulation, error correction, and other details of the KEM protocol.

[0153] For example, Figure 2 As shown, the KEM protocol can be defined on the sub-ring Z q [x] / Φ n+1 (x), preferably has n+1 prime numbers, for example, a polynomial of degree n with coefficients modulo q. The reduction polynomial can be arbitrary, but the (n+1)th cyclotometic polynomial Φ n+1 (x) = x n +···+x+1 may be a valid choice. The common object A can be a d / n×d / n matrix whose entries are in Z q [x] / Φ n+1 (x). The private key can be or Dimensional matrix.

[0154] For example, the following parameters can be used:

[0155] d: the number of polynomial coefficients in each row of the common matrix

[0156] n: the degree of the reduction polynomial; also indicates whether to use a ring (n>1) or a non-ring (n=1) instantiation

[0157] h: the number of non-zero polynomial coefficients in each column of the secret matrix

[0158] q,p,t,b: rounding modulus, e.g. b|t|p|q, e.g. all powers of 2 that satisfy b <t<p<q

[0159] b_bits: the number of bits to extract for each symbol in the ciphertext component; = 2 b_bits ,

[0160] κ: security parameter; the number of bits of information in the transmitted key

[0161] The number of columns in the initiator's secret matrix

[0162] The number of columns in the responder's secret matrix

[0163] For example, in an embodiment, one may choose: d=618, n=618, h=104, q=2 11 , p = 2 8 , t = 2 4 , b=2 1 ,κ=128,

[0164] To further reduce the error probability, the transport key can be encoded in the codeword before encapsulation. This can be done using the following additional parameters.

[0165] f: number of bit errors that can be corrected by the error correction code

[0166] xe: parity bit of error correction code

[0167] μ: the number of symbols in the ciphertext component

[0168] For example, for the above situation, the above parameters may be: f = 0, xe = 0, μ = 128. In an embodiment, it is possible to have and μ·b_bits ≥ κ.

[0169] Different instantiations can be as follows:

[0170] d=1186,n=1,h=712,q=2 15 ,p=2 12 ,t=2 7 ,b=2 4 ,κ=256, f=0, xe=0, μ=64.

[0171] Different instantiations can be as follows:

[0172] d=490,n=490,h=242,q=2 10 ,p=2 7 ,t=2 3 ,b=2 1 ,κ=128, f=5, xe=190, μ=318.

[0173] Similar parameters as above can be used to Figure 1 agreement.

[0174] There are various other ways to reduce the distance between the first and second original keys, which may be in addition to or in lieu of the Figure 1 and Figure 2For example, in an embodiment, both encapsulation and reconciliation are used. In this case, one can use the reconciled original key for encapsulation. For example, before calculating the reconciliation and / or encapsulation, so-called reliable bits of the second original key can be selected, for example, those coefficients of the second original key that are most likely to produce the same bits at the first device 10. The reconciliation and / or encapsulation can then be applied to the selected reliable coefficients. The index of the reliable coefficient can be communicated from device 20 to device 10, for example, in communication 21.2.

[0175] Various examples of calculating the final seed τ, the pre-seed σ, and / or the pre-shared secret p are given below. Each of these examples can be incorporated into the various key agreement protocols described herein, in particular Figure 1 and 2 Those.

[0176] For example, in an embodiment, the pre-shared secret may include a pre-shared password. For example, the password may be an alphanumeric character sequence or a numeric character sequence. For example, the pre-shared secret may be obtained via an out-of-band channel.

[0177] For example, in an embodiment, the pre-seed σ may be sent and received in plain text format. For example, the device 10 may randomly generate the pre-seed σ and send it to the second device 20 in plain text format (e.g., unencrypted). Interestingly, the security of the system is not affected by this. An attacker cannot obtain the public object a from the pre-seed σ alone, and even if he can, the security of the resulting transmission key K system does not depend on the confidentiality of the public object a.

[0178] For example, the pre-seed may be sent and received via a communication interface installed in the first device 10 and the second device 20, the communication interface being used to exchange communications (e.g., messages) of the key agreement protocol, and / or for subsequent communications exchanged between them and protected with a transport key. In an embodiment, the pre-seed is not sent via those communication interfaces.

[0179] For example, the final seed τ may depend on further information than the pre-seed and the pre-shared secret. For example, the further information may be included in a hash or key derivation function. For example, the final seed may be further calculated based on network configuration data from a network connection between the second cryptographic device and the first cryptographic device. Even if the network configuration data is public data, it still helps to mitigate MitM attacks or impersonation attacks because the attacker will need to keep track of the further information.

[0180] For example, the further information may include a network address of the first and / or second cryptographic device. Examples of network addresses are IP addresses or MAC addresses.

[0181] For example, the further information z may include the purpose of the network connection. For example, the purpose of the network connection may be to perform communications for a specific application. The name of the application may be contained in the further communication. The purpose of the connection may be derived from previously derived information. For example, the network port address may be used to derive the purpose. The network port itself may also be part of the further information. For example, a key agreement protocol may be performed due to a further algorithm to be performed subsequently; an indication of the further algorithm may be used as further information for calculating the final seed and may later be verified to see whether the further algorithm is indeed used or to reject an algorithm that is inconsistent with the further information.

[0182] For example, the further information z may include the time of day, possibly including the current date. For example, the first and second devices may first perform a synchronization protocol to synchronize their times, after which the synchronized time may be used as the further information. For example, the current date may be included in the further information.

[0183] For example, the further information z may include an interaction counter. The interaction counter may be maintained by the second cryptographic device 20 and the first cryptographic device 10. For example, the interaction counter may be increased at least every time a shared key is derived.

[0184] Thus, further resistance to attacks can be achieved by deriving the final seed τ from three sources: a pre-seed σ that can be shared, for example, in communication 11.1, a pre-shared secret p, and further information. In fact, advantageous protocols with different properties can also be obtained by deriving the final seed τ from another choice of two sources, such as: a pre-seed σ and further information z, or, for example, a pre-shared secret p and further information.

[0185] The network configuration data used in the further information may come from a current network connection between the first cryptographic device and the second cryptographic device, and / or the network configuration data used in the further information may come from a previous network connection between the first cryptographic device and the second cryptographic device.

[0186] For example, in an embodiment, a successful key agreement is obtained if the pre-shared secrets match. For example, the shared secret p can be a PIN or a pre-shared key (PSK). If both parties know the pre-shared secret, such as a PIN or PSK, then they are both able to derive the final seed τ and derive the common object a. For example, τ=Hash(p|σ) and a=drbg(τ). Once the final seed τ is obtained, the known KEX or KEM protocol using the seed can be followed as usual. If an attack is ongoing, such as MitM or impersonation, the KEX or KEM protocol will not result in a shared symmetric key or allow proper decapsulation. Later regular use of the established keys will implicitly determine whether the two parties share the same secret p. Implicit authentication can be converted to explicit authentication. For example, communication 11.1 can include a challenge, and communication 21.1 or 21.2 can include a corresponding response. For example, the challenge can be a random number, and the response can be an encryption with a transmission key. After deriving the transmission key, device 10 can verify the response and therefore learn whether device 20 has a secret p that matches its own. The challenge may also be implicit, for example, the challenge may be a predetermined string of characters.

[0187] Figure 1 and Figure 2 The message in or after the message can include a message authentication code or a message authentication tag. If they can be correctly verified, the implicit authentication can be converted to an explicit authentication. If they cannot be correctly verified, the implicit lack of authentication can be converted to an explicit lack of authentication.

[0188] Note that even if a short shared secret is used, for example a PIN with 4 digits has only 10,000 possible values, this structure ensures that the PIN cannot be easily brute-forced. The reason is that even if the number of secret values ​​p is limited (10,000), this value does not pass through the wire, making it impossible for an attacker to derive the used PIN. The values ​​exchanged through the wire (the public key components b and u) are obtained by multiplying the public object a with s and r. Since s and r themselves are secrets, these public key components cannot be easily linked back to the shared secret. In contrast, in traditional algorithms, the hash of the password may pass through the wire, which may directly lead to password leakage when the entropy of the password is low. Another advantage is that neither party will learn the shared secret of the other party. The reason is that the public object cannot be derived from the knowledge of the public key.

[0189] In an embodiment, the final seed τ may be derived from further information z in addition to the pre-seed σ and the pre-shared secret p. This construction may be used to establish a secure connection between two parties, for example using a network protocol such as IPSec. For example, in an embodiment, the parties may periodically establish a connection, and the further information may then include, for example:

[0190] - Information about the current exchange, including (1) the current IP address of the first party; (2) the purpose of the IP connection, such as which other protocols may be used later; (3) the time of day;

[0191] - Information about previous exchanges, such as: (1) the last time a key was exchanged; and (2) the purpose of the exchange. This information can be public, but it does mean that an attacker may have to keep track of the state between the two parties if they are to successfully impersonate both parties in an impersonation or MitM attack.

[0192] - A random number from a random number beacon, such as the NIST random number beacon. If the last public random number from the beacon is used in further information, the second party knows that this is a new handshake, not a replay.

[0193] - Information about the current connection, such as an IP address. The counterparts then bind the key exchange to that specific IP address. This avoids mix-and-match attacks, in which parts of the communication are reused in different contexts.

[0194] - Includes information about the subsequent protocol that the first party intends to use, and the second party can then check early on whether the purpose is suitable. The ability to check early on means that DOS attacks are more difficult.

[0195] - Information about previous key exchanges. This forces potential attacks to track those previous exchanges in order to subvert the protocol.

[0196] Interestingly, when a pre-shared secret p is used, an attacker cannot recover the secret context p given the public components b and u. In fact, if the space of p (e.g. the size of the security parameter) is large, then security is equivalent to finding the preimage of the hash function output. Therefore, if a secure hash function is used, the system is secure. However, even if the secret p has only a finite number of states, in the extreme case, only 2 possible states, then security is still equivalent to the following problem: Given public(a1,a2,b)=(hash(σ,m),hash(σ,1-m),m·A1*s+(1-m)·A2*s) with a public seed, secret m=0 or 1, and secret s, find m, or in other words, find out whether a1 or a2 was used. In this problem, A1 and A2 are public objects that can be derived from the seed in a known way, for example, we can use A1=sd(σ,m) etc.

[0197] The LWE / R assumption states that (A, b = A*s) is difficult to distinguish from uniform random. In the above problem, (A1, b = A1*s) and (A2, b = A2*s) are both LWE / R samples, which are difficult to distinguish from uniform and therefore difficult to distinguish from each other.

[0198] Figure 3 An example of an embodiment of a protocol between a first device 10 and a second device 20 is schematically shown.

[0199] Figure 3 , out-of-bounds communications 13 sharing a pre-shared secret p are shown. Out-of-bounds communications 13 may be performed during a registration phase 31 of devices 10 and 20. For example, out-of-bounds communications 13 may be performed during the manufacture of the devices, for example, to enable them to be used for later communications. For example, out-of-bounds communications 13 may be partially performed during the manufacture of the devices, for example, to enable them to be used for later communications. The pre-shared secret may be provided to the other of the devices later. For example, the out-of-bounds communications may be performed by a user, for example, manually via a user interface on one or both devices. For example, the pre-shared secret may be set on one of the devices, for example, device 20, by setting a switch of the device, for example, a dip switch, or by another interface to indicate the secret. The secret may be generated on another device and set on the other device.

[0200] In a later key agreement phase 32, the first device 10 and the second device 20 communicate with each other according to an embodiment (e.g., Figure 1 or Figure 2 In the embodiments described herein) a key agreement protocol is performed. In the key agreement protocol, two messages may be exchanged: key agreement protocol message 14 and key agreement protocol message 15, for example, as described herein. There may be more messages in the key agreement protocol. In the key agreement protocol, a pre-shared secret p may be used.

[0201] At the end of the key agreement phase 32, the two devices may have a transmission key K that is at least implicitly authenticated with respect to the secret p. If the devices 10 and 20 do not have the same share, then, at least in most cases, the transmission key K derived at the two devices will be different.

[0202] In an embodiment, the registration phase 31 and the key agreement phase 32 use different communication channels, such as different communication media, but they may use different frequencies or different frequency bands.

[0203] The transport key agreed upon in the key agreement phase may be used during a later use phase 33. For example, messages cryptographically protected using the transport key K may be exchanged between the devices 10 and 20, e.g., the messages may be encrypted with the key K or include an authentication tag (e.g., a MAC) calculated using the key K, or both. The messages may also be protected using a key derived from the key K. Figure 3 Two messages 16 and 17 are shown, but there may be more than 2 messages, for example 4 or more etc., or one message etc. The order of the messages may be different.

[0204] For example, the device 20 may be configured to encrypt the message m with the transmission key K and transmit the encrypted message to the first cryptographic device 10, or vice versa. The device 10 may be configured to decrypt the message using the transmission key K.

[0205] The transport key is a key derived from the original shared key. For example, the transport key can be independent of the original shared key, such as in the KEM protocol. In an embodiment, the key used for encryption can be a hash of the transport key and the public key. For example, the public key of the recipient. One can also hash with the sender's public key, or both. For example, the transport key can be derived directly from the original shared key, such as by hashing it. In an embodiment, the key used for encryption can be a hash of the original key and the public key.

[0206] Implicit authentication may be converted to explicit authentication during the key agreement phase 32 or the usage phase 33. For example, the challenge-response protocol may be completed using the transport key, such as directly using the transport key or a key derived therefrom.

[0207] Interestingly, the challenge-response protocol may be implicit. For example, during the use phase 33, the message may be authenticated as part of the protection. If the authentication fails, this may mean that the message has been tampered with or the pre-shared secret p does not match between the devices. In both cases, the communication cannot be trusted and appropriate action can be taken. Appropriate action when a problem is detected may include, for example, terminating the communication, starting a new key agreement protocol, sending a warning message (e.g., email, alarm, etc.).

[0208] For example, during the use phase 33, the message may be encrypted as part of the protection. If the message contains a predictable portion, such as a predetermined string, a header, such as a counter, etc., the predictable portion may be verified after decryption. If the predictable portion fails to match the prediction after decryption, it may be concluded that the message has been tampered with or that the pre-shared secret p does not match between the devices. Appropriate action may be taken in this case.

[0209] One interesting application is, for example, provisioning a device with network configuration data. For example, consider a device configured to perform network communications. For example, consider a device configured to configure a device for network communications. For example, in one embodiment, the device configured to perform network communications may be device 20, and the configuration device may be device 10, but it may also be the other way around. The configuration device may be a smartphone, a laptop, a computer, etc.

[0210] For example, for the enrollment phase 31, a pre-shared secret may be provided to the device 20. The pre-shared secret is communicated out of bounds to the device 10. For example, the pre-shared secret may be provided on the outside of the device and entered by the user, or scanned, for example in the form of scanning a QR code, barcode, etc. When the pre-shared secret is available in the device 10, for example through a suitable interface, such as a user interface, a scanning interface. For example, NFC or Bluetooth may be used to share the pre-shared secret. For example, the exchange may be initiated by pressing a button on the device 10 and / or 20. For example, the pre-shared secret may be randomly generated on the device 10 and / or 20.

[0211] During the key agreement phase 32, devices 10 and 20 use the pre-shared secret to agree on a transport key K. For example, the key agreement phase may use different communication channels, such as Wi-Fi.

[0212] During the use phase 33, the device 10 may send network configuration data protected (e.g., encrypted) using the transmission key to the device 20. For example, the transmission may use the same communication channel as the key agreement phase 32, such as Wi-Fi, etc. After receiving the network configuration data, the device 20 may use the network configuration data to send and receive data over the computer network. The network configuration data may include network keys, certificates, network addresses, etc. Encrypting a message (e.g., network configuration data) with the transmission key includes direct encryption with the transmission key as well as indirect encryption, in which further keys are derived from the transmission key used to directly encrypt the message. For example, the device 20 may be a router. Protocols such as the above-mentioned protocols may also be used to configure lighting elements, such as lamps.

[0213] Interestingly, embodiments can provide a more secure transmission key than using, for example, a pre-shared secret to directly protect communications.Even if the entropy in the pre-shared secret is low, the transmission key provided by the present embodiment can still have high entropy.

[0214] For example, a pair of Bluetooth devices can be coupled to establish a secure and authenticated communication link. The link is secure in terms of the confidentiality strength provided by the key agreement protocol, and authenticated because they both use the same pre-shared secret.

[0215] Embodiments may also be used to address impersonation attacks. For example, in conventional protocols, e.g., where common objects are fixed or shared as part of the protocol, an attacker may be able to replay messages from one side. It may take a long time for the second party to notice that something is wrong. However, when the second party receives the message, that party may want to ensure that the incoming message is indeed from a specific source. In embodiments, this may be accomplished by including a changing element in the message. For example, the second party may include a challenge (e.g., a random number) in the message (e.g., in message 21.1 or 21.2) and send it to the other party for encryption or authentication with a transport key.

[0216] Figure 4 An example of a cryptographic system 301 according to an embodiment is schematically shown. The system 301 includes a first cryptographic device 300, a second cryptographic device 350. For example, the first device 300 and the second device 350 are on a device such as the first device 300 and / or the second device 350. For example, the device 300 can be configured as the device 10, and the device 350 can be configured as the device 20.

[0217] The first device 300 and the second device 350 are configured to perform a cryptographic protocol. They are capable of transferring data from one device to another.

[0218] For example, the first and second devices may be configured for a key agreement protocol, such as one designed to generate a key, typically a symmetric key, shared between the two devices. The shared key may then be used by the devices for protected communications, such as encrypted and / or authenticated communications, such as by using the key to encrypt a message and / or calculate an authentication tag for a message.

[0219] In an embodiment, the device 300 and the device 350 may each store a pre-shared secret p. For example, the device 300 and the device 350 may include a pre-shared secret unit (not separately shown) to obtain and / or store the pre-shared secret.

[0220] The first device 300 and the second device 350 may include one or more of a storage interface, a processor, and a memory, respectively. The first device 300 and the second device 350 (e.g., various devices of the system 301) may communicate with each other through a computer network 391. The computer network may be the Internet, an intranet, a LAN, a WLAN, etc. The computer network 391 may be the Internet. The computer network may be wired in whole or in part, and / or wireless in whole or in part. For example, the computer network may include an Ethernet connection. For example, the computer network may include a wireless connection, such as Wi-Fi, ZigBee, etc. The device includes a connection interface, which is arranged to communicate with other devices of the system 301 as needed. For example, the connection interface may include a connector, such as a wired connector (e.g., an Ethernet connector), or a wireless connector (e.g., an antenna, such as a Wi-Fi, 4G, or 5G antenna). For example, the first device 300 and the second device 350 may include communication interfaces 305 and 355, respectively. The computer network 391 may include additional elements, such as a router, a hub, etc.

[0221] The execution of the first device 300 and the second device 350 can be implemented in a processor, such as a processor circuit, an example of which is shown herein. The first device 300 (particularly the processor of the first device 300) can implement the functions of the first party 10. The second device 350 (particularly the processor of the second device 350) can implement the functions of the second party 20. For example, these functions can be implemented in whole or in part in computer instructions stored at the device 300 or 350, for example, in the electronic memory of the device, and can be executed by the microprocessor of the device. In a hybrid embodiment, the functional unit is partially implemented in hardware, such as a coprocessor (e.g., a cryptographic coprocessor), and partially implemented in software stored and executed on the device 300 or 350.

[0222] Devices 300 and 350 may include a storage interface to store and / or retrieve messages, which may be encrypted messages. For example, the storage interface may be implemented locally, such as as an interface to a memory contained in the device, such as in the memory of the corresponding device. The storage interface may also interface with an offline (e.g., non-local) storage device, such as a cloud storage device, such as a storage device such as a memory or drive located in another device. If a cloud storage device is used, the device may also include a local storage device, such as a memory. For example, the memory may be used to store computer programming instructions, temporary storage of files, etc.

[0223] In various embodiments of devices 300 and 350, the communication interface can be selected from a variety of alternatives. For example, the interface can be a network interface of a local area network or a wide area network (such as the Internet), a storage interface of an internal or external data storage device, an application program interface (API), etc.

[0224] Devices 300 and 350 may have a user interface, which may include well-known elements such as one or more buttons, a keyboard, a display, a touch screen, etc. The user interface may be arranged to accommodate user interactions such as initiating a key negotiation protocol, responding to a key negotiation protocol, sending encrypted messages, etc.

[0225] The storage device may be implemented as an electronic memory, such as a flash memory, or a magnetic memory, such as a hard disk, etc. The storage device may include a plurality of discrete memories that together constitute the storage device. The storage device may also be a temporary memory, such as a RAM.

[0226] Typically, devices 300 and 350 each include a microprocessor that executes appropriate software stored in devices 300 and 350. For example, the software may have been downloaded and / or stored in a corresponding memory, such as a volatile memory such as RAM or a non-volatile memory such as flash memory. Alternatively, devices 300 and 350 may be implemented in whole or in part in programmable logic, for example as a field programmable gate array (FPGA). Devices 300 and 350 may be implemented in whole or in part as a so-called application specific integrated circuit (ASIC), for example, an integrated circuit (IC) customized for its specific purpose. For example, the circuit may be implemented in CMOS, for example using a hardware description language (such as Verilog, VHDL, etc.).

[0227] In an embodiment, devices 300 and 350 may include one or more circuits to implement one or more or all functions of the corresponding devices. The circuits may implement the corresponding functions described herein. The circuits may be processor circuits and memory circuits, and the processor circuits execute instructions represented electronically in the memory circuits.

[0228] The processor circuit may be implemented in a distributed manner, for example, as multiple sub-processor circuits. The storage device may be distributed across multiple distributed sub-storage devices. Some or all of the storage may be electronic memory, magnetic memory, etc. For example, the storage device may have volatile and non-volatile portions. Parts of the storage device may be read-only. The circuit may also be an FPGA, an ASIC, etc.

[0229] The first device 300 may include a public / private key generator 315 configured to generate a first private key (r) and a first public key (b) derived from the first private key. The public key derived from the private key may use a public object (a). For example, generating the public key may involve multiplying with the public object, and / or introducing a noise, such as shrinking the multiplication result, adding a noise term, etc. The private key and the public object may be, for example, a polynomial or matrix over a finite field or ring.

[0230] The first device 300 and the second device 350 are configured to agree on a common object a. For example, the first device 300 and the second device 350 can be configured to exchange data from which a final seed can be calculated, such as one or more pre-seeds σ, sent to and / or from the first device 300 and the second device 350. For example, the first device 300 and the second device 350 can be configured to maintain public data from which a final seed can also be calculated, such as counters, network data, etc. For example, the first device 300 and the second device 350 can be configured to store secret data, such as a pre-shared secret p. For example, the first device 300 and the second device 350 can be configured to obtain public data, such as from a random number beacon. For one or more of these sources, the devices calculate a common final seed τ. For an attacker to obtain the same final seed τ, he needs to access or track the same source. Devices 300 and 350 are configured to derive a common object a from a common final seed. Note that the attacker does not know the common object used for key negotiation.

[0231] The first private key and the public key may be temporarily generated. For example, the latter may be used in a key agreement protocol, in particular when the first and second devices authenticate each other using another authentication mechanism (eg, an out-of-band mechanism, such as certificate-based authentication, etc.).

[0232] For example, the first public key is transmitted from the first device 300 to the second device 350 via the communication interfaces 305 and 355. This can be done by direct communication. If necessary, a pre-seed σ can also be transmitted together with the first public key. For example, by sending the pre-seed σ, a final seed can be calculated from which the public object (a) can be generated.

[0233] The second device 350 may include a public key obtainer 360. The public key may also be obtained directly from the first device, possibly out of bounds, such as in an email. The public key may be stored until needed. However, the first public key may also be received for immediate use, such as for a key sharing operation, for example, in which case the first public key and / or public object may be temporarily generated.

[0234] The second device 350 may include a public / private key generator 365 configured to generate a second private key (s) and generate a second public key (u) based on the second private key (s). The second public key uses the same public object as used to generate the first public key. The first and second private keys are private to their respective devices. When necessary, they can be shared with trusted parties, such as for backup, key escrow, etc. The public keys and public objects are not necessarily secure secrets; nonetheless, one or more of them are still private to the first and second devices when necessary. For example, the first public key may only be shared with the second device, and vice versa.

[0235] For example, in the case of a message, independent generation may be obtained if the message is generated from an application independent of public key cryptography (e.g., a financial or communications application, etc.). For example, independent generation may be obtained by random generation.

[0236] The second device 350 may include an original key generator 375. The original key generator 375 is configured to generate a second original shared key (k*) from the first public key (b) and the second private key (s). For example, the original key generator 375 may be configured to apply noise multiplication to the first public key and the second private key. For example, the noise multiplication may be multiplication or exponentiation depending on the underlying mechanism. The second device 350 is configured to transmit its second public key to the first device 300.

[0237] The first device 300 may include an original key generator 325. The original key generator 325 is configured to generate a first original shared key (k') from a second public key (u) and a first private key (r), for example, by applying noise multiplication. Unfortunately, for noise multiplication, it may happen that the first and second original keys are close to each other, but not necessarily the same. The specific probability of this happening depends on the underlying noise multiplication. In most applications, some probability of different original keys may be accepted, but how much this probability is will depend on the application. But generally, a lower probability will be preferred. The original key can have the same mathematical type as the private key and the public key, such as a polynomial or a matrix.

[0238] The reconciliation data generator 385 is configured to generate reconciliation data (h) for the indicated coefficients of the original shared key. The reconciliation data includes information that allows for reducing the difference between the first and second original keys derived at the first and second devices. For example, applying the reconciliation data may result in a reduction in the difference (e.g., Lee distance) between the coefficients of the original keys at the first and second devices, thereby increasing the likelihood that the two will produce the same bits. The reconciliation data may be calculated on the coefficients in the original shared key.

[0239] One method of achieving the harmonic data is to use one or more (e.g., b) of the coefficients after the key bit. h ) bits. For example, the number of harmonization bits for each selected coefficient may be, for example, 1 or 2. A smaller number of harmonization bits has the advantage of reducing communication overhead. However, a larger number of harmonization bits is possible.

[0240] The second device 350 may include a wrapper 390. The wrapper 390 is configured to wrap the key K with the key bits by applying a wrapping function (eg, XOR). The wrapping may be a one-time pad wrapping. For example, an XOR function may be used on one of the other wrapping functions described herein.

[0241] The second device is configured to transmit the second public key (u), the reconciliation data (h) and / or the encapsulation data (c). The transmission may be in response to receiving the first public key, such as in the case of key agreement, or not, such as in the case of public key encryption.

[0242] The first device 300 is configured to receive a second public key (u), reconciliation data (h) and / or encapsulation data (c) from a second device. The first device 300 may include a reconciliation unit 335, which is configured to apply the reconciliation data (h) in the reconciliation function to the coefficients in the first original shared key (k') to obtain the key bit (k). For example, the reconciliation bit can be used to reconcile the coefficients, and then the coefficients are sampled to obtain reliable bits. The first device 300 includes a decapsulation unit 340, which is configured to decapsulate the encapsulation data (c) to obtain the key K. In an embodiment, the device 300 and the device 350 only include one of the reconciliation and encapsulation / decapsulation units. In an embodiment, the device 300 and the device 350 include other ways to reduce the distance between the original keys.

[0243] Figure 5a An example of a cryptographic method 400 according to an embodiment is schematically shown. For example, method 400 can be used together with method 450. For example, methods 400 and 450 can be expanded or changed according to the embodiments described herein. The second cryptographic method (400) may include:

[0244] - communicating (405) with a first cryptographic device (10),

[0245] - Calculate (410) the final seed according to:

[0246] - a pre-seed received from a first cryptographic device (10), and

[0247] - a pre-shared secret, said secret being pre-shared between the second cryptographic device and the first cryptographic device,

[0248] - calculating (415) a common object (a) based on the final seed,

[0249] - obtaining (420) a first public key (b) associated with the first cryptographic device, and obtaining a second private key (s) associated with the second cryptographic device,

[0250] - calculating (425) a second public key (u) from the second private key (s), calculating the second public key (u) comprising multiplying the second private key (s) with the public object (a),

[0251] - calculating (430) a second original shared key (k*) from the first public key (b) and the second private key (s), the calculation of the second original shared key comprising a multiplication between the second private key (s) and the first public key (b),

[0252] - Transmitting (435) the second public key (u) to the first device.

[0253] Figure 5b An example of a cryptographic method 450 according to an embodiment is schematically shown. The first cryptographic method (450) may include:

[0254] - communicating (455) with a second cryptographic device (20),

[0255] - selecting (460) a pre-seed and sending the pre-seed to a second cryptographic device (20),

[0256] - computing (465) a final seed based on a pre-seed and a pre-shared secret, said secret being pre-shared between the second cryptographic device and the first cryptographic device,

[0257] - calculating (470) a common object (a) based on the final seed,

[0258] - obtaining (475) a first private key (r) associated with the first cryptographic device, and calculating a first public key (b) based on the first private key (r), the calculation of the first public key (b) comprising multiplying the first private key (r) with the public object (a), and transmitting the first public key (b) to the second cryptographic device,

[0259] - receiving (480) a second public key (u) from a second cryptographic device,

[0260] - calculating (485) a first original shared key (k') from the second public key (u) and the first private key (r), the calculation of the first original shared key comprising a multiplication between the second public key (u) and the first private key (r).

[0261] For example, methods 400 and 450 can be computer-implemented methods. For example, the computational portion of the method can be computed using a computer, computing circuit, etc. For example, a communication interface can be used to accomplish communication with a cryptographic device. For example, parameters, keys, etc. can be stored or retrieved from an electronic storage device (e.g., a memory, a hard drive, etc.). Keys and / or public objects can be represented by data greater than 10 bytes, 50 bytes, 100 bytes, etc.

[0262] Many different ways of performing the method are possible, as will be apparent to one skilled in the art. For example, the steps may be performed in the order shown, but the order of the steps may also be changed or some steps may be performed in parallel. In addition, other method steps may be inserted between the steps. The inserted steps may represent improvements to the methods described herein, or may be unrelated to the method. In addition, a given step may not be fully completed before starting the next step.

[0263] Embodiments of the method can be performed using software, which includes instructions for causing a processor system to perform method 400 and / or 450. The software may include only those steps taken by a specific sub-entity of the system. The software may be stored in a suitable storage medium, such as a hard disk, a floppy disk, a memory, an optical disk, etc. The software may be sent as a signal along a wired, or wireless, or using a data network (e.g., the Internet). The software may be downloaded and / or used remotely on a server. An embodiment of the method may be performed using a bitstream that is arranged to configure programmable logic (e.g., a field programmable gate array (FPGA)) to perform the method.

[0264] It should be understood that the subject matter disclosed herein also extends to computer programs, particularly computer programs on or in a carrier, suitable for putting the subject matter disclosed herein into practice. The program can be in the form of source code, object code, code between source and object code, such as a partially compiled form, or any other form suitable for implementing an embodiment of the method. An embodiment related to a computer program product includes computer executable instructions corresponding to each processing step of at least one of the methods described. These instructions can be subdivided into subroutines and / or stored in one or more files that can be statically or dynamically linked. Another embodiment related to a computer program product includes computer executable instructions corresponding to each of the devices, units and / or parts of at least one of the systems and / or products described.

[0265] Figure 6a A computer readable medium 1000 having a writable portion 1010 according to an embodiment is shown, the writable portion 1010 including a computer program 1020, the computer program 1020 including instructions for causing a processor system to perform a cryptographic method. The computer program 1020 may be embodied on the computer readable medium 1000 as a physical mark or by magnetization of the computer readable medium 1000. However, any other suitable embodiments are also conceivable. In addition, it should be understood that although the computer readable medium 1000 is shown as an optical disk, the computer readable medium 1000 may be any suitable computer readable medium, such as a hard disk, a solid state memory, a flash memory, etc., and may be non-recordable or recordable. The computer program 1020 includes instructions for causing a processor system to perform the cryptographic method.

[0266] Figure 6b 1 shows a schematic diagram of a processor system 1140 according to an embodiment of a cryptographic device. The processor system includes one or more integrated circuits 1110. The architecture of the one or more integrated circuits 1110 is Figure 6bSchematically shown in . Circuit 1110 includes a processing unit 1120, such as a CPU, for running a computer program component to perform a method according to an embodiment and / or implement its module or unit. Circuit 1110 includes a memory 1122 for storing programming code, data, etc. A portion of memory 1122 may be read-only. Circuit 1110 may include a communication element 1126, such as an antenna, a connector, or both. Circuit 1110 may include a dedicated integrated circuit 1124 for performing some or all of the processing defined in the method. Processor 1120, memory 1122, dedicated IC 1124, and communication element 1126 may be connected to each other via interconnect 1130 (e.g., a bus). Processor system 1110 may be arranged to perform contact and / or contactless communication using an antenna and / or a connector, respectively.

[0267] For example, in an embodiment, the processor system 1140 (e.g., a cryptographic device) may include a processor circuit and a memory circuit, and the processor is arranged to execute software stored in the memory circuit. For example, the processor circuit may be an Intel Core i7 processor, an ARM Cortex-R8, etc. In an embodiment, the processor circuit may be an ARM Cortex M0. The memory circuit may be a ROM circuit, or a non-volatile memory, such as a flash memory. The memory circuit may be a volatile memory, such as an SRAM memory. In the latter case, the device may include a non-volatile software interface, such as a hard drive, a network interface, etc., arranged to provide software.

[0268] Although device 1140 is shown as including one of each described component, various components may be replicated in various embodiments. For example, processing unit 1120 (e.g., processor 1120) may include multiple microprocessors that are configured to independently perform the methods described herein or are configured to perform the steps or subroutines of the methods described herein, so that multiple processors collaborate to implement the functions described herein. In addition, in the case where device 1140 is implemented in a cloud computing system, various hardware components may belong to separate physical systems. For example, processor 1120 may include a first processor in a first server and a second processor in a second server.

[0269] It should be noted that the above-mentioned embodiments illustrate rather than limit the presently disclosed subject matter, and that those skilled in the art will be able to design many alternative embodiments.

[0270] In the claims, any reference signs placed between brackets shall not be interpreted as limiting the claims. The use of the verb "comprise" and its conjugations does not exclude the presence of elements or steps other than those described in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. Expressions such as "at least one" before a list of elements indicate the selection of all elements or any subset of elements from the list. For example, the expression "at least one of A, B, and C" should be understood to include only A, only B, only C, both A and B, both A and C, both B and C, or all A, B, and C. The subject matter currently disclosed can be implemented by hardware including several different elements and by appropriately programmed computers. In a device claim that lists several parts, several of these parts can be embodied by the same hardware item. The fact that certain measures are described in mutually different dependent claims does not mean that the combination of these measures cannot be advantageously utilized.

[0271] The following numbered clauses include intended and non-limiting examples:

[0272] Clause 1. A second cryptographic device (20), comprising:

[0273] - a communication interface configured to communicate with the first cryptographic device (10),

[0274] - a processor configured to:

[0275] -The final seed is calculated based on:

[0276] - a pre-seed received from a first cryptographic device (10), and

[0277] - a pre-shared secret, said secret being pre-shared between said second cryptographic device and said first cryptographic device,

[0278] - computing a common object (a) from said final seed,

[0279] - obtaining a first public key (b) associated with said first cryptographic device, and obtaining a second private key (s) associated with said second cryptographic device,

[0280] - calculating a second public key (u) from said second private key (s), calculating said second public key (u) comprising multiplying said second private key (s) by said public object (a),

[0281] - calculating a second original shared key (k*) from said first public key (b) and said second private key (s), said calculation of said second original shared key comprising a multiplication between said second private key (s) and said first public key (b),

[0282] - transmitting said second public key (u) to said first device.

[0283] 2. A first cryptographic device (10), comprising:

[0284] - a communication interface configured to communicate with a second cryptographic device (20),

[0285] - a processor configured to:

[0286] - selecting a pre-seed and sending said pre-seed to said second cryptographic device (20),

[0287] -The final seed is calculated based on:

[0288] - said pre-seed and said pre-shared secret, said secret being pre-shared between said second cryptographic device and said first cryptographic device,

[0289] - computing a common object (a) from said final seed,

[0290] - obtaining a first private key (r) associated with the first cryptographic device and calculating the first public key (b) from the first private key (r), the calculation of the first public key (b) comprising multiplying the first private key (r) with the public object (a), and transmitting the first public key (b) to the second cryptographic device,

[0291] - receiving a second public key (u) from said second cryptographic device,

[0292] - calculating a first original shared key (k') from said second public key (u) and said first private key (r), said calculation of said first original shared key comprising a multiplication between said second public key (u) and said first private key (r).

[0293] Clause 3. The second cryptographic device (20) or the first cryptographic device (10) as described in any of the preceding clauses, wherein the pre-shared secret includes a pre-shared password.

[0294] Clause 4. The second cryptographic device (20) or the first cryptographic device (10) as described in any of the preceding clauses, wherein the pre-seed is sent and received in a plain text format.

[0295] Clause 5. The second cryptographic device (20) or the first cryptographic device (10) as described in any of the preceding clauses, wherein the pre-seed is sent and received via a communication interface, but the pre-shared secret is not sent and received via a communication interface.

[0296] Clause 6. The second cryptographic device (20) or the first cryptographic device (10) as described in any of the preceding clauses, wherein the final seed is also calculated based on network configuration data from a network connection between the second cryptographic device and the first cryptographic device.

[0297] Clause 7. The second cryptographic device (20) or the first cryptographic device (10) of any of the preceding clauses, wherein the final seed is calculated according to:

[0298] - the network address of the first and / or second cryptographic device,

[0299] - the purpose of the network connection,

[0300] - time of day,

[0301] - an interaction counter maintained by the second cryptographic device (20) and the first cryptographic device (10) and incremented at least each time a shared key is derived.

[0302] Clause 8. The second cryptographic device (20) or the first cryptographic device (10) as described in any of the preceding clauses, wherein:

[0303] - the processor of the second cryptographic device (20) is configured to:

[0304] - Generate a transmission key (K),

[0305] - encapsulating said transmission key (K) with at least part of the second original shared key by applying an encapsulation function to obtain encapsulated data (c),

[0306] - transmitting said encapsulated data (c) to a first cryptographic device, and

[0307] - the processor of the first cryptographic device (10) is configured to:

[0308] - receiving encapsulated data from the second device (c),

[0309] - decapsulating said encapsulated data (c) using at least part of said first original shared key (k') to obtain a transmission key.

[0310] Clause 9. The second cryptographic device (20) or the first cryptographic device (10) as described in any of the preceding clauses, wherein:

[0311] - the processor of the second cryptographic device (20) is configured to:

[0312] - generating reconciliation data (h) for at least part of said coefficients of said original shared key, said reconciliation data comprising information allowing to reduce the difference between a first original key and said second original key derived at said first device and said second device,

[0313] - generating a transmission key (K) from said second original shared key (k*),

[0314] - transmitting said reconciliation data (h) to said first device, and

[0315] - the processor of the first cryptographic device (10) is configured to:

[0316] - receiving reconciliation data (h) from said second device,

[0317] - applying said conciliation data (h) in a conciliation function to at least part of said coefficients of said first original shared key (k'),

[0318] - Generate a transmission key (K) from the reconciled first original shared key (k').

[0319] Clause 10. A second cryptographic device (20) or a first cryptographic device (10) as described in any of the preceding clauses, wherein the multiplication with the public object (a) when calculating the first public key (b) and the second public key (u) is a noise multiplication.

[0320] Clause 11. A second cryptographic device or a first cryptographic device as described in any of the preceding clauses, wherein:

[0321] - the processor of the second cryptographic device is configured to encrypt a message (m) using the transmission key and transmit the encrypted message to the first cryptographic device, the processor of the first cryptographic device is configured to decrypt the encrypted message using the transmission key and verify the message (m), and / or

[0322] - the processor of the first cryptographic device is configured to encrypt a message (m) using the transmission key and transmit the encrypted message to the second cryptographic device, and the processor of the second cryptographic device is configured to decrypt the encrypted message using the transmission key and verify the message (m).

[0323] Clause 12. A second cryptographic device or a first cryptographic device as described in any of the preceding clauses, wherein the transmission key is random, and / or ephemeral, and / or symmetric, and / or independent of the first public key (b).

[0324] Clause 13. A second cryptographic device or a first cryptographic device as described in any of the preceding clauses, wherein:

[0325] - the first and second public keys, the first and second private keys, the first and second original keys and the common object are matrices over a finite field or a ring,

[0326] - the first and second public keys, the first and second private keys, the first and second original keys and the common object are polynomials over a finite field or ring.

[0327] Clause 14. The second cryptographic device or the first cryptographic device as described in any of the preceding clauses, wherein the network configuration data is sent encrypted using the transmission key.

[0328] Clause 15. A second cryptographic method (400), comprising:

[0329] - communicating (405) with a first cryptographic device (10),

[0330] - The final seed is calculated (410) according to

[0331] - a pre-seed received from said first cryptographic device (10), and

[0332] - a pre-shared secret, said secret being pre-shared between said second cryptographic device and said first cryptographic device,

[0333] - calculating (415) a common object (a) from said final seed,

[0334] - obtaining (420) a first public key (b) associated with said first cryptographic device, and obtaining a second private key (s) associated with said second cryptographic device,

[0335] - calculating (425) a second public key (u) from said second private key (s), calculating said second public key (u) comprising multiplying said second private key (s) by said public object (a),

[0336] - calculating (430) a second original shared key (k*) from said first public key (b) and said second private key (s), said calculating of said second original shared key comprising a multiplication between said second private key (s) and said first public key (b),

[0337] - transmitting (435) said second public key (u) to said first device.

[0338] Clause 16. A first cryptographic method (450) comprising:

[0339] - communicating (455) with said second cryptographic device (20),

[0340] - selecting (460) a pre-seed and sending said pre-seed to said second cryptographic device (20),

[0341] - calculating (465) the final seed from: the pre-seed and the pre-shared secret, the secret being pre-shared between the second cryptographic device and the first cryptographic device,

[0342] - calculating (470) a common object (a) according to said final seed,

[0343] - obtaining (475) a first private key (r) associated with the first cryptographic device and calculating a first public key (b) from the first private key (r), calculating the first public key (b) comprising multiplying the first private key (r) with the public object (a), and transmitting the first public key (b) to the second cryptographic device,

[0344] - receiving (480) a second public key (u) from said second cryptographic device,

[0345] - calculating (485) a first original shared key (k') from said second public key (u) and said first private key (r), said calculation of said first original shared key comprising a multiplication between said second public key (u) and said first private key (r).

[0346] Clause 17. A transient or non-transitory computer-readable medium (1000) comprising data (1020) representing instructions which, when executed by a processor system, cause the processor system to perform the method according to clauses 14 and / or 15.

[0347] In the claims, the signs in parentheses refer to the reference signs in the drawings of the exemplary embodiments or the formula of the embodiments, thereby increasing the understandability of the claims. These signs should not be interpreted as limiting the claims.

Claims

1. A second cryptographic device (20) for executing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with a first cryptographic device (10), wherein the second cryptographic device (20) include: a communication interface configured to communicate with the first cryptographic device (10) using the lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol, A processor configured to: The final seed is calculated as follows: a pre-seed received from said first cryptographic device (10), a pre-shared secret, the secret being pre-shared between the second cryptographic device (20) and the first cryptographic device (10), and Further information, the further information comprising at least one of the following: a network address of the first cryptographic device (10) and / or the second cryptographic device (20), Network port address, the time of day, and an interaction counter maintained by the second cryptographic device (20) and the first cryptographic device (10) and incremented at least each time a shared key is derived; Using a deterministic random bit generator (DRBG) or a pseudo-random number generator (PRNG) to calculate a public object (a) based on the final seed; Obtaining a first public key (b) associated with the first cryptographic device (10), and obtaining a second private key (s) associated with the second cryptographic device (20), the first public key being calculated at the first cryptographic device (10), the calculation comprising a multiplication between the public object and the first private key of the first cryptographic device (10); Calculating a second public key (u) based on the second private key (s), wherein calculating the second public key (u) comprises multiplying the second private key (s) by the public object (a); Calculating a second original shared key (k*) according to the first public key (b) and the second private key (s), wherein calculating the second original shared key (k*) comprises multiplication between the second private key (s) and the first public key (b); The second public key (u) is transmitted to the first cryptographic device (10).

2. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 1, in, The pre-shared secret includes a pre-shared password.

3. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 1, in, The pre-seed is sent and received in clear text format.

4. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 1, in, The pre-seed is sent and received over the communication interface, but the pre-shared secret is not sent and received over the communication interface.

5. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 1, in, The final seed is also calculated based on network configuration data from a network connection between the second cryptographic device (20) and the first cryptographic device (10).

6. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 1, in, The processor of the second cryptographic device (20) is configured to: Generate a transmission key (K), encapsulating said transmission key (K) with at least part of said second original shared key (k*) by applying an encapsulation function to obtain encapsulated data (c), transmitting the encapsulated data (c) to the first cryptographic device (10), and The processor of the first cryptographic device (10) is configured to: receiving encapsulated data (c) from the second cryptographic device (20), The encapsulated data (c) is decapsulated using at least part of the first original shared key (k') to obtain a transmission key.

7. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with the first cryptographic device (10) according to claim 1, wherein The processor of the second cryptographic device (20) is configured to: generating reconciliation data (h) for at least some of the coefficients of the second original shared key (k*), the reconciliation data comprising information allowing to reduce the difference between the first original key and the second original key derived at the first cryptographic device (10) and the second cryptographic device (20), Generate a transmission key (K) according to the second original shared key (k*), transmitting the reconciliation data (h) to the first cryptographic device (10), and The processor of the first cryptographic device (10) is configured to: receiving reconciliation data (h) from the second cryptographic device (20), applying said conciliation data (h) in a conciliation function to at least part of said coefficients of the first original shared key (k'), A transmission key (K) is generated from the reconciled first original shared key (k').

8. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 1, in, The multiplication with the public object (a) when calculating the first public key (b) and the second public key (u) is a noise multiplication.

9. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 6 or 7, in, The processor of the second cryptographic device (20) is configured to encrypt a message (m) using the transmission key and transmit the encrypted message to the first cryptographic device (10), and the processor of the first cryptographic device (10) is configured to decrypt the encrypted message using the transmission key and verify the message (m), and / or The processor of the first cryptographic device (10) is configured to encrypt a message (m) using the transmission key and transmit the encrypted message to the second cryptographic device (20), and the processor of the second cryptographic device (20) is configured to decrypt the encrypted message using the transmission key and verify the message (m).

10. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 6 or 7, in, The transmission key is random, and / or ephemeral, and / or symmetric, and / or independent of the first public key (b).

11. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 7, in: The first public key and the second public key, the first private key and the second private key, the first original key and the second original key, and the common object are matrices over a finite field or a ring, The first public key and the second public key, the first private key and the second private key, the first original key and the second original key, and the public object are polynomials over a finite field or a ring.

12. The second cryptographic device (20) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol together with the first cryptographic device (10) according to claim 6 or 7, in, The network configuration data is sent encrypted using the transmission key.

13. A first cryptographic device (10) for performing a lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20), wherein the first cryptographic device (10) include: a communication interface configured to communicate with the second cryptographic device (20) using the lattice-based key exchange (KEX) or the lattice-based key encapsulation (KEM) key agreement protocol, A processor configured to: Selecting a pre-seed and sending the pre-seed to the second cryptographic device (20); The final seed is calculated as follows: The pre-seed, a pre-shared secret, the secret being pre-shared between the second cryptographic device (20) and the first cryptographic device (10), and Further information, the further information comprising at least one of the following: a network address of the first cryptographic device (10) and / or the second cryptographic device (20), Network port address, the time of day, and an interaction counter maintained by the second cryptographic device (20) and the first cryptographic device (10) and incremented at least each time a shared key is derived; Using a deterministic random bit generator (DRBG) or a pseudo-random number generator (PRNG) to calculate a public object (a) based on the final seed; Obtaining a first private key (r) associated with the first cryptographic device (10) and calculating a first public key (b) based on the first private key (r), wherein calculating the first public key (b) comprises multiplying the first private key (r) with the public object (a), and transmitting the first public key (b) to the second cryptographic device (20); receiving a second public key (u) from the second cryptographic device (20); A first original shared key (k') is calculated according to the second public key (u) and the first private key (r), and the calculation of the first original shared key (k') includes multiplication between the second public key (u) and the first private key (r).

14. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, in, The pre-shared secret includes a pre-shared password.

15. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, in, The pre-seed is sent and received in clear text format.

16. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, in, The pre-seed is sent and received over the communication interface, but the pre-shared secret is not sent and received over the communication interface.

17. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, in, The final seed is also calculated based on network configuration data from a network connection between the second cryptographic device (20) and the first cryptographic device (10).

18. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, in, The processor of the second cryptographic device (20) is configured to: Generate a transmission key (K), encapsulating the transmission key (K) with at least part of the second original shared key (k*) by applying an encapsulation function to obtain encapsulated data (c), transmitting the encapsulated data (c) to the first cryptographic device (10), and The processor of the first cryptographic device (10) is configured to: receiving encapsulated data (c) from the second cryptographic device (20), The encapsulated data (c) is decapsulated using at least part of the first original shared key (k') to obtain a transmission key.

19. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, wherein The processor of the second cryptographic device (20) is configured to: generating reconciliation data (h) for at least some of the coefficients of the second original shared key (k*), the reconciliation data comprising information allowing to reduce the difference between the first original key and the second original key derived at the first cryptographic device (10) and the second cryptographic device (20), Generate a transmission key (K) according to the second original shared key (k*), transmitting the reconciliation data (h) to the first cryptographic device (10), and The processor of the first cryptographic device (10) is configured to: receiving reconciliation data (h) from the second cryptographic device (20), applying said conciliation data (h) in a conciliation function to at least part of said coefficients of said first original shared key (k'), A transmission key (K) is generated from the reconciled first original shared key (k').

20. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 13, in, The multiplication with the public object (a) when calculating the first public key (b) and the second public key (u) is a noise multiplication.

21. A first cryptographic device (10) for performing a lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 18 or 19, in, The processor of the second cryptographic device (20) is configured to encrypt a message (m) using the transmission key and transmit the encrypted message to the first cryptographic device (10), and the processor of the first cryptographic device (10) is configured to decrypt the encrypted message using the transmission key and verify the message (m), and / or The processor of the first cryptographic device (10) is configured to encrypt a message (m) using the transmission key and transmit the encrypted message to the second cryptographic device (20), and the processor of the second cryptographic device (20) is configured to decrypt the encrypted message using the transmission key and verify the message (m).

22. A first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 18 or 19, in, The transmission key is random, and / or ephemeral, and / or symmetric, and / or independent of the first public key (b).

23. The first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 19, in: The first public key and the second public key, the first private key and the second private key, the first original key and the second original key, and the common object are matrices over a finite field or a ring, The first public key and the second public key, the first private key and the second private key, the first original key and the second original key, and the public object are polynomials over a finite field or a ring.

24. A first cryptographic device (10) for performing a lattice-based key exchange (KEX) or a lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20) according to claim 18 or 19, in, The network configuration data is sent encrypted using the transmission key.

25. A cryptographic method (400) for performing a lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol with a first cryptographic device (10), the method include: The final seed is calculated (410) according to: a pre-seed received from said first cryptographic device (10), a pre-shared secret, the secret being pre-shared between a second cryptographic device (20) and the first cryptographic device (10), and Further information, the further information comprising at least one of the following: a network address of the first cryptographic device (10) and / or the second cryptographic device (20), Network port address, the time of day, and an interaction counter maintained by the second cryptographic device (20) and the first cryptographic device (10) and incremented at least each time a shared key is derived; using a deterministic random bit generator (DRBG) or a pseudo-random number generator (PRNG) to calculate (415) a public object (a) based on the final seed; obtaining (420) a first public key (b) associated with the first cryptographic device (10), and obtaining a second private key (s) associated with the second cryptographic device (20), the first public key being calculated at the first cryptographic device (10), the calculation comprising a multiplication between the public object and a first private key of the first cryptographic device (10); calculating (425) a second public key (u) based on the second private key (s), the calculating the second public key (u) comprising multiplying the second private key (s) by the public object (a); Calculating (430) a second original shared key (k*) based on the first public key (b) and the second private key (s), the calculation of the second original shared key (k*) comprising a multiplication between the second private key (s) and the first public key (b); The second public key (u) is transmitted (435) to the first cryptographic device (10).

26. A cryptographic method (450) for performing a lattice-based key exchange (KEX) or lattice-based key encapsulation (KEM) key agreement protocol with a second cryptographic device (20), the method include: selecting (460) a pre-seed and sending the pre-seed to the second cryptographic device (20); The final seed is calculated (465) as follows: The pre-seed, a pre-shared secret, the secret being pre-shared between the second cryptographic device (20) and the first cryptographic device (10), and Further information, the further information comprising at least one of the following: a network address of the first cryptographic device (10) and / or the second cryptographic device (20), Network port address, the time of day, and an interaction counter maintained by the second cryptographic device (20) and the first cryptographic device (10) and incremented at least each time a shared key is derived; using a deterministic random bit generator (DRBG) or a pseudo-random number generator (PRNG) to calculate (470) a public object (a) based on the final seed; Obtaining (475) a first private key (r) associated with the first cryptographic device (10) and calculating a first public key (b) based on the first private key (r), wherein calculating the first public key (b) includes multiplying the first private key (r) with the public object (a), and transmitting the first public key (b) to the second cryptographic device (20); receiving (480) a second public key (u) from the second cryptographic device (20); A first original shared key (k') is calculated (485) based on the second public key (u) and the first private key (r), and the calculation of the first original shared key (k') includes multiplication between the second public key (u) and the first private key (r).

27. A transient or non-transitory computer readable medium (1000) comprising data (1020) representing instructions which, when executed by a processor system, cause the processor system to perform the method according to claim 25 and / or 26.

Citation Information

Patent Citations

  • Shared key establishment method under quantum computation environment

    CN103326852A

  • Device for determining a shared key

    CN106464490A

Cited By

  • An internal and external network optical isolation interaction method based on post-quantum session key and time-limited two-dimensional code

    CN123163836A