Bluetooth: Add LE Data signing smp_sign_pkt()
Subsystems (2)
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
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.
Signed-off-by Brian Gix <[email protected]>
--- 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
@@ -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