[lkml]   [2019]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject(Small) bias in generation of random passkeys for pairing

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?
(cesky, pictures)
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2019-06-19 18:26    [W:0.031 / U:19.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site