diff options
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/padlock-aes.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index b98ad203d6cb..17ee684144f9 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -60,15 +60,14 @@ | |||
60 | #define AES_EXTENDED_KEY_SIZE_B (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t)) | 60 | #define AES_EXTENDED_KEY_SIZE_B (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t)) |
61 | 61 | ||
62 | struct aes_ctx { | 62 | struct aes_ctx { |
63 | uint32_t e_data[AES_EXTENDED_KEY_SIZE]; | ||
64 | uint32_t d_data[AES_EXTENDED_KEY_SIZE]; | ||
65 | struct { | 63 | struct { |
66 | struct cword encrypt; | 64 | struct cword encrypt; |
67 | struct cword decrypt; | 65 | struct cword decrypt; |
68 | } cword; | 66 | } cword; |
69 | uint32_t *E; | 67 | u32 *D; |
70 | uint32_t *D; | ||
71 | int key_length; | 68 | int key_length; |
69 | u32 E[AES_EXTENDED_KEY_SIZE]; | ||
70 | u32 d_data[AES_EXTENDED_KEY_SIZE]; | ||
72 | }; | 71 | }; |
73 | 72 | ||
74 | /* ====== Key management routines ====== */ | 73 | /* ====== Key management routines ====== */ |
@@ -313,8 +312,7 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, | |||
313 | * itself we must supply the plain key for both encryption | 312 | * itself we must supply the plain key for both encryption |
314 | * and decryption. | 313 | * and decryption. |
315 | */ | 314 | */ |
316 | ctx->E = ctx->e_data; | 315 | ctx->D = ctx->E; |
317 | ctx->D = ctx->e_data; | ||
318 | 316 | ||
319 | E_KEY[0] = le32_to_cpu(key[0]); | 317 | E_KEY[0] = le32_to_cpu(key[0]); |
320 | E_KEY[1] = le32_to_cpu(key[1]); | 318 | E_KEY[1] = le32_to_cpu(key[1]); |