Authentication of a device by cryptographic processing

By using a decryption algorithm implemented in open devices, combining cryptographic masking and demasking functions with white-box implementation, the vulnerability of white-box cryptographic algorithms to attacks is solved, providing greater flexibility and security, and protecting cryptographic keys from attacks.

CN115208558BActive Publication Date: 2026-07-31IDEMIA FRANCE SAS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
IDEMIA FRANCE SAS
Filing Date
2022-03-31
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In open devices, existing white-box cryptographic algorithms are vulnerable to attacks, and vendors have limited freedom in selecting or modifying the white-box implementation of cryptographic algorithms, making it difficult to effectively protect cryptographic keys. Furthermore, modifying the software implementation has a significant impact on protocols or applications.

Method used

By cooperating with the first and second devices, key data is received and processed. Using cryptographic masking and demasking functions, combined with a white-box decryption algorithm, response data is generated to authenticate the device. The software implementation is flexibly adjusted to protect the cryptographic algorithm.

Benefits of technology

It provides secure protection for cryptographic algorithms, increases the freedom of software implementation, effectively resists attacks, and allows modification of the software implementation without affecting the protocol or application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208558B_ABST
    Figure CN115208558B_ABST
Patent Text Reader

Abstract

This invention relates to a processing method in a first device (DV1), the method comprising: receiving first data including query data; and acquiring a cryptographic key including encryption (DV1). EC Key data (C) EC ), key data (C EC The encryption key (D) is masked by executing the cryptographic masking function (F1); the demasking key is received; and the encryption key (D) is determined by executing the cryptographic demasking function (F2) based on the demasking key. EC ); through cryptographic keys (D) EC The algorithm executes a white-box implementation of a decryption algorithm (pdec) to determine the cryptographic key (K) for decryption. EC ); through the decrypted cryptographic key (K) EC The system executes a predetermined cryptographic algorithm (ALp) on the query data (CH1) and determines the response data through cryptographic operations; and sends the response data to authenticate the first device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cryptography, and more particularly to implementing cryptographic processing to authenticate a first device to a second device. Background Technology

[0002] Digital devices (also known as computer devices or digital equipment), such as computers, tablets, chip cards, mobile phones, and connected objects, are ubiquitous in everyday life. These devices often require security solutions to protect access to the device and safeguard sensitive data from any attacks.

[0003] Common security solutions involve embedding secure elements into such devices. As defined by the Global Platform standards organization, well-known to those skilled in the art, a secure element is a hardware and software platform configured to securely host an application and its associated sensitive data (cryptographic keys, algorithms, etc.), conforming to rules set by a trusted third-party organization. The secure element provides a secure execution environment for the application. It can take various hardware forms, such as UICC (Universal Integrated Circuit Card) modules, embedded secure elements (or "embedded SE" or again, "eSIM"), or microSD cards. UICC modules and microSD cards are typically removable. Each form of secure element is designed for very specific applications and must meet the specific needs of the market in question.

[0004] Safety elements offer a good level of protection, but their deployment is complex and limiting, requiring highly specific equipment and services from experts. Using safety elements to protect equipment complicates implementation and operation, and is therefore not always desirable.

[0005] Another solution involves implementing the application in open devices such as PCs, tablets, or smartphones without using any secure components. This makes it possible to enter new markets and simplify application deployment. To secure open devices, a purely software solution, such as a cryptographic solution, must be implemented.

[0006] However, security challenges arise because the source code and data implemented in open devices (without secure elements) are easily accessible to potential hackers. Open devices are vulnerable to "white-box" attacks in the sense that attackers have complete access to the software implementation of cryptographic algorithms: the binary is then fully visible and can be modified by the attacker, who has complete control over the execution platform. Therefore, it is essential to adequately protect the software implementation of applications in open devices.

[0007] Various known software solutions can be used to protect open devices, including "white-box" cryptography. White-box cryptographic solutions are based on the implementation of a cryptographic algorithm while protecting the secret cryptographic key used. White-box cryptography can be applied to any cryptographic algorithm used in an application that wishes to be protected. White-box implementations of cryptographic algorithms involve modifying (complexing, masking, etc.) the implementation of the algorithm in question, for example, by changing the internal representation of the functions and data involved, in order to protect the key used. White-box implementations can also include, for example, combining a secret (in the form of data, but also in the form of code) with random data instantiated at compile time into a combination in which the secret is then difficult to deduce. For example, a white-box implementation of the AES (Advanced Encryption Standard) cryptographic algorithm can be used in an application to authenticate users.

[0008] However, the security issue arises because even in a white-box implementation, cryptographic algorithms can still be vulnerable to certain attacks (statistical attacks) if an attacker can unload the necessary resources. Such attacks are possible, especially when an attacker can monitor application execution based on memory usage.

[0009] If an attacker manages to discover the cryptographic key of a cryptographic algorithm with a white-box implementation, then for the vendor of the application in question, it becomes necessary to use a new white-box implementation with a different design to protect the cryptographic algorithm and new associated secrets again. This presents a problem given the relatively limited number of possible white-box implementations of a given algorithm. Therefore, vendors have very limited freedom when choosing or modifying the white-box implementation of a cryptographic algorithm. Consequently, protecting vulnerable cryptographic algorithms quickly becomes difficult.

[0010] Furthermore, it is desirable to adequately protect cryptographic algorithms, ensuring that the one or more cryptographic keys used are effectively protected against any attacks. Additionally, if an attacker successfully compromises the cryptographic algorithm used to protect a given application, it is necessary to be able to easily modify the software implementation to maximize the security of the application in question.

[0011] Furthermore, when cryptographic algorithms are used to protect protocols or given applications, it is desirable to be able to modify the software implementation of the cryptographic algorithm as needed without affecting the given protocol or application (and thus with minimal impact on the protocol or application in question). Summary of the Invention

[0012] For this purpose, the present invention relates to a processing method implemented by a first device and a second device in cooperation, the method comprising:

[0013] a) Receive first data, including first interrogation data, from the second device;

[0014] b) Obtain key data, the key data including an encrypted cryptographic key obtained by a first encryption algorithm, the key data being masked by performing a cryptographic masking function based on the encrypted cryptographic key and the masking key;

[0015] c) Receive the demasking key from the second device;

[0016] d) Determine the encrypted cryptographic key by performing a cryptographic demasking function based on the key data obtained in b) and the demasking key received in c);

[0017] e) Execute a first decryption algorithm with a white-box implementation based on the encrypted cryptographic key, and determine the decryption cryptographic key by decryption;

[0018] f) Execute a predetermined cryptographic algorithm based on the decrypted cryptographic key and the received first interrogation data to determine response data through cryptographic operations; and

[0019] g) In response to the first data received in a), send the response data to the second device to authenticate the first device to the second device.

[0020] This invention advantageously enables secure and flexible authentication of a first device by a second device. In particular, it allows for the effective protection of any cryptographic algorithm and provides greater freedom in the software implementation used.

[0021] This invention makes it possible to protect cryptographic algorithms, thereby effectively protecting one or more cryptographic keys used from any attack. Furthermore, when an attacker successfully attacks the cryptographic algorithm used to protect a given application, the software implementation can be easily modified using this invention to protect the application in question as much as possible.

[0022] Furthermore, when a cryptographic algorithm is used to protect a given protocol or application, the present invention can modify the software implementation of the cryptographic algorithm as needed without affecting the given protocol or application (and thus having minimal impact on the protocol or application in question).

[0023] According to a particular implementation, the first encryption algorithm and the first decryption algorithm are associated cryptographic algorithms configured to perform an inverse cryptographic function.

[0024] According to a specific implementation, the first encryption algorithm and the first decryption algorithm are different from the predetermined cryptographic algorithm.

[0025] According to a particular implementation, before receiving the demasking key (c), the method further includes:

[0026] h) Send second data, including the second query data, to the second device;

[0027] Specifically, the demasking key received from the second device in c) is calculated based on the second query data.

[0028] According to a particular implementation, before h), the method includes:

[0029] i) Obtain a token, the token comprising:

[0030] -The key data;

[0031] - First-time data, indicating the validity period of the password key; and

[0032] - An identifier that the cryptographic key can be used during the validity period;

[0033] The second data sent in h) includes the first time data extracted from the token and the identifier.

[0034] According to a particular implementation, the method further includes:

[0035] j) Based on the second time data contained in the first data received in a), select the token obtained in i) from one or more tokens accessible to the first device.

