From: Brian Gix <bgix@codeaurora.org>
To: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org, Johan Hedberg <johan.hedberg@gmail.com>
Subject: Re: [PATCH 2/8] Bluetooth: Add a custom type for Short Term Keys
Date: Fri, 11 Nov 2011 09:02:38 -0800 [thread overview]
Message-ID: <4EBD552E.4020801@codeaurora.org> (raw)
In-Reply-To: <4EBD5378.7080303@codeaurora.org>
Hi Johan, Vinicius,
On 11/11/2011 8:55 AM, Brian Gix wrote:
> On 11/10/2011 5:03 PM, Vinicius Costa Gomes wrote:
>> These keys are just used to encrypt the link, during SMP phase 2, they
>> should
>> not be stored nor reused. We use the same list as the LTKs to
>> temporarily store
>> them, but as soon as they are used they are removed from the list.
>>
>> Signed-off-by: Vinicius Costa Gomes<vinicius.gomes@openbossa.org>
>> ---
>> include/net/bluetooth/hci.h | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
>> index 139ce2a..069768c 100644
>> --- a/include/net/bluetooth/hci.h
>> +++ b/include/net/bluetooth/hci.h
>> @@ -260,6 +260,7 @@ enum {
>> #define HCI_LK_AUTH_COMBINATION 0x05
>> #define HCI_LK_CHANGED_COMBINATION 0x06
>> /* The spec doesn't define types for SMP keys */
>> +#define HCI_LK_SMP_STK 0x80
>> #define HCI_LK_SMP_LTK 0x81
>> #define HCI_LK_SMP_IRK 0x82
>> #define HCI_LK_SMP_CSRK 0x83
>
>
> At some point, we will also need to expand this list to include key
> types for both Initiator and Responder (or rather, keys Locally
> generated, and keys Remotely generated). Although there are 3 base types
> of LE keys (4 if you count the STK), there are in fact 6 different keys
> for different situations (7 if you count STK).
>
> LTKs might be considered an exception, since most devices will only ever
> be a Master or a Slave, and IRKs will often only need to be saved for
> remote privacy supporting peripherals, if the local side does not use
> privacy.
>
> However, for the CSRKs, I suspect that we will need to strongly
> differentiate between Locally and Remotely generated signing keys. If we
> have a server with a "Signed Write Cmd" Characteristic and the remote
> device has one too, we will need to sign the outbound Write Cmds with
> the key the remote side distributed to us, and they will use the key
> that we sent them, so we need to keep them separate.
>
> And once you start down that path, you should at least consider the
> possibility of needing to distinguish between remote and local LTKs and
> IRKs as well. STKs at least do not have that problem: them are jointly
> derived.
>
> Should we add _LCL_ and _REM_ to the naming conventions, and expand the
> enumeration out to 0x86?
>
I am including Johan in for this:
We also may want to expand or add an interface to MGMT to specify which
keys we can Generate and Accept during LE pairing. Obviously at this
point, I think this would be set to Generating No keys (if we are
Master, and Central) and accepting only the LTK (reverse that if we are
LE slaves).
Looking towards the future, the keys distributed will depend very much
on what the User space (bluez) entities are able to support.
--
Brian Gix
bgix@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2011-11-11 17:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 1:03 [PATCH 0/8] New LTK messages Vinicius Costa Gomes
2011-11-11 1:03 ` [PATCH 1/8] Bluetooth: Add structures for the new LTK exchange messages Vinicius Costa Gomes
2011-11-12 23:33 ` Marcel Holtmann
2011-11-11 1:03 ` [PATCH 2/8] Bluetooth: Add a custom type for Short Term Keys Vinicius Costa Gomes
2011-11-11 16:55 ` Brian Gix
2011-11-11 17:02 ` Brian Gix [this message]
2011-11-11 1:03 ` [PATCH 3/8] Bluetooth: Rename smp_key_size to enc_size Vinicius Costa Gomes
2011-11-12 23:35 ` Marcel Holtmann
2011-11-11 1:03 ` [PATCH 4/8] Bluetooth: Change SMP procedures to use the new key structures Vinicius Costa Gomes
2011-11-11 1:03 ` [PATCH 5/8] Bluetooth: Add new mgmt handlers for Long Term Keys Vinicius Costa Gomes
2011-11-11 1:03 ` [PATCH 6/8] Bluetooth: Add support for reusing the same hci_conn for LE links Vinicius Costa Gomes
2011-11-11 1:03 ` [PATCH 7/8] Bluetooth: Disconnect the link if encryption fails Vinicius Costa Gomes
2011-11-11 1:03 ` [PATCH 8/8] Bluetooth: Only increase the connection sec-level if encryption is successful Vinicius Costa Gomes
-- strict thread matches above, loose matches on Subject: below --
2011-12-07 0:48 [PATCH 0/8] Bluetooth: SMP Key Exchange Vinicius Costa Gomes
2011-12-07 0:48 ` [PATCH 2/8] Bluetooth: Add a custom type for Short Term Keys Vinicius Costa Gomes
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=4EBD552E.4020801@codeaurora.org \
--to=bgix@codeaurora.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=vinicius.gomes@openbossa.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).