Skip to contentSkip to conversation

Bluetooth: Add LE Data signing smp_sign_pkt()

PATCH New Brian Gix 1 participant 2 messages Dec 21, 2011

Subsystems (2)
lore
Share & tools
lore

Brian Gix

author
#0 lore raw

v2 cover Bluetooth: Add LE Data signing smp_sign_pkt()

Identical to version 1, except rebased onto latest Master branch.

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

PATCH v2 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