[0036] The second time data indicates the validity period of the cryptographic key for the selected token.

[0037] According to a specific implementation, the token obtained in i) further includes the second query data, which is separate from the first time data and the identifier;

[0038] The second data sent in h) includes the second query data extracted from the token.

[0039] According to a specific implementation, the first time data and the identifier included in the second data sent in h) constitute the second query data.

[0040] According to a particular implementation, the token also includes a key encoded in a format suitable for white-box implementation.

[0041] In e), the decrypted cryptographic key is determined by decryption using the first decryption algorithm with a white-box implementation, based on the encrypted cryptographic key and the key encoded in a format suitable for extraction from the token.

[0042] According to a specific implementation, the cryptographic masking function and the cryptographic demasking function are respectively associated encryption and decryption functions.

[0043] According to a specific implementation, the cryptographic masking function and the cryptographic demasking function are symmetric encryption functions, and the masking key and the demasking key are the same.

[0044] According to a particular implementation, after g), the method includes:

[0045] k) In response to detecting that the first device has successfully authenticated with the second device, a predetermined function for cooperating with the second device is triggered.

[0046] In a particular implementation, the different steps of the processing method are determined by computer program instructions.

[0047] Therefore, the present invention also relates to a computer program on an information medium (or recording medium) that can be implemented in a device (so-called "first device") or more generally in a computer, the program including instructions suitable for implementing the processing methods as defined in this document.

[0048] The program can use any programming language and can be in the form of source code, object code, or intermediate code between source code and object code, such as partially compiled code, or any other desired form.

[0049] The present invention also relates to a computer-readable information medium (or recording medium) and includes instructions for a computer program as defined in this document.

[0050] Information media can be any entity or device capable of storing programs. For example, media can include storage devices such as non-volatile rewritable or ROM memories, such as CD-ROMs or microelectronic circuit ROMs, or magnetic recording devices such as floppy disks or hard disks.

[0051] Furthermore, the information medium can be a transmissible medium, such as electrical or optical signals, which can be transmitted via cables or optical fibers, radio, or other means. The program according to the invention can be downloaded, in particular, via an Internet-type network.

[0052] Alternatively, the information medium may be an integrated circuit containing a program, the circuit being adapted to execute or be used to execute the method in question.

[0053] The present invention also relates to an apparatus, namely a so-called first apparatus, capable of implementing the processing method as defined in this document. In particular, the present invention provides a first apparatus capable of cooperating with a second apparatus, comprising:

[0054] - A first receiving module, configured to receive first data including first interrogation data from the second device;

[0055] - An acquisition module configured to acquire key data, the key data including an encrypted password key obtained by a first encryption algorithm, the key data being masked by executing a password masking function based on the encrypted password key and the masking key;

[0056] - A second receiving module configured to receive a demasking key from the second device;

[0057] - A first determining module is configured to determine the encrypted cryptographic key by performing a cryptographic demasking function based on the obtained key data and the received demasking key;

[0058] - The second determining module is configured to execute a first decryption algorithm with white-box implementation based on the encrypted cryptographic key, and determine the decryption cryptographic key by decryption;

[0059] - A third determining module, configured to perform a predetermined cryptographic algorithm based on the decrypted cryptographic key and the received first query data, to determine response data through cryptographic operations; and - a sending module, configured to send the response data to the second device in response to the received first data, to authenticate the first device to the second device.

[0060] Note that the different embodiments described above (and those described below) and the associated advantages related to the processing method of the present invention can be applied in a similar manner to the first device of the present invention.

[0061] For each step of the processing method, the first device of the present invention may include a corresponding module configured to perform the step.

[0062] In this respect, the term "module" in this document can also refer to a software component, a hardware component, or a combination of hardware and software components.

[0063] A software component is equivalent to one or more computer programs, one or more subroutines of a program, or more generally, any element of a program or software capable of implementing a function or a set of functions, as described below for the modules discussed. Such a software component can be executed by the data processor of a physical entity (terminal, server, gateway, router, etc.) and has access to the hardware resources of that physical entity (memory, recording medium, communication bus, electronic input / output card, user interface, etc.).

[0064] In the same way, a hardware component is equivalent to any element of a hardware component capable of implementing a function or a set of functions, as described below for the modules under discussion. It can be a programmable hardware component or a component with an integrated processor for executing software, such as an integrated circuit, a chip card, a memory card, an electronic card for executing firmware, etc. Attached Figure Description

[0065] Other features and advantages of the invention will become apparent from the following description with reference to the accompanying drawings, which illustrate exemplary embodiments without any limitations. In the drawings:

[0066] Figure 1 This schematically illustrates a method for authenticating a first device to a second device, according to a first example.

[0067] Figure 2 This schematically illustrates an environment in which a first device, a second device, and a remote server collaborate according to a particular embodiment.

[0068] Figure 3 The structure of a first device according to a specific embodiment of the present invention is schematically shown;

[0069] Figure 4 The structure of a second device according to a specific embodiment of the present invention is schematically shown;

[0070] Figure 5 A module implemented by a first device according to a specific embodiment of the present invention is schematically shown;

[0071] Figure 6 The steps of a processing method according to a specific embodiment of the present invention are illustrated in diagram form;

[0072] Figure 7 The steps of a processing method according to a specific embodiment of the present invention are illustrated in diagram form;

[0073] Figure 8 Represented in the form of a diagram Figure 6 A variation of the processing method shown. Detailed Implementation

[0074] As already noted, this application relates to a first device, and more generally to the authentication of a user of that first device to a second device, for example, in order to access any service or any function.

[0075] The embodiments described below belong to the category of access control for vehicles (such as, for example, automobiles). Thus, a user uses a first device to authenticate themselves to another device that controls access to the vehicle. However, it should be understood that the invention is more generally applicable to cryptographic processing that allows any first device to authenticate itself to another so-called second device. For example, the second device of the invention is configured to control any function of the vehicle, such as controlling the doors or the vehicle's start / stop control. The second device can similarly control a house door, control security doors, control access to a vehicle, or access to internet services, game consoles, etc.

[0076] The nature of the first and second devices can vary depending on one or more intended applications. The first device can be, for example, a terminal such as a mobile phone, tablet computer, computer, or a USB key or equivalent.

[0077] This invention provides enhanced security for authentication of a first device to a second device, particularly by means of a cryptographic algorithm with a white-box implementation for protecting the cryptographic key used for authentication. To this end, the first device cooperates with the second device to authenticate itself to the second device. During the processing method (authentication method), the first device uses a demasking key provided by the second device during a previous interaction between the first and second devices to demask its own encrypted cryptographic key. The first device then decrypts the thus obtained encrypted cryptographic key by executing a decryption algorithm with a white-box implementation. The first device can then generate a response based on the decrypted cryptographic key and query data pre-provided by the second device by executing a predetermined cryptographic algorithm. In response to the first query data, sending this response to the second device allows the first device to authenticate itself to the second device; if authentication succeeds or fails, the second device can verify the validity of the response and infer from it.

[0078] Other aspects and advantages of the invention will become apparent from the exemplary embodiments described below with reference to the accompanying drawings.

[0079] As already noted, white-box cryptography is a well-known technique that involves implementing a function of a given cryptographic algorithm, but by modifying the implementation of that algorithm, for example, by using a secure implementation, known as a white-box implementation. Readers may refer, for example, to the following reference text: “White-Box Cryptography and an AES Implementation” (Stanley Chow, Philip A. Eisen, Harold Johnson, and Paul C. van Oorschot; in Kaisa Nyberg and Howard M. Heys, eds.; Fields of Choice in Cryptography, Lecture Notes in Computer Science, Vol. 2595, pp. 250–270. Springer, 2002; https: / / eprint.iacr.org / 2013 / 104.pdf).

[0080] Official documentation for cryptographic algorithms (in standards, specifications, etc.) provides descriptions of the mathematical functions implemented in the computation of these algorithms (e.g., the AES algorithm is standardized by the National Institute of Standards and Technology (NIST)). White-box implementations of such cryptographic algorithms aim to modify these descriptions, for example, by altering the internal representation of the functions or data implemented in these algorithms to hide secrets within the code of the implementation to protect the secrets from any attack. For example, a table can be used to combine a secret key (in the form of data and / or code) with random data containing a function that is difficult to derive from its secret key. The general principles of a white-box implementation of a given cryptographic algorithm are well known to those skilled in the art and will not be described in more detail in this document.

