Secure wireless communication between controllers and accessories
First Claim
1. A method for controlling an accessory using a controller, the method comprising:
- establishing, by the controller, a session key usable to encrypt messages exchanged with the accessory;
identifying, by the controller, a target characteristic of the accessory, the target characteristic comprising an attribute of the accessory that is configured to be controlled based at least in part on data being written to the target characteristic;
determining, by the controller, write data to be written to the target characteristic of the accessory, the write data comprising information configured to instruct the accessory to control the attribute of the accessory corresponding to the target characteristic;
identifying, by the controller, an identifier of the target characteristic;
generating, by the controller, a first payload that comprises the write data and the identifier of the target characteristic;
encrypting, by the controller, the first payload with the session key;
sending, by the controller, a first instruction to the accessory, the first instruction comprising the first payload and an indication that the accessory should temporarily store the write data and the identifier of the target characteristic;
receiving, by the controller, a first response from the accessory, the first response comprising a first signed data block indicating that the accessory received the first instruction;
in response to receiving the first response, sending, by the controller, a second instruction to the accessory, the second instruction comprising a second payload comprising the identifier of the target characteristic and indicating that the accessory should write the write data from the first payload to the target characteristic in accordance with the received identifier corresponding to the stored identifier; and
receiving, by the controller, a second response from the accessory, the second response comprising a second signed data block indicating that the accessory received and executed the second instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A controller and an accessory controllable by the controller can communicate using secure read and write procedures. The procedures can include encrypting identifiers of accessory characteristics targeted by a read or write operation as well as any data being read or written. The procedures can also include the accessory returning a cryptographically signed response verifying receipt and execution of the read or write instruction. In some instances, a write procedure can be implemented as a timed write in which a first instruction containing the write data is sent separately from a second instruction to execute the write operation; the accessory can disregard the write data if the second instruction is not received within a timeout period after receiving the first instruction.
14 Citations
19 Claims
-
1. A method for controlling an accessory using a controller, the method comprising:
-
establishing, by the controller, a session key usable to encrypt messages exchanged with the accessory; identifying, by the controller, a target characteristic of the accessory, the target characteristic comprising an attribute of the accessory that is configured to be controlled based at least in part on data being written to the target characteristic; determining, by the controller, write data to be written to the target characteristic of the accessory, the write data comprising information configured to instruct the accessory to control the attribute of the accessory corresponding to the target characteristic; identifying, by the controller, an identifier of the target characteristic; generating, by the controller, a first payload that comprises the write data and the identifier of the target characteristic; encrypting, by the controller, the first payload with the session key; sending, by the controller, a first instruction to the accessory, the first instruction comprising the first payload and an indication that the accessory should temporarily store the write data and the identifier of the target characteristic; receiving, by the controller, a first response from the accessory, the first response comprising a first signed data block indicating that the accessory received the first instruction; in response to receiving the first response, sending, by the controller, a second instruction to the accessory, the second instruction comprising a second payload comprising the identifier of the target characteristic and indicating that the accessory should write the write data from the first payload to the target characteristic in accordance with the received identifier corresponding to the stored identifier; and receiving, by the controller, a second response from the accessory, the second response comprising a second signed data block indicating that the accessory received and executed the second instruction. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An electronic device, comprising:
-
a wireless communication interface to communicate with an accessory; and one or more processors coupled to the wireless communication interface, the one or more processors being configured to; establish, via the wireless communication interface, a session key usable to encrypt messages exchanged with the accessory; identify a target characteristic of the accessory, the target characteristic comprising an attribute of the accessory that is configured to be controlled based at least in part on data being written to the target characteristic; determine write data to be written to the target characteristic of the accessory, the write data comprising information configured to instruct the accessory to control the attribute of the accessory corresponding to the target characteristic; identify an identifier of the target characteristic; generate a first payload that comprises the write data and the identifier of the target characteristic; encrypt the first payload with the session key; send, via the wireless communication interface, a first instruction to the accessory, the first instruction comprising the first payload and an indication that the accessory should temporarily store the write data and the identifier of the target characteristic; receive, via the wireless communication interface, a first response from the accessory, the first response comprising a first signed data block indicating that the accessory received the first instruction; send, in response to receiving the first response, a second instruction to the accessory via the wireless communication interface, the second instruction comprising a second payload comprising the identifier of the target characteristic and indicating that the accessory should write the write data from the first payload to the target characteristic in accordance with the received identifier corresponding to the stored identifier; and receive, via the wireless communication interface, a second response from the accessory, the second response comprising a second signed data block indicating that the accessory received and executed the second instruction. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A non-transitory computer-readable storage medium having stored therein program code that, when executed by one or more processors of an accessory device, cause the one or more processors to perform operations comprising:
-
establishing a session key usable to encrypt messages exchanged with a controller; receiving a first instruction from the controller, the first instruction comprising a first payload encrypted with the session key; extracting, from the first payload, write data and an identifier of a target characteristic to which the write data is to be written, the write data comprising information that controls the attribute of the accessory corresponding to the target characteristic; identifying the target characteristic, the target characteristic comprising an attribute of the accessory that is configured to be controlled based at least in part on writing the write data to the target characteristic; sending a first response to the controller, the first response comprising a first signed data block indicating that the accessory received the first instruction; storing, temporarily, the write data and the identifier of the target characteristic; receiving a second instruction from the controller, the second instruction comprising a second payload comprising the identifier of the target characteristic and indicating that the accessory should write the write data from the first payload to the target characteristic in accordance with the received identifier corresponding to the stored identifier; determining whether the second instruction is received within a time to live after sending the first response; in response to determining that the second instruction is not received within the time to live, ignoring the second instruction; and in response to determining that the second instruction is received within the time to live and the received identifier corresponds to the stored identifier, executing the second instruction, the execution of the second instruction comprising writing the write data from the first payload to the target characteristic. - View Dependent Claims (14, 15, 16, 17, 18, 19)
-
Specification