aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/aes.c')
-rw-r--r--crypto/aes.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/aes.c b/crypto/aes.c
index a5017292e066..a038711831e7 100644
--- a/crypto/aes.c
+++ b/crypto/aes.c
@@ -248,10 +248,10 @@ gen_tabs (void)
248 t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \ 248 t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \
249} 249}
250 250
251static int 251static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
252aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) 252 unsigned int key_len, u32 *flags)
253{ 253{
254 struct aes_ctx *ctx = ctx_arg; 254 struct aes_ctx *ctx = crypto_tfm_ctx(tfm);
255 const __le32 *key = (const __le32 *)in_key; 255 const __le32 *key = (const __le32 *)in_key;
256 u32 i, t, u, v, w; 256 u32 i, t, u, v, w;
257 257
@@ -318,9 +318,9 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
318 f_rl(bo, bi, 2, k); \ 318 f_rl(bo, bi, 2, k); \
319 f_rl(bo, bi, 3, k) 319 f_rl(bo, bi, 3, k)
320 320
321static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in) 321static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
322{ 322{
323 const struct aes_ctx *ctx = ctx_arg; 323 const struct aes_ctx *ctx = crypto_tfm_ctx(tfm);
324 const __le32 *src = (const __le32 *)in; 324 const __le32 *src = (const __le32 *)in;
325 __le32 *dst = (__le32 *)out; 325 __le32 *dst = (__le32 *)out;
326 u32 b0[4], b1[4]; 326 u32 b0[4], b1[4];
@@ -373,9 +373,9 @@ static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
373 i_rl(bo, bi, 2, k); \ 373 i_rl(bo, bi, 2, k); \
374 i_rl(bo, bi, 3, k) 374 i_rl(bo, bi, 3, k)
375 375
376static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in) 376static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
377{ 377{
378 const struct aes_ctx *ctx = ctx_arg; 378 const struct aes_ctx *ctx = crypto_tfm_ctx(tfm);
379 const __le32 *src = (const __le32 *)in; 379 const __le32 *src = (const __le32 *)in;
380 __le32 *dst = (__le32 *)out; 380 __le32 *dst = (__le32 *)out;
381 u32 b0[4], b1[4]; 381 u32 b0[4], b1[4];