* [PATCH] Bluetooth: zero kpp input for key generation
@ 2017-04-30 10:48 Marcel Holtmann
0 siblings, 0 replies; only message in thread
From: Marcel Holtmann @ 2017-04-30 10:48 UTC (permalink / raw)
To: linux-bluetooth
When generating new ECDH keys with kpp, the shared secret input needs to
be set to NULL. Fix this by including kpp_request_set_input call.
Fixes: 58771c1c ("Bluetooth: convert smp and selftest to crypto kpp
API")
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/ecdh_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/ecdh_helper.c b/net/bluetooth/ecdh_helper.c
index 579684bfc322..2a65ca3fa8fa 100644
--- a/net/bluetooth/ecdh_helper.c
+++ b/net/bluetooth/ecdh_helper.c
@@ -191,6 +191,7 @@ bool generate_ecdh_keys(u8 public_key[64], u8 private_key[32])
goto free_all;
sg_init_one(&dst, tmp, 64);
+ kpp_request_set_input(req, NULL, 0);
kpp_request_set_output(req, &dst, 64);
kpp_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
ecdh_complete, &result);
--
2.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-30 10:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-30 10:48 [PATCH] Bluetooth: zero kpp input for key generation Marcel Holtmann
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).