ble_sec.rst 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. NimBLE Security
  2. ---------------
  3. The Bluetooth Low Energy security model includes five distinct security
  4. concepts as listed below. For detailed specifications, see BLUETOOTH
  5. SPECIFICATION Version 4.2 [Vol 1, Part A].
  6. - **Pairing**: The process for creating one or more shared secret keys.
  7. In LE a single link key is generated by combining contributions from
  8. each device into a link key used during pairing.
  9. - **Bonding**: The act of storing the keys created during pairing for
  10. use in subsequent connections in order to form a trusted device pair.
  11. - **Device authentication**: Verification that the two devices have the
  12. same keys (verify device identity)
  13. - **Encryption**: Keeps message confidential. Encryption in Bluetooth
  14. LE uses AES-CCM cryptography and is performed in the *Controller*.
  15. - **Message integrity**: Protects against message forgeries.
  16. Bluetooth LE uses four association models depending on the I/O
  17. capabilities of the devices.
  18. - **Just Works**: designed for scenarios where at least one of the
  19. devices does not have a display capable of displaying a six digit
  20. number nor does it have a keyboard capable of entering six decimal
  21. digits.
  22. - **Numeric Comparison**: designed for scenarios where both devices are
  23. capable of displaying a six digit number and both are capable of
  24. having the user enter "yes" or "no". A good example of this model is
  25. the cell phone / PC scenario.
  26. - **Out of Band**: designed for scenarios where an Out of Band
  27. mechanism is used to both discover the devices as well as to exchange
  28. or transfer cryptographic numbers used in the pairing process.
  29. - **Passkey Entry**: designed for the scenario where one device has
  30. input capability but does not have the capability to display six
  31. digits and the other device has output capabilities. A good example
  32. of this model is the PC and keyboard scenario.
  33. Key Generation
  34. ~~~~~~~~~~~~~~
  35. Key generation for all purposes in Bluetooth LE is performed by the
  36. *Host* on each LE device independent of any other LE device.
  37. Privacy Feature
  38. ~~~~~~~~~~~~~~~
  39. Bluetooth LE supports an optional feature during connection mode and
  40. connection procedures that reduces the ability to track a LE device over
  41. a period of time by changing the Bluetooth device address on a frequent
  42. basis.
  43. There are two variants of the privacy feature.
  44. - In the first variant, private addresses are resolved and generated by
  45. the *Host*.
  46. - In the second variant, private addresses are resolved and generated
  47. by the *Controller* without involving the Host after the Host
  48. provides the Controller device identity information. The Host may
  49. provide the Controller with a complete resolving list or a subset of
  50. the resolving list. Device filtering becomes possible in the second
  51. variant when address resolution is performed in the Controller
  52. because the peer’s device identity address can be resolved prior to
  53. checking whether it is in the white list.
  54. **Note**: When address resolution is performed exclusively in the Host,
  55. a device may experience increased power consumption because device
  56. filtering must be disabled. For more details on the privacy feature,
  57. refer to BLUETOOTH SPECIFICATION Version 4.2 [Vol 3, Part C] (Published
  58. 02 December 2014), Page 592.