Lines Matching refs:ctx
42 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_init() local
63 ctx->fallback = fallback; in p8_aes_init()
70 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_exit() local
72 if (ctx->fallback) { in p8_aes_exit()
73 crypto_free_cipher(ctx->fallback); in p8_aes_exit()
74 ctx->fallback = NULL; in p8_aes_exit()
82 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_setkey() local
88 ret = aes_p8_set_encrypt_key(key, keylen * 8, &ctx->enc_key); in p8_aes_setkey()
89 ret += aes_p8_set_decrypt_key(key, keylen * 8, &ctx->dec_key); in p8_aes_setkey()
93 ret += crypto_cipher_setkey(ctx->fallback, key, keylen); in p8_aes_setkey()
99 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_encrypt() local
102 crypto_cipher_encrypt_one(ctx->fallback, dst, src); in p8_aes_encrypt()
108 aes_p8_encrypt(src, dst, &ctx->enc_key); in p8_aes_encrypt()
116 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_decrypt() local
119 crypto_cipher_decrypt_one(ctx->fallback, dst, src); in p8_aes_decrypt()
125 aes_p8_decrypt(src, dst, &ctx->dec_key); in p8_aes_decrypt()