Symmetric encryption method and device for vehicle computer

By generating the same internal counter final value between different information systems and independently determining the key, the problem of key leakage and low data exchange efficiency is solved, and efficient and secure data exchange is achieved.

CN113491084BActive Publication Date: 2024-12-20PEUGEOT CITROEN AUTOMOBILES SA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080017209.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-02-28
Filing Date
2020-01-31
Publication Date
2024-12-20
Estimated Expiration
2040-01-31

AI Technical Summary

Technical Problem

The existing encryption technology requires resetting a new key in all computers after the key is leaked, and the asymmetric encryption computing power is strong and complex, resulting in low data exchange efficiency.

Method used

By generating the same internal counter final value between the two devices, the key is determined independently, key exchange is avoided, and new keys are initialized only during data exchange, ensuring that new keys are used for each exchange.

Benefits of technology

Effectively prevent key leakage, improve the security and efficiency of data exchange, and avoid the complexity of key reset and computing power requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113491084B_ABST
    Figure CN113491084B_ABST
Patent Text Reader

Abstract

The invention relates to a method and a device for decrypting encrypted data based on a key. To this end, a random duration is generated. A first final value of a first internal counter of a first device is determined based on the random duration. One or more requests are transmitted to a second device. These requests enable the second device to determine a second final value of a second internal counter of the second device. The one or more requests are transmitted so that the second final value is the same as the first final value. The key is generated by the first device by using the first final value, and the same key is also generated by the second device by using the second final value. Data to be transmitted by the second device to the first device is encrypted by the key generated by the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the exchange of data between different information systems, such as the electronic box or computers and off-board systems of a vehicle, in particular of the motor vehicle type, and to a method and a device for encrypting and / or decrypting such data. Background Art

[0002] Modern vehicles are equipped with several computers, each ensuring one or more functions, such as driving assistance management, anti-skid management, electronic brake distribution management or actuator control to ensure optimal operation of the internal combustion engine.

[0003] These computers are also called UCE (“Unité de Commande Electronique”, ECU in English “Electronic Control Unit”). These computers are loaded with software that is executed to ensure the functions for which they are responsible. These software or updates to these software are downloaded from an off-board system (also called the “Cloud” in English) via a wired or wireless connection, for example a connection of the OTA (“over-the-air” in English or “par voie aérienne” in French) type.

[0004] In order to avoid any misappropriation of the data exchanged between the off-board system and the computer, it is known to encrypt these data, for example by using symmetric encryption with fixed keys, asymmetric encryption or hybrid solutions.

[0005] For symmetric encryption with a fixed key, the same key is shared and used by the off-board system and by the computer to encrypt and decrypt the exchanged data, respectively, which is stored in the secure area of ​​the off-board system and the secure area of ​​the computer. The main disadvantage of this technology is that if the key is intercepted by a third party, a new key that has not been leaked must be re-set in all computers that use the key.

[0006] Asymmetric encryption itself uses a combination of a public key and a private key (a basic system with a public key) to encrypt and decrypt data. However, this technology requires strong computing power and slows down the data exchange process.

[0007] The hybrid solution enables the transmission of a computer key encrypted with the public key of the off-board system. Thus, the off-board system can encrypt data to be transmitted to the computer using the computer's key. However, this solution is complex to implement and requires resetting a new public key in all computers in the event that the off-board system's public key is leaked. Summary of the invention

[0008] An object of the present invention is to provide a symmetric encryption mechanism with enhanced security to prevent the disclosure of keys used in data encryption.

[0009] According to a first aspect, the present invention relates to a method for decrypting encrypted data based on a key, the method being implemented in a first device, the method comprising the following steps:

[0010] - generating information representing a random duration;

[0011] - determining a first final value of a first internal counter within said first device based on said information representative of the random duration;

[0012] - transmitting at least one request to a second device in order for the second device to determine a second final value of a second internal counter within the second device, the second final value being identical to the first final value;

