projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NETFILTER]: bridge-nf: filter bridged IPv4/IPv6 encapsulated in pppoe traffic
[powerpc.git]
/
crypto
/
aes.c
diff --git
a/crypto/aes.c
b/crypto/aes.c
index
a501729
..
e244077
100644
(file)
--- a/
crypto/aes.c
+++ b/
crypto/aes.c
@@
-248,14
+248,15
@@
gen_tabs (void)
t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \
}
t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \
}
-static int
-
aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags
)
+static int
aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
+
unsigned int key_len
)
{
{
- struct aes_ctx *ctx = c
tx_arg
;
+ struct aes_ctx *ctx = c
rypto_tfm_ctx(tfm)
;
const __le32 *key = (const __le32 *)in_key;
const __le32 *key = (const __le32 *)in_key;
+ u32 *flags = &tfm->crt_flags;
u32 i, t, u, v, w;
u32 i, t, u, v, w;
- if (key_len
!= 16 && key_len != 24 && key_len != 32
) {
+ if (key_len
% 8
) {
*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
}
*flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
return -EINVAL;
}
@@
-318,9
+319,9
@@
aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
f_rl(bo, bi, 2, k); \
f_rl(bo, bi, 3, k)
f_rl(bo, bi, 2, k); \
f_rl(bo, bi, 3, k)
-static void aes_encrypt(
void *ctx_arg
, u8 *out, const u8 *in)
+static void aes_encrypt(
struct crypto_tfm *tfm
, u8 *out, const u8 *in)
{
{
- const struct aes_ctx *ctx = c
tx_arg
;
+ const struct aes_ctx *ctx = c
rypto_tfm_ctx(tfm)
;
const __le32 *src = (const __le32 *)in;
__le32 *dst = (__le32 *)out;
u32 b0[4], b1[4];
const __le32 *src = (const __le32 *)in;
__le32 *dst = (__le32 *)out;
u32 b0[4], b1[4];
@@
-373,9
+374,9
@@
static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
i_rl(bo, bi, 2, k); \
i_rl(bo, bi, 3, k)
i_rl(bo, bi, 2, k); \
i_rl(bo, bi, 3, k)
-static void aes_decrypt(
void *ctx_arg
, u8 *out, const u8 *in)
+static void aes_decrypt(
struct crypto_tfm *tfm
, u8 *out, const u8 *in)
{
{
- const struct aes_ctx *ctx = c
tx_arg
;
+ const struct aes_ctx *ctx = c
rypto_tfm_ctx(tfm)
;
const __le32 *src = (const __le32 *)in;
__le32 *dst = (__le32 *)out;
u32 b0[4], b1[4];
const __le32 *src = (const __le32 *)in;
__le32 *dst = (__le32 *)out;
u32 b0[4], b1[4];