Lines Matching refs:ctx

48 int lrw_init_table(struct lrw_table_ctx *ctx, const u8 *tweak)  in lrw_init_table()  argument
53 if (ctx->table) in lrw_init_table()
54 gf128mul_free_64k(ctx->table); in lrw_init_table()
57 ctx->table = gf128mul_init_64k_bbe((be128 *)tweak); in lrw_init_table()
58 if (!ctx->table) in lrw_init_table()
64 ctx->mulinc[i] = tmp; in lrw_init_table()
65 gf128mul_64k_bbe(&ctx->mulinc[i], ctx->table); in lrw_init_table()
72 void lrw_free_table(struct lrw_table_ctx *ctx) in lrw_free_table() argument
74 if (ctx->table) in lrw_free_table()
75 gf128mul_free_64k(ctx->table); in lrw_free_table()
82 struct priv *ctx = crypto_tfm_ctx(parent); in setkey() local
83 struct crypto_cipher *child = ctx->child; in setkey()
96 return lrw_init_table(&ctx->table, tweak); in setkey()
139 struct blkcipher_walk *w, struct priv *ctx, in crypt() argument
146 .tfm = crypto_cipher_tfm(ctx->child), in crypt()
165 gf128mul_64k_bbe(&s.t, ctx->table.table); in crypt()
174 &ctx->table.mulinc[get_index128(iv)]); in crypt()
198 struct priv *ctx = crypto_blkcipher_ctx(desc->tfm); in encrypt() local
202 return crypt(desc, &w, ctx, in encrypt()
203 crypto_cipher_alg(ctx->child)->cia_encrypt); in encrypt()
209 struct priv *ctx = crypto_blkcipher_ctx(desc->tfm); in decrypt() local
213 return crypt(desc, &w, ctx, in decrypt()
214 crypto_cipher_alg(ctx->child)->cia_decrypt); in decrypt()
223 struct lrw_table_ctx *ctx = req->table_ctx; in lrw_crypt() local
248 gf128mul_64k_bbe(&t_buf[0], ctx->table); in lrw_crypt()
259 &ctx->mulinc[get_index128(iv)]); in lrw_crypt()
301 struct priv *ctx = crypto_tfm_ctx(tfm); in init_tfm() local
314 ctx->child = cipher; in init_tfm()
320 struct priv *ctx = crypto_tfm_ctx(tfm); in exit_tfm() local
322 lrw_free_table(&ctx->table); in exit_tfm()
323 crypto_free_cipher(ctx->child); in exit_tfm()