[0081] As already noted, the applicant has observed that while current techniques for implementing cryptographic algorithms with white-box implementations offer advantages in terms of security, they also introduce limitations and constraints to their ability to effectively protect protocols or applications. This stems in particular from the fact that cryptographic algorithms with white-box implementations are often used by protocols or applications that people wish to protect, as explained below.

[0082] Figure 1 The first solution is illustrated in the diagram, in which a first device 2 (a terminal in this example) uses a MAC (Message Authentication Code) algorithm based on AES (Advanced Encryption Standard) with a white-box implementation to authenticate itself to a second device 4 (a vehicle in this example).

[0083] As shown in the figure, assume that terminal 2 and vehicle 4 interact together during the authentication process to allow terminal 2 to authenticate itself to vehicle 4. Vehicle 4 sends (E2) randomly selected query data CH0 to terminal 2. Then, terminal 2 calculates (E4) response RP0 based on the received query data CH0. For this purpose, terminal 2 has an AES-based MAC algorithm in its memory, or more precisely, a representation of the algorithm as wb[aes / K]. EC A specific white-box implementation. This white-box implementation has an embedded cryptographic key K. EC The password key K EC It is masked in the implemented code. Terminal 2 is therefore based on the query data CH0 provided by vehicle 4 (which is represented as RP0 = wb[aes / K)). EC The terminal 2 executes the AES-based MAC algorithm (E4) with a white-box implementation (CH0). Once determined, the terminal 2 sends a response RP0 (E6) to the vehicle 4, which can verify the validity of the received response RP0. To do this, the vehicle uses the query data CH0 and its key K... EC The vehicle executes an AES-based MAC algorithm to calculate (E8) its own response RP0a. Then, the vehicle compares the received response RP0 with its theoretical response RP0a (E10), and if a match exists between RP0 and RP0a, terminal 2 is successfully authenticated.

[0084] exist Figure 1 In the example shown, the white-box implementation technique is directly applied to the AES-based MAC algorithm used by vehicle 4 to authenticate terminal 2, which raises a problem. As already stated, for a single and identical cryptographic algorithm, i.e., the AES-based MAC algorithm in this example, only a finite number of possible white-box implementations exist. If an attacker manages to determine the cryptographic key K... EC Alternatively, if the security of the AES-based MAC algorithm implementation is compromised in any way in terminal 2, it can be demonstrated that it is difficult to implement a new white-box implementation of the same AES-based MAC algorithm in terminal 2 while maintaining a good level of security. Because the configuration of vehicle 4 in this example imposes the use of the AES-based MAC algorithm in vehicle 4 and therefore in terminal 2, and because white-box implementation techniques are applied to this AES-based MAC algorithm within terminal 2 in this example, the programmer has only limited freedom. Furthermore, it is generally undesirable if the algorithm used by vehicle 4 to authenticate terminal 2 can be modified, as this would require significant modifications to the configuration of devices already deployed in the field.

[0085] This invention, through the application of white-box implementation technology, provides a change in principle. Instead of targeting the algorithm imposed by the second device for authenticating the first device, it targets a different decryption algorithm used by the first device to protect the authentication process—not the decryption algorithm used by the second device during the authentication method. Therefore, the white-box implementation of this additional decryption algorithm can be adjusted and protected in the first device without affecting the second device, particularly without requiring significant modifications to the second device's configuration, and maintaining a consistently high level of security. Furthermore, any modifications to the white-box implementation on the first device side have no impact on the second device, providing greater flexibility to better protect the authentication method from attacks.

[0086] Now for reference Figures 2-8 Describe specific implementation schemes. Unless otherwise stated, elements that are common or similar in several figures have the same reference numerals and have the same or similar features, and therefore, for simplicity, these common elements will not be generally described.

[0087] Figure 2 Environment E is shown, in which a first device DV1 and a second device DV2 cooperate. The first device DV1 and the second device DV2 together form system SY1.

[0088] In this example, the first device DV1 is a terminal, such as a mobile phone (smartphone) or tablet. The second device DV2 is an appliance included in or connected to vehicle 8. In a variation, device DV2 may be vehicle 8 itself.

[0089] In this example, user UR uses terminal DV1 to authenticate himself to vehicle 8, and more specifically to a second device DV2 that controls access to vehicle 8.

[0090] Optionally, environment E may include a removal server SV1 capable of communicating with at least a first device DV1 and a second device DV2 (or at least one of these devices). Server SV1 may send data to the first device DV1, for example, in the form of a token TN (also called a data group), or send query data CH2 to the second device DV2. However, implementation of the invention is possible without such a server SV1.

[0091] Figure 3 A particular embodiment is shown. Figure 2 The structure of the first device DV1 shown is illustrated. In this example, the first device DV1 includes a processor 10, volatile memory 12, non-volatile memory 14, non-volatile memory 16, and a communication interface INT1.

[0092] The memory 14 is a rewritable non-volatile memory or read-only memory (ROM) that constitutes a recording medium (or information medium) according to a particular embodiment, is readable by the first device DV1, and has a computer program PG1 according to a particular embodiment registered thereon. The computer program PG1 includes instructions for performing the steps of the processing method according to the particular embodiment as further described.

[0093] Memory 16 is a rewritable, non-volatile memory capable of storing tokens TN, a white-box implementation of the decryption algorithm pdec (denoted as wb[pdec]), and a predetermined cryptographic algorithm ALp. However, the contents of memory 16 can vary depending on the implementation of the invention under consideration. In this example, memory 16 stores a set of tokens TN, denoted as TN1 to TN20, each of which includes: key data C. EC The system queries for data CH2, as well as data EXP and ID. As further described, the content and quantity of token TN can vary depending on the circumstances. As an example, implementation is possible without such token TN, or without data EXP and ID within those token TN.

[0094] As further described, key data C EC Including encrypted cryptographic key D EC It is generated by encryption through the execution of the cryptographic algorithm penc. As will become more apparent, the cryptographic algorithm penc is the corresponding part of the decryption algorithm pdec, and conversely (in other words, the two algorithms are consistent with each other), enabling the decryption algorithm pdec to undo or decrypt the encryption performed by the encryption algorithm penc.

