Automotive keyless entry systems typically use a remote control device to unlock the car when a button is pressed and are widely used in modern cars. Typical automotive keyless entry systems use a “rolling code” where the command information (e.g. an UNLOCK command) is sent in the form of a message which includes a counter value and the result of a cryptographic computation (i.e. an encryption) of the counter value and other information such as a code defining the command and the identifier for which the command is intended.
Because remote keyless entry devices operate on battery power, a typical consideration is to minimize the power consumption of the device and, in particular, to minimize the length of the message transmitted. The radio frequency transmission portion of the operation typically consumes a disproportionate amount of the power used. Hence, while an encryption of the “rolling code” may be performed in the remote keyless entry device, it is typically not necessary to transmit the entire result of the encryption operation.
Secure wired and wireless networks comprising a master controller/base station and remote sensors or other devices may also require a message to be addressed to a particular device and for the addressed device to respond with an acknowledgment message in a secure manner.
AES encryption circuitry 160, 161 employs an industry standard block cipher used in RKE that typically encrypts 128 bit or equivalently, 16 byte data blocks using cryptographic key 150 which may be 128, 192 or 256 bits in length. It should be noted that other block ciphers with a larger block size than 128 bits may be used in accordance with the invention. Because AES encryption circuitry 160, 161 uses a 128 bit block cipher size, a large number of bits are unused for typical RKE systems. Typical RKE systems do not need to transmit MAC 170 that is longer than that required to keep the probability of an attacker guessing the encryption result sufficiently low (e.g. length of 40 bits or 5 bytes), which is a probability of 2−40 in this embodiment in accordance with the invention. The transmission of all 128 bits (16 bytes) of the encryption result typically results only in a reduced battery life for key 120 due to the longer message length and the corresponding longer time that the radio frequency transmitter needs to be activated.
The purpose of counter value CTR in message 155 is to avoid “replay” issues: when a valid command containing a particular counter value has been received, a corresponding counter located in vehicle 130 is updated and no command with a lower counter value is then accepted. This prevents transmitted commands that are captured by an attacker from being re-transmitted to access the car. Typical RKE systems provide for an “acceptance window” for the counter value so that if the new received counter value is less than the last verified value plus the value of the acceptance window, the command is still accepted. The presence of an acceptance window allows for the possibility that the key has been operated out of the range of the car which results in an increment of the counter in key 120 without vehicle 130 detecting that this has occurred.
In addition to the power expended on transmission by key 120, AES encryption circuitry 160 consumes significant power. Performing a second AES operation within key 120 is necessary if RKE system 110 requires vehicle 130 to send an “acknowledgement” message back to key 120 which results in significant additional power requirements. Such an acknowledgement message may be used, for example, to trigger an LED flash or LCD display on key 120 that confirms that the car has been locked.
The acknowledgment message needs to be secure. A typical form of attack exploiting the acknowledgment message in such RKE systems involves a two step process: 1) the attacker first corrupts message 155 carrying the “LOCK” command from key 120 to vehicle 130 so that verification fails and the locking of the car is not performed; 2) The attacker attempts to send a false acknowledgement message to key 120 to fool the user into believing that the “LOCK” command was successfully performed and thereby allowing access to the car. Other possible attack scenarios include modifying a legitimate acknowledgement message to indicate a “LOCKED” status when the car is actually “UNLOCKED”.
In accordance with the invention, the acknowledgment message 345 (see
In accordance with the invention, the unused bits (e.g. bits b(41) . . . b(128) produced by the AES encryption circuitry 161 are used to construct a secure acknowledgment message. The unused 88 bits (e.g. bits b(41) . . . b(128) are known to both key 120 and vehicle 130 when message 155 received by vehicle 130 has been verified as valid. The unused bits b(41) . . . b(128) are only valid for the message transaction in which they are generated and are overwritten with new values when the next message transaction occurs. Hence, the unused bits function as a “one-time” shared secret between key 120 and vehicle 130 that is unknown to the potential attacker. It should be noted that any alternative encryption scheme to AES may be used in accordance with the invention as long as the encryption scheme generates unused cipher text bytes which are not put into message 155 from key 120 to vehicle 130.
where bit (j, CRC) means the j-th bit of the CRC byte counting from 1 to k where k is the bit size of each block B. B(1) . . . B(k+1) are the blocks that the ciphertext has been divided into which corresponds to bits b(41) . . . b(128) in an exemplary embodiment in accordance with the invention. In step 250, the CHK value is appended to the acknowledgment message. An attacker who does not know the shared secret bits (e.g. bits b(41) . . . b(112) used in the case of the CRC value having 8-bits when a 128 bit standard block cipher is used) is unable to reconstruct the calculation performed in step 230. The probability for success of guessing the CHK value using the above algorithm is 1 in 2k (e.g. 1 in 256 if using an 8-bit CRC value). In an exemplary embodiment in accordance with the invention, modulo 2k addition may be used (modulo 256 if using an 8 bit CRC value) instead of XOR, so that in place of the XOR operation:
where bit (j, CRC) and B(1) . . . B(k+1) are as defined for Eq. (1). In accordance with the invention, other operations are also possible for creating the CHK value as long as the operation has the property that all (e.g. 256) possible results have an equal probability of being generated when the bytes are combined using the selected operation (e.g. XOR). This means that all CHK values are equally probable for an attacker who does not know the secret shared bytes and the attacker's probability of success is no better than guessing.
In general, the probability of an attacker randomly guessing the CHK value is 1 in 2L (e.g. 1 in 256 for CHK 355 which is 8-bits in length, see
An attacker who attempts to modify the content of acknowledgment message 345 (i.e. VID0, VID1 and STAT) in an embodiment in accordance with the invention, and not change CRC value 340 (to keep the CHK byte valid) is unable to do so by only modifying the STAT byte value. This is a direct consequence of the properties of CRC value 340. CRC 340 has the property that the length (in bits) of any modification which keeps CRC value 340 consistent must be longer than the length in bits of the data filed (e.g. the STAT byte field) that is being protected. Mathematically, CRC value 340 is the remainder value when the message bytes VID0, VID1 and STAT are treated as a polynomial over the Galois field of two elements (GF(2)) and divided by the degree 8 polynomial which defines CRC value 340 in an embodiment in accordance with the invention. Therefore, only integer multiples of the degree 8 polynomial can be XORed with the bytes of message 335 and because the degree 8 polynomial spans 9 bits (1 bit larger than the 8 bit size of a byte), any modification cannot change only the STAT byte. This is because original acknowledgment message 345 was constructed to be an exact multiple of the degree 8 polynomial which defines CRC value 340 when original acknowledgement message 345 is concatenated with the plaintext of the CRC. An attacker who tries to preserve this property of acknowledgment message 345 would need to XOR a multiple of the degree 8 polynomial which defines the CRC value 340 to acknowledgment message 345, this multiple must span at least 9 bits because the degree eight polynomial that defines CRC value 340 is 9 bits long. Therefore, it is not possible for the modified acknowledgment message to differ only in the STAT byte field because the STAT byte field is only 8 bits long. This means that any modification cannot leave the VID0 and/or VID1 field unchanged which ensures that the response message is not accepted by vehicle 130.
The CHK byte construction method in accordance with the invention ensures that any malicious modification by an attacker only generates an acceptable acknowledgment message with the same probability as guessing the CHK byte value as well as providing a method for detecting innocent transmission errors. In accordance with the invention, longer CRC fields and/or different message lengths may be employed as long as sufficient secret bytes are available in the encryption method used and the CRC length is as long or longer than the bit length of the essential informational content carried in the acknowledgment message (i.e. the equivalent of the STAT byte). Examples of other block ciphers may be those with a 192-bit or a 256-bit block size. Note that the Rijndael cipher on which AES is based has a block size of a minimum of 128 bits and a maximum of 256 bits with unlimited key sizes and that block sizes and key sizes must be multiples of 32. If, for example, a 256-bit block size is used instead of a 128-bit block size then a single encryption yields 256 bits (32 bytes) of which only a small number are used in the message. In the RKE system described above, only 40 bits of the output of the encryption are used for MAC 170, allowing 216-bits to be used to protect the acknowledgment message.
In accordance with the invention, the same construction as described above for 128-bit block size is possible with a k-bit CRC and XORing or modulo 2k addition of up to (k+1) blocks of k-bits each subject to the condition that k(k+1)≧216. Taking k=14 and excluding the bits b(1) . . . b(40) typically used for the MAC that are known to the attacker due to transmission, a bit string composed of the remaining 216 bits, b(41) . . . b(256), is available to protect the response. The remaining bit string composed of 216 bits b(41) . . . b(256) can be split into 15 blocks that each are of 14-bit size with the 6 bits left over.
The 14-bit CRC (cyclic redundancy check) can be computed over the “acknowledgement” message and then:
where bit (j, CRC) means the j-th bit of the CRC byte counting from 1 to 14 and blocks B(0) . . . B(14) are derived from bits b(41) . . . b(256) as shown in
While it may appear to be inefficient to use a 256-bit block cipher when typically only 40 bits of the output is used for MAC 170 on the originally transmitted message 155 (see
Other applications in accordance with the invention include low-complexity acknowledge systems in automotive bus systems and wireless sensor networks where an acknowledgment message needs to be received and verified by a device which needs to minimize power consumption related to cryptographic computations. In such applications the communication is extended from being between two specific devices such as key 120 and vehicle 130 to communication on a multi-device network. Here a device sending the original message directs it to one of the multiple devices either over a wireless or wired (e.g. automotive bus) network. The original message incorporates an identifier for the device to be securely addressed and requests response data relating to one or more parameters (e.g. inlet manifold pressure, engine speed if on an automotive bus).
For example, vehicle manufacturers typically seek to ensure the security of engine related data to prevent tampering that can adversely affect vehicle performance or emissions. In accordance with the invention, the engine control unit (ECU) or the electronic control module sends its request on the automotive bus and the addressed sensor device protects its returned data (the plaintext of the acknowledgment message) by appending a CHK value to the returned data to generate a secured acknowledgment message. The sensor device can very quickly compute its response as discussed above and the ECU or the electronic control module can perform the verification of the response using relatively few XORs or modulo additions or other suitable mathematical operations. This provides a low latency for the returned sensor device data which is an important issue in the design of feedback control systems incorporated into ECUs or electronic control modules for automobiles such as active suspension control modules and braking system control modules.
Wireless networks, such as for example, Bluetooth, Zigbee and 802.11 are similar in principle to wired networks in requiring a message to be addressed to a particular device and for the addressed device to respond with an acknowledgment message. However, in some wireless networks, a device on the network may function as a “relay” by forwarding messages. For example, if a low power sensor is out of range of the master controller because the sensor device's transmit power level is too low to enable the signal to be sent directly to the master controller, then another device more proximate to the sensor device can be used to forward the message. Additionally, if a master controller desires to contact a sensor device that is out of range, a signal can be relayed to the out of range sensor by a sensor that is closer. In particular with reference to
It is typically important to maintain the security of such wireless networks. Tampering attempts by an attacker device that has been inserted into the wireless network may be defeated in accordance with the invention as described.
While the invention has been described in conjunction with specific embodiments, it is evident to those skilled in the art that many alternatives, modifications, and variations will be apparent in light of the foregoing description. Accordingly, the invention is intended to embrace all other such alternatives, modifications, and variations that fall within the spirit and scope of the appended claims.