
- •Contents
- •Preface
- •1 Introduction
- •1.1 Bluetooth system basics
- •1.1.1 Background
- •1.1.2 Trade-offs
- •1.1.3 Bluetooth protocol stack
- •1.1.4 Physical layer
- •1.1.5 Baseband
- •1.1.6 Link manager protocol
- •1.1.7 Logical link control and adaptation protocol
- •1.1.8 Host control interface
- •1.1.9 Profiles
- •1.2 Bluetooth security basics
- •1.2.1 User scenarios
- •1.2.2 Notions and terminology
- •References
- •2.1 Key types
- •2.2 Pairing and user interaction
- •2.3 Authentication
- •2.4 Link privacy
- •2.4.1 Protect the link
- •2.4.2 Encryption algorithm
- •2.4.3 Mode of operation
- •2.4.4 Unicast and broadcast
- •2.5 Communication security policies
- •2.5.1 Security modes
- •2.5.2 Security policy management
- •References
- •3 Bluetooth Pairing and Key Management
- •3.1 Pairing in Bluetooth
- •3.2 HCI protocol
- •3.3 LM protocol
- •3.4 Baseband events
- •3.4.1 Initialization key generation
- •3.4.2 Unit key generation
- •3.4.3 Combination key generation
- •3.4.4 Authentication
- •3.4.5 Master key generation
- •3.5 User interaction
- •3.6 Cipher key generation
- •3.7 Key databases
- •3.7.1 Unit keys generation requirements
- •3.7.2 Combination key generation requirements
- •3.7.3 Key databases
- •3.7.4 Semipermanent keys for temporary use
- •References
- •4 Algorithms
- •4.1 Crypto algorithm selection
- •4.1.1 Block ciphers
- •4.1.2 Stream ciphers
- •4.2 SAFER+
- •4.3 Encryption engine
- •4.4 Ciphering algorithm E0
- •4.4.1 Initialization
- •4.5 Implementation aspects
- •References
- •5 Broadcast Encryption
- •5.1 Overview
- •5.2 Preparing for broadcast encryption
- •5.3 Switching to broadcast encryption
- •References
- •6 Security Policies and Access Control
- •6.1 Objectives
- •6.1.1 Trust relations
- •6.1.2 Security levels
- •6.1.3 Flexibility
- •6.1.4 Implementation considerations
- •6.2 Security manager architecture
- •6.2.1 Overview
- •6.2.2 Device trust level
- •6.2.3 Security level for services
- •6.2.4 Connection setup
- •6.2.5 Database contents and registration procedure
- •Reference
- •7 Attacks, Strengths, and Weaknesses
- •7.1 Eavesdropping
- •7.2 Impersonation
- •7.3 Pairing
- •7.4 Improper key storage
- •7.4.1 Disclosure of keys
- •7.4.2 Tampering with keys
- •7.4.3 Denial of service
- •7.5 Unit key
- •7.6 Location tracking
- •7.6.1 Bluetooth device address and location tracking
- •7.6.2 Five different types of location tracking attacks
- •7.7 Implementation flaws
- •References
- •8 Providing Anonymity
- •8.1 Overview of the anonymity mode
- •8.2 Address usage
- •8.3 Modes of operation
- •8.4 Inquiry and paging
- •8.4.1 Connectable mode
- •8.4.2 Private connectable mode
- •8.4.3 General connectable mode
- •8.5 Alias authentication
- •8.6 Pairing
- •8.7 Anonymity mode LMP commands
- •8.8 Pairing example
- •References
- •9 Key Management Extensions
- •9.1 Improved pairing
- •9.1.1 Requirements on an improved pairing protocol
- •9.1.2 Improved pairing protocol
- •9.1.3 Implementation aspects and complexity
- •9.2 Higher layer key exchange
- •9.2.2 Higher layer key exchange with EAP TLS
- •9.3 Autonomous trust delegation
- •9.3.1 Security group extension method
- •9.3.3 Group extension method versus public key method
- •References
- •10 Security for Bluetooth Applications
- •10.1 Headset
- •10.1.1 Headset security model
- •10.1.2 Pass-key and key management
- •10.1.3 Example
- •10.2 Network access
- •10.2.1 Common access keys
- •10.2.2 Security architecture
- •10.2.3 Network service subscription
- •10.2.4 Initial connection
- •10.2.5 Subsequent access to NAcPs
- •10.3 SIM access
- •10.3.1 The SIM access profile
- •10.3.2 Securing SIM access
- •References
- •Glossary
- •List of Acronyms and Abbreviations
- •About the Authors
- •Index
4
Algorithms
In this chapter, the internal workings of the Bluetooth cryptographic algorithms will be described. These algorithms can be divided into two groups. On one hand we have the four algorithms E1, E21, E22, and E3, which all use the same underlying 128-bit block cipher SAFER+. On the other hand, we have the Bluetooth encryption mechanism E0, which uses a stream cipher with a 132-bit initial state. Because of SAFER+’s and E0’s central position, we will focus in this chapter on describing these two algorithms. Some implementation aspects will be discussed at the end of the chapter. We start by returning to the basic description of cryptographic algorithms from Chapter 1.
4.1 Crypto algorithm selection
4.1.1Block ciphers
In Chapter 1, block ciphers and stream ciphers were introduced as reversible transformations to encrypt plaintext information into cipher text. In Chapter 3, we saw that the key management in the Bluetooth systems involves several key derivation and generation methods. By simply looking at the way the key derivation algorithms E1, E21, E22, and E3 are defined (as mappings from inputs to an output), one can see that these are very similar to block ciphers. It is rather easy to modify a block cipher for use in these four algorithms. This is typical and block ciphers are therefore often found in key derivation mechanisms for other systems. Since keys in the Bluetooth system are 128 bits long, it is natural to use a block cipher that can transform 128-bit data with a 128-bit key, since keys can then be directly used as data input as well. Besides this interface requirement,
65

