Lines Matching refs:ctx
27 static int num_rounds(struct crypto_aes_ctx *ctx) in num_rounds() argument
36 return 6 + ctx->key_length / 4; in num_rounds()
41 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_encrypt() local
77 "1"(ctx->key_enc), in aes_cipher_encrypt()
78 "2"(num_rounds(ctx) - 2) in aes_cipher_encrypt()
86 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_decrypt() local
122 "1"(ctx->key_dec), in aes_cipher_decrypt()
123 "2"(num_rounds(ctx) - 2) in aes_cipher_decrypt()
149 int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, in ce_aes_expandkey() argument
168 memcpy(ctx->key_enc, in_key, key_len); in ce_aes_expandkey()
169 ctx->key_length = key_len; in ce_aes_expandkey()
173 u32 *rki = ctx->key_enc + (i * kwords); in ce_aes_expandkey()
202 key_enc = (struct aes_block *)ctx->key_enc; in ce_aes_expandkey()
203 key_dec = (struct aes_block *)ctx->key_dec; in ce_aes_expandkey()
204 j = num_rounds(ctx); in ce_aes_expandkey()
225 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ce_aes_setkey() local
228 ret = ce_aes_expandkey(ctx, in_key, key_len); in ce_aes_setkey()