Skip to content

Commit

Permalink
crypto: arm/aesbs - fix brokenness after skcipher conversion
Browse files Browse the repository at this point in the history
The CBC encryption routine should use the encryption round keys, not
the decryption round keys.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Ard Biesheuvel authored and Herbert Xu committed Nov 30, 2016
1 parent 2debd33 commit 81126d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/crypto/aesbs-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static inline void aesbs_encrypt_one(struct crypto_skcipher *tfm,
{
struct aesbs_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);

AES_encrypt(src, dst, &ctx->dec.rk);
AES_encrypt(src, dst, &ctx->enc);
}

static int aesbs_cbc_encrypt(struct skcipher_request *req)
Expand Down

0 comments on commit 81126d1

Please sign in to comment.