66 |
Bluetooth Security |
one wants a block cipher with a high strength level and that is cryptographically well understood. There are a number of block ciphers available that would fit into these requirements. An additional requirement is that the use of the algorithm was free, that is, not limited by patent rights or license fees. The designers of the Bluetooth system chose SAFER+. The algorithm was at the time of selection for Bluetooth one of the contenders1 for the AES. It was taken out of the competition mainly because of the results in performance measurements using reference implementations and because the 256-bit key version had a weakness that reduced the effective key size somewhat. Yet SAFER+ was available with very thorough cryptanalysis using state-of-the-art block cipher analysis techniques. The latter, in combination with the experience of its predecessor SAFER [1], convinced the Bluetooth designers to put their trust in SAFER+. As of today, no weaknesses in SAFER+ have been reported that constitute a threat to its use in Bluetooth.
4.1.2Stream ciphers
Stream ciphers are ideal in communication systems, since they very easily handle plaintexts of various length. Block ciphers can be used as well but require padding schemes. Furthermore, traditionally, stream ciphers have been designed with (low) implementation complexity in mind. There are mainly two approaches toward designing a stream cipher: direct or indirect via a block cipher. This split is not very well defined, and it may well happen that one cannot tell which design type a specific construction belongs to.
In a block cipher–based design, the block cipher is complemented with memory registers to keep a state and with a feedback mechanism to create an altogether autonomous finite state machine. The overall key to the stream cipher system is often used as the key to the block cipher but could also determine the initial state of the registers. To be attractive, this kind of design requires the block cipher to be very implementation friendly in either software or hardware or both. An example of such a design is the Universal Mobile Telecommunications System (UMTS) encryption algorithm f8 [2], which uses the KASUMI block cipher. In a direct design, one constructs the autonomous finite state machine directly, potentially offering an easier way for keeping implementation complexity down. Compared to block ciphers, it is somewhat more difficult to meaningfully define the strength requirements of a stream cipher. For our purposes it is sufficient to state that even if the attackers have access to a very long key stream, they should not be able to recover the key that was used to generate that key stream. Let us now turn to the Bluetooth system.
1.It was submitted by Cylink, Corp., Sunnyvale, CA, and designed by J. L. Massey and G. H. Khachatrian.