Skip to contentSkip to conversation

Bluetooth: Add LE Data signing smp_sign_pkt()

RFC Superseded Brian Gix 1 participant 2 messages Dec 16, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Brian Gix

author
#0 lore raw

cover Bluetooth: Add LE Data signing smp_sign_pkt()

This is in response to Sumit's inquiry yesterday.

This patch impliments data signing as perscribed in:
1. BT Core Spec v4.0 Vol 3 Part H Sec 2.4.5
2. RFC-4493
3. BT Erratum 4243

It has been verified against the sample data described in Erratum 4243.

Nobody calls this code at this point, and SMP does not yet exchange CSRK's, but I am working on it. There has been much debate on Data signing in the Core Systems Working Group and at UPFs, but it is finally coming to a resolution, and the code here is what I believe to be correct.

Signature · 4 lines
Brian Gix
[email protected]
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum 
author
#1 lore raw

RFC 1/1 Bluetooth: Add LE Data signing smp_sign_pkt()

The LE packet signing algorythm is based on RFC-4493, and is used by the GATT procedure Write Signed Command. This implementation is self contained, takes as inputs a Packet to be signed, a Serial number, and CSRK, all in Network order. It's output is a fully signed datagram for Transmission or Verification.

---
 include/net/bluetooth/smp.h |    3 +-
 net/bluetooth/smp.c         |  103 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+), 1 deletions(-)
include/net/bluetooth/smp.h +2 -1
index 15b97d5..987a864 100644
@@ -134,7 +134,8 @@ struct smp_chan {
 int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level);
 int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb);
 int smp_distribute_keys(struct l2cap_conn *conn, __u8 force);
-
+int smp_sign_pkt(u8 *src, int slen, u8 *dst, int *dlen, __le32 serial,
+								u8 *csrk);
 void smp_chan_destroy(struct l2cap_conn *conn);
 
 #endif /* __SMP_H */
net/bluetooth/smp.c +103 -0

115 lines not on this page · raw message

Signature · 7 lines
1.7.8

-- 
Brian Gix
[email protected]
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum