The foregoing summary of the invention, as well as the following detailed description of illustrative embodiments, is better understood when read in conjunction with the accompanying drawings, which are included by way of example, and not by way of limitation with regard to the claimed invention.
a illustrates another embodiment of a system of wireless communication modules in communication in accordance with at least one aspect of the present invention;
b illustrates another embodiment of a system of wireless communication modules in communication in accordance with at least one aspect of the present invention;
a illustrate embodiments of exemplary initiation vectors formats that may be used in accordance with at least one aspect of the present invention.
In the following description of various illustrative embodiments, reference is made to the accompanying drawings, which form a part hereof, and in which is shown, by way of illustration, various embodiments in which the invention may be practiced. It is to be understood that other embodiments may be utilized and structural and functional modifications may be made without departing from the scope of the present invention.
As shown in
a illustrates an embodiment with a communication module 202 communicating with communication module 243 via air interface 217 and with communication module 244 via air interface 219. Thus,
b illustrates an alternative embodiment where a device 270, which may be a cellular phone or some other device, includes a communication module 204 that is in communication with communication module 245 via an air interface 221. As depicted, the device further includes a cellular radio 260 that is in communication with a cellular network 280 via air interface 223. Thus, device 270 is an embodiment of a dual-mode device and while a cellular radio is depicted, over known radios may also be used. As can be appreciated, various combinations of dual-mode devices and point-to-point or point-to-multipoint are possible. Thus, the illustrated configurations are merely representative and numerous variations are contemplated. For the sake of brevity, however, additional variations of the depicted embodiments will not be described.
It should be noted that the amount of control exercised by upper layers through the ULIF interface may depend on the nature of the device. For example, in certain simple devices there may be no need for security and therefore the data overhead associated with providing security is not at issue. For other devices, the upper layers may provide security. However, for certain devices it is preferable to minimize upper layer activity because it is not otherwise needed or desired. In such devices, having security provided in the baseband level can allow for more cost effective and or energy efficient implementation of security on a device. If the power usage for providing the security in the baseband layer can also be reduced, the ability to provide such security becomes even more attractive.
MAC State Machine
A state machine of BT-LEE MAC functionality is illustrated by the components 311, 313, 315, 317, 319 and 321 within the broken line box 301 as shown in
As depicted, a device, when it initially starts, shifts from an off state 311 to an idle state 313 and can shift to any state from the idle state 313, however the device takes no actions on the air interface while in idle state 313. If the device moves to an advertise state 321, the device can periodically broadcast a ID-INFO advertising message that is visible to devices in scan state 315 or connect state 317. A device in the scan state 315 listens to broadcast messages. A device in connect state 317 can initiate a connection setup with the advertising device and is referred to as an initiator device. From the scan and connect states 315, 317, a device can then shift to a connected state 319 with the advertising device, which will also shift to a connected state 319. Once in the connected state 319, a device can shift back to the four other states as appropriate.
New Packets
In BT-LEE technology, the MAC layer packet may be preceded by a preamble and a sync word, as shown in
If the packet is an ID-packet, the format depicted in
If the packet is a DATA-packet, the PDU depicted in
DATA-packets may be represented by a value of 0, 1, or 2 in the Type field to indicate which what type of header is being used (non-extended, long-extended, and short-extended). The long-extended header may be use by poller devices to transmit data in sniff mode, to poll and acknowledge, if there are multiple polled devices in the sniff, the sniff poll is delayed or the poller indicates additional data transmission.
MAC control packets may use a similar format with the values 3, 4, and 5 representing the type of header being used (non-extended, long-extended, and short-extended). The MAC control packet further includes a format for the payload section, with 1 byte for a control type and up to 254 bytes for data (as depicted in
As is known, the data payload can include data whitening so as to avoid long sequences of 0 bits or 1 bits. In an embodiment, the data whitening may be done after the CRC is calculated on the transmission side and before error check calculation on the receiver side.
The CRC calculation, which may be based on the CRC16 CCITT algorithm using the X16+x12+x5+1 polynomial (based on the X25 standard), can be done over the entire 48 bits of the device address field and device service field depicted in
Once the packet is received, the payload with the appended CRC can then be run through the CRC algorithm to verify that no errors exist. If an error is detected, the ACK bit in the header of the response packet can be set to zero.
Security Considerations
There are a number of basic security threats common to wireless communication. One threat is the potential that a device may masquerade as an authorized device, thus gaining unauthorized access to resources. Another threat is that an unauthorized device may receive a transmission, potentially allowing for unauthorized disclosure of the data. Yet another threat is that an unauthorized device can attempt to address a device and gain unauthorized use of a resource. Other threats include interruption of data integrity and interruption of service through the use of interference.
While a number of methods have been used to address some of the above concerns, data confidentiality typically requires some sort of encryption of the data before transmission. A number of encryption algorithms exist and may be used. For example, one popular encryption algorithm is a block cipher and an example of the block cipher is an Advanced Encryption Standard (AES) algorithm. Of course, other encryption algorithms are also suitable to encrypt data. Furthermore, other block ciphers, such as, but not limited to, Twofish may also be used in place of the AES block cipher. One advantage of the AES block cipher is that it has been tested and no known attacks have proven able to compromise the encryption with current technology. Furthermore, AES is a recognized standard in encryption and has been widely adopted. Thus, the accepted security of AES (at least in view of current technology) makes it suitable for use in devices that require a relatively robust security measure. In particular, AES-Counter (AES-CTR) is well suited to use in a wireless security protocol that streams data. For ease of discussion, a 128-bit implementation will be described below with the understanding that other size bit implementations such as 192-bits or 256-bits are also contemplated.
As is known, AES-CTR uses a unique per-packet value (or control block) to encrypt a payload of plaintext. In an embodiment, a 128-bit control block 1102 is generated by using a 32-bit nonce 1105, a 64-bit random nonce 1110 and a 32-bits counter 1115 that is incremented for each control block, as depicted in
Plaintext(Pt)=Pt(1); Pt(2); . . . Pt(n) (where P(n) is less than or equal to 128 bits)
Then each partition is encrypted to form ciphertext in a process depicted in
While the above method for implementing AES-CTR is relatively secure, assuming authentication issues are handled with a message authentication code, one problem is that it places a relatively high burden on devices that send data relatively infrequently and at potentially lower data rates. As can be appreciated, security can be provided by using a processor at the baseband layer (where the processor may be one or more processors). However, with a BT-LEE devices operating in simplified mode, the need to transmit the random nonce 1110 with each higher level packet places a substantial burden on the device and may significantly reduce the potential lifecycle of a device for a given energy storage device, especially if only a couple of bits of data are being sent. Furthermore, it would be beneficial to allow the security to be provided for in the baseband level because certain BT-LEE devices do not require much in the way of upper level functionality.
Therefore, to address these concerns, in an embodiment the random nonce can be transmitted intermittently and stored in memory of a device. It should be noted that the memory may comprise one or more distinct types and physical locations on the device, thus the term memory is used to generally refer to the memory on the device unless otherwise noted. In an embodiment, the format of the control block may be as disclosed in
The direction (Dir) bit indicates the direction of travel of the packet and in an embodiment may be set to 1 if originating from the poller and 0 if originating from one polled device. The upper level packet counter is incremented for each packet transmitted with SAR=0 (e.g., for each upper level packet). It is also reset when a new nonce is sent, for example, in a SESSION_REFRESH PDU. Incrementing the upper level packet counter resets the packet counter, which corresponds to the number of lower level packets in an upper level packet. The packet counter is reset when SAR=0 and increments for each packet sent where SAR is not=0. The packet counter may also increment for packets that are treated as a sub-block. In an embodiment, the counters for the poller device and the polled device may be provided in two sets, one for transmission and one for reception, so that each set of counters are separately incremented for transmission from the poller and the polled device. Alternatively, a single set of counters may be used for both directions so that each block of encrypted data sent increments one at least one of the counters but the direction bit is updated based on the next packet sent or received.
Within each packet, the block counter may be set at zero and the initiation vector (IV)—(which is also known as the control block in a block cipher algorithm) associated with the zero-value block counter state may used to establish an integrity check value (ICV). In other words, the CRC may be substituted with an ICV/CRC to provide integrity and authentication along with the error checking provided by the CRC. The remaining values 1-255 for the block counter may be used to sequentially encrypt the partitions of plaintext in 128-bit blocks. Of course, some other order of incrementing may also be used. Each subsequent IV is processed through the encryption algorithm (which may be a block cipher such as the AES block cipher (with 10 rounds)), to form a key stream and the key stream is XORed with the respective 128-bits of plaintext to create the 128-bits of ciphertext. Thus, if the first data sent was a payload of plaintext of 2400 bits, it would be sent over one packet and the first packet would include 19 blocks of ciphertext (with the last block potentially being truncated). Furthermore, the IV for the last block encrypted in the second packet could have the previously provided random nonce (which may be XORed with the 64-bit device address value if desired), a value of “0” for the dir bit, a value of “1” for the upper level counter (where the upper level counter may be 39 bits, a value of “1” for the packet counter (which may 16 bits) and a value of “19” for the block counter (which may be 8 bits). It should be noted that each packet may or may not be encrypted, however the encryption resolution preferably will be at a MAC packet level. Thus, an encrypted packet may be followed by an unencrypted packet and the transmitting of the unencrypted packet would not need to increment the state of the counters.
Thus, when using the above IV, for a given packet, each subsequent 128-bit partition will be XORed with a key stream that began as the IV (which was determined by the appropriate incrementing/resetting of the various counters) and was processed through the encryption algorithm. It should be noted that incrementing of the various counters can be as desired and may, for example, involve addition or subtraction of a predetermined value in a predetermined pattern. In other words, each counter may changes states based on, for example, the number and type of packets that are sent and a predetermined pattern. Furthermore, the size of the counters may be adjusted so as to provide the desired number of blocks per MAC level packet, the number of MAC packets per upper level packet, and the number of upper level packets.
Thus as depicted, for a given random nonce value, a maximum MAC layer packet size may be about 2 kilobits, a maximum upper level packet size may be about 1 megabyte and a maximum number of upper-level packets may be 4 billion. Other values are also possible and, for example, the size of the MAC layer packet may be increased or limited to something less, depending on the amount of buffer space that is desired to be used. One advantage of this system is because the random nonce can be stored in the memory of the devices in communication, the random nonce does not need to be transmitted with each packet sent, reducing the transmission overhead while still providing a relatively secure encryption for a significant number of upper level packets per random nonce. Furthermore, if the random nonce is XOR with the device address, then a single random nonce may be used with a number of polled devices in a point to multipoint transmission. As can be appreciated, as the upper limit of the of the MAC layer packet decreases, the overhead of transmitting a random nonce becomes proportionally greater and the ability to not include it in the transmission become more valuable.
While a significant number of upper level packets can utilize the same random nonce, the random nonce can also be changed as desired and can be communicated by means of a SESSION_REFRESH PDU, as discussed above. The random nonce may also be changed if the random nonce for the session is set through the ULIF layer. The random nonce may also be changed as part of an error recovery process, if for example, packets are lost and two devices lose synchronization. The random nonce may also be reset in a situation where the polling device sets up a multi-peer network, possibly with a group key for all the devices. As can be appreciated, the random nonce may also be reset for other reasons, including the passage of time, etc . . . .
While 128-bit encryption with a tested algorithm such as AES-CTR provides an acceptable level of encryption for most applications, variations are possible. For example, 192-bit encryption would be possible with the depicted system in conjunction with a 128-bit random nonce and 256-bit encryption would be possible with a 192-bit random nonce (or an appropriate change in the size of the counters). Smaller and less secure encryption is also possible. For example, the 64-bit random nonce could be XOR with the 64-bit set of counters to form a 64-bit IV as depicted in
As noted above, while a block cipher algorithm, such as the AES-CTR algorithm, can provide good confidentiality, it does not resolve issues of authentication and integrity. Indeed, it is considered relatively straightforward to use a valid ciphertext to forge other ciphertext that appear valid to the decryptor. Generally speaking, therefore, it is recommended that encryption algorithms be used with some sort of authentication algorithm such as HMAC-SHA.
In an embodiment, an additional set of bytes could be included in the packet to provide for the authentication and integrity of the packet using a known authentication algorithm. In an alternative embodiment, however, to reduce the transmission of bytes, the 16-bit CRC depicted in
In an embodiment, the ICV16 may be generated as follows. First an IV with a zero-value block counter may be processed in the encryption algorithm to form a first key stream. The first two bytes of the first vector (the two most significant bytes) may be used to generate a polynomial p(x), however, to improve error correction properties the first degree of x in the polynomial may be set to 1. For example:
Thus, the first two bytes can be used to provide a value for the first 15 bits (most significant bit being used for the corresponding most significant bit), 1 can be used for the value of X1 bit and then the least significant value of the first two bytes can be used for the x0 value of the polynomial p(x). As can be appreciated, variations in determining the polynomial p(x) based on the key stream are possible. In addition, the last two bytes of the first key stream (the least significant bytes of the key stream) may be used as k (to be used as a one time pad). Both the p(x) and the k need to be shared a priori between the message authentication code originator and the verifier. However, if the originator and the verifier can determine the first key stream ahead of time (which is possible because the next state of the counters can be determined based on the current state of the counters and the header bits and the predetermined pattern of state change), the values for p(x) and k can be computed ahead of time. Then, for a b-bit message B (which, as discussed above, may be the ciphertext payload), the following notation may be used:
Associate B=Bb-1 . . . B1, B0 with the polynomial
Then compute:
d(x)=coef(B(x)*xm mod 2 p(x))
to obtain the m-bit (m=16 in the present example) string of coefficients from the degree m remainder polynomial after dividing B(x)*xm by p(x). A vector i16 is then set equal to the coefficients of the remainder. Then the ICV16 value for the message B is i16 XOR k. Thus, the operation of the algorithm is essentially a binary polynomial division of the message B by p(x) followed by an XOR of the resultant coefficient with a one-time code k where p(x) is based on the most significant two bytes of the key stream associated with the zero-value block counter and k is based on the least two significant bytes of the key stream associated with the zero-value block counter. Of course, the key stream associated with a one-value block counter could also be used as to provide the p(x) and k values as there would be no need for the ICV16 if there was not at least a partial block of ciphertext. However, if the packet is not encrypted (e.g., the security bit is 0) then there is no need for the ICV16 and the normal CRC may be used.
As can be appreciated, the above method of calculating the ICV16 allows for a reasonably rapid calculation so as to provide for a timely ACK/NACK response. As the first and last packet of an upper-level packet are identified by the header bits, the next IV to be used with a specific counterpart can be uniquely identified from any packet in the sequence and key stream for the IV with the zero value counter block can be predetermined. Thus, if p(x) and k are pre-computed, the computation of the ICV16 can be done in substantially real time. As can be appreciated, depending on the size of the key stream and the desired size of p(x) and k, different portions of the key stream may be used to generate the p(x) and k values. It should be noted that while stronger integrity levels and error detection levels are possible if an authentication algorithm was used in combination with the CRC, the level of integrity and error detection afforded by replacing the CRC with the ICV16 provides a suitable tradeoff between protecting against known-plaintext attacks and interference and transmission errors while minimizing transmission power requirements.
Thus, the encrypted data PDU may be sent with minimal overhead versus a non-encrypted packet. As is known, encryption algorithms such as the AES algorithm can be accomplished using a look-up table. In an embodiment, a hardware (HW) module may also be used to process the IV with a encryption algorithm such as the AES algorithm in a known manner. Thus, security can be provided on a chip without the need for significant cost or significant higher layer involvement.
It should be further noted that the ICV16 uses substantially the same algorithm as the CRC16 CCITT algorithm discussed above. Therefore, it is possible to use the same logic hardware to perform portions of both the CRC16 CCITT and the ICV16 algorithms. In an integrated circuit, this allows for further reduction in hardware complexity and cost by allowing both algorithms to use the same configurable CRC-block for the polynomial division.
In addition, to provide for a certain level of error correction, 4 different sets hardware modules could be provided to allow for simultaneous evaluation of the received CRC/ICV. In an embodiment, each hardware module could process the received packet with a different value for the packet counter (e.g., x, x+1, x+2, and x+3, where x is either equal to the current value of the packet counter or the equal to the current value minus y—where y is 1, 2 or 3). As can be appreciated, such a configuration would allow the device to receive a packet even if up to three packets had been missed. Therefore, less resetting of the random nonce would be necessary because it would be less likely for two devices to loose synchronization. In addition, as such an implementation could be implemented in the hardware device without greatly increasing the cost of the device, it would provide for a cost effective and efficient method to reduce retransmission of packets and/or the random nonce. Naturally, more or less hardware blocks could be added as desired.
However, it is expected that certain amount of re-syncronization of the IV may be required. For example, if an encrypted packet cannot be received, then a new nonce may be provided via the Session_Refresh control packet and the states of the counters can be reset. To improve security, the Session_Refresh packet may be sent after the poller device enters a whisper or reduced power mode so as to provide greater security for the transmission of the nonce.
While illustrative systems and methods as described herein embodying various aspects of the present invention are shown, it will be understood by those skilled in the art, that the invention is not limited to these embodiments. Modifications may be made by those skilled in the art, particularly in light of the foregoing teachings. For example, each of the elements of the embodiments may be utilized alone or in combination or subcombination with elements of the other embodiments. It will also be appreciated and understood that modifications may be made without departing from the true spirit and scope of the present invention. The description is thus to be regarded as illustrative instead of restrictive on the present invention.