Method for performing authentication method and pairing of peripheral device and companion device
By introducing a pairing table and counter mechanism into the electronic device authentication method, the problems of malicious device access and excessive pairing of peripheral devices are solved, achieving more reliable device authentication and secure pairing.
Patent Information
- Application Number
- CN202480043508.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-11
- Filing Date
- 2024-06-29
- Publication Date
- 2026-01-23
AI Technical Summary
Existing electronic device authentication methods lack effective protection against malicious devices accessing data and functions, and are unable to effectively deal with excessive pairing and authentication attempts by peripheral devices.
By introducing a pairing table and counter mechanism into the authentication method between peripheral devices and accompanying devices, the peripheral device sends an identifier and a counter value, and the accompanying device verifies the pairing table and decides whether to initiate a pairing session or stop authentication based on the counter value, generating a shared key to ensure the reliability of device pairing.
It improves the reliability of authentication methods, prevents malicious devices from accessing the device, and rejects authentication when peripheral devices are excessively paired or attempt too many authentications, ensuring the security and efficiency of device pairing.
Smart Images

Figure CN121399599A_ABST
Abstract
Description
Cross Reference to Related Applications
[0001] This application is an international application (PCT) and claims the benefit of and priority to U.S. Patent Application No. 18 / 350,495, filed July 11, 2023, entitled “Method of Performing an Authentication Method and a Pairing of a Peripheral Device to a Companion Device,” the entire contents of which are incorporated herein by reference. TECHNICAL FIELD
[0002] The present disclosure relates generally to electronic devices or circuits, and in particular embodiments to pairing tables. BACKGROUND
[0003] Communication between two electronic devices or circuits is usually preceded by an authentication phase. During this phase, an authentication method implemented by the two devices verifies whether the two devices are authorized to communicate with each other.
[0004] Authentication methods are usually used for communication between a terminal-type device, such as a computer, a printer or a payment terminal, and a peripheral-type electronic equipment or device, such as a consumable or an accessory. In this case, the authentication method enables to verify the access of the peripheral-type device to the data and / or functions of the terminal-type device. The authentication method is a major protection against malicious devices trying to access the data and / or functions of other devices.
[0005] A common example of authentication method used, for instance, between a computer and a user is the use of a user ID and a password.
[0006] It is desirable to be able to at least partially improve known authentication methods for electronic devices. SUMMARY
[0007] For example, the present disclosure is applicable to an authentication method between two electronic devices or circuits preceding a communication method between the two devices or circuits.
[0008] Embodiments can provide a more reliable authentication method. For example, embodiments can provide a more reliable authentication method using information from previous attempts of performing the authentication method.
[0009] Embodiments address all or some of the drawbacks of known authentication methods.
[0010] According to a first aspect, one embodiment provides an authentication method, wherein a peripheral device can refuse to perform the authentication method due to a previous attempt of the authentication method.
[0011] One embodiment provides an authentication method in which a companion device can refuse to perform the authentication method due to a previous attempt of the authentication method.
[0012] One embodiment provides an authentication method in which a peripheral device can refuse to perform the authentication method if the peripheral device has paired with too many companion devices.
[0013] One embodiment provides an authentication method in which a peripheral device can refuse to perform the authentication method if the peripheral device has performed too many attempts of performing the authentication method.
[0014] An embodiment provides an authentication method to pair a peripheral device with a companion device, the method comprising the steps of: (a) the peripheral device sending a first identifier and a first value of a first counter to the companion device; and (b) the companion device verifying whether a pairing table contains the first identifier. When the pairing table does not include the first identifier, the companion device initiates a pairing session; and when the pairing table includes the first identifier, the companion device compares the first value with a second value associated with the first identifier in the pairing table. If the first value is greater than the second value, the companion device initiates a nominal session; and if the first value is less than or equal to the second value, the companion device stops performing the authentication method.
[0015] According to an embodiment, during the pairing session, the peripheral device and the companion device exchange data to verify whether they can be paired together.
[0016] According to an embodiment, during the pairing session, the peripheral device and the companion device generate a shared key.
[0017] According to an embodiment, during the pairing session, the peripheral device and the companion device exchange encrypted commands.
[0018] According to an embodiment, if the pairing session is successful, the peripheral device and the companion device are paired together and they use the shared key.
[0019] According to an embodiment, if the pairing session fails, the peripheral device and the companion device are not paired together.
[0020] According to an embodiment, during the nominal session, the peripheral device and the companion device have been previously paired together, the peripheral device has stored at least a second identifier associated with the companion device and a shared key, and the companion device has stored the shared key.
[0021] According to an embodiment, the shared key has been generated during a previous successful pairing session performed by the peripheral device and the companion device.
[0022] According to an embodiment, the first counter is incremented each time an attempt to perform the authentication method is made.
[0023] According to an embodiment, during step (b), if the companion device has not previously stored the first identifier, the companion device stores the first identifier with the first value.
[0024] According to an embodiment, the peripheral device and the companion device communicate with each other via the host device.
[0025] According to an embodiment, the authentication method further comprises a step (c) before step (a), wherein the host device sends to the peripheral device a second identifier associated with the companion device.
[0026] According to an embodiment, the authentication method further comprises a step (d) between step (c) and step (a), wherein the peripheral device verifies whether it has previously stored the second identifier.
[0027] According to an embodiment, the authentication method comprises a step (e) after step (d), wherein, if the peripheral device has not previously stored the second identifier, the peripheral device compares the first value with a first threshold.
[0028] According to an embodiment, during step (e), if the first value is lower than the first threshold, the next step is step (a).
[0029] According to an embodiment, during step (f), if the first value is equal to or greater than the first threshold, the peripheral device stops the execution of the authentication method.
[0030] According to an embodiment, during step (e), if the peripheral device has previously stored the second identifier, the next step is the verification step (f).
[0031] According to an embodiment, during step (f), the peripheral device stores the second identifier.
[0032] According to an embodiment, during step (f), the peripheral device verifies at least one first data stored with the second identifier.
[0033] According to an embodiment, during step (f), the stored at least one first data is a second value of a second counter.
[0034] According to an embodiment, the second counter is incremented each time an attempt to execute the authentication method with the companion device is made.
[0035] According to an embodiment, during step (f), the peripheral device compares the second value with a second threshold.
[0036] According to an embodiment, during step (f), if the second value is lower than the first threshold, the next step is step (a).
[0037] According to an embodiment, during step (f), if the second value is equal to or greater than the second threshold, the next step is step (g).
[0038] According to an embodiment, the second threshold is between one and five.
[0039] According to an embodiment, the second threshold is equal to three.
[0040] According to an embodiment, during step (g), the peripheral device stops the execution of the authentication method.
[0041] According to an embodiment, the companion device is a circuit for a printer.
[0042] According to an embodiment, the peripheral device is a circuit for an ink cartridge.
[0043] Another embodiment provides an electronic peripheral device configured as a peripheral device in an authentication method taking into account a pairing of the peripheral device with a companion device, comprising the following steps: (a) the peripheral device sends a first identifier and a first value of a first counter to the companion device; and (b) the companion device verifies whether a pairing table contains the first identifier. When the pairing table does not include the first identifier, the companion device initiates a pairing session; and when the pairing table includes the first identifier, the companion device compares the first value with a second value associated with the first identifier in the pairing table. If the first value is greater than the second value, the companion device initiates a nominal session; and if the first value is less than or equal to the second value, the companion device stops the execution of the authentication method.
[0044] Another embodiment provides an electronic companion device configured as a companion device in an authentication method taking into account a pairing of the peripheral device with a companion device, comprising the following steps: (a) the peripheral device sends a first identifier and a first value of a first counter to the companion device; and (b) the companion device verifies whether a pairing table contains the first identifier. When the pairing table does not include the first identifier, the companion device initiates a pairing session; and when the pairing table includes the first identifier, the companion device compares the first value with a second value associated with the first identifier in the pairing table. If the first value is greater than the second value, the companion device initiates a nominal session; and if the first value is less than or equal to the second value, the companion device stops the execution of the authentication method.
[0045] Another embodiment provides an electronic system comprising a peripheral device and a companion device, the peripheral device and the companion device being configured to implement an authentication method taking into account a pairing of the peripheral device with the companion device, comprising the steps of: (a) the peripheral device sending to the companion device a first identifier and a first value of a first counter; and (b) the companion device verifying whether a pairing table contains the first identifier. When the pairing table does not include the first identifier, the companion device initiates a pairing session; and when the pairing table includes the first identifier, the companion device compares the first value with a second value associated with the first identifier in the pairing table. If the first value is greater than the second value, the companion device initiates a nominal session; and if the first value is less than or equal to the second value, the companion device stops the execution of the authentication method.
[0046] Another embodiment provides a non-transitory computer readable medium having stored a program which, when executed by a microprocessor of a device of the aforementioned electronic system, causes the device to perform the aforementioned method.
[0047] The aforementioned features described with respect to the method can be translated into system features specific to any device of the invention.
[0048] According to a second aspect, embodiments provide an authentication method wherein a host device used for communication purposes between a peripheral device and a companion device has no access to sensitive data during a pairing session.
[0049] Embodiments provide an authentication method taking into account a pairing of a peripheral device with a companion device via a host device, wherein, when a pairing session is initiated, the host device receives a first command; wherein the first command comprises a first command code and a first encrypted payload to be exchanged between the peripheral device and the companion device via the host device, the first command code instructing the host device to pass the command without decoding it.
[0050] According to embodiments, the first encrypted payload comprises at least an encrypted second command code.
[0051] According to embodiments, the encrypted payload further comprises at least one encrypted first parameter associated with the second command code.
[0052] According to embodiments, the command comprises a first encrypted payload encrypted with a first verification code.
[0053] According to embodiments, when the companion device or the peripheral device receives the encrypted command, the companion device or the peripheral device decrypts the first encrypted payload.
[0054] According to embodiments, when the companion device or the peripheral device receives the encrypted command, the companion device or the peripheral device decrypts the first encrypted payload using a pairing session key.
[0055] According to an embodiment, once the encrypted command is decrypted, the companion device or the peripheral device verifies whether the second command code is compliant.
[0056] According to an embodiment, once the encrypted command is decrypted, the companion device or the peripheral device verifies whether the at least one first parameter is compliant.
[0057] According to an embodiment, once the encrypted command is decrypted, the companion device or the peripheral device performs at least one operation associated with the second command code.
[0058] According to an embodiment, once the at least one operation is performed, the companion device or the peripheral device generates a first response.
[0059] According to an embodiment, the first response comprises at least a first response command.
[0060] According to an embodiment, the first response further comprises at least a second parameter.
[0061] According to an embodiment, the first response is then encrypted.
[0062] According to an embodiment, the first response is then encrypted by the companion device or the peripheral device using the pairing session key.
[0063] According to an embodiment, the companion device or the peripheral device generates a second encrypted command comprising, in this order: - the first command code; - a second encrypted payload, the encrypted first response; - and a second verification code encrypted with the second encrypted payload.
[0064] According to an embodiment, the companion device or the peripheral device sends the second encrypted command to the peripheral device or the companion device via the host device.
[0065] According to an embodiment, the authentication method comprises an identification session prior to the pairing session.
[0066] According to an embodiment, during the identification session, the companion device decides whether a pairing session is needed.
[0067] According to an embodiment, when the companion device decides whether a pairing session is needed, the companion device sends a second encrypted response to the host device.
[0068] According to an embodiment, the second encrypted response comprises, in this order: - a second response code indicating to the host device that the authentication method continues; - first status data indicating initiation of said pairing session; - a third encrypted payload comprising a third encrypted command; and - a third verification code encrypted with the second encrypted payload.
[0069] According to an embodiment, the peripheral device is a circuit for an ink cartridge.
[0070] According to an embodiment, the companion device is a circuit for a printer.
[0071] According to an embodiment, the host device is a circuit for a printer.
[0072] Another embodiment provides an electronic companion device configured to implement, as a companion device, an authentication method taking into account the pairing of a peripheral device with a companion device via a host device, wherein, when a pairing session is initiated, a first command is received by the host device, wherein the first command comprises a first command code and a first encrypted payload to be exchanged between the peripheral device and the companion device via the host device, the first command code indicating that the host device passes the command without decoding it.
[0073] Another embodiment provides an electronic peripheral device configured to implement, as a peripheral device, an authentication method taking into account the pairing of a peripheral device with a companion device via a host device, wherein, when a pairing session is initiated, a first command is received by the host device, wherein the first command comprises a first command code and a first encrypted payload to be exchanged between the peripheral device and the companion device via the host device, the first command code indicating that the host device passes the command without decoding it.
[0074] Another embodiment provides an electronic host device configured to implement, as a host device, an authentication method taking into account the pairing of a peripheral device with a companion device via the host device, wherein, when a pairing session is initiated, a first command is received by the host device, wherein the first command comprises a first command code and a first encrypted payload to be exchanged between the peripheral device and the companion device via the host device, the first command code indicating that the host device passes the command without decoding it.
[0075] Another embodiment provides an electronic system comprising a companion device, a peripheral device and a host device, all capable of implementing an authentication method taking into account the pairing of the peripheral device with the companion device via the host device, wherein, when a pairing session is initiated, a first command is received by the host device, wherein the first command comprises a first command code and a first encrypted payload to be exchanged between the peripheral device and the companion device via the host device, the first command code indicating that the host device passes the command without decoding it.
[0076] The features described previously in relation with the method can be transposed into system features specific to any of the devices of the invention. BRIEF DESCRIPTION OF DRAWINGS
[0077] The foregoing features and advantages, as well as others, will be described in more detail below by reference to specific embodiments given by way of illustration, but not by way of limitation, to the specific embodiments, wherein:
[0078] [ Figure 1 ] illustrates schematically an electronic device to which the embodiments described hereinafter can be applied;
[0079] [ Figure 2 ] illustrates schematically an example of a system that can perform the embodiments described hereinafter;
[0080] [ Figure 3 ] illustrates schematically a practical example of an embodiment of the system of [ Figure 2 ] ;
[0081] [ Figure 4 ] illustrates schematically in block diagram form an example of the structure of the exchanged commands and responses of the system of [ Figure 2 ] ;
[0082] [ Figure 5 ] illustrates a block diagram briefly illustrating an embodiment of the authentication method;
[0083] [ Figure 6 ] illustrates a block diagram illustrating a part of the embodiment of [ Figure 5 ] ;
[0084] [ Figure 7 ] illustrates schematically in block diagram form an embodiment of the structure of the exchanged responses;
[0085] [ Figure 8 ] illustrates a block diagram illustrating another part of the embodiment of the authentication method. DETAILED DESCRIPTION
[0086] The same features are referred to by the same reference numerals in the various figures. In particular, structural and / or functional features common among the various embodiments can have the same reference numerals and can be placed with the same structural, dimensional and material properties.
[0087] For the sake of clarity, only those operational and structural elements that are necessary for understanding the operation and elements of the embodiments described herein have been illustrated and described in detail.
[0088] Unless otherwise indicated, when referring to two elements connected together, it means a direct connection without any intermediate elements other than conductors; when referring to two elements coupled together, it means that the two elements can be connected or coupled via one or more other elements.
[0089] In the following disclosure, unless otherwise specified, when referring to absolute positional qualifiers such as “front,” “back,” “top,” “bottom,” “left,” and “right,” relative positional qualifiers such as “above,” “below,” “higher,” and “lower,” or directional qualifiers such as “horizontal” and “vertical,” refer to the orientation shown in the accompanying drawings.
[0090] Unless otherwise specified, the expressions “approximately,” “about,” “substantially,” and “on the order of magnitude” indicate within 10%, and preferably within 5%.
[0091] The embodiments described below relate to authentication taking into account the pairing of peripheral devices and accompanying devices, and more specifically to the steps of the authentication method and the data sequences exchanged during the authentication method.
[0092] According to the first aspect, the authentication method may include a first identification operation, wherein the peripheral device and the accompanying device determine whether they have previously communicated.
[0093] If the two devices have already been paired, the next operation is a nominal operation, in which the two devices pair using pairing data stored in a pairing table included in each device.
[0094] If the two devices have not been paired before, each device performs verification to determine whether the other device is malicious. If neither device is considered malicious, a pairing process is initiated. The various operations and verifications are described below.
[0095] These authentication methods offer the advantage of giving accompanying devices the ability to refuse to perform the authentication method due to previous attempts at the authentication method.
[0096] These authentication methods offer additional advantages: they give peripheral devices the ability to refuse to perform the authentication method if the peripheral device has already been paired with too many companion devices or has already made too many attempts to perform the authentication method.
[0097] According to the second aspect, during the authentication process, the two devices communicate via the host device.
[0098] Except during the pairing operation, the host device acts as the master device for communication during the authentication process.
[0099] Therefore, during pairing operations, the host device should be transparent and should transmit commands from the peripheral device to the companion device or from the companion device to the peripheral device without decoding the commands.
[0100] In the second aspect, it is therefore proposed to use a specific command format, such that each command includes a specific field as described below, which indicates to the host device that its function is only to transmit the command without performing any further processing.
[0101] The second advantage is that the host device used for communication between peripheral devices and accompanying devices cannot access sensitive data during the pairing session.
[0102] [ Figure 1 An example architecture of the electronic device 100 is shown in a highly schematic block diagram.
[0103] Electronic device 100 includes processor 101 (CPU) adapted to implement various instructions to process data stored in the memory of the device 100 and / or provided to the device 100 by another circuit.
[0104] Electronic device 100 may also include different types of memory, including non-volatile memory 102 (NVM), volatile memory 103 (RAM), and / or read-only memory 104 (ROM). Each memory is adapted to store different types of data. Device 100 may have one or more of these different types of memory, and / or only one or two of these different types.
[0105] The electronic device 100 also includes various circuits 105 (FCTs) adapted to perform different functions. For example, circuit 105 may include measurement circuits, data conversion circuits, encryption circuits, or circuits that perform encryption operations, such as encryption circuits. Hereinafter, circuits that perform encryption functions and / or operations will be referred to as cryptographic circuits, and circuits that use encryption functions and / or operations for the purpose of encrypting and / or decrypting data, or for the purpose of encoding and / or deciphering data, will be referred to as encryption circuits.
[0106] Electronic device 100 may also include interface circuitry 106 (IN / OUT), which is adapted to send data to and / or receive data from outside the device 100. Interface circuitry 106 may also be adapted to implement a data display, such as a display screen. Electronic device 100 is also particularly adapted to communicate and / or pair with other electronic devices, and is adapted to implement authentication methods to authenticate such communication and / or such pairing.
[0107] The electronic device 100 also includes one or more data buses 107 adapted to transfer data between its various components. Specifically, the bus 107 is used to transfer data stored in memories 102 to 104 to processor 101, circuit 105 and / or interface circuit 106.
[0108] [ Figure 2An example of an electronic system 200 capable of performing the authentication method embodiment described hereafter is shown.
[0109] The electronic system 200 is composed of three electronic devices of the type of the electronic device 100 described in relation with Figure 1 ]. More specifically, the electronic system 200 is composed of a companion device 201 (COMP), a peripheral device 202 (PERI) and a host device 203 (HOST).
[0110] The companion device 201 is a terminal type device configured to work with the peripheral device 202.
[0111] The peripheral device 202 is a peripheral type device, more specifically, the device 202 can be a consumable, adapted to be used by the companion device 201.
[0112] The host device 203 is a host type device or a router type device, used to run the communication between the devices 201 and 202. In other words, the host device 203 is capable of communicating with the companion device 201 as well as with the peripheral device 202, and is capable of transferring data from the companion device 201 to the peripheral device 202 or from the peripheral device 202 to the companion device 201. The devices 201 and 202 are not configured to exchange data directly with each other.
[0113] According to an example, the companion device 201 and the host device 203 can be parts of the same main electronic device 204. In that case, the companion device 201 is for example an electronic circuit dedicated to the use of the consumable, while the device 202 is for example a main processor of the main electronic device 204. According to a variant, the companion device 201 and the host device 203 can be performed by the same electronic circuit, such as a secure element.
[0114] According to an embodiment, the devices 201 and 202 are configured to work in collaboration and are configured to communicate with each other by using the host device 203, at least as a communication tool and at most as a communication master. More specifically, the system 200 is configured to implement an authentication method for the purpose of authenticating the peripheral device 202 to the companion device 201 using the host device 203 as a communication tool. In other words, each device 201, 202 and 203 is configured to implement a part of this authentication method. According to an embodiment, this authentication method has two objectives: a first objective is to verify whether the devices 201 and 202 are authorized to work with each other or at least to communicate with each other; a second objective is to generate a shared encryption key (hereafter called shared key) which is used during subsequent communications to encrypt and / or decrypt all or part of the data exchanged by the devices 201 and 202, and / or for the authentication purposes detailed hereafter. If the authentication method results in success or is successful, the devices 201 and 202 are paired.
[0115] According to some embodiments, the authentication method can also verify the hardware and / or software compatibility of the devices 201 and 202. According to another example, the authentication method can be able to prevent a malicious device from accessing sensitive or confidential data stored in the devices 201 and 202.
[0116] With regard to Figure 5 to Figure 8 Examples of implementations and authentication method embodiments are described.
[0117] [ Figure 3 ] shows a practical system of an electronic system 300 of the same type as the electronic systems described with regard to Figure 2 ] More specifically, Figure 3 ] shows a system composed of a printer 301 and a cartridge 302.
[0118] The printer 301 and the cartridge 302 are both devices of the type of the device 100 described with regard to Figure 1 ] More specifically,
[0119] The printer 301 acts as, or comprises the circuitry of, the companion device 201 and the host device 203 of the system 200 described with regard to Figure 2 ] More specifically, the printer 301 comprises a main circuit (e.g. a processor or a secure element) acting as the host device 203, and a dedicated circuit dedicated to the guidance of the cartridge 302 acting as the companion device 201. Figure 3 ] The main circuit and the dedicated circuit are not represented in
[0120] The cartridge 302 acts as, or comprises the circuitry of, the peripheral device 202 of the system 200 described with regard to Figure 2 ] More specifically,
[0121] [ Figure 4 ] shows, in a block diagram form, a structure example of the exchanged commands and responses of the system of Figure 2 ] or of the system of Figure 3 ] More specifically, Figure 4 ] shows the structure of a command 400, of a response 420, of an encrypted command 440, and of an encrypted response 460.
[0122] In the following disclosure, a command is one or a set of data constituting a command to be executed by a receiver device. A response is one or a set of data constituting a response to a previously received command. Moreover, in the figures, a command is represented with a double arrow, and a response is represented with a single thick arrow.
[0123] The command 400, the response 420, the encrypted command 440, and the encrypted response 460 are all composed of a sequence of data arranged in a specific order. The encrypted command 440 represents a specific example of the command 400. The encrypted response 460 represents a specific example of the response 420.
[0124] The command 400 comprises a sequence of data comprising, in this order: - a command code field 401 (Cmd Code) comprising data hereinafter called command code, which indicates the type of operation performed by the command 400; - a length data field 402 (Len) comprising data indicating the length of the sequence of the command 400, meaning the number of bytes constituting the command 400; - a payload field 403 (Payload) comprising data hereinafter called payload, which indicates the data used to perform the command 400; and - a verification data field 404 (CRC) comprising verification data of the command 400.
[0125] The response 420 comprises a sequence of data comprising, in this order: - a response code field 421 (Rsp Code) comprising data hereinafter called response code 421, which indicates the type of response 420; - a length data field 422 (Len) comprising data indicating the length of the sequence of the response 420, meaning the number of bytes constituting the response 420; - a payload field 423 (Payload) comprising data hereinafter called payload, which indicates the data included in the response 420; and - a verification data field 424 (CRC) comprising data indicating the verification data of the response 420.
[0126] The data comprised in the command code field 401 indicates only the type or class of the command 400, or in other words, the type of operation performed when the command 400 is implemented. The data comprised in the payload field 403 indicates the data, also called parameters, used to perform the command 400.
[0127] Similarly, the response code 421 indicates the type or class of the response 420. According to an example, the response code can indicate to which command the response is associated, or can indicate the result status. The data comprised in the payload field 423 indicates the data, also called parameters, included in the response 420.
[0128] Furthermore, the fields 402, 404, 422 and 424 can be optional. In the following disclosure, these fields are omitted. In some cases, it is sufficient for the receiver to have data in the command code field 401 or in the response code field 421, and the payload field 403 or 423 is empty.
[0129] As previously mentioned, the command 440 and the response 460 are both encrypted. Like the command 400 and the response 420 described previously, the command 440 and the response 460 consist of a sequence of data arranged in a specific order.
[0130] The encrypted command 440 comprises a sequence of data comprising, in this strict order: - a command code field 441 (Cmd Code) comprising data representative of the type of command 440 or command code 441 ; - a length data field 442 (Len) comprising data representative of the length of the sequence of the command 440, meaning the number of bytes constituting the command 440; - an encrypted payload field 443 (E(Cmd + Payload)) comprising encrypted data hereinafter called encrypted payload 443, which can be representative of encrypted data or a command of the type of command 400; - an authentication code field 444 (MAC) comprising data representative of a message authentication code related to the encryption of the command 440; and - a verification field 445 (CRC) comprising data representative of the verification data of the command 440.
[0131] The encrypted response 460 comprises a sequence of data comprising, in this strict order: - a response code field 461 (Rsp Code) comprising data hereinafter called response code, which is representative of the type of response 460; - a length data field 462 (Len) comprising data representative of the length of the sequence of the response 460, meaning the number of bytes constituting the response 460; - an encrypted payload field 463 (E(Rsp + Payload)) comprising data hereinafter called encrypted payload 463, which can be representative of encrypted data or a response of the type of response 420; - an authentication code field 464 (MAC) comprising data representative of a message authentication code related to the encryption of the response 460; and - a verification data field 465 (CRC) comprising data representative of the verification data of the response 460.
[0132] Since the command 440 is encrypted, the command code included in the command code field 441 merely indicates that the command 440 is an encrypted command, without disclosing the type of the command 440. In other words, the data included in the command code field 441 does not disclose the type of operation that the command 440 is performing. As mentioned previously, the encrypted payload field 443 includes encrypted data that is capable of representing the type of the command 400, meaning that the encrypted payload field is capable of including an encrypted command code, and if appropriate, an encrypted payload. The encrypted command code is the true command code of the command 440, indicating the type of the command 440. If appropriate, the encrypted payload includes the data used when the command 440 is executed.
[0133] According to an example, when a device receives an encrypted command 440, the command code indicates that the command 440 has been encrypted. Accordingly, the device decrypts the encrypted payload to obtain the actual command code, and if appropriate, the actual payload of the command 440. Once the payload is decrypted, the device is able to execute the command 440. If the device is not able to decrypt or decode the encrypted payload, it is not able to execute the command 440.
[0134] Similarly, the response 460 is encrypted, and the response code included in the response code field 461 merely indicates that the response 460 is an encrypted response, without disclosing the type of the response 460. On the other hand, the encrypted payload included in the encrypted payload field 463 is capable of including encrypted data that is strictly composed of the following order: the actual response code of the response 460 and the payload of the response 460. The actual response code indicates the type of the response 460. The parameters of the response 460 are the data that constitutes the response.
[0135] According to an example, when a device receives an encrypted response 460, the response code indicates that the response 460 is encrypted. Accordingly, the device decrypts the encrypted payload to obtain the actual response code, and if appropriate, the actual payload of the response 460. Once the payload is decrypted, the device is able to access the data included in the response 460. If the device is not able to decrypt the encrypted payload, it is not able to access the data included in the response 460.
[0136] Similarly, the data 442, 444, 462, and 464 can be optional. In some cases, the command code 441 or the response code 461 is sufficient for the receiver, and the payload 443 or 463 is empty.
[0137] In variants, the sequence of data that constitutes the command or response can be a different order than described with respect to Figure 4 ].
[0138] [ Figure 5 ] shows a simplified block diagram that illustrates the execution of a command by a device according to an example. The device receives a command 440 that includes a command code 441 and a payload 443. The command code 441 is included in the command code field 441. The payload 443 is included in the encrypted payload field 443. The command code 441 is encrypted, and the payload 443 is encrypted if appropriate. The device decrypts the command code 441 to obtain the actual command code, and if appropriate, the actual payload of the command 440. Once the payload is decrypted, the device is able to execute the command 440. If the device is not able to decrypt or decode the encrypted payload, it is not able to execute the command 440. Figure 2The system 200 performs and uses the authentication method with respect to Figure 4 Embodiments of the authentication method of the command and response.
[0139] According to an embodiment, the authentication method starts with an identification operation 501 (ID) in which the companion device 201 and the peripheral device 202 determine whether they are aware of each other, i.e. whether they have been paired together. More specifically, during this operation, the companion device 201 and the peripheral device 202 identify whether they have attempted to perform the present authentication method, whether successfully or not. Details about Figure 6 The identification operation is detailed with respect to
[0140] To this end, according to an embodiment, the companion device 201 stores in a pairing table: - its own identification data IDComp, or identifier IDComp; - a list of pairing master keys; - a list of pairing master key identifiers; and - a list of data groups, each data group comprising identification data, or an identifier, a shared key and a value of a session counter, each group corresponding to a peripheral device that has been successfully authenticated with the companion device 201 previously.
[0141] More precisely, the identifier IDComp is unique data identifying the companion device 201. The list of pairing master keys and the list of pairing master key identifiers are used by the companion device 201 to perform a pairing operation, or pairing session, detailed below.
[0142] According to an embodiment, the list of data groups represents all or part of the peripheral devices that have been successfully authenticated by the companion device 201. The identification data comprised in the group represents an identifier of the peripheral device. The shared key corresponds to a decryption and / or encryption key associated with this peripheral device, this key being generated during a pairing operation successfully performed with the peripheral device. The value of the session counter represents the value of a counter stored in each peripheral device, which is detailed below.
[0143] Moreover, according to an embodiment, the peripheral device 202 stores in a pairing table: - its own identification data IDPeri, or identifier IDPeri; - a list of pairing base keys; - a list of pairing base key identifiers; - a list of data groups, each group corresponding to a device that the peripheral device has attempted to authenticate previously; and - a plurality of counters and limitation data representing a limitation on these previous counters.
[0144] More precisely, the identifier IDPeri is unique data identifying the peripheral device 202. The list of pairing base keys and the list of pairing base key identifiers are used by the peripheral device to perform the pairing operation detailed hereafter.
[0145] According to an embodiment, the list of data groups comprises data representative of all the companion devices with which the peripheral device has successfully or unsuccessfully authenticated. Each data group comprises: - an identifier of the companion device; - where appropriate, a shared key corresponding to a decryption and / or encryption key associated with this companion device, this shared key having been generated during a pairing operation successfully performed with this companion device; and - optionally, data PairCnt representative of the value of a counter updated each time the authentication method is attempted to be performed with the companion device.
[0146] The several counters and limit data in the pairing table of the peripheral data can comprise: - a counter SessionCnt incremented each time a new attempt to perform the authentication method is made with any companion device; - limit data SessionCntLim representative of the maximum number of attempts to perform the authentication method with any companion device; - optionally, limit data PairCntLim representative of the maximum number of attempts to perform the authentication method with one particular companion device; and - optionally, a counter GPairCnt representative of the number of attempts to perform the authentication method with any companion device; - optionally, limit data GPairCntLim representative of the maximum number of attempts to perform the authentication method with any companion device.
[0147] According to an example, the limit data SessionCntLim is lower than a million and is for example equal to one million. The limit data PairCntLim is comprised between one and five and is for example equal to 3.
[0148] The use of the pairing table of the companion device 201 and of the peripheral device 202 will be described in more detail in connection with Figure 6 ] and
[0149] Moreover, during the identification operation, the host device 203 is the master device of the communication. In other words, the host device 203 is in the driving seat of the communication, playing the role of sending commands to the companion device 201 and to the peripheral device 202 and of performing the identification operation. The commands and responses exchanged in the system 200 during the identification operation are explained in detail hereafter in connection with Figure 6 ] and Figure 7 ].
[0150] Once the identification operation is performed, the companion device 201 and the peripheral device 202 have determined whether they have contacted each other before, even paired. There can be three cases here.
[0151] According to a first case, the devices 201 and 202 can decide that they do not want to communicate with each other (output S of operation 501), or be paired with each other. This case can occur for example when one of the devices detects that the other device is malicious, or for example when one of the devices has reached a limit number of pairing sessions. In this case, the next operation is operation 502 (STOP).
[0152] According to a second case, the companion device 201 and the peripheral device 202 can decide that they do want to communicate with each other, but they have never been paired with each other (output P of operation 501), or one of the devices 201 or 202 has forgotten that they have been paired with each other before. In this case, the next operation is a pairing operation 503 (PAIR) or a pairing session 503.
[0153] According to a third case, the companion device 201 and the peripheral device 202 recognize each other (output N of operation 501), meaning that they have been paired with each other, and that the data required to pair again together has been stored. The next operation is a nominal operation 504 (NOM) or a nominal session 504, in which the companion device 201 and the peripheral device 202 can use the shared key obtained in the previous pairing session and stored in their respective pairing tables, to establish a secure communication session.
[0154] During operation 502, the authentication method fails and stops. According to an example, the companion device 201 stores in its pairing table the identifier IDPeri of the peripheral device 202 and the last value of the counter SessionCnt. In a variant, the companion device 201 does not store any information about the peripheral device 202. The peripheral device 202 stores in its pairing table the identifier IDComp, and updates its different counter. After operation 502, the companion device 201 and the peripheral device 202 are not authorized to communicate with each other via the host device 203.
[0155] During the pairing operation 503, the companion device 201 and the peripheral device 202 decide that they do want to communicate with each other but do not trust each other yet, and a pairing session is performed. Different verification steps are performed (for example using cryptographic operations) to generate a shared key ShBK shared by the companion device 201 and the peripheral device. Detailed examples of the pairing operation 503 will be combined with the description of the pairing session 503. Figure 8is described in more details. If the pairing operation presents success (output Y of operation 503), the shared key ShBK is obtained and the next operation is operation 505 (continuation). If it is not successful (output N of operation 503), the next operation is operation 502.
[0156] Further, during the pairing operation 503, the host device 203 becomes a slave device for the communication. In other words, the host device 203 no longer has the leadership of the communication and its role is to relay commands from the companion device 201 to the peripheral device 202, or from the peripheral device 202 to the companion device 201. Further, according to an embodiment, when the host device is a slave device in the communication, each time it receives an encrypted command, its only role is to relay the encrypted command without trying to execute, or decode, or decrypt the command.
[0157] During the nominal operation 504, or nominal session 504, it is confirmed that the devices 201 and 202 have authenticated each other and paired each other, so they trust each other. The devices 201 and 202 have stored the shared key ShBK and they are able to use this key to obtain the pairing. The host device 203 is still the master device for the communication. In other words, the host device 203 has the leadership of the communication, its role is to send commands to the companion device 201 and to the peripheral device 202. The host device 203 sends commands to the companion device 201 and to the peripheral device 202 and receives their responses.
[0158] Further, during the nominal operation 504, the companion device 201 and the peripheral device 202 are paired with each other, then they are able to communicate with each other via the host device 203. More specifically, the companion device 201 and the peripheral device 202 are able to exchange encrypted data and for this purpose, they are able to use their shared key ShBK. According to an example, the devices 201 and 202 use their shared key ShBK for generating one or more encryption and / or decryption keys for encrypting and / or decrypting commands and responses. The peripheral device 202 stores in its pairing table the identifier IDComp and the shared key ShBK and updates its different counters. On its side, the companion device 201 stores in its pairing table the identifier IDPeri and the shared key ShBK. The next operation is operation 505.
[0159] During operation 505, the companion device 201 and the peripheral device 202 have been paired together and are ready to communicate with each other via the host device 203 by using the shared key ShBK.
[0160] [ Figure 6 ] shows a block diagram illustrating in more details the system 200 executed by and using the method 500 described with respect to [ Figure 2 ] shows a block diagram illustrating in more details the system 200 executed by and using the method 500 described with respect to [ Figure 4The described embodiment of the identification operation 600. This identification operation 600 is of the type described in relation with the identification operation 501 described above. Figure 5
[0161] The identification operation 601 starts with an initial step 601 (Start ID) executed by the host device 203, wherein the host device 203 initiates the authentication method by sending a command StartPeriCmd to the peripheral device 202. This command StartPeriCmd comprises an identifier IDComp of the companion device 201, and optionally, a decryption and / or encryption key Kld. This decryption and / or encryption key Kld is a key used to generate a pairing session key and / or a shared key ShBK. More specifically, this key Kid is used to select which pairing base key to use for deriving a pairing session key that will be used to encrypt and / or decrypt commands during the pairing session. This command StartPeriCmd is of the type described in relation with the command 400 described above, meaning that this command StartPeriCmd is not an encrypted command. Figure 4
[0162] At a step 602 (ID?) executed by the peripheral device 202, this step following the initial step 601, the peripheral device 202 has received the command StartPeriCmd and decides whether it wishes to start the authentication method with the companion device 201. To do so, the peripheral device 202 performs some verifications, more specifically, the peripheral device 202 looks for the identifier IDComp and the encryption key Kld in its pairing table. If one of the verifications fails (output N of the step 602), the next step is the step 603 (Stop); if all verifications succeed (output Y of the step 602), the next step is the step 604 (Suspend).
[0163] According to a first example, the first verification consists in verifying that the peripheral device 202 has a pairing base key corresponding to the key Kld. If the peripheral device 202 does not have a corresponding key, the first verification fails.
[0164] According to a second example, the second verification consists in verifying that the identifier IDComp is stored in the pairing table of the peripheral device 202.
[0165] If the identifier IDComp is found in the pairing table, the peripheral device is able to verify that the sequence of the command StartPeriCmd is correct. The peripheral device 202 verifies that the shared key ShBK is associated with this identifier IDComp. If the shared key ShBK is found, it means that the peripheral device 202 has previously been paired with the companion device 201, the next step is step 604, and the counter GPairCnt is incremented if appropriate. If the shared key ShBK is not found, it means that the peripheral device 202 has not been paired with the companion device 201, the next step is step 604, unless the counter PairCnt exceeds the limit PairCntLim, or unless the counter SessionCnt exceeds the limit SessionCntLim.
[0166] According to an example, the flag data can be associated with the identifier IDComp. In some cases, this flag data can indicate whether the companion device 201 is blocked by the peripheral device 202, in which case the next step is step 603. The peripheral device can update this flag data each time necessary.
[0167] If the identifier is not found in the pairing table, it means that the peripheral device 202 has never been in contact with the companion device 201. The peripheral device 202 verifies whether it can be paired with a new companion device by checking, if appropriate, the counter GPairCnt and verifying that its value is not greater than the limit GPairCntLim. The next step is step 603 if the peripheral device exceeds the session number limit; the next step is step 604 if the peripheral device does not exceed the session number limit.
[0168] According to a third example, a third verification consists in verifying whether the peripheral device 202 can start a new session by checking the session counter SessionCnt and verifying that its value is not greater than the limit SessionCntLim. If the counter exceeds the session number limit, the next step is step 603. Otherwise, if the counter does not exceed the session number, the peripheral device increments the session counter SessionCnt and the next step is step 604.
[0169] Moreover, during step 602, the peripheral device 202 stores the identifier IDComp in its pairing table, and eventually stores the flag data related to the execution of the attempt, and updates its different counters. More specifically, then, the counter SessionCnt is incremented.
[0170] During step 603, the authentication method fails and stops. The peripheral device 202 sends a response STOPPeriRsp to the host device 203 and the next step is step 605 (STOP) performed by the host device 203, in which the host device confirms that the peripheral device does not want to proceed with the authentication method with the companion device 201. Step 605 is followed by the operations 502 described in relation with Figure 5 ]. For example, the peripheral device 202 can update its pairing table.
[0171] During step 604, the peripheral device 202 is in the suspended state and decides to proceed with the authentication method with the companion device 201. The peripheral device 202 sends a response CONTINUEPeriRsp to the host device 203. This response CONTINUEPeriRsp includes the identifier IDPeri of the peripheral device 202 and the last value of the counter SessionCnt. The next step is step 606 (START ID) performed by the host device 203.
[0172] During step 606, the host device 203 confirms that the peripheral device wants to proceed with the authentication method with the companion device 201 and receives the response CONTINUEPeriRsp. Moreover, the host device 203 initiates the authentication method at the companion device 201 side by sending a command StartCompCmd to the companion device 201. This command StartCompCmd includes the identifier IDPeri of the peripheral device 202, the key KId and the last value of the counter SessionCnt.
[0173] After step 606, step 607 (ID?) is performed by the companion device 201, which has received the command StartCompCmd and decides whether it wants to start the authentication method with the peripheral device 202. To this end, the companion device 201 performs one or more verifications.
[0174] According to an embodiment, the companion device 201 verifies whether the identifier IDPeri and the shared key ShBK are present in its pairing table.
[0175] If companion device 201 finds the identifier IDPeri and / or the associated shared key ShBK in its pairing table, it means that companion device 201 has previously contacted peripheral device 202 at least once. Furthermore, if companion device 201 finds the identifier IDPeri in its pairing table, companion device 201 verifies the value of SessionCnt stored associated with that identifier IDPeri. If the value of the counter SessionCnt received with the command StartCompCmd is equal to or higher than the value of the counter SessionCnt stored in companion device 201's pairing table, it means that the peripheral device is not malicious, and the next step is step 608 (NOM) performed by companion device 201; if the value of the counter SessionCnt received with the command StartCompCmd is less than or equal to the value of the counter SessionCnt stored in companion device 201's pairing table, it means that the peripheral device is malicious. In fact, the counter SessionCnt never decrements, so the value of the counter SessionCnt should only increase. Then, the next step is step 612 (stop) performed by companion device 201.
[0176] If companion device 201 does not find the identifier IDPeri in its pairing table, it means that companion device 202 has never contacted peripheral device 202, or has forgotten that it has contacted peripheral device 202. Then, companion device 610 indicates that a pairing operation is required for the authentication method. The next step is step 610 (pairing).
[0177] If the accompanying device 201 detects an error with the identifier IDPeri, the next step is step 612 (stop) performed by the accompanying device 201.
[0178] During step 608, the accompanying device 201 sends a response NomRsp to the host device 203, indicating that the next operation is nominal operation 504. The structure of the NomRsp response will be combined with [ Figure 7 This is described in more detail. The next step is step 609 (NOM), which is performed by host device 203, where host device 203 prepares for nominal operation 504.
[0179] During step 610, this is performed by the accompanying device 201, wherein the accompanying device sends a response PairRsp to the host device 203. The structure of the PairRsp response will combine [ Figure 7 This is described in more detail. The next step is step 611 (pairing) performed by host device 203, where host device 203 confirms that the accompanying device wishes to perform an authentication method with peripheral device 202. The next operation is pairing operation 503.
[0180] During step 612, the authentication method fails and stops. The companion device sends a response StopRsp to the host device 203 and the next step is step 613 (Stop) performed by the host device 203, in which the host device confirms that the companion device does not want to proceed with the authentication method with the peripheral device 202. The structure of the response StopRsp will be described in more detail in connection with Figure 7 ] The next operation is operation 502.
[0181] [ Figure 7 ] An embodiment of the structure of the response StopRsp, the response NomRsp and the response PairRsp described in connection with Figure 6 ] is schematically illustrated in a block diagram.
[0182] The response StopRsp is a type of response 420 described in connection with Figure 4 ]. During step 612 described in connection with Figure 6 ], the response StopRsp is generated by the companion device 201 when it, after receiving the identifier IDPeri, decides that it does not want to proceed with the authentication method. The response StopRsp is sent to the host device 203. The response StopRsp is one of the possible responses to the command StartCompCmd sent by the host device 203.
[0183] The response StopRsp consists only of a response code field comprising a response code 701 (Rsp1) indicating that the authentication method is ended.
[0184] The response NomRsp is a type of response 420 described in connection with Figure 4 ]. During step 608 described in connection with Figure 6 ], the response NomRsp is generated by the companion device 201 when it decides that it already knows the peripheral device 202 and that they trust each other. The response NomRsp is sent to the host device 203. The response NomRsp is one of the possible responses to the command StartCompCmd sent by the host device 203.
[0185] The response NomRsp consists of a response code field comprising a response code 711 (Rsp2) directly followed by a payload field comprising status data 712 (Nom). The response code 711 indicates that the authentication method will continue, and the status data 712 indicates to the host device 203 that the next operation is the nominal operation 504, and then the next step is step 609. When the host device 203 receives the response NomRsp, the host device 203 understands that it is still the master device of the communication, and is responsible for the initialization of the nominal operation.
[0186] During step 610 described in relation to [ Figure 6 ], the response PairRsp is generated by the companion device 201 when it decides that it wants to proceed with the authentication method with the peripheral device 202. The response PairRsp is sent to the host device 203. The response PairRsp is one of the possible responses to the command StartCompCmd sent by the host device 203.
[0187] The response PairRsp is of the type of the response 420 described in relation to [ Figure 4 ]. The response PairRsp consists of a response code field comprising a response code 721 (Rsp 3) directly followed by a payload field comprising status data 722 (Cmd code 3) and data 723 (Payload 3). The status data 722 and the data 723 are considered as parameters associated with the response code 721. The response code 721 indicates that the authentication method will continue. The status data 722 indicates to the host device 203 that the next operation is the pairing operation 503 and that the next step is step 611. According to a variant, the status data 722 is not present. The data 723 comprises an encrypted command for data expected by the peripheral device 202 and used during the pairing operation 503. When the response PairRsp is received by the host device 203, the host device 203 understands that it becomes the slave device of the communication and is no longer in charge of driving the communication. After that, the host device 203 passes the data 723 to the peripheral device 202.
[0188] More specifically, according to an embodiment, the data 723 comprises an encrypted command of the type of the encrypted command 440 described in relation to [ Figure 4 ]. The data 723, i.e. the encrypted command 723, is encrypted by using a key derived from the key Kid. Thus, the data 723 consists of, in this strict order: - data 724 (Enc code), or encryption code 724, indicating that the data 723 is an encrypted command, the data 724 being not encrypted; - encrypted data 725 (E (Payload)), i.e. encrypted payload 725, representing the encrypted command; and - data 726 (MAC), representing a message authentication code related to the encryption of the command.
[0189] Moreover, when the data 725 is decrypted, it consists of, in this strict order: - data 727 (Enc code), or command code 727, indicating the type of the command; and - data 728 (E (Payload)), or payload 725, comprising parameters and / or data for executing the command.
[0190] The advantage of using the encrypted data stored in the response is to avoid any leak of parameters and / or data used to execute the command. Indeed, the host device 203 is the device that passes the responses and commands between the companion device 201 and the peripheral device 202, and a malicious person can try to hack the host device 203 to get secret or sensitive data. This is not possible in the present embodiment because the secret or sensitive data is stored in the encrypted data 728.
[0191] [ Figure 8 ] shows a block diagram illustrating in more details an embodiment of the pairing operation 800 performed by the system 200 described with respect to [ Figure 2 ] and using the command and response described with respect to [ Figure 4 ]. This pairing operation 600 is of the type of the pairing operation 503 described with respect to [ Figure 5 ].
[0192] The pairing operation 800 is initiated at a step 801 (pairing) of the type of the step 610 described with respect to [ Figure 6 ]. During the step 801, the companion device 201 sends to the host device 203 a response PairRsp. The response PairRsp is described in details with respect to [ Figure 7 ].
[0193] At a step 802 (start pairing) performed by the host device 203 after the step 801, the host device 203 becomes the slave device of the communication. The host device 203 passes only a part of the response PairRsp to the peripheral device 202, more specifically, the host device 203 passes to the peripheral device 202 an encrypted command E (pairing 1 ) that corresponds to the data 723 described with respect to [ Figure 7 ]. Moreover, the host device 203 does not try to execute this encrypted command and passes it directly. More specifically, the host device 203, upon receiving the encrypted data, deciphers the encrypted command code as a pass-through command.
[0194] The encrypted command E (pairing 1 ) is of the type of the encrypted command 440 described with respect to [ Figure 4 ], i.e. the encrypted command E (pairing 1 ) strictly comprises in the following order: - a command code indicating that this encrypted command E (pairing 1 ) is an encrypted command; - encrypted data corresponding to the encrypted command itself; and - data representing a message authentication code related to the encryption of this encrypted command E (pairing 1 ).
[0195] Moreover, according to the embodiment, the command code of the encrypted command E (Pairing 1), as well as the command code accompanying each encrypted command exchanged between the companion device 201 and the peripheral device 201, indicates to the host device 203 that it should pass this encrypted command without trying to decode or decrypt the encrypted payload. This way, the host device 203 knows that it is the slave device of the communication.
[0196] Once it is decrypted, the encrypted data consists of a command code indicating the type of the encrypted data, and data including parameters associated with the encrypted data.
[0197] At a pairing step 803 (Pairing 1) following the step 802 and executed by the peripheral device 202, the peripheral device 202 receives the encrypted data E (Pairing 1) and uses one or more data included in the encrypted command E (Pairing 1) to perform the first specific pairing action of the pairing operation 800. According to an example, during the step 803, the peripheral device 202 can perform part of a verifier-prover type authentication method, or part of an encrypted verifier-prover type authentication method. More specifically, the peripheral device 202 (respectively the companion device 201) can use various internal secret data and / or parameters received in the command sent by the companion device 201 (respectively the peripheral device 202) to perform an encryption operation.
[0198] At the end of this pairing action, the peripheral device 202 generates an encrypted command E (Pairing 2) for the companion device 201 and sends it to the host device 203 for passing. For example, the encrypted command E (Pairing 2) includes data representative of one or more results of the actions of the step 803 and / or data intended to be used during subsequent actions. According to a practical example, the peripheral device 202 generates the encrypted command E (Pairing 2) by encrypting[ Figure 4 ] the type of response 420 and filling the encrypted payload field of the command 440 type of encrypted command with it[ Figure 4 ]. The command code of this pairing command is the same as the command code of the command E (Pairing 1).
[0199] At a step 804 (Passing) following the step 803 and executed by the host device 203, the host device 203 receives the encrypted command E (Pairing 2). In line with the previous, the host device is no longer the master device of the communication, its only role being to pass data, commands and / or responses between the companion device 201 and the peripheral device 202. Thus, the host device 203 passes the encrypted command E (Pairing 2) to the companion device 201 without any modification and without trying to decode or decrypt it.
[0200] At another pairing step 805 (Pairing 2) following step 804 and performed by the companion device 201, the companion device 201 receives the encrypted command E (Pairing 2) and performs the second specific pairing action of the pairing operation 800 using one or more data included in the encrypted command E (Pairing 2). According to an example, during step 805, the companion device 202 is able to perform another part of the pairing operation 800 in response to the peripheral device 202 having previously performed a part of the verifier- prover type authentication method, or a part of the encrypted verifier-prover type authentication method.
[0201] At the end of this pairing action, the companion device 201 generates an encrypted command E (Pairing 3) intended for the peripheral device 202 and sends it to the host device 203 for delivery. The encrypted command E (Pairing 3) includes, for example, data representative of the result of one or more actions of step 805, and data to be used during subsequent actions.
[0202] The encrypted command E (Pairing 3) is then delivered by the host device 203 to the peripheral device 202. The companion device 201 and the peripheral device 202 continue to exchange encrypted data with the previous mechanisms until they finally determine that they can trust each other and until they can provide a shared encryption and / or decryption key ShKey that can be used for future encrypted communications.
[0203] Moreover, at each pairing step, if the encrypted command is not correct, or if the encrypted command includes erroneous data, one of the devices 201, 202 is able to stop the pairing operation.
[0204] The last pairing step 810 (Pairing K) performed at the peripheral device 202 side, the peripheral device 202 sends a last encrypted command E (Pairing K) to the companion device 202 via the host device 203. Step 810 is the last pairing step, then the peripheral device is able to perform step 809 (Store) in which the peripheral device updates its pairing table with the data obtained during the pairing operation 800.
[0205] At step 811 (Delivery) following step 810 and performed by the host device 203, the host device 203 receives the encrypted command E (Pairing K). The host device 203 delivers the encrypted command E (Pairing K) to the companion device 201 without any modification. The next step is step 806 (Aut. Success).
[0206] During step 806, the companion device 201 and / or the peripheral device 202 determine that they can trust each other. A success response SuccessRsp is sent to the host device 203 for step 807 (Aut. Success) in which the host device is informed of the success of the authentication method. In Figure 8In this case, step 806 is performed by the companion device 201, but in alternative embodiments, the peripheral device can perform step 806.
[0207] After step 806, the companion device 201 performs a step 808 (storage) similar to step 810, in which the companion device 201 updates its pairing table with the data obtained during the pairing operation 800. More specifically, the companion device 201 stores the identifier IDPeri and the shared encryption and / or decryption key ShKey.
[0208] Moreover, in order not to overload the figures, it is not shown that Figure 8 In this case, step 806 is performed by the companion device 201, but in alternative embodiments, the peripheral device can perform step 806.
[0209] Various embodiments and variants have been described. The person skilled in the art will understand that certain features of these embodiments can be combined, and that other variants will readily occur to the person skilled in the art.
[0210] Finally, based on the functional description provided above, the actual implementation of the embodiments and variants described herein is within the capabilities of the person skilled in the art.
Claims
1. A method for performing authentication and pairing peripheral devices with accompanying devices, the method comprising: The accompanying device receives a first identifier and a first value of a first counter from the peripheral device. The accompanying device verifies whether the pairing table stored in the accompanying device contains the first identifier; When the pairing table does not include the first identifier, the accompanying device initiates the pairing session; When the pairing table includes the first identifier, the accompanying device performs the following steps: Compare the first value with the second value associated with the first identifier in the pairing table; In response to the first value being greater than the second value, a nominal session is initiated; and The execution of the method is stopped in response to the first value being less than or equal to the second value.
2. The method according to claim 1, further comprising: Data is exchanged between the peripheral device and the accompanying device to verify whether the peripheral device and the accompanying device can be paired together.
3. The method according to claim 1, further comprising: A shared key is generated by the peripheral device and the accompanying device.
4. The method according to claim 3, further comprising: The peripheral device is paired with the accompanying device so that the peripheral device and the accompanying device use the shared key.
5. The method according to claim 1, further comprising: Encryption commands are exchanged between the peripheral device and the accompanying device.
6. The method according to claim 1, further comprising: The nominal session is initiated after the peripheral device and the accompanying device have been previously paired, the peripheral device has stored a second identifier and a shared key associated with the accompanying device, and the accompanying device has stored the shared key.
7. The method of claim 6, wherein the shared key was generated during a previous successful pairing session performed by the peripheral device and the accompanying device.
8. The method of claim 1, wherein the first counter is incremented each time the authentication method is attempted.
9. The method according to claim 1, further comprising: When the pairing table does not include the first identifier, the accompanying device stores the first identifier and the first value.
10. The method of claim 1, wherein the peripheral device and the accompanying device communicate with each other via a host device.
11. The method of claim 10, further comprising: The host device sends a second identifier associated with the accompanying device to the peripheral device.
12. The method of claim 11, further comprising: The peripheral device determines whether it has previously stored the second identifier.
13. The method of claim 12, wherein determining whether the peripheral device has previously stored the second identifier comprises: The method further includes determining that the peripheral device has not previously stored the second identifier, and then having the peripheral device compare the first value with a first threshold.
14. The method of claim 13, further comprising: In response to the peripheral device determining that the first value is lower than the first threshold, the first identifier and the first value are sent from the peripheral device to the accompanying device.
15. The method of claim 13, further comprising: In response to the peripheral device determining that the first value is not lower than the first threshold, the peripheral device stops the execution of the authentication method.
16. The method of claim 12, further comprising: In response to determining that the peripheral device had not previously stored the second identifier, the peripheral device stores the second identifier.
17. The method of claim 12, further comprising: In response to determining that the peripheral device has previously stored the second identifier, the peripheral device performs a verification step.
18. The method of claim 17, wherein performing the verification step comprises: Verify that the first data is stored together with the second identifier.
19. The method of claim 18, wherein the stored first data is the second value, and the second value comes from the second counter.
20. The method of claim 19, wherein the second counter is incremented each time the authentication method is attempted to utilize the accompanying device.
21. The method of claim 19, wherein performing the verification step comprises: The peripheral device compares the second value with the second threshold.
22. The method of claim 21, further comprising: In response to the second value being lower than the first threshold, the first identifier and the first value are sent from the peripheral device to the accompanying device.
23. The method of claim 21, further comprising: In response to the second value being equal to or greater than the second threshold, the peripheral device stops the execution of the authentication method.
24. The method of claim 21, wherein the second threshold is between one and five.
25. The method of claim 24, wherein the second threshold is equal to three.
26. The method of claim 1, wherein the accompanying device is circuitry for a printer.
27. The method of claim 1, wherein the peripheral device is a circuit for an ink cartridge.
28. A non-transitory computer-readable medium storing a program that, when executed by a microprocessor in an electronic device, causes the microprocessor to perform the method according to claim 1.
29. An electronic device configured as an accompanying device in an authentication method, wherein a peripheral device is paired with the accompanying device, the electronic device comprising: A receiver capable of being communicatively coupled to the peripheral device; A pairing table storage, wherein the pairing table storage stores a pairing table; processor; as well as Memory, coupled to the processor and storing program code, which, when executed by the processor, causes the processor to: Verify whether the pairing table contains a first identifier received from the peripheral device; When the pairing table does not include the first identifier, a pairing session is initiated. When the pairing table includes the first identifier: The first value received from the peripheral device is compared with the second value associated with the first identifier in the pairing table; In response to the first value being greater than the second value, a nominal session is initiated; as well as In response to the first value being less than or equal to the second value, the accompanying device stops executing the authentication method.
30. An electronic system comprising: Peripheral equipment; as well as Accompanying equipment; The peripheral device and the accompanying device are configured to implement an authentication method to pair the peripheral device and the accompanying device. and The authentication method mentioned above includes: Sending a first identifier and a first value of a first counter from the peripheral device to the accompanying device; and The accompanying device verifies whether the pairing table in the accompanying device includes the first identifier; When the pairing table does not include the first identifier, the accompanying device initiates the pairing session; When the pairing table includes the first identifier, the accompanying device performs the following steps: Compare the first value with the second value associated with the first identifier in the pairing table; In response to the first value being greater than the second value, a nominal session is initiated; and The authentication method is stopped when the first value is less than or equal to the second value.