]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: let the crypto subsystem generate the ecc privkey
authorTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 28 Sep 2017 14:14:55 +0000 (17:14 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 6 Oct 2017 18:35:47 +0000 (20:35 +0200)
commit75c6613847ea3beebaf29932f3f8e5444f706422
treec67d9808af8d276eaa5f92a021ae17d129cd5124
parenta32da6c4b86afea7d49de0e2d3105256d7d929e0
Bluetooth: let the crypto subsystem generate the ecc privkey

That Bluetooth SMP knows about the private key is pointless, since the
detection of debug key usage is actually via the public key portion.
With this patch, the Bluetooth SMP will stop keeping a copy of the
ecdh private key and will let the crypto subsystem to generate and
handle the ecdh private key, potentially benefiting of hardware
ecc private key generation and retention.

The loop that tries to generate a correct private key is now removed and
we trust the crypto subsystem to generate a correct private key. This
backup logic should be done in crypto, if really needed.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/ecdh_helper.c
net/bluetooth/ecdh_helper.h
net/bluetooth/selftest.c
net/bluetooth/smp.c