[0095] Therefore, the encrypted cryptographic key D EC Equivalent to the cryptographic key K EC (D EC =enc(K EC The decryption algorithm pdec with a white-box implementation can be any decryption algorithm (proprietary algorithm, or all or part of the AES algorithm, etc.). As further described, one aspect of the invention is based on the fact that, in this example, white-box implementation techniques are applied to the decryption algorithm pdec.

[0096] Key data C EC (and therefore included in C) EC The encrypted key D in EC ) via cryptographic key D EC The key K1 is further masked by executing the encryption masking function F1. In other words, the key data C ECThis is generated by the execution of the cryptographic masking function F1, which will encrypt the cryptographic key D. EC And the masking key K1 is used as input. Therefore, it is contained in the key data C. EC The encrypted key D in EC Therefore, it is masked by the execution of the masking function F1. Therefore, the key data C EC Equivalent to the cryptographic key K EC (via pdec), then masked (via F1).

[0097] As further noted, it is not the first device DV1 that performs masking via function F1 to generate key data C. EC However, the first device, DV1, is able to acquire or receive key data C. EC And store them in memory 16.

[0098] The properties and uses of the different elements contained in memory 16 will be described in further detail.

[0099] The communication interface INT1 allows the first device DV1 to communicate with the second device DV2 via a wired or wireless type (e.g., via Bluetooth, Wi-Fi, NFC, or radio communication type such as GSM or LTE) via an appropriate communication link.

[0100] Processor 10 also uses volatile memory 12 to perform various operations or functions required for the operation of the first device DV1, including executing computer program PG1 during the implementation of the processing method of the present invention.

[0101] Figure 4 A particular embodiment is shown. Figure 2 The structure of the second device DV2 shown is illustrated. In this example, the second device DV2 includes a processor 20, volatile memory 22, non-volatile memory 24, non-volatile memory 26, and a communication interface INT2.

[0102] The memory 24 is a rewritable non-volatile memory or read-only memory (ROM) that constitutes a recording medium (or information medium) according to a particular embodiment, readable by the second device DV2, and, according to a particular embodiment, has a computer program PG2 recorded thereon. The computer program PG2 includes instructions for performing steps of the processing method according to the particular embodiment as further described.

[0103] Memory 26 is capable of storing the aforementioned predetermined cryptographic algorithms Alp and AL1, from which one or more keys K can be derived. ECThe master key MK, key TK, and data EPX and ID are stored in a rewritable non-volatile memory. However, the contents of memory 26 can vary according to an implementation contemplated by the invention. As an example, an implementation is possible without at least one (or none) of EXP, ID, TK, and MK.

[0104] like Figure 4 As shown, memory 26 can also store time data EXPmin (hereinafter referred to as second time data), although implementation of the present invention is possible in this time data.

[0105] The nature and use of the different elements contained in memory 26 will be described in further detail with specific examples.

[0106] In the example considered here, the predetermined cryptographic algorithm ALp is therefore used by the first device DV1 and the second device DV2 during the authentication process to authenticate the first device DV1 to the second device DV2. This cryptographic algorithm ALp can be any algorithm used to perform encryption (or more generally, cryptographic operations), provided that the first device DV1 and the second device DV2 use the same cryptographic algorithm ALp. This cryptographic algorithm ALp can be, for example, the AES cryptographic algorithm, or a signature calculation algorithm, or a MAC (Message Authentication Code) identifier calculation algorithm, such as one based on AES. Without wanting to make deep modifications to the configuration of the second device DV2, the properties of the cryptographic algorithm ALp implemented in the first device DV1 are therefore imposed by the configuration of the second device DV2.

[0107] Furthermore, communication interface INT2 is configured to cooperate (and conversely) with communication interface INT1 of the first device DV1 to establish a communication link between DV1 and DV2. As already noted, this link can be of various types (wired or wireless).

[0108] Processor 20 also uses volatile memory 22 to perform various operations or functions required for the operation of the second device DV2, including executing computer program PG2 during the implementation of the processing method of the present invention.

[0109] Notice, Figures 2-4 The first device DV1 and the second device DV2 shown herein constitute only exemplary embodiments, and other implementations are possible within the scope of this invention. As those skilled in the art will understand, only certain elements of the first device DV1 and the second device DV2 are described herein to simplify the understanding of the invention, and these elements are not essential for implementing the invention.

[0110] like Figure 5As shown, according to a specific embodiment, the processor 10 of the first device DV1, driven by the computer program PG1, implements a number of modules, namely: a first receiving module MD2, an acquisition module MD4, a second receiving module MD6, a first determining module MD8, a second determining module MD10, a third determining module MD12, and a transmitting module MD14, and, where applicable, a second acquisition module MD16 and / or a second transmitting module MD18. However, implementation of the present invention is possible, particularly without these modules MD16 and MD18.

[0111] More precisely, the first receiving module MD2 is configured to receive first data DT1, including first interrogation data CH1, from the second device DV2.

[0112] As specifically referenced above. Figure 3 The description states that the MD4 acquisition module is configured to acquire key data C. EC Therefore, key data C EC Including what is represented as D EC The encrypted cryptographic key (which has been pre-encrypted using the PINC cryptographic algorithm), key data C EC It itself is based on the cryptographic key D EC The previous execution of the password masking function F1 of the masking key K1 is masked.

[0113] Therefore, as already pointed out, the encrypted cryptographic key D EC It is the password key K EC The encrypted version uses the PINC cryptographic algorithm to secure the key K. EC It was obtained through encryption. Additionally, the key data C... EC The encrypted cryptographic key D included EC It is itself masked by the execution of the masking function F1.

[0114] Get MD4 search key data C from module C EC The method can vary depending on the circumstances, which will be described further below. Key Data C EC For example, it can be received in advance from an external source, such as from server SV1 ( Figure 2 ) Received. Server SV1 can, for example, be configured to generate this key data C EC .

[0115] The second receiving module MD6 is configured to receive a demasking key K2 from the second device DV2. This demasking key K2 is configured to be used as input to a cryptographic demasking function F2 as indicated below.

[0116] The first determining module MD8 is configured to use key data C obtained from the acquisition module MD4. EC Furthermore, based on the demasking key K2 received by the second receiving module MD6, the cryptographic demasking function F2 is executed to determine the encryption key D. EC (that is, key K) EC (The encrypted but unmasked version). The demasking function F2 is configured to remove the masking previously performed by function F1 to generate key data C. EC In other words, the first determining module MD8 uses the demasking function F2 to execute the key data C. EC The demasking function F2 is used to generate key data C. EC The inverse cryptographic function of the masking function F1. As further mentioned, various cryptographic functions F1 and F2 can be conceived, as long as they are the opposites of each other.

[0117] The second determining module MD10 is configured to use the encrypted cryptographic key D determined by the first determining module MD8. EC The decryption algorithm pdec, with a white-box implementation (i.e., a white-box implementation of wb[pdec]), is executed to determine the cryptographic key K by decryption. EC .

[0118] The third determining module MD12 is configured to use the decryption key K determined by the second determining module MD10. EC The first interrogation data CH1 received by the first receiving module MD2 is processed using the predetermined cryptographic algorithm ALp as described above to determine the response data ANS1 through cryptographic operations. As described in specific examples below, this cryptographic operation can be encryption or other types of cryptographic operations (signature calculation, MAC calculation, etc.).

[0119] The sending module MD14 is configured to send response data ANS1 determined by the third determining module Md12 to the second device DV2 in response to the first data DT1 received by the first receiving module MD2, so as to authenticate the first device DV1 to the second device DV2.

[0120] As already noted, the first device DV1 may also include a second acquisition module MD16, which is configured to acquire key data C, where applicable. EC At least one token TN. Then, the MD4 acquisition module is configured to extract key data C from the token TN. EC Depending on the specific implementation, the token TN may include various other data, such as query data CH2 or other data EXP and ID, the nature and use of which will be further described below.

[0121] As already noted, the first device DV1 may also include a second sending module MD18, which is configured to send second data DT2 to the second device DV2, the second data DT2 including second query data CH2 (the latter being extracted, for example, from a token TN obtained by the second acquisition module MD16 where applicable).

[0122] The configuration and operation of modules MD2-MD18 of the first device DV1 will be explained below. Figures 6-8 The exemplary implementations described are presented in more detail. Note that, as Figure 5 The modules MD2-MD18 shown are merely exemplary embodiments of the present invention and are not restrictive.

[0123] Typically, for each step of the processing method of the present invention, the first device of the present invention may include a corresponding module configured to perform the step.

[0124] Now refer to Figure 6 Describes a specific implementation. More specifically, previous references Figures 2-5 The first device DV1 (hereinafter referred to as the "terminal") and the second device DV2 cooperate, specifically to allow the first device DV1 to authenticate itself to the second device DV2. To this end, the terminal DV1 cooperates with the second device DV2 to implement a processing method (or authentication method) by executing a computer program PG1. In the same manner, the second device DV2 executes a computer program PG2 to authenticate the terminal DV1.

[0125] During receiving step S2, terminal DV1 receives first data DT1 from second device DV2, which includes first interrogation data represented as CH1. Second device DV2 may, for example, randomly select the interrogation data CH1 sent to terminal DV1 in S2 to make the method more secure.

[0126] In addition, terminal DV1 obtains (S4) a cryptographic key D that includes encryption. EC Key data C EC The key data C EC (and therefore included in key data C) EC The encrypted key D in EC ) via cryptographic key D EC The key K1 is masked by executing the cipher masking function F1.

[0127] More specifically, the encrypted cryptographic key D EC It is generated by encryption using the PINC cryptographic algorithm. In other words, the encrypted cryptographic key D EC It is the password key K EC The encrypted version uses the PINC cryptographic algorithm to secure the key K.EC Obtained through encryption.

[0128] In addition, it is included in the key data C EC The encrypted key D in EC It is itself masked by the execution of the cryptographic masking function F1. Therefore, the key data C EC Equivalent to the cryptographic key K (via pdec) EC Then it is masked (via F1).

[0129] Terminal DV1 retrieves key data C EC The method can vary depending on the situation, as described further. Key Data C EC For example, it can be received in advance from an external source, such as from server SV1 ( Figure 2 ) Received. According to a specific example, server SV1 executes the cryptographic algorithm penc on the cryptographic key K. EC Encryption to obtain the encryption key D EC Then, by masking the decryption key D obtained by executing the cipher masking function F1 based on the masking key K1. EC To generate key data C EC .

