Skip to content

Bluetooth: LE Secure Connections support

Johan Hedberg linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest49 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/49Bluetooth: Add basic SMP defines for LE Secure Connectionsnet/bluetooth/smp.h+24 -10 replies
2/49Bluetooth: Make auth_req mask dependent on SC enabled or notnet/bluetooth/smp.c+10 -70 replies
3/49Bluetooth: Add SMP flag for SC and set it when necessary.net/bluetooth/smp.c+7 -00 replies
4/49Bluetooth: Update SMP security level to/from auth_req for SCnet/bluetooth/smp.c+14 -40 replies
5/49Bluetooth: Add mgmt support for LE Secure Connections LTK typesinclude/net/bluetooth/mgmt.h net/bluetooth/mgmt.c net/bluetooth/smp.h+42 -70 replies
6/49Bluetooth: Set the correct security level for SC LTKsnet/bluetooth/smp.h+6 -20 replies
7/49Bluetooth: Use custom macro for testing BR/EDR SC enabledinclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c net/bluetooth/hci_event.c +1 more+7 -70 replies
8/49Bluetooth: Add mgmt_set_secure_conn support for any LE adapternet/bluetooth/mgmt.c+8 -90 replies
9/49Bluetooth: Update LTK lookup to correctly deal with SC LTKsnet/bluetooth/hci_core.c net/bluetooth/hci_event.c+36 -90 replies
10/49Bluetooth: Remove unused hci_find_ltk functioninclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c+0 -300 replies
11/49Bluetooth: Rename hci_find_ltk_by_addr to hci_find_ltkinclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c net/bluetooth/hci_event.c +1 more+8 -110 replies
12/49Bluetooth: Set link key generation bit if necessary for LE SCnet/bluetooth/smp.c+10 -00 replies
13/49Bluetooth: Add basic support for AES-CMACnet/bluetooth/Kconfig net/bluetooth/smp.c+11 -00 replies
14/49Bluetooth: Add ECC library for LE Secure Connectionsnet/bluetooth/Makefile net/bluetooth/ecc.c net/bluetooth/ecc.h+871 -10 replies
15/49Bluetooth: Add basic support for sending our LE SC public keynet/bluetooth/smp.c+44 -10 replies
16/49Bluetooth: Add handler function for receiving LE SC public keynet/bluetooth/smp.c+44 -00 replies
17/49Bluetooth: Add support for sending LE SC Confirm valuenet/bluetooth/smp.c+96 -00 replies
18/49Bluetooth: Add LE SC support for responding to Pairing Confirm PDUnet/bluetooth/smp.c+22 -00 replies
19/49Bluetooth: Add support for LE SC numeric comparisonnet/bluetooth/smp.c+70 -10 replies
20/49Bluetooth: Add support for handling LE SC user responsenet/bluetooth/smp.c+154 -00 replies
21/49Bluetooth: Add support for LE SC DHKey check PDUnet/bluetooth/smp.c+56 -00 replies
22/49Bluetooth: Add support for LE SC key generationnet/bluetooth/smp.c+57 -00 replies
23/49Bluetooth: Track authentication method in SMP contextnet/bluetooth/smp.c+17 -150 replies
24/49Bluetooth: Add selection of the SC authentication methodnet/bluetooth/smp.c+69 -50 replies
25/49Bluetooth: Detect SMP SC debug keysnet/bluetooth/smp.c+27 -00 replies
26/49Bluetooth: Add check for accidentally generating a debug keynet/bluetooth/smp.c+11 -30 replies
27/49Bluetooth: Set correct LTK type and authentication for SCnet/bluetooth/smp.c+12 -10 replies
28/49Bluetooth: Add support for SC just-works pairingnet/bluetooth/smp.c+27 -120 replies
29/49Bluetooth: Fix BR/EDR Link Key type when derived through LE SCnet/bluetooth/hci_core.c net/bluetooth/smp.c+28 -30 replies
30/49Bluetooth: Add passkey entry support for LE SCnet/bluetooth/smp.c+180 -110 replies
31/49Bluetooth: Fix DHKey Check sending order for slave rolenet/bluetooth/smp.c+43 -170 replies
32/49Bluetooth: Add dummy handler for LE SC keypress notificationnet/bluetooth/smp.c+14 -00 replies
33/49Bluetooth: Use debug keys for SMP when HCI_USE_DEBUG_KEYS is setnet/bluetooth/smp.c+18 -90 replies
34/49Bluetooth: Add hci_conn flag for new link key generationinclude/net/bluetooth/hci_core.h net/bluetooth/hci_event.c+4 -00 replies
35/49Bluetooth: Add debugfs switch for forcing SMP over BR/EDRinclude/net/bluetooth/hci.h net/bluetooth/hci_core.c+48 -00 replies
36/49Bluetooth: Add skeleton for BR/EDR SMP channelinclude/net/bluetooth/hci_core.h include/net/bluetooth/l2cap.h net/bluetooth/smp.c+74 -180 replies
37/49Bluetooth: Add full SMP BR/EDR supportnet/bluetooth/l2cap_core.c net/bluetooth/smp.c+212 -220 replies
38/49Bluetooth: Add SC-only mode support for SMPnet/bluetooth/smp.c+9 -00 replies
39/49Bluetooth: Unify remote OOB data functionsinclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c net/bluetooth/mgmt.c+22 -390 replies
40/49Bluetooth: Store address type with OOB datainclude/net/bluetooth/hci_core.h net/bluetooth/hci_core.c net/bluetooth/hci_event.c +1 more+29 -200 replies
41/49Bluetooth: Add support for adding remote OOB data for LEnet/bluetooth/mgmt.c+11 -30 replies
42/49Bluetooth: Set SMP OOB flag if OOB data is availablenet/bluetooth/smp.c+25 -60 replies
43/49Bluetooth: Add basic LE SC OOB support for remote OOB datanet/bluetooth/smp.c+36 -20 replies
44/49Bluetooth: Introduce SMP_DBG macro for low-level debugingnet/bluetooth/smp.c+40 -280 replies
45/49Bluetooth: Fix missing const declarations in SMP functionsnet/bluetooth/smp.c net/bluetooth/smp.h+13 -100 replies
46/49Bluetooth: Organize SMP crypto functions to logical sectionsnet/bluetooth/smp.c+71 -630 replies
47/49Bluetooth: Fix SMP debug key handlingnet/bluetooth/hci_core.c net/bluetooth/smp.c+14 -110 replies
48/49Bluetooth: Fix minor coding style issue in smp.cnet/bluetooth/smp.c+1 -10 replies
49/49Bluetooth: Fix false-positive "uninitialized" compiler warningnet/bluetooth/smp.c+12 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/49] Bluetooth: LE Secure Connections support

