]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: kpp - assume key is already set in maxsize
authorTudor-Dan Ambarus <tudor.ambarus@microchip.com>
Thu, 25 May 2017 07:18:08 +0000 (10:18 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 10 Jun 2017 04:04:27 +0000 (12:04 +0800)
commit44f380098440f917c77620fdb6b3df90a7b5fb4e
tree1a2200c719c7955ee2c77f8005f44eed791dafd3
parent67839363510d80d3502077631b5315f6502da13d
crypto: kpp - assume key is already set in maxsize

As of now, crypto_kpp_maxsize() can not be reached without successfully
setting the key for the transformation. kpp algorithm implementations
check if the key was set and then return the output buffer size
required for the given key.

Change the return type to unsigned int and always assume that this
function is called after a successful setkey of the transformation.
kpp algorithm implementations will remove the check if key is not NULL
and directly return the max size.

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