Skip to content

Commit 57d8154

Browse files
ambarusherbertx
authored andcommitted
crypto: atmel-aes - Change data type for "lastc" buffer
In case of in-place decryption, the "lastc" buffer is used to copy the last ciphertext block before the decryption of the message. It is later used to update the req->iv of the skcipher_request. "lastc" variable is not used to interact with the hardware, there is no restriction to be of type "u32". Change the type of "lastc" to "u8". Signed-off-by: Tudor Ambarus <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 61b0dd6 commit 57d8154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/atmel-aes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ struct atmel_aes_authenc_ctx {
155155

156156
struct atmel_aes_reqctx {
157157
unsigned long mode;
158-
u32 lastc[AES_BLOCK_SIZE / sizeof(u32)];
158+
u8 lastc[AES_BLOCK_SIZE];
159159
};
160160

161161
#if IS_ENABLED(CONFIG_CRYPTO_DEV_ATMEL_AUTHENC)

0 commit comments

Comments
 (0)