Hi,

First of all, appologies to all for this huge patch set. It's work from the past 6 months or so that wasn't releasable until the 4.2 specification goes public. That happened just some moments ago:

http://www.bluetooth.com/SiteCollectionDocuments/4-2/bluetooth4-2.aspx

I'm sending the patches to the mailing list mainly for reference since Marcel will probably directly merge them from my tree. Any issues/fixes etc should be done on top of them.

Johan

----------------------------------------------------------------
Johan Hedberg (49):
Bluetooth: Add basic SMP defines for LE Secure Connections
Bluetooth: Make auth_req mask dependent on SC enabled or not
Bluetooth: Add SMP flag for SC and set it when necessary.
Bluetooth: Update SMP security level to/from auth_req for SC
Bluetooth: Add mgmt support for LE Secure Connections LTK types
Bluetooth: Set the correct security level for SC LTKs
Bluetooth: Use custom macro for testing BR/EDR SC enabled
Bluetooth: Add mgmt_set_secure_conn support for any LE adapter
Bluetooth: Update LTK lookup to correctly deal with SC LTKs
Bluetooth: Remove unused hci_find_ltk function
Bluetooth: Rename hci_find_ltk_by_addr to hci_find_ltk
Bluetooth: Set link key generation bit if necessary for LE SC
Bluetooth: Add basic support for AES-CMAC
Bluetooth: Add ECC library for LE Secure Connections
Bluetooth: Add basic support for sending our LE SC public key
Bluetooth: Add handler function for receiving LE SC public key
Bluetooth: Add support for sending LE SC Confirm value
Bluetooth: Add LE SC support for responding to Pairing Confirm PDU
Bluetooth: Add support for LE SC numeric comparison
Bluetooth: Add support for handling LE SC user response
Bluetooth: Add support for LE SC DHKey check PDU
Bluetooth: Add support for LE SC key generation
Bluetooth: Track authentication method in SMP context
Bluetooth: Add selection of the SC authentication method
Bluetooth: Detect SMP SC debug keys
Bluetooth: Add check for accidentally generating a debug key
Bluetooth: Set correct LTK type and authentication for SC
Bluetooth: Add support for SC just-works pairing
Bluetooth: Fix BR/EDR Link Key type when derived through LE SC
Bluetooth: Add passkey entry support for LE SC
Bluetooth: Fix DHKey Check sending order for slave role
Bluetooth: Add dummy handler for LE SC keypress notification
Bluetooth: Use debug keys for SMP when HCI_USE_DEBUG_KEYS is set
Bluetooth: Add hci_conn flag for new link key generation
Bluetooth: Add debugfs switch for forcing SMP over BR/EDR
Bluetooth: Add skeleton for BR/EDR SMP channel
Bluetooth: Add full SMP BR/EDR support
Bluetooth: Add SC-only mode support for SMP
Bluetooth: Unify remote OOB data functions
Bluetooth: Store address type with OOB data
Bluetooth: Add support for adding remote OOB data for LE
Bluetooth: Set SMP OOB flag if OOB data is available
Bluetooth: Add basic LE SC OOB support for remote OOB data
Bluetooth: Introduce SMP_DBG macro for low-level debuging
Bluetooth: Fix missing const declarations in SMP functions
Bluetooth: Organize SMP crypto functions to logical sections
Bluetooth: Fix SMP debug key handling
Bluetooth: Fix minor coding style issue in smp.c
Bluetooth: Fix false-positive "uninitialized" compiler warning

 include/net/bluetooth/hci.h      |    1 +
 include/net/bluetooth/hci_core.h |   23 +-
 include/net/bluetooth/l2cap.h    |    2 +
 include/net/bluetooth/mgmt.h     |    3 +
 net/bluetooth/Kconfig            |    1 +
 net/bluetooth/Makefile           |    2 +-
 net/bluetooth/ecc.c              |  816 ++++++++++++++++++++
 net/bluetooth/ecc.h              |   54 ++
 net/bluetooth/hci_core.c         |  155 ++--
 net/bluetooth/hci_event.c        |   23 +-
 net/bluetooth/l2cap_core.c       |    4 +
 net/bluetooth/mgmt.c             |   75 +-
 net/bluetooth/smp.c              | 1543 +++++++++++++++++++++++++++++++++----
 net/bluetooth/smp.h              |   51 +-
 14 files changed, 2509 insertions(+), 244 deletions(-)