diff options
author | Nicolas Toromanoff | 2021-11-30 08:54:57 +0100 |
---|---|---|
committer | Herbert Xu | 2021-12-11 16:48:06 +1100 |
commit | 39e6e699c7fb92bdb2617b596ca4a4ea35c5d2a7 (patch) | |
tree | 27274a908e85578f6c5307cd94b0630aad7ae290 /lib/cmpdi2.c | |
parent | d703c7a994ee34b7fa89baf21631fca0aa9f17fc (diff) |
crypto: stm32/cryp - check early input data
Some auto tests failed because driver wasn't returning the expected
error with some input size/iv value/tag size.
Now:
Return 0 early for empty buffer. (We don't need to start the engine for
an empty input buffer).
Accept any valid authsize for gcm(aes).
Return -EINVAL if iv for ccm(aes) is invalid.
Return -EINVAL if buffer size is a not a multiple of algorithm block size.
Fixes: 9e054ec21ef8 ("crypto: stm32 - Support for STM32 CRYP crypto module")
Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/cmpdi2.c')
0 files changed, 0 insertions, 0 deletions