public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* (Small) bias in generation of random passkeys for pairing
@ 2019-06-19 16:24 Pavel Machek
  2019-06-20 12:00 ` Stefan Seyfried
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2019-06-19 16:24 UTC (permalink / raw)
  To: kernel list, security, linux-bluetooth, johan.hedberg, marcel

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

Hi!

There's a (small) bias in passkey generation in bluetooth:

                get_random_bytes(&passkey, sizeof(passkey));
 		passkey %= 1000000;
		put_unaligned_le32(passkey, smp->tk);

(there are at least two places doing this).

All passkeys are not of same probability, passkey "000000" is more
probable than "999999", but difference is small.

Do we care?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-20 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-19 16:24 (Small) bias in generation of random passkeys for pairing Pavel Machek
2019-06-20 12:00 ` Stefan Seyfried

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox