Lines Matching refs:ctx

39 static inline void twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,  in twofish_enc_blk_3way()  argument
42 __twofish_enc_blk_3way(ctx, dst, src, false); in twofish_enc_blk_3way()
45 static inline void twofish_enc_blk_xor_3way(struct twofish_ctx *ctx, u8 *dst, in twofish_enc_blk_xor_3way() argument
48 __twofish_enc_blk_3way(ctx, dst, src, true); in twofish_enc_blk_xor_3way()
51 void twofish_dec_blk_cbc_3way(void *ctx, u128 *dst, const u128 *src) in twofish_dec_blk_cbc_3way() argument
58 twofish_dec_blk_3way(ctx, (u8 *)dst, (u8 *)src); in twofish_dec_blk_cbc_3way()
65 void twofish_enc_blk_ctr(void *ctx, u128 *dst, const u128 *src, le128 *iv) in twofish_enc_blk_ctr() argument
75 twofish_enc_blk(ctx, (u8 *)&ctrblk, (u8 *)&ctrblk); in twofish_enc_blk_ctr()
80 void twofish_enc_blk_ctr_3way(void *ctx, u128 *dst, const u128 *src, in twofish_enc_blk_ctr_3way() argument
98 twofish_enc_blk_xor_3way(ctx, (u8 *)dst, (u8 *)ctrblks); in twofish_enc_blk_ctr_3way()
189 struct twofish_ctx *ctx = priv; in encrypt_callback() local
193 twofish_enc_blk_3way(ctx, srcdst, srcdst); in encrypt_callback()
198 twofish_enc_blk(ctx, srcdst, srcdst); in encrypt_callback()
204 struct twofish_ctx *ctx = priv; in decrypt_callback() local
208 twofish_dec_blk_3way(ctx, srcdst, srcdst); in decrypt_callback()
213 twofish_dec_blk(ctx, srcdst, srcdst); in decrypt_callback()
219 struct twofish_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_twofish_setkey() local
222 err = __twofish_setkey(&ctx->twofish_ctx, key, keylen - TF_BLOCK_SIZE, in lrw_twofish_setkey()
227 return lrw_init_table(&ctx->lrw_table, key + keylen - TF_BLOCK_SIZE); in lrw_twofish_setkey()
234 struct twofish_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt() local
240 .table_ctx = &ctx->lrw_table, in lrw_encrypt()
241 .crypt_ctx = &ctx->twofish_ctx, in lrw_encrypt()
251 struct twofish_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt() local
257 .table_ctx = &ctx->lrw_table, in lrw_decrypt()
258 .crypt_ctx = &ctx->twofish_ctx, in lrw_decrypt()
267 struct twofish_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_twofish_exit_tfm() local
269 lrw_free_table(&ctx->lrw_table); in lrw_twofish_exit_tfm()
276 struct twofish_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_twofish_setkey() local
289 err = __twofish_setkey(&ctx->crypt_ctx, key, keylen / 2, flags); in xts_twofish_setkey()
294 return __twofish_setkey(&ctx->tweak_ctx, key + keylen / 2, keylen / 2, in xts_twofish_setkey()
302 struct twofish_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt() local
308 .tweak_ctx = &ctx->tweak_ctx, in xts_encrypt()
310 .crypt_ctx = &ctx->crypt_ctx, in xts_encrypt()
320 struct twofish_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_decrypt() local
326 .tweak_ctx = &ctx->tweak_ctx, in xts_decrypt()
328 .crypt_ctx = &ctx->crypt_ctx, in xts_decrypt()