[0013] - generating said key based on said first final value of said first internal counter;

[0014] - receiving data encrypted by said second device based on said key generated by said second device based on said second final value of said second internal counter;

[0015] - decrypting the received encrypted data by using the key generated by the first device;

[0016] - initializing said information representing a random duration, said first final value and said key; and

[0017] - transmitting to said second device an initialization request for initializing said second final value and said key.

[0018] According to one variant, the decryption is carried out only if the duration between the transmission of the at least one request and the start of the reception of the encrypted data is less than a determined duration.

[0019] According to another variant, the method further comprises a verification step of verifying that the received encrypted data has been encrypted by means of the key.

[0020] According to a supplementary variant, the time increment step of the first internal counter is the same as the time increment step of the second internal counter, and the time increment step is greater than the maximum propagation time of a signal between the first device and the second device.

[0021] According to a second aspect, the invention relates to a device for decrypting encrypted data based on a key, the device being referred to as a first device and comprising:

[0022] - means for generating information representing a random duration;

[0023] - means for determining a first final value of a first internal counter within said first device as a function of said information representative of a random duration;

[0024] - means for transmitting at least one request to a second device to determine, by said second device, a second final value of a second internal counter within said second device, said second final value being identical to said first final value;

[0025] - means for generating said secret key based on said first final value of said first internal counter;

[0026] - means for receiving data encrypted by said second device based on said key generated by said second device based on said second final value of said second internal counter;

[0027] - means for decrypting said received encrypted data by using said key generated by said first device;

[0028] - means for initializing said information representative of a random duration, said first final value and said key; and

[0029] - means for transmitting to said second device an initialisation request for initialising said second final value and said key.

[0030] According to one variant, the decryption is carried out only if the duration between the transmission of the at least one request and the start of the reception of the encrypted data is less than a determined duration.

[0031] According to another variant, the device also comprises means for verifying that the received encrypted data has been encrypted by means of the key.

[0032] According to a supplementary variant, the time increment step of the first internal counter is the same as the time increment step of the second internal counter, and the time increment step is greater than the maximum propagation time of a signal between the first device and the second device.

[0033] According to a third aspect, the invention relates to a system installed in a vehicle, said system comprising one or more devices according to the second aspect of the invention as described above.

[0034] According to a fourth aspect, the invention relates to a vehicle, for example of the motor vehicle type, comprising one or more devices according to the second aspect of the invention as described above.

[0035] According to a fifth aspect, the invention relates to a computer program comprising instructions adapted to perform the steps of the method according to the first aspect of the invention when the computer program is executed by at least one processor.

[0036] Such a computer program may use any programming language, and be in the form of source code, object code, or an intermediate code between source code and object code, such as in a partially compiled form, or in any other desired form.

[0037] According to a sixth aspect, the present invention relates to a computer-readable storage medium having stored thereon a computer program comprising instructions to execute the steps of the method according to the first aspect of the present invention.

[0038] On the one hand, the storage medium can be any entity or device that can store a program. For example, the medium can include a storage component, such as a memory ROM, a CD-ROM or a memory ROM of a microelectronic circuit type, or a magnetic storage component or a hard disk.

[0039] On the other hand, the storage medium can also be a transmissible medium such as an electrical or optical signal, which can be transmitted via an electrical or optical cable by conventional radio or electromagnetic waves or by a self-guided laser beam or by other means. In particular, the computer program according to the invention can be downloaded on an Internet type network.

[0040] Alternatively, the storage medium can be an integrated circuit in which the computer program is incorporated, the integrated circuit being adapted to be executed or to be used in the performance of the method in question. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] By reading the following detailed description of non-limiting embodiments of the present invention and referring to Figures 1 to 7 , other features and advantages of the present invention will become more apparent in the accompanying drawings:

[0042] - Figure 1 An environment for encrypted data exchange between one or more first devices and a second device is schematically shown according to a specific embodiment of the present invention;