[0130] In step S4, the pre-terminal DV1 can be accessed in its memory 16 ( Figure 3 The received key data C is recorded in the database. EC It then consults its memory 16 to retrieve this data.

[0131] During the transmission step S6, terminal DV1 then transmits second data DT2, including second interrogation data represented as CH2, to second device DV2. The manner in which terminal DV1 pre-determines the second interrogation data CH2 to be sent to second device DV2 can vary depending on the circumstances. For example, terminal DV1 may pre-receive and record the second interrogation data CH2 combined with key data C in its memory 16. EC As shown below, it is possible for terminal DV1 to not send any second data DT2 to the second device DV2.

[0132] In this example, the second device DV2 then determines (S8) the demasking key K2 based on the second interrogation data CH2 received in S6. More precisely, the second device DV2 computes the demasking key K2 by executing encryption algorithm AL1 based on the second interrogation data CH2, and, where applicable, also by executing encryption algorithm AL1 based on the key TK stored in the memory 26 of the second device DV2 (although using the key TK is not required). In other words, encryption algorithm AL1 takes the second interrogation data CH2 and the applicable key TK as input to produce the demasking key K2 as output. This demasking key K2 constitutes a response whose purpose is to allow terminal DV1 to demask in this masked form contained in the key data CH2. EC The encrypted key D in EC .

[0133] Note that in S8, the second device DV2 can use any encryption algorithm AL1 to generate the demasking key K2, as long as it can generate the required demasking key K2 for the terminal DV1, thereby enabling the execution of the demasking S12 as described below. Specifically, the encryption algorithm AL1 can be different from the predetermined cryptographic algorithm ALp used by the terminal DV1 and the second device DV2 to authenticate the terminal DV1. The encryption algorithm AL1 can be the AES algorithm or any other suitable encryption algorithm.

[0134] During the transmission step S10, the second device DV2 therefore sends the demasking key K2 to the terminal DV1 in response to the second data DT2 received in S6. Sending the second interrogation data CH2 from the terminal DV1 to the second device DV2 in S6 further protects the processing method, ensuring that the second device DV2 can only generate the demasking key K2 based on the interrogation data CH2 pre-provided by the terminal DV1 during the interaction. However, other implementations are also possible, where the second device DV2 does not require any second interrogation data CH2 from the terminal DV1 to generate or obtain the demasking key K2.

[0135] As a variation, terminal DV1 does not send the second data DT2 during transmission step S6, and in S8, the second device DV2 determines the demasking key K2 (which can be received from the outside in particular) in any appropriate manner. Then, in S10, the second device DV2 sends the demasking key K2 to terminal DV1 without responding to any query data CH2 from terminal DV1.

[0136] According to a specific example, the second device DV2 receives a demasking key K2 from the server SV1. To do this, the second device DV2 receives, for example, a list of one or more demasking keys K2 from the server SV1. The second device DV2 then extracts the demasking keys K2 from the list, for example, following a predetermined order, and sends them to the terminal DV1 in S10.

[0137] According to another example, DV2 can receive query data CH2 or demasking key K2 from server SV1, along with key K. EC .

[0138] Terminal DV1 therefore responds to the second data DT2 reception (S10) by receiving the demasking key K2 provided by the second device DV2. During the determination step S12, terminal DV1 then proceeds based on the key data C obtained in S4. EC The demasking key K2 received in S10 is used to execute the cryptographic demasking function F2 (as described above) to determine the encryption cryptographic key D. EC In other words, the demasking function F2 is executed, transferring the key data C. EC And the demasking key K2 is used as input to the demasking key data C EC And thus obtain the encrypted password key D EC As output.

[0139] The demasking function F2 can be adjusted as needed, and F2 can be selected to eliminate the masking effect caused by the cryptographic masking function F1, thereby generating the key data C. EC In other words, the demasking function F2 is chosen as a function of the masking function F1 in order to produce the inverse cryptographic effect of the masking function F1 (i.e., the demasking effect).

[0140] In this specific example, the cipherface function F1 and the demasking function F2 are associated encryption and decryption functions, respectively. Various encryption and decryption functions can be envisioned. In this specific example, the cipherface function F1 and the demasking function F2 are symmetric encryption functions, and the masking key K1 (based on its generated key data C) EC The cryptographic masking function F1 and the demasking function F2 are the same. In a variant, the cryptographic masking function F1 and the demasking function F2 are asymmetric encryption and decryption functions, where keys K1 and K2 are different public and private keys, respectively.

[0141] In this specific instance, the cryptographic masking function F1 and the demasking function F2 are "exclusive OR" functions, also known as XOR (or exclusive disjunction) functions. The XOR function, well-known to those skilled in the art, is typically represented by the symbol "⊕". In this particular case, functions F1 and F2 are therefore identical, and in S12, the masking effect produced by applying F1 is eliminated by applying F2.

[0142] Key data C EC The initial masking provides the key K EC This provides favorable protection because it is necessary to extract the encrypted key D. EC (and from this, the key K can be derived.) EC Terminal DV1 must be able to interact with the second device DV2 beforehand in order to retrieve the demasking key K2. Only by using this demasking key K2 can terminal DV1 determine the encrypted cryptographic key D by executing the cryptographic demasking function F2. EC That is, the cryptographic key K in encrypted form. EC Without the demasking key provided by the second device DV2, it is impossible for an attacker to demask the encryption key D. EC .

[0143] During step S14, terminal DV1 then determines the cryptographic key K in its decrypted form (in plaintext). EC To this end, terminal DV1 uses an encrypted cryptographic key D. EC Decryption is performed by executing the pdec cryptographic decryption algorithm with a white-box implementation. In other words, terminal DV1 decrypts the encrypted cryptographic key D. EC The white-box implementation wb[pdec] is used as input to perform the decryption algorithm pdec in order to generate the cryptographic key K in the plaintext. EC As output.

[0144] Therefore, according to the principles of the present invention, the white-box implementation technique is not applied to a predetermined cryptographic algorithm ALp imposed by the second device DV2 to authenticate terminal DV1, but rather to a decryption algorithm pdec specific to terminal DV1. As a result, those skilled in the art can use more degrees of freedom than the algorithm ALp to modify the decryption algorithm pdec to make the method as secure as possible.

[0145] The decryption algorithm pdec can be any decryption algorithm, as long as it can reverse (or undo) the encryption previously performed by the encryption algorithm penc to generate the encrypted cryptographic key D. EC Thus, the password key K was obtained. ECIn other words, the encryption algorithm PINC and the decryption algorithm PDE are related cryptographic algorithms configured to perform inverse cryptographic functions.

[0146] The decryption algorithm pdec can be, for example, a proprietary algorithm, or all or part of the AES algorithm, etc. In a specific example, the encryption algorithm penc and the decryption algorithm pdec are different from the predetermined cryptographic algorithm ALp used by the second device DV2 to authenticate terminal DV1. Note that this difference may relate to the implementation of one and the same type of algorithm (for one and the same mathematical principles). As an example, algorithms ALp and pdec (and penc) can be different algorithms, meaning their respective software implementations are different, for example, in the case where algorithm pdec is an AES algorithm with a white-box implementation while algorithm ALp is an AES algorithm with a non-white-box implementation.

[0147] Based on specific examples, the decryption algorithm pdec is different from the AES algorithm.

[0148] Note that during step S14, the white-box implementation wb[pdec] of the decryption algorithm pdec can, where applicable, take data specific to terminal DV1 and / or user UR from terminal DV1 (e.g., a secret PIN code entered by user UR) as input, in addition to the encrypted password key D. EC In addition.

[0149] The white-box implementation wb[pdec] of the decryption algorithm pdec can also consider a key, which can be hidden in the white-box implementation or "tokenized" (i.e., in the form of a token) and passed as a parameter of the white-box implementation. This tokenized key can, for example, be obtained by terminal DV1 from key data C obtained in S4. EC get.

[0150] During step S16, terminal DV1 then uses the decryption key K determined in S14. EC The terminal DV1 executes the predetermined cryptographic algorithm ALp (as described above) on the first query data CH1 previously received in S2 to determine the response data ANS1 through encryption (or more generally, through cryptographic operations). In other words, the terminal DV1 executes the predetermined cryptographic algorithm ALp and uses the cryptographic key K EC The query data CH1 is taken as input to generate response data ANS1 as output. The response data ANS1 constitutes a response to the query data CH1 received in S2.

[0151] In the example considered here, the cryptographic algorithm ALp does not have a white-box implementation (although this is possible). As mentioned above, applying white-box implementation techniques to the decryption algorithm pdec in S14 makes it possible to improve the flexibility and security of the processing method.

[0152] During the transmission step S18, terminal DV1 then sends response data ANS1 to second device DV2 in response to the first data DT1 received in S2 (in particular in response to query data CH1) to authenticate terminal DV1 (and therefore user UR) to second device DV2.

[0153] Once the response data ANS1 is received (S18), the second device DV2 authenticates the terminal DV1 based on the response data ANS1 and the query data CH1 (S20). More precisely, the second device DV2 authenticates the terminal DV1 based on the password key K. EC The query data CH1 previously sent in S2 is used to calculate the theoretical response data ANS1a (S22) by executing the predetermined cryptographic algorithm ALp through encryption (or more generally, through cryptographic operations). In other words, the second device DV2 executes the predetermined cryptographic algorithm ALP and uses the cryptographic key K... EC The query data CH1 is taken as input to generate the theoretical response data ANS1a as output. The second device DV2 can retrieve the cryptographic key K in any suitable manner. EC .

[0154] Then, the second device DV2 compares the response data ANS1 provided by terminal DV1 in S18 with the theoretical response data ANS1a determined in S22 (S24). If the received response data ANS1 matches the theoretical response data ANS1a, terminal DV1 is successfully authenticated; otherwise, authentication fails. In other words, terminal DV1 is only successfully authenticated if there is a match between ANS1 and ANS1a.

[0155] As described above, during the authentication method used to authenticate the first device DV1, the predetermined cryptographic algorithm ALp used by the first device DV1 and the second device DV2 can vary depending on the circumstances, as long as both the terminal DV1 and the second device DV2 use the same cryptographic algorithm ALp (therefore, in S20, the response data ANS1 can be verified by the second device DV2). This cryptographic algorithm ALp can be, for example, the AES encryption algorithm, a signature calculation algorithm, or a MAC (Message Authentication Code) identifier calculation algorithm, such as one based on AES. The principles of signature or MAC calculation are well known to those skilled in the art, and therefore will not be described in detail here for simplicity.

[0156] As a result of authentication step S20, the second device DV2 can also control access to function F3 (here, any function of vehicle 8). Specifically, if terminal DV1 is successfully authenticated, the second device DV2 can trigger the implementation of function F3, while if authentication fails, function F3 is blocked. As described above, function F3 may, for example, include controlling access to vehicle 8 or controlling its startup.

[0157] According to a specific example, in sending step S18 ( Figure 6 After that, terminal DV1 is reconfigured to modify the decryption algorithm pdec by replacing it with a new decryption algorithm pdec that is different from the old one. Then, in S14, the authentication method described in steps S2 to S26 above can be performed again using the new decryption algorithm pdec implemented in terminal DV1 in a white-box manner.

[0158] This invention advantageously enables secure and flexible authentication of a first device DV1 to a second device. In the example above, the second device DV2 executes a predetermined cryptographic algorithm ALp to authenticate the first device DV1. Since it is desirable to modify the configuration of the second device DV2 (application, protocol, etc.) with as little as possible, the configuration of the second device DV2 forces the first device DV1 to use the same cryptographic algorithm ALp to generate response data ANS1 during the authentication process. This is because the second device DV2 needs to use the same algorithm ALp in order to be able to... Figure 6 The validity of the response data ANS1 provided by the first device DV1 is verified by calculating the theoretical response data ANS1a as described above.

[0159] However, the principle of this invention is based on the following fact: during the execution of the first device DV1 of the decryption algorithm pdec (S14, Figure 6 During this period, white-box implementation techniques are applied. Therefore, it is the cryptographic algorithm pdec that has a white-box implementation in the first device DV1, not the cryptographic algorithm ALp (although this is possible). As long as the choice of algorithms ALp and pdec is decoupled, the decryption algorithm pdec, which has a white-box implementation in the first device DV1 (S14), can be carefully selected and adapted as needed without modifying the cryptographic algorithm ALp executed in the first device DV1 and the second device DV2 (S16, S22). In other words, as long as the first device DV1 also uses the same cryptographic algorithm ALp to generate the response data ANS1 (S16, S22), Figure 6The second device DV2 can use any cryptographic algorithm ALp. Specifically, the cryptographic algorithm ALp does not need to be protected by a white-box implementation in the first device DV1. Therefore, this invention enables configuration flexibility, particularly when an attack has compromised the security of the first device DV1 and it is necessary to modify the white-box implementation of the decryption algorithm pdec in the first device DV1.

[0160] As already mentioned, the number of possible white-box implementations is finite for a single, identical algorithm. Therefore, in the case of security concerns, the decryption algorithm pdec can be modified in this invention to ensure that the cryptographic key K is determined... EC Step S14 ( Figure 6 During this process, the first device DV1 implements the new pdec algorithm using a white-box implementation, which enhances the security of the authentication method without affecting the configuration of the second device DV2. In other words, this invention thus makes it easier to update the white-box implementation of the decryption algorithm pdec without affecting the second device DV2, which does not execute the decryption algorithm pdec.

[0161] However, attackers could attempt to analyze the white-box implementation of the pdec decryption algorithm to extract the cryptographic key K. EC However, the algorithm pdec can be proprietary (or, where applicable, all or part of the AES algorithm) and can be modified periodically, making all attacks difficult. Depending on the specific example, the decryption algorithm pdec is an algorithm distinct from AES.

[0162] Another advantage of this invention is that it requires the first device DV1 to interact with the second device DV2 to retrieve the demasking key K2, thereby allowing it to subsequently demask the encrypted key D. EC This allows attackers to discover the decryption key K within a limited time. EC And it uses it. This prior interaction between the first device DV1 and the second device DV2 complicates the attack because it forces the attacker to interact with the second device DV2 beforehand to determine the password key K. EC If a transaction does not occur correctly (e.g., it does not complete correctly or takes too long), the second device DV2 can specifically block the password key K. EC This renders it invalid, thus preventing any subsequent authentication based on that key.

[0163] The following will refer to Figure 7 and 8 describe Figure 6 Variations of the embodiments described above. Unless otherwise stated, the above description of different features and steps of the invention according to the above embodiments can be applied in the same manner to... Figure 7 and Figure 8 Equivalent features with the same reference numerals in the variants.

[0164] according to Figure 7 The embodiments shown herein again assume that the previously referenced Figures 2-5 The first device DV1 (hereinafter referred to as the "terminal") and the second device DV2 cooperate to specifically allow the first device DV1 to authenticate itself to the second device DV2. To this end, the terminal DV1 cooperates with the second device DV2 to implement a processing method (or authentication method) by executing a computer program PG1. Similarly, the second device DV2 executes a computer program PG2 to authenticate the terminal DV1.

[0165] In this example, during step S40 of receiving (or acquiring) multiple tokens TN, it is assumed that terminal DV1 receives (or acquires) each of the multiple tokens TN, wherein each of the multiple tokens TN includes key data C. EC The query data CH2, the first-time data EXP, and the key identifier ID are combined. For each token TN, the first-time data EXP indicates the valid time period of the associated cryptographic key. Furthermore, the identifier ID identifies the cryptographic key K associated with the token TN under consideration. EC The key K EC It is available during the validity period specified by the first-time data EXP.

[0166] The first-time data EXP can, for example, indicate an expiration time or the end of the validity period (e.g., expiration date and / or expiration clock time). After this expiration time or the end of the validity period, the associated password key K... EC No longer valid.

[0167] The identifier ID can be an index or take any other suitable form. This identifier ID makes it possible to distinguish several cryptographic keys K. EC (And more generally, several tokens TN) become possible, including when the same validity period (and therefore the same value of data EXP) is assigned to several cryptographic keys K. EC At that time, the values ​​of data EXP and ID can be selected such that each token TN (and therefore each cryptographic key K) is such that... EC It is associated with a single pair (EXP, ID).

[0168] As already noted, other implementations are possible without resorting to data EXP and ID. However, the use of data EXP and ID is advantageous because it restricts the cryptographic key K. EC The effective time limit, and thus the time when attackers can compromise the security of the system and use illegally obtained keys.

[0169] In the example considered here, terminal DV1 is in its memory 16 ( Figure 3 The tokens TN are labeled TN1 to TN20. However, it should be noted that the number of tokens obtained by terminal DV1 can vary depending on the circumstances. As mentioned above, terminal DV1 can obtain one or more tokens TN.

[0170] During receiving step S42, terminal DV1 receives first data DT1 from second device DV2, which includes first interrogation data CH1 (as described above) and second time data EXPmin. In other words, receiving step S42 is related to the previously described step S2 (… Figure 6 The difference is that, in addition to the first query data CH1, the received first data DT1 also includes second time data EXPmin. The second time data EXPmin allows terminal DV1 to select token TN, as described in step S44.

[0171] During the selection step S44, the terminal DV1 selects a token TN from one or more tokens TN accessible to the terminal DV1 based on the second time data EXPmin received in the first data DT1 in S42, that is, selects a token TN from the tokens TN1 to TN20 recorded in its memory 16 in the example considered herein.

[0172] The second time data EXPmin represents the cryptographic key K of the token TN selected in S44. EC A valid validity period is required. In other words, terminal DV1 selects token TN (and the corresponding cryptographic key K) from available tokens TN1 to TN20. EC The selected token TN includes key data C that satisfies the valid time condition imposed by EXPmin. EC Terminal DV1 is based on the key data C in the token TN under discussion. EC The associated first-time data EXP determines the key data C contained in the token TN. EC Is it related to the second time condition EXPmin?

[0173] As an example, the second time data EXPmin indicates the minimum remaining time (e.g., minimum expiration date) during which the selected key data C... EC (and the corresponding password key K) EC The key must be valid. Therefore, the second device DV2 can request the terminal DV1 to select its password key K in S44 via the second time data EXPmin. ECFor example, a token TN that expires within at least 2 hours. Based on the value of the time data EXPmin, terminal DV1 can select the appropriate token TN in S44.

[0174] According to a specific example, in S44, terminal DV1 selects a new token TN in each iteration of the authentication method, that is, each new reception of the first data DT1 (S42).

[0175] Once a selection is made (S44), terminal DV1 sends (S46) second data DT2 to the second device DV2. This second data DT2 includes second query data CH2, first time data EXP, and an identifier ID extracted from the token TN selected in S44. In other words, sending step S46 is related to the previously described step S6. Figure 6 The difference is that, in addition to the second query data CH2, the second data DT2 includes the data EXP and ID specified in the token TN selected in S44. In this case, the sent second query data CH2 is therefore separate from the data EXP and ID contained in the second data DT2.

[0176] In one example, terminal DV1 signs the second data DT2 with its private key SKm before sending it to second device DV2. In another example, the signing of the second data DT2 is performed by server SV1, then received and stored in first device DV1 along with the associated token. Second device DV2, possessing the public key PKm associated with the private key SKm, can then verify the signature. Only when the signature is successfully verified does second device DV2 accept the continued authentication method. This variant specifically makes it possible to avoid any DoS (Denial of Service) attacks aimed at preventing second device DV2 from authenticating itself to the legitimate user UR, thus depriving it of the services it is considering. Such an attack is possible if an attacker impersonates terminal DV1 and sends arbitrary or erroneous values ​​of the first time data EXP in the first time data DT1 to second device DV2. In this case, second device DV2 can then reject token TN that does not have a valid range, which is at least until the end of the validity period indicated by the last received EXP.

[0177] Furthermore, once the second data DT2 is received, the second device DV2 verifies (S48) the token TN (and therefore the password key K) selected by terminal DV1 in S44 based on this second data DT2. ECThe validity of the token TN selected by terminal DV1 is verified in S48 based on the first time data EXP and the identifier ID contained in the received second data DT2. For example, the second device DV2 verifies, in S44, that the token TN selected by terminal DV1 has not yet been used by terminal DV1 or another terminal based on the data EXP and ID. During this verification, the second device DV2 may specifically compare the first time data EXP received in S46 with the second time data EXPmin contained in the data DT1 sent to terminal DV1 in S42 to verify whether the first time data EXP satisfies the validity time condition imposed by EXPmin. As mentioned above, for the token TN to be valid, it is particularly necessary to compare the key data C of the token TN. EC The associated first-time data EXP satisfies the time validity condition imposed by EXPmin.

[0178] If the second device DV2 determines in S48 that the token TN selected by the terminal DV1 is valid, the method continues in calculation step S50. Conversely, if the authentication of the terminal DV1 fails, the authentication method ends (where applicable, the second device warns the terminal DV1 of the failure and requests it to select another token TN related to the second time data EXPmin).

[0179] During calculation step S50, the second device DV2 calculates (or determines) the demasking key K2 based on the second interrogation data CH2 received in the second data DT2 received in S46. This is done by executing the cryptographic algorithm AL1, in conjunction with the previously described step S8 (…). Figure 6 The same method can be used to complete the calculation step S50. As mentioned above, during the execution of the cryptographic algorithm AL1, the second device DV2 can also consider other inputs, such as the key TK.

[0180] During calculation step S50, in addition to the second query data CH2 (and the applicable key TK), the first time data EXP, and the identifier ID, the demasking key K2 can also be determined by performing an operation with the encryption algorithm AL1 as input. This allows for further enhancement of the security of the calculation of the demasking key K2. Specifically, it prevents attackers from reusing expired tokens by modifying the time data EXP (e.g., the date) or the identifier ID sent to the second device DV2. In this case, the demasking key K2 determined in S50 will differ from the demasking key K2 intended to work for the token TN in question.

[0181] Then, the second device DV2 sends (S10) to the terminal DV1 to demask the key K2.

[0182] Note that in the example considered here, the second data DT2 sent by terminal DV1 to second device DV2 in S46 includes a second query data CH2 in addition to the first time data EXP and identifier ID (in other words, it is not the data EXP and ID that serve as the second query data). The data EXP and ID allow second device DV2 to verify the validity of the selected token TN, while the second query data CH2 allows second device DV2 to calculate the demasking key K2. However, a variation is possible where terminal DV1 does not include the second query data CH2 in the second data DT2 sent (S46) to second device DV2, except for the data EXP and ID. In this case, it is precisely the data EXP and ID (or at least one of these two data) that serve as the second query data, and is therefore used by second device DV2 in S50 to determine the demasking key K2. However, including the second query data CH2 in the second data DT2 in addition to the first time data EXP and identifier ID is advantageous because it avoids any conflict issues caused by using different token TNs. Typically, this conflict issue can be avoided by installing a mechanism that guarantees that each pair (EXP, ID) is unique within the deployed token TN. Based on the pair (EXP, ID) received in the second data DT2, the second device DV2 can then determine whether the corresponding token TN is still valid.

[0183] In one variant, the second data DT2 sent to the second device DV2 in S46 may only include the identifier ID (the first time data EXP or data CH2 is not included in the second data DT2 sent in S46), and then be used as the second query data. In this particular case, the second device DV2 uses the identifier ID as the second query data to determine the demasking key K2 in S50. Regardless of the conceived implementation, the second device DV2 must preferably be able to verify in S48 that one and the same token TN has not been used twice.

[0184] According to a specific example, in S46, terminal DV1 sends a different second query data CH2 for each new iteration of the method. In other words, in S46, terminal DV1 sends a different second query data CH2 for each token TN used to authenticate terminal DV1 (to the second device DV2 or any other device).

[0185] Furthermore, once the demasking key K2 has been received in S10, terminal DV1 executes steps S12, S14, S16, and S18, as previously referenced. Figure 6 As described. Here, as an example, assume that the demasking function F2 used is the XOR function as described above.

[0186] Therefore, in S18, the second device DV2 receives the response data ANS1. In this example, during the determination step S60, the second device DV2 determines the cryptographic key K used by the terminal DV1. EC That is, the cryptographic key K corresponding to the token TN selected by terminal DV1 in S44. EC Therefore, the second device DV2 derives the password key K based on the master password key MK (stored in memory 26 in this example) (S60). EC And where applicable, it is also based on the data EXP, ID and / or CH2 previously received in S46 in the two data DT2 (i.e., at least one of them, such as EXP and ID, or EXP and CH2, or ID and CH2 or EXP, ID and CH2).

[0187] Then, the second device DV2 executes the previously referenced... Figure 6 The method continues with steps S20, S22, S24, and S26 as described. Specifically, the second device DV2 proceeds using the cryptographic key K calculated in S60. EC Furthermore, based on the query data CH1 previously sent in S42, a predetermined cryptographic algorithm ALp is executed to calculate (S22) the theoretical response data ANS1a through encryption (or more generally through cryptographic operations). Then, the second device DV2 compares the response data ANS1 received in S18 with the theoretical response data ANS1a (S24), and infers that if a match exists between ANS1 and ANS1a, authentication has been successful.

[0188] according to Figure 8 The embodiments shown herein again assume that the previously referenced Figures 2-5 The first device DV1 (hereinafter referred to as the "terminal") and the second device DV2 then cooperate, specifically to allow the first device DV1 to authenticate itself to the second device DV2. To this end, the terminal DV1 cooperates with the second device DV2 to implement a processing method (or authentication method) by executing a computer program PG1. In the same manner, the second device DV2 executes a computer program PG2 to authenticate the terminal DV1.

[0189] Figure 8 The variants shown are Figure 7 The difference in the implementation is that terminal DV1 also uses a key KRand encoded in a format suitable for white-box implementation as input to the decryption algorithm pdec implemented in a white-box manner to determine the cryptographic key K. EC(in its decrypted form). Therefore, the key KRand can only be used by the white-box implementation under consideration. To this end, the key KRand can undergo any suitable transformation (e.g., encryption or transformation in the form of a table that performs the operation of hiding the key) such that the key KRand can only be understood or used by the white-box implementation under discussion.

[0190] More precisely, such as Figure 8 As shown, during step S80 of receiving (or obtaining), terminal DV1 receives (or obtains) multiple tokens TN, each of which includes key data C. EC The query data CH2, the first-time data EXP, the key identifier ID, and the cryptographic key KRand (denoted as wb[KRand]) encoded in a format suitable for white-box implementation are combined. In other words, the token TN and the reference... Figure 7 The difference lies in the fact that they also include a key KRand encoded in a suitable format for white-box implementation, in conjunction with the other components already listed. Therefore, the key KRand itself is secure, protecting it from any attacks.

[0191] With each key data D EC The associated key KRand is, for example, a random key.

[0192] Then, assuming that terminal DV1 and second device DV2 execute together as described above... Figure 7 The steps S42 to S50, as well as steps S10 and S12, are described.

[0193] During step S86, terminal DV1 then determines the cryptographic key K in its decrypted form (in plaintext). EC To this end, terminal DV1 uses a cryptographic algorithm based on encryption, D... EC (Obtained in S12) and based on the white-box implemented key KRand extracted from the token TN selected in S44, the white-box implemented cryptographic decryption algorithm pdec is executed to perform decryption. In other words, terminal DV1 executes the encryption using the cryptographic key D. EC The white-box implementation of the key KRand, wb[KRand], is used as input to the white-box implementation of the decryption algorithm pdec, wb[pdec], thereby generating the cipher key K in the plaintext. EC As output.

[0194] Once the password key K is determined EC (in its decrypted form), terminal DV1 and second device DV2 execute as already referenced. Figure 7 The described steps S16, S18, S60, and S20 to S26 continue the processing method.

[0195] Therefore, this variant provides multiple keys KRand with white-box implementation in the token TN, which makes it possible to further secure the processing method of the present invention.

[0196] In addition, it should be noted that, as previously referenced Figures 6 to 8 The order in which the steps of the described processing method follow each other constitutes only one exemplary implementation; variations are possible.

[0197] Those skilled in the art will understand that the above embodiments and variations constitute only non-limiting examples of implementations of the present invention. In particular, those skilled in the art can contemplate any modifications or combinations of the above embodiments and variations according to the appended claims.

Claims

1. A processing method implemented by a first device (DV1) and a second device (DV2) in cooperation, the method comprising: a) Receive (S2) first data (DT1) including first query data (CH1) from the second device; b) Obtain (S4) key data (C EC The key data (C) EC This includes the encrypted cryptographic key (D) obtained by encrypting with the first encryption algorithm (PENC). EC The key data is masked by executing a cryptographic masking function (F1) based on the encrypted cryptographic key and the masking key (K1); c) Receive (S10) the demasking key (K2) from the second device; d) determining (S12) the encrypted password key (D by performing a cryptographic unmasking function (F2) based on the key data obtained in b) and the unmasked key (K2) received in c) EC ); e) via the cryptographic key (D) based on the encryption. EC )Execute the first decryption algorithm (pdec) with white-box implementation, and determine the decryption key (K) by decryption (S14). EC The first encryption algorithm (penc) and the first decryption algorithm (pdec) are associated cryptographic algorithms configured to perform an inverse cryptographic function; f) determining (S16) a response data (ANS1) by a cryptographic operation by performing a predetermined cryptographic algorithm (ALp) based on said decrypted cryptographic key (K EC ) and said received first challenge data (CH1); and g) In response to the first data (DT1) received in a), send (S18) the response data (ANS1) to the second device to authenticate the first device to the second device.

