2011-08-10 15:41:06

by dave higton

[permalink] [raw]
Subject: Bluetooth encryption algorithms

My friend Google has been of no help, and my searches
through the bluez source have not found what I was
looking for: information, and ideally source code,
for the Bluetooth encryption algorithms.

I'm trying to create a simple Bluetooth stack for
RISC OS. Rather than attempt to port an existing
open source stack, I'm trying to write from scratch
as far as possible. This may be a naive idea, but I
want to do it as much for the educational value to me
as for the end product.

I have been able to perform an inquiry, get the names
of discoverable devices, and perform the first step
of pairing. So far, so good - and, yes, that's the
easy stuff.

So if anyone can point me to sources of information
detailed and explicit enough to show me how Bluetooth
encryption and decryption are done, I would very much
appreciate it. I have the Bluetooth core specification,
but I'm not confident that I can implement correctly
from it alone. I'm also looking for test data, ideally
for each step through each algorithm.

If there is a book that covers the subject in enough
detail, I'd be happy to buy it.

Tia,

Dave




2011-08-21 21:13:51

by Ash K

[permalink] [raw]
Subject: Re: Bluetooth encryption algorithms

Spec has dedicated sections for sample data:

For Core, you have sample data in Volume 2, Part G
For LE, you have sample data in Volume 6, part C.

As I said before if you are using a 2.1 or below controller,
authentication and encryption would be done in controller. If it is
4.0 authentication is performed in host using SMP and encryption is
done in controller.

If you are implementing controller functionality, the sample data in
spec would be enough!


On Sat, Aug 20, 2011 at 2:43 AM, Dave Higton <[email protected]> wrote:
> In message <5B4B9A479BF6994B88EA975675EC5B790580AC7068@MES1OS2SXC003.mes1.tconet.net>
> ? ? ? ? ?"Cufi, Carles" <[email protected]> wrote:
>
>> Hi there,
>> > So if anyone can point me to sources of information detailed and
>> > explicit enough to show me how Bluetooth encryption and decryption are
>> > done, I would very much appreciate it. ?I have the Bluetooth core
>> > specification, but I'm not confident that I can implement correctly from
>> > it alone. ?I'm also looking for test data, ideally for each step through
>> > each algorithm.
>>
>> Just register with bluetooth.org and get the Core Spec v4.0. All the
>> information you need is there.
>>
>> https://www.bluetooth.org/Technical/Specifications/adopted.htm
>
> Like I said in the bit you quoted, I have the specification (I have
> Core Spec v4.0, although I didn't specifically say that). ?At least
> I have, since I first posted, found the test data - I was almost sure
> I'd seen them before, but I couldn't find them via the index. ?I saw
> them by accident when browsing for something else. ?(Encryption test
> data not in the Security section... who'd have thought it?)
>
> I'm still hoping for something more tutorial or explanatory, but if
> I can't find anything, at least the test data will give me more
> confidence to try implementing from the specification.
>
> Dave
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>



--
Ash

2011-08-19 21:13:36

by dave higton

[permalink] [raw]
Subject: RE: Bluetooth encryption algorithms

In message <5B4B9A479BF6994B88EA975675EC5B790580AC7068@MES1OS2SXC003.mes1.tconet.net>
"Cufi, Carles" <[email protected]> wrote:

> Hi there,
> > So if anyone can point me to sources of information detailed and
> > explicit enough to show me how Bluetooth encryption and decryption are
> > done, I would very much appreciate it. I have the Bluetooth core
> > specification, but I'm not confident that I can implement correctly from
> > it alone. I'm also looking for test data, ideally for each step through
> > each algorithm.
>
> Just register with bluetooth.org and get the Core Spec v4.0. All the
> information you need is there.
>
> https://www.bluetooth.org/Technical/Specifications/adopted.htm

Like I said in the bit you quoted, I have the specification (I have
Core Spec v4.0, although I didn't specifically say that). At least
I have, since I first posted, found the test data - I was almost sure
I'd seen them before, but I couldn't find them via the index. I saw
them by accident when browsing for something else. (Encryption test
data not in the Security section... who'd have thought it?)

I'm still hoping for something more tutorial or explanatory, but if
I can't find anything, at least the test data will give me more
confidence to try implementing from the specification.

Dave

2011-08-15 12:54:37

by Cufi, Carles

[permalink] [raw]
Subject: RE: Bluetooth encryption algorithms

Hi there,
> So if anyone can point me to sources of information detailed and
> explicit enough to show me how Bluetooth encryption and decryption are
> done, I would very much appreciate it. I have the Bluetooth core
> specification, but I'm not confident that I can implement correctly from
> it alone. I'm also looking for test data, ideally for each step through
> each algorithm.

Just register with bluetooth.org and get the Core Spec v4.0. All the information you need is there.

https://www.bluetooth.org/Technical/Specifications/adopted.htm

Carles