[0043] - Figure 2 According to a specific embodiment of the present invention, Figure 1 The first device;

[0044] - Figure 3 According to a specific embodiment of the present invention, Figure 1 a second device;

[0045] - Figure 4 According to a specific embodiment of the present invention, Figure 1A flowchart of different steps of a data exchange process between a first device and a second device;

[0046] - Figure 5 According to a specific embodiment of the present invention, Figure 4 A timing diagram associated with an operation that is part of a process;

[0047] - Figure 6 According to a specific embodiment of the present invention, Figure 1 A flowchart of different steps of a method for decrypting encrypted data implemented in one of the first devices;

[0048] - Figure 7 According to a specific embodiment of the present invention, Figure 1 Flow chart of different steps of a data encryption method implemented in a second device. DETAILED DESCRIPTION

[0049] Now we will combine the following Figures 1 to 7 A method for decrypting encrypted data, a data encryption method, and associated devices and systems are described. Throughout the following description, the same elements are identified using the same reference numerals.

[0050] According to a specific and non-limiting embodiment of the present invention, a method for decrypting encrypted data using a key is implemented in a first device, for example, in a computer of a system loaded in a vehicle. The data decryption is also called data decryption. To this end, the method includes generating a random duration, for example, expressed in seconds or milliseconds. A first final value of a first internal counter of the first device is determined according to the random duration. One or more requests are transmitted to a second device, the second device corresponding to an off-board system, which is responsible for transmitting data toward the first device, for example, update data for updating software installed on the first device. These requests enable the second device to determine a second final value of a second internal counter of the second device. The one or more requests are transmitted so that the second final value is the same as the first final value. The key is generated by the first device using the first final value, and the same key is also generated by the second device using the second final value. The data to be transmitted by the second device to the first device is encrypted by the second device using the key generated by the second device. These encrypted data are therefore received by the first device and then decrypted by the first device using the key generated by the first device. Once the received encrypted data is decrypted, the first device initializes the value of the random duration, the first final value and the key. The first device also transmits a request to the second device to cause the second device to initialize the second final value and the key.

[0051] This method avoids the exchange of keys between the first device and the second device, which limits the risk of interception and disclosure of the keys by unauthorized third parties, since the first device and the second device generate the same key based on the same final value of an internal counter that is determined independently at the first device and the second device.

[0052] Furthermore, initialization of parameters (e.g., keys) within the first device and within the second device can generate new keys for each data exchange between the first device and the second device. Thus, if a key used for a given exchange is stolen, the key can no longer be used for subsequent data exchanges.

[0053] Figure 1 An environment 1 of encrypted data exchange between one or more first devices 102, 103, 104 and a second device 101 is schematically shown according to a specific and non-limiting embodiment of the present invention.

[0054] Each first device 102, 103, 104 corresponds, for example, to a computer, for example of the UCE type. The UCE consists of an electronic computer and one or more loaded software implementing one or more servo controls. The first devices 102, 103, 104 belong, for example, to a system 10, which is advantageously loaded in a vehicle, for example of the motor type. The computers 102, 103, 104, for example, form a multiplexing architecture to implement different useful services for the good functioning of the vehicle and to assist the driver and / or passengers of the vehicle in controlling the vehicle.