2. The method of claim 1, wherein, The first encryption algorithm (penc) and the first decryption algorithm (pdec) are different from the predetermined cryptographic algorithm (ALp).

3. The method according to claim 1 or 2, further comprising, before receiving the demasking key (K2) in step c),: h) Send second data (DT2) including second query data (CH2, EXP, ID) to the second device; Specifically, the demasking key (K2) received from the second device in c) is calculated based on the second query data.

4. The method according to claim 3, wherein before h), the method comprises: i) Obtain a token (TN), the token (TN) comprising: - said key data (C EC ) ; - a first time data (EXP) indicating a validity period during which the cryptographic key (K EC ) is valid; and - An identifier (ID) that the password key can use during the validity period; The second data (DT2) sent in h) includes the first time data (EXP) extracted from the token and the identifier (ID).

5. The method according to claim 4, further comprising: j) Based on the second time data (EXPmin) contained in the first data (DT1) received in a), select the token obtained in i) from one or more tokens accessible to the first device. The second time data indicates the validity period of the cryptographic key for the selected token.

6. The method of claim 4, wherein, The token obtained in i) also includes the second query data (CH2), which is separate from the first time data (EXP) and the identifier (ID); The second data (DT2) sent in h) includes the second query data (CH2) extracted from the token.

7. The method of claim 4, wherein, The first time data (EXP) and the identifier (ID) contained in the second data (DT2) sent in h) constitute the second query data.

