The support for NVME in-band authentication currently in the works ([1])Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
needs to generate ephemeral DH keys. Make dh-generic's ->set_secret()
to generate an ephemeral key via the recently added crypto_dh_gen_privkey()
in case the input ->key_size is zero. Note that this behaviour is in
analogy to ecdh's ->set_secret().
[1] https://lkml.kernel.org/r/20211122074727.25988-4-hare@xxxxxxx
Signed-off-by: Nicolai Stange <nstange@xxxxxxx>
---
crypto/dh.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)