• Ard Biesheuvel's avatar
    crypto: geode-aes - switch to skcipher for cbc(aes) fallback · 504582e8
    Ard Biesheuvel authored
    Commit 79c65d17 ("crypto: cbc - Convert to skcipher") updated
    the generic CBC template wrapper from a blkcipher to a skcipher algo,
    to get away from the deprecated blkcipher interface. However, as a side
    effect, drivers that instantiate CBC transforms using the blkcipher as
    a fallback no longer work, since skciphers can wrap blkciphers but not
    the other way around. This broke the geode-aes driver.
    
    So let's fix it by moving to the sync skcipher interface when allocating
    the fallback. At the same time, align with the generic API for ECB and
    CBC by rejecting inputs that are not a multiple of the AES block size.
    
    Fixes: 79c65d17 ("crypto: cbc - Convert to skcipher")
    Cc: <stable@vger.kernel.org> # v4.20+ ONLY
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarFlorian Bezdeka <florian@bezdeka.de>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    504582e8
geode-aes.h 1.32 KB