Lines Matching refs:ctx
42 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_init() local
60 ctx->fallback = fallback; in p8_aes_init()
67 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_exit() local
69 if (ctx->fallback) { in p8_aes_exit()
70 crypto_free_cipher(ctx->fallback); in p8_aes_exit()
71 ctx->fallback = NULL; in p8_aes_exit()
79 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_setkey() local
84 ret = aes_p8_set_encrypt_key(key, keylen * 8, &ctx->enc_key); in p8_aes_setkey()
85 ret += aes_p8_set_decrypt_key(key, keylen * 8, &ctx->dec_key); in p8_aes_setkey()
88 ret += crypto_cipher_setkey(ctx->fallback, key, keylen); in p8_aes_setkey()
94 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_encrypt() local
97 crypto_cipher_encrypt_one(ctx->fallback, dst, src); in p8_aes_encrypt()
102 aes_p8_encrypt(src, dst, &ctx->enc_key); in p8_aes_encrypt()
109 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_decrypt() local
112 crypto_cipher_decrypt_one(ctx->fallback, dst, src); in p8_aes_decrypt()
117 aes_p8_decrypt(src, dst, &ctx->dec_key); in p8_aes_decrypt()