crypto: ecdh - fix concurrency on shared secret and pubkey
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Thu, 20 Jul 2017 07:37:39 +0000 (10:37 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 Aug 2017 05:47:22 +0000 (13:47 +0800)
commit952035baedb15d956d5f25b34287d728c751cac9
tree4b45b62c2ff36007e7b7e208893fa0fcb16fa88e
parent0876d16124d41b78f7fdbd96ad42b1d7b13fe620
crypto: ecdh - fix concurrency on shared secret and pubkey

ecdh_ctx contained static allocated data for the shared secret
and public key.

The shared secret and the public key were doomed to concurrency
issues because they could be shared by multiple crypto requests.

The concurrency is fixed by replacing per-tfm shared secret and
public key with per-request dynamically allocated shared secret
and public key.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ecdh.c