[0055] The first devices 102, 103 and 104 communicate and exchange data with each other by means of one or more information buses, such as CAN ("Controller Area Network" in English and "Reseau de ”) data bus type communication bus 11.

[0056] Each first device 102, 103, 104 is, for example, connected to communicate with a second device 101. The second device 101 corresponds, for example, to an external device of a non-onboard system. Each first device 102, 103, 104 is connected to a second device via a wired or wireless connection. The second device 101 is, for example, a cloud ("nuage" in French) remote server. For example, via the Internet through an OTA ("over-the-air" in English, "par voie aérienne" in French) type of connection, one or more first devices, for example, load an update of the software stored in the second device 101 to be downloaded. The downloaded data representing the update is advantageously implemented by reference to Figure 4 , Figure 6 and / or Figure 7The method described is encrypted.

[0057] Of course, the number of the first devices 102, 103, 104 of the system 10 is not limited to 3, and can be extended to any number, such as 10, 20, 50, 100 or even more first devices. Figure 2 The hardware embodiment of the second device 101 is described in detail. Figure 3 to describe.

[0058] Figure 2 A first device 2 is schematically shown according to a specific and non-limiting embodiment of the invention. The first device 2 advantageously corresponds to Figure 1 The first devices 102, 103 and 104. The first device 2 advantageously corresponds to a computer of a system loaded on a vehicle, but is not limited thereto.

[0059] The first device 2 is configured, for example, to implement a reference Figure 4 At least a part of the steps of the method described. Examples of such a first device 2 include, but are not limited to, an onboard electronic device such as a vehicle computer, an electronic computer such as a UCE. The elements of the first device 2 may be integrated individually or in combination in a single integrated circuit, in multiple integrated circuits, and / or in discrete components. The first device 2 may be implemented in the form of a circuit or a software (or information) module or a combination of a circuit and a software module. According to different specific embodiments, the first device 2 is connected to communicate with other similar devices or systems, such as by means of a communication bus or through a dedicated input / output port.

[0060] The first device 2 comprises one (or more) processors 20, which are configured to execute instructions to implement the steps of the method and / or to execute instructions of one or more software loaded in the first device 2. The processor 20 may include integrated memory, input / output interfaces, and different circuits known to those skilled in the art. The first device 2 also comprises at least one memory 21, for example corresponding to a volatile and / or non-volatile memory.

[0061] The processor corresponds to, for example, a hardware security module HSM (“Hardware Security Module” in English) to protect access to variables and functions for data encryption / decryption.

[0062] Information codes of one or more on-board software including instructions to be loaded and executed by the processor are stored on the memory 21 , for example.

[0063] According to a specific and non-limiting embodiment, the first device 2 comprises an interface element block 22 to communicate with an external device, such as Figure 1The second device 101, remote server or cloud, ranging sensor, GPS sensor. The interface elements of block 22 include one or more of the following interfaces:

[0064] -RF radio frequency interface, such as or LTE (English: "Long-Term Evolution", French: "Evolution à long terme"), LTE-Advanced (French: "LTE-avancé (Advanced Long-Term Evolution)") types;

[0065] -USB interface (English: "Universal Serial Bus" and French: "BusUniversel en Série");

[0066] -HDMI interface (English: “High Definition Multimedia Interface”, French: “Interface Multimedia Haute Definition”).

[0067] By using a network compliant with IEEE802.11, for example Or a mobile network, such as a 4G (or Long Term Evolution Advanced compliant with 3GPP Release 10-Release 10) or 5G network, for example, loading the data to the first device 2 via an interface of the block 22.

[0068] According to another particular embodiment, the first device 2 comprises a communication interface 23 capable of establishing communication with other devices, such as a secondary computer of an onboard system, via a communication channel 230. The communication interface 23 corresponds, for example, to a transmitter configured to transmit and receive information and / or data via the communication channel 230. The communication channel 230 corresponds, for example, to a wired network of the CAN type.

[0069] Figure 3 The second device 3 is schematically shown according to a particular and non-limiting embodiment of the invention. The second device 2 advantageously corresponds to Figure 1 The second device 101.

[0070] Examples of such second device 3 include, but are not limited to, various electronic devices, such as portable computers, computer update tools. The components of the second device 3 may be integrated into a single integrated circuit, multiple integrated circuits, and / or discrete components, either individually or in combination. The second device 3 may be implemented in the form of a circuit or a software (or information) module or a combination of a circuit and a software module.

[0071] The second device 3 comprises one (or more) processors 30, which are configured to execute instructions to implement the steps of the method. The processor 30 may include integrated memory, input / output interfaces, and different circuits known to those skilled in the art. The second device 3 also includes at least one memory 31, such as volatile and / or non-volatile memory, or a storage device that may include volatile and / or non-volatile memory, such as EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash memory, magnetic disk or optical disk.

[0072] The processor corresponds to, for example, a hardware security module HSM (“Hardware Security Module” in English) to protect access to variables and functions used for data encryption / decryption.

[0073] Information codes including instructions to be loaded and executed by the processor are stored, for example, in a memory or storage device 31 .

[0074] According to a specific and non-limiting embodiment, the device 3 includes an interface element block 32 to communicate with an external device (e.g., the first device 2). The interface element of the block 32 includes one or more of the following interfaces:

[0075] -RF radio frequency interface, such as or type;

[0076] -USB interface (English: "Universal Serial Bus" and French: "BusUniversel en Série");

[0077] -HDMI interface (English: “High Definition Multimedia Interface”, French: “Interface Multimedia Haute Definition”).

[0078] According to another specific embodiment, the device 3 comprises a communication interface 33 capable of establishing communication with other devices via a communication channel 330. The communication interface 33 corresponds, for example, to a transmitter configured to transmit and receive information and / or data via the communication channel 330. The communication interface 33 comprises, for example, a modem and / or a network card, and the communication channel may be implemented, for example, in a wired and / or wireless medium.

[0079] By using a network compliant with IEEE802.11, for example Or a mobile network such as a 4G (or Long Term Evolution Advanced compliant with 3GPP Release 10 - Release 10) or 5G network, for example loading data to the second device 3.

[0080] According to a supplementary particular embodiment, the device 3 can provide output signals to one or more external devices, such as a display screen 340, one or more loudspeakers 350 and / or other peripherals 360 (DVD player, projection system), respectively, via output interfaces 34, 35 and 36. According to a variant, one or another of the external devices is integrated with the second device 3.

[0081] Figure 4 A flowchart showing different steps or operations in a data exchange process between a first device (eg, the first device 102 ) and a second device 101 according to a specific and non-limiting embodiment of the present invention is shown.

[0082] In a first operation 400, the second device 101 transmits a request to the first device 102 to initiate a data download procedure.

[0083] In a second operation 401, the first device 102 generates a random duration named D_alea using the value of its internal clock at the moment of receiving the request received in operation 400. The random duration is bounded by a minimum time limit (e.g., equal to 0) and by a maximum time limit, which is, for example, adjustable or parameterizable to limit the value of D_alea.

[0084] In a third operation 402, the first device 102 transmits a request to the second device 101 so that the second device starts an internal counter, referred to as a second internal counter count_Ks2.

[0085] In a fourth operation 403a, the first device 102 starts its internal counter, called the first internal counter count_Ks1. The first internal counter starts after a delay calibrated to be equal to the maximum propagation time of the request transmitted in operation 402, which depends on the communication channel used. The second internal counter will stop at the end of a random duration D_alea, which is equal to the time elapsed between the start of the first internal counter and the stop of the first internal counter. This operation makes it possible to determine the first final value adopted by the first internal counter when the random duration D_alea expires. The first final value corresponds to the number of steps of the time increment step counted between the start and stop of the first internal counter. The increment step Tcoum is, for example, adjustable in duration and needs to be greater than the maximum propagation time of the request transmitted in operation 402. It is considered that the time deviation of the internal clock of the first device 102 is negligible.

[0086] According to a variant, a plurality of internal counters are used, these internal counters having different time increment steps. The first final value is determined by juxtaposition of the final values ​​of each of these internal counters.

[0087] According to another variant, the duration of the time increment step is randomly generated each time the second device 102 transmits data to the first device 101. The random duration of the increment step is generated as in operation 401. In order for the first device and the second device to use the same time increment step, the first device transmits a synchronization request to the second device at the beginning and end of the generated time increment step, as described in operation 404.

[0088] In a fifth operation 403b, the second device 101 starts its internal counter, referred to as a second internal counter count_Ks2, after receiving the request transmitted in operation 402.

[0089] In a sixth operation 404, the first device 102 transmits a request to the second device 101 so that the second device stops its internal counter, called the second internal counter count_Ks2. The transmission of the request implemented by the first device 102 corresponds to the end of operation 403a, in which the first device 102 has stopped its internal counter, called the first internal counter count_Ks1, at the end of the random duration. Upon receiving the request, the second device 101 stops its internal counter, which has assumed a second final value. The second final value corresponds to the number of steps of the time increment counted between the start and the stop of the second internal counter. The increment step Tcount of the second internal counter is also adjustable in duration. The duration of the increment step of the second internal counter is selected to be equal to the duration of the increment step of the first internal counter. It is considered that the time deviation of the internal clock of the second device 101 is negligible.

[0090] Therefore, the second final value assumed by the second internal counter count_Ks2 is equal to the first final value assumed by the first internal counter count_Ks1 .

[0091] In a seventh operation 405a, the hash function of the first device 102 uses the first final value to generate a key K_sec.

[0092] In an eighth operation 405b, the hash function of the second device 101 that is the same as the hash function of the first device 102 uses the second final value (the second final value is the same as the first final value) to generate the same key K_sec.

[0093] The key K_sec is thus generated simultaneously by the first device 102 and by the second device 101 , which avoids having to transmit the key K_sec from one device to the other.

[0094] In a ninth operation 406, the second device 101 encrypts the data to be transmitted to the first device 102 using the key K_sec generated by the second device 101 during operation 405b. The encryption is performed by implementing a block or stream encryption algorithm, such as an algorithm of the AES (English for "Advanced Encryption Standard" and French for "normede chiffrement avancé"), Blowfish, Serpent or Twofish type.

[0095] In a tenth operation 407, the second device 101 transmits to the first device 102 the data encrypted in the ninth operation 406. According to an optional embodiment variant, the first device 102 verifies that the start of the download of the encrypted data starts before a determined delay, which starts at the end of the sixth operation 404. According to this variant, the maximum time between the end of the sixth operation 404 and the start of the tenth operation 407 must be less than this determined delay, named Cste_Dmax_start, which is selected by the user or set in the system, for example. According to this variant, if the transmission of the encrypted data (and therefore the reception of these data by the first device 102) starts when this variable Cste_Dmax_start is exceeded, the first device 102 refuses to receive the encrypted data.

[0096] In an eleventh operation 408, the first device 102 decrypts the encrypted data received in the previous operation by using the key K_sec generated by the first device 102 in operation 405a.

[0097] In a twelfth operation 409, the first device 102 verifies that the first decrypted data is equal to the determined data, named Cste_verif. A verification operation to verify that the start of the encrypted data download starts before the determined delay Cste_Dmax_start is implemented, for example, in this twelfth operation, which is therefore implemented in parallel to the eleventh operation 408. If one and / or the other of the conditions associated with Cste_verif and Cste_Dmax_start is not verified, the first device 102 interrupts the reception of the encrypted data and the process switches directly to operation 412a. If both conditions associated with Cste_verif and Cste_Dmax_start are verified, the reception and decryption of the encrypted data are continued and the process therefore continues to the next operation 410.

[0098] In a thirteenth operation 410 , the decrypted data is downloaded to the memory of the first device 102 .

[0099] In a fourteenth operation 411, the first device 102 transmits an initialization request to the second device 101, the initialization request being used to initialize variables associated with the encryption data exchange process, namely, the second final value Cpt_alea of ​​the second internal counter count_Ks2 and the key K_sec.

[0100] In a fifteenth operation 412a, the first device 102 initializes variables associated with the encrypted data exchange process, namely the random duration D_alea, the first final value Cpt_alea of ​​the first internal counter count_Ks1, and the key K_sec.

[0101] In a sixteenth operation 412b, the second device 101, upon receiving the request transmitted in operation 411, initializes variables associated with the encrypted data exchange process, namely the second final value Cpt_alea of ​​the second internal counter count_Ks2 and the key K_sec.

[0102] Advantageously, when a new encrypted data transmission is to be performed from the second device 101 to the first device 102 , operations 400 to 412 b are repeated, the encryption / decryption process being based on a new key generated simultaneously by the first device 102 and the second device 101 .

[0103] Figure 5 According to a specific and non-limiting embodiment of the present invention, Figure 4 A timing diagram associated with a portion of operations (particularly operations 402 to 404) of the process.

[0104] Figure 5 Two timing diagrams 52 and 54 associated with operations 402 to 404 for the first device 102 and two timing diagrams 51 and 53 associated with operations 402 to 404 for the second device 101 are shown.

[0105] A first request 541 is transmitted by the first device 102 to the second device 101 at a time t. The request is received by the second device at a time t+δt in a time interval corresponding to the maximum propagation time of the signal transmitting the request Tpropag_max531. The second device 101 starts counting 512 using its internal counter count_Ks2. The first device 102 itself starts counting 522 at a delayed time relative to this time t, the delay corresponding to the maximum propagation time of the signal transmitting the request Tpropag_max531. The start of the counter 522 also corresponds to the beginning of a random duration D_alea521. At the end 523 of the random duration D_alea521, the first device 102 determines the number of steps of the time increment step Tcount counted by the first counter count_Ks1, which number of steps corresponds to the first final value of the first internal counter count_Ks1.

[0106] Thus, when the first internal counter coun_Ks1 stops counting the number of time increment steps that have passed during the random duration D_alea, a second request 542est is transmitted by the first device 102 to the second device 101. After receiving the second request 542, the second device stops its internal counter count_Ks2 and determines the number of time increment steps 513 that have passed until the second request is received. The number of time increment steps 513 that have passed corresponds to the second final value of the second internal counter count_Ks2.

[0107] As in Figure 5 As shown in FIG. 5 , the duration of the time increment step of the first internal counter count_Ks1 is equal to the duration of the time increment step of the second internal counter count_Ks2 , which is greater than the maximum propagation time of the signal Tpropag_max531 .

[0108] The time increment step of the first internal counter, which is identical to the time increment step of the second internal counter, corresponds, for example, to a preprogrammed constant. According to a variant, the time increment step of the first internal counter, which is identical to the time increment step of the second internal counter, is a randomly generated constant. To this end, the first device generates supplementary information representing a random duration, which can obtain a random time step for the first internal counter of the first device. The first device then transmits at least one request to the second device to determine a duration, which can obtain a time step for the second internal counter inside the second device, which time step is identical to the time step of the first internal counter inside the first device.

[0109] Figure 6A flowchart showing the different steps of a method for decrypting encrypted data according to a specific and non-limiting embodiment of the invention is shown. The method is advantageously implemented by a first device, for example by Figure 1 Computer implementation of on-board systems.

[0110] In a first step 61, such as described in operation 401, information representing a random duration is generated.

[0111] In a second step 62, a first final value of a first internal counter within the first device is determined based on said information representative of the random duration.

[0112] In a third step 63, at least one request is transmitted to the second device to enable the second device to determine a second final value of a second internal counter of the second device. The second final value is identical to the first final value.

[0113] In a fourth step 64 , a key is generated based on the first final value of the internal counter, for example by implementing a hash function.

[0114] In a fifth step 65, data encrypted by the second device based on a key generated by the second device based on the second final value of the internal counter are received by the first device.

[0115] In a sixth step 66, the encrypted data received in the previous step is decrypted by the first device by using the key generated by the first device.

[0116] In a seventh step 67, information representing the random duration, a first final value generated or determined by the first device, and a key are initialized by the first device.

[0117] In an eighth step 68, an initialization request is transmitted by the first device to the second device to initialize the second final value and the key.

[0118] Figure 7 According to a particular and non-limiting embodiment of the invention, different steps of a method for encrypting data transmitted to a first device are shown. The method is advantageously implemented by a second device, for example by Figure 1 The device is implemented by a non-vehicle system.

[0119] In a first step 71 , at least one request transmitted by a first device is received by a second device.

[0120] In a second step 72 , a second final value of a second internal counter of the second device is determined based on the one or more requests received in step 71 .

[0121] In a third step 73 , a key is generated based on the second final value of the second internal counter, for example by implementing a hash function.

[0122] In a fourth step 74, the data transmitted to the first device is encrypted by using the key generated by the second device in the previous step.

[0123] In a fifth step 75, the data encrypted in the previous step is transmitted to the first device.

[0124] In a sixth step 76, an initialization request causing the second final value and said key to be initialized is transmitted by the first device and received by the second device.

[0125] Of course, the present invention is not limited to the above-mentioned embodiments, but extends to a data encryption method and a device configured to implement the method. The present invention also relates to a communication method between a first device and a second device, which implements data encryption and decryption.

[0126] The invention also relates to a vehicle, such as a motor vehicle or more generally a land motor vehicle, comprising Figure 2 Device 2 or Figure 1 The vehicle system 10.

Claims

1. A method for decrypting encrypted data based on a key, the method being implemented in a first device (102), the method comprising the following steps: - generating (61) information representing a random duration; - determining (62) a first final value of a first internal counter within said first device (102) based on said information representative of the random duration; - transmitting (63) at least one request (541, 542) to a second device (101) to determine, by said second device (101), a second final value of a second internal counter inside said second device (101), said second final value being identical to said first final value; - generating (64) said key based on said first final value of said first internal counter; - receiving (65) data encrypted by said second device (101) based on said key generated by said second device (101) based on said second final value of said second internal counter; - decrypting (66) the received encrypted data by using the key generated by the first device (102); - initializing (67) said information representative of a random duration, said first final value and said key; and - transmitting (68) to said second device (101) an initialization request for initializing said second final value and said key, wherein the decryption is performed only if the duration between the transmission of the at least one request and the start of the reception of the encrypted data is less than a determined duration, The time increment step of the first internal counter is the same as the time increment step of the second internal counter, and the time increment step is greater than the maximum propagation time of the signal between the first device and the second device.

2. The method according to claim 1, further comprising a verification step of verifying that the received encrypted data has been encrypted by the key.

3. A device for decrypting encrypted data based on a key, the device being referred to as a first device and comprising: - means (20) for generating information representing a random duration; - means (20) for determining a first final value of a first internal counter within said first device as a function of said information representative of the random duration; - means (22) for transmitting at least one request to a second device for determining, by said second device, a second final value of a second internal counter within said second device, said second final value being identical to said first final value; - means (20) for generating said key based on said first final value of said first internal counter; - means (22) for receiving data encrypted by said second device based on said key generated by said second device based on said second final value of said second internal counter; - means (20) for decrypting said received encrypted data by using said key generated by said first device; - means (20) for initializing said information representative of a random duration, said first final value and said key; as well as - means (22) for transmitting to said second device an initialization request for initializing said second final value and said key, The time increment step of the first internal counter is the same as the time increment step of the second internal counter, and the time increment step is greater than the maximum propagation time of the signal between the first device and the second device.

4. The device according to claim 3, wherein: The decryption is performed only if the duration between the transmission of the at least one request and the start of the reception of the encrypted data is less than a determined duration.

5. The device according to claim 3 or 4, further comprising a component (20) for verifying that the received encrypted data has been encrypted by the key.

6. A motor vehicle comprising a device according to any one of claims 3 to 5.

7. A computer program product comprising instructions adapted to perform the steps of the method according to claim 1 or 2 when the computer program is executed by at least one processor.