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: 9e054ec2 ("crypto: stm32 - Support for STM32 CRYP crypto module") Signed-off-by: NNicolas Toromanoff <nicolas.toromanoff@foss.st.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Showing
想要评论请 注册 或 登录