From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/8] Bluetooth: Add new structures for handling SMP Long Term Keys
Date: Mon, 30 Jan 2012 20:13:22 -0300 [thread overview]
Message-ID: <20120130231322.GA17656@samus> (raw)
In-Reply-To: <1327963360.1955.192.camel@aeonflux>
Hi Marcel,
On 14:42 Mon 30 Jan, Marcel Holtmann wrote:
> Hi Vinicius,
>
> > This includes a new list for storing the keys and a new structure used
> > to represent each key.
> >
> > Some notes: authenticated is used to identify that the key may be used
> > to setup a HIGH security link. As the same list is used to store both
> > the STK's and the LTK's the type field is used so we can separate
> > between those two types of keys and if the key should be used when
> > in the master or slave role.
> >
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
> > ---
> > include/net/bluetooth/hci.h | 5 +++++
> > include/net/bluetooth/hci_core.h | 15 +++++++++++++++
> > net/bluetooth/hci_core.c | 31 +++++++++++++++++++++++++++++++
> > 3 files changed, 51 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> > index cb9097a..83f045a 100644
> > --- a/include/net/bluetooth/hci.h
> > +++ b/include/net/bluetooth/hci.h
> > @@ -274,6 +274,11 @@ enum {
> > #define HCI_LK_SMP_LTK 0x81
> > #define HCI_LK_SMP_IRK 0x82
> > #define HCI_LK_SMP_CSRK 0x83
> > +/* The spec doesn't define types for SMP keys, the _MASTER suffix is implied */
> > +#define HCI_SMP_STK 0x80
> > +#define HCI_SMP_STK_SLAVE 0x81
> > +#define HCI_SMP_LTK 0x82
> > +#define HCI_SMP_LTK_SLAVE 0x83
> >
> > /* ---- HCI Error Codes ---- */
> > #define HCI_ERROR_AUTH_FAILURE 0x05
> > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> > index 896d9e4..06eab3f 100644
> > --- a/include/net/bluetooth/hci_core.h
> > +++ b/include/net/bluetooth/hci_core.h
> > @@ -88,6 +88,18 @@ struct bt_uuid {
> > u8 svc_hint;
> > };
> >
> > +struct smp_ltk {
> > + struct list_head list;
> > + bdaddr_t bdaddr;
> > + u8 bdaddr_type;
> > + u8 authenticated;
> > + u8 type;
> > + u8 enc_size;
> > + __le16 ediv;
> > + u8 rand[8];
> > + u8 val[16];
> > +} __packed;
> > +
> > struct key_master_id {
> > __le16 ediv;
> > u8 rand[8];
> > @@ -239,6 +251,8 @@ struct hci_dev {
> >
> > struct list_head link_keys;
> >
> > + struct list_head ltks;
> > +
>
> I am fine with this as well, but just to discuss this, don't you think
> calling this long_term_keys would be better? It makes it easier to read
> and makes it similar to link_keys.
Yeah, it looks more consistent with the longer name. Will change it.
>
> Acked-by: Marcel Holtmann <marcel@holtmann.org>
>
> Regards
>
> Marcel
>
>
Cheers,
--
Vinicius
next prev parent reply other threads:[~2012-01-30 23:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 22:29 [PATCH 0/8] [Resend] New MGMT messages for SMP Long Term Keys Vinicius Costa Gomes
2012-01-30 22:29 ` [PATCH 1/8] Bluetooth: Add structures for the new LTK exchange messages Vinicius Costa Gomes
2012-01-30 22:38 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 2/8] Bluetooth: Rename smp_key_size to enc_key_size Vinicius Costa Gomes
2012-01-30 22:39 ` Marcel Holtmann
2012-01-31 2:04 ` Johan Hedberg
2012-01-30 22:29 ` [PATCH 3/8] Bluetooth: Add new structures for handling SMP Long Term Keys Vinicius Costa Gomes
2012-01-30 22:42 ` Marcel Holtmann
2012-01-30 23:13 ` Vinicius Costa Gomes [this message]
2012-01-30 22:29 ` [PATCH 4/8] Bluetooth: Use the updated key structures for handling LTKs Vinicius Costa Gomes
2012-01-30 22:44 ` Marcel Holtmann
2012-01-30 23:24 ` Vinicius Costa Gomes
2012-01-31 0:48 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 5/8] Bluetooth: Add MGMT handlers for dealing with SMP LTK's Vinicius Costa Gomes
2012-01-30 22:46 ` Marcel Holtmann
2012-01-30 23:27 ` Vinicius Costa Gomes
2012-01-31 0:49 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 6/8] Bluetooth: Add support for removing LTK's when pairing is removed Vinicius Costa Gomes
2012-01-30 22:49 ` Marcel Holtmann
2012-01-30 23:33 ` Vinicius Costa Gomes
2012-01-31 0:50 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 7/8] Bluetooth: Clean up structures left unused Vinicius Costa Gomes
2012-01-30 22:49 ` Marcel Holtmann
2012-01-30 22:29 ` [PATCH 8/8] Bluetooth: Add support for notifying userspace of new LTK's Vinicius Costa Gomes
2012-01-30 22:50 ` Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2012-01-13 19:39 [PATCH 0/8] New MGMT messages for SMP Long Term Keys Vinicius Costa Gomes
2012-01-13 19:39 ` [PATCH 3/8] Bluetooth: Add new structures for handling " Vinicius Costa Gomes
2012-01-13 20:43 ` Brian Gix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120130231322.GA17656@samus \
--to=vinicius.gomes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.