Friday, March 31, 2017

Bluetooth Security

                                    Bluetooth Security


* Authentication
** Authorization
*** Symmetric key security
: generally A trus B if B can prove that it has the same shared key that A does

Multiple Security Modes:

Mode 1: No security other than against " casual evesdroppers"
---> all the BT devices employ "data-hopping", which entails skipping around the radio band up to 1600 times per second( 79 differnet frequencies)

Mode 2: Services Level Security" established after creating the channel, above datalink layer.
---> It depend on device: 
     i) Trusted deivce have unrestricted access to all services, fixed releationship to other devices
     ii) Untrusted devices generally have no permanent relationship and services that it has access to are limited.
It have one of the 3 security levels:
Level 3: Requires Authentication and Authorization. PIN number musht be entered.
Level 2: Authentication only, fixed PIN ok.
Level 1: Open to all devices, the default level. security for legacy applications.

Mode 3: Datalink level Security: Security initiated befor establishing channel, by the Link Manager, as well as by the service level.
--> Security is implemented by symmertic key in a challege-response system.
security implementations in bluetooth units are all the same.
Critical ingredents: PIN,BD_ADDR, RAND(), Link and Encryption Keys

Device Security Levels:

Trust level of the device determines which services that devices hasa access to.

a) Trusted Device: The device has been previously authenticated, a link key is stored and the device is marked as "truested" in the Device database.

b) Untrusted Device: The device has been previously authenticated, a link key is stored but the device is not marked as "trust" in the Device database.

c) Unknown Device: No security information is available for this device, e.g Untrusted.

--------------------------------Security Entities-----------------------

1. PIN: up to 128 bit number, can be fixed(entered in only one device), or can be entered in both devices.
If fixed, much lower security.

2. BD_ADDR: BT devices address, unique 48 bit sequence, Devices must know the address of devices it want to communicate with.
Addresses are publicly avalilable via BT inquires.

3. Private Authentication Keys, or LInk keys: 128 bit random numbers used for authentication purposes. Paired devices share a link key.

4. Private Encryption key: varying length key(8-128 bit), regenerated for each transmission from link key.

5. RAND: frequently changing 128 bit random number generated by the devices. common input fro key generation.
** All BT devices have this random number generator.

---------------------------------------------------Initialization ----------------------------

Needed before two secure devices can communicate five parts:

a) Generation of initialization key pairing--> Initialization key generation only occurs when two devices have not yet communicated before.
Highest security demands PIN be entered by both users.( MOde 3) this key used to secure the process of generating a shared link key between the devices.

Device A and B now share the initalization key, which they use as theri temporary link key while deciding on what kind of link key they willuse for data transmission.
b) Authentication : Does not always need to be mutual, specified by app, If it is mutual then both act as verifiers one after the other,
 Deices A: verifier
 Devices B: Claiment
Basically determines if both have same shared key.

B send its response to A, who checks to see that they match. IF failure, start exponential waiting with a limit set on number of possible attempts.

On success, the BD_ADDR of other devices is sotred in the devices database by the service manager.
c) Generation of link key--> Link key does not change it was made when device was installed.
   Application decieds wheich device will provide its unit key as link key.
   Shared initialization key is used to protect the transaction: it is XORed iwth the new link key.
d) Link key exchange--> After the link key is stored on the other device, the initialization key is discarded.
   Higher securtiy: combinition key is used rather than the link key and this is formed by ( link key, RAND , BD_ADDR) on both A and B.
   Master-slave communications use Master link key. A slave gets a master link key when first connected to master and then changes it when prompted by master.
e) Generation of encryption key in both devices.
   -->Encryption requires an authenticated link with an established link key.
   -->devices musht agree on an encryption key to communicate.
   --> Packete payloads are encrypted ( not the packet headers or access codes)
  ---> Devices negotiatae on what size encryption key they need, typically around 64 bits. Range is 1-16 bytes

No comments:

Post a Comment

Qualcomm Short Term

  113 is the SL. 1st Target by mid July.

Total Pageviews