CR_3349: crypto: starfive - Remove AES key zeroization
authorJia Jie Ho <jiajie.ho@starfivetech.com>
Thu, 16 Feb 2023 04:24:02 +0000 (12:24 +0800)
committerJia Jie Ho <jiajie.ho@starfivetech.com>
Thu, 16 Feb 2023 04:24:02 +0000 (12:24 +0800)
Remove key zeroization after each request in AES module.

Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
drivers/crypto/starfive/jh7110/jh7110-aes.c

index 84174ec110660db19bbe11939681fd1d043c84c8..0c9310ca2dfd35e199098195bad0bcfc76cb0c24 100755 (executable)
@@ -652,8 +652,6 @@ static void jh7110_cryp_finish_req(struct jh7110_sec_ctx *ctx, int err)
        else
                crypto_finalize_skcipher_request(ctx->sdev->engine, rctx->req.sreq,
                                err);
-
-       memset(ctx->key, 0, ctx->keylen);
 }
 
 static bool jh7110_check_counter_overflow(struct jh7110_sec_ctx *ctx, size_t count)