8. The method of claim 4, wherein, The token (TN) also includes a key encoded in a format suitable for white-box implementation (wb[KRand]). wherein in e) the decrypted cryptographic key (K EC ) is determined by performing the first decryption algorithm with white-box implementation (pdec) by decryption based on the encrypted cryptographic key (D EC ) and the key encoded in a format suitable for a white-box implementation (wb[KRand]) extracted from the token.

9. The method of any one of claims 1 to 2, wherein, The cryptographic masking function (F1) and the cryptographic demasking function (F2) are respectively associated encryption and decryption functions.

10. The method according to claim 9, wherein, The cryptographic masking function (F1) and the cryptographic demasking function (F2) are symmetric encryption functions, and the masking key (K1) and the demasking key (K2) are the same.

11. The method according to claim 9, wherein, The cipher masking function (F1) and the cipher demasking function (F2) are XOR functions.

12. The method according to any one of claims 1 to 2, wherein, Following g), the method includes: k) In response to detecting that the first device has successfully authenticated with the second device, a predetermined function for cooperating with the second device is triggered.

13. A computer program (PG1) product comprising computer instructions that, when executed by a computer, perform the steps of the method as described in any one of claims 1 to 12.

14. A first device (DV1) capable of cooperating with a second device (DV2), comprising: - First receiving module (MD2) is configured to receive first data (DT1) including first interrogation data (CH1) from the second device; - Get module (MD4), configured to retrieve key data (C EC The key data (C) EC This includes the encrypted cryptographic key (D) obtained by encrypting with the first encryption algorithm (PENC). EC The key data is masked by executing a cryptographic masking function (F1) based on the encrypted cryptographic key and the masking key (K1); - The second receiving module (MD6) is configured to receive the demasking key (K2) from the second device; - The first determining module (MD8) is configured to determine the key data (C) based on the obtained key data. EC The received demasking key (K2) and the cryptographic demasking function (F2) are executed to determine the encrypted cryptographic key (D). EC ); - a second determining module (MD10) configured to determine a decrypted cryptographic key (K EC ) by decryption by executing a first decryption algorithm (pdec) with a white-box implementation based on said encrypted cryptographic key (D EC ), said first encryption algorithm (penc) and said first decryption algorithm (pdec) being associated cryptographic algorithms configured to execute an inverse cryptographic function; - a third determining module (MD12) configured to determine, by a cryptographic operation, a response data (ANS1) by executing a predetermined cryptographic algorithm (ALp) based on said decrypted cryptographic key (K EC ) and said first challenge data (CH1) received; as well as - The sending module is configured to send the response data (ANS1) to the second device in response to the received first data (DT1) to authenticate the first device to the second device.