Lines Matching refs:fctx
76 void *fctx; in nitrox_skcipher_init() local
84 fctx = crypto_alloc_context(nctx->ndev); in nitrox_skcipher_init()
85 if (!fctx) { in nitrox_skcipher_init()
89 nctx->u.ctx_handle = (uintptr_t)fctx; in nitrox_skcipher_init()
101 struct flexi_crypto_context *fctx = nctx->u.fctx; in nitrox_skcipher_exit() local
103 memset(&fctx->crypto, 0, sizeof(struct crypto_keys)); in nitrox_skcipher_exit()
104 memset(&fctx->auth, 0, sizeof(struct auth_keys)); in nitrox_skcipher_exit()
105 crypto_free_context((void *)fctx); in nitrox_skcipher_exit()
119 struct flexi_crypto_context *fctx; in nitrox_skcipher_setkey() local
131 fctx = nctx->u.fctx; in nitrox_skcipher_setkey()
132 fctx->flags = 0; in nitrox_skcipher_setkey()
133 fctx->w0.cipher_type = cipher_type; in nitrox_skcipher_setkey()
134 fctx->w0.aes_keylen = aes_keylen; in nitrox_skcipher_setkey()
135 fctx->w0.iv_source = IV_FROM_DPTR; in nitrox_skcipher_setkey()
136 fctx->flags = cpu_to_be64(*(u64 *)&fctx->w0); in nitrox_skcipher_setkey()
138 memcpy(fctx->crypto.u.key, key, keylen); in nitrox_skcipher_setkey()
243 struct flexi_crypto_context *fctx; in nitrox_aes_xts_setkey() local
258 fctx = nctx->u.fctx; in nitrox_aes_xts_setkey()
260 memcpy(fctx->auth.u.key2, (key + keylen), keylen); in nitrox_aes_xts_setkey()
270 struct flexi_crypto_context *fctx; in nitrox_aes_ctr_rfc3686_setkey() local
276 fctx = nctx->u.fctx; in nitrox_aes_ctr_rfc3686_setkey()
278 memcpy(fctx->crypto.iv, key + (keylen - CTR_RFC3686_NONCE_SIZE), in nitrox_aes_ctr_rfc3686_setkey()