Lines Matching +full:0 +full:x6c000000
77 0, 0, 16, 24, 40, 48, 64, 72, 88,
84 0, 32, 32, 48, 48, 64, 64, 80, 80,
91 0x01000000, 0x02000000, 0x04000000, 0x08000000,
92 0x10000000, 0x20000000, 0x40000000, 0x80000000,
93 0x1B000000, 0x36000000, 0x6C000000
131 memset(&reqctx->hctx_wr, 0, sizeof(struct chcr_hctx_per_wr)); in chcr_init_hctx_per_wr()
138 int nents = 0; in sg_nents_xlen()
140 unsigned int skip_len = 0; in sg_nents_xlen()
145 skip_len = 0; in sg_nents_xlen()
149 skip = 0; in sg_nents_xlen()
157 skip_len = 0; in sg_nents_xlen()
177 int cmp = 0; in chcr_verify_tag()
193 *err = 0; in chcr_verify_tag()
201 return 0; in chcr_inc_wrcount()
253 for (i = 0; i < nk; i++) in get_aes_decrypt_key()
256 i = 0; in get_aes_decrypt_key()
264 } else if (nk == 8 && (i % 4 == 0)) { in get_aes_decrypt_key()
272 for (k = 0, j = i % nk; k < nk; k++) { in get_aes_decrypt_key()
275 if (j < 0) in get_aes_decrypt_key()
286 base_hash = crypto_alloc_shash("sha1", 0, 0); in chcr_alloc_shash()
289 base_hash = crypto_alloc_shash("sha224", 0, 0); in chcr_alloc_shash()
292 base_hash = crypto_alloc_shash("sha256", 0, 0); in chcr_alloc_shash()
295 base_hash = crypto_alloc_shash("sha384", 0, 0); in chcr_alloc_shash()
298 base_hash = crypto_alloc_shash("sha512", 0, 0); in chcr_alloc_shash()
354 for (i = 0; i < (ds / sizeof(u64)); i++) in chcr_change_order()
358 for (i = 0; i < (ds / sizeof(u32)); i++) in chcr_change_order()
372 return 0; in is_hmac()
379 walk->nents = 0; in dsgl_walk_init()
391 | CPL_RX_PHYS_DSGL_ISRDMA_V(0)); in dsgl_walk_end()
393 htonl(CPL_RX_PHYS_DSGL_PCIRLXORDER_V(0) | in dsgl_walk_end()
394 CPL_RX_PHYS_DSGL_PCINOSNOOP_V(0) | in dsgl_walk_end()
395 CPL_RX_PHYS_DSGL_PCITPHNTENB_V(0) | in dsgl_walk_end()
396 CPL_RX_PHYS_DSGL_PCITPHNT_V(0) | in dsgl_walk_end()
397 CPL_RX_PHYS_DSGL_DCAID_V(0) | in dsgl_walk_end()
401 phys_cpl->rss_hdr_int.hash_val = 0; in dsgl_walk_end()
417 if ((j % 8) == 0) in dsgl_walk_add_page()
427 int skip_len = 0; in dsgl_walk_add_sg()
428 unsigned int left_size = slen, len = 0; in dsgl_walk_add_sg()
437 skip_len = 0; in dsgl_walk_add_sg()
441 skip = 0; in dsgl_walk_add_sg()
447 offset = 0; in dsgl_walk_add_sg()
456 if ((j % 8) == 0) in dsgl_walk_add_sg()
463 skip_len = 0; in dsgl_walk_add_sg()
473 walk->nents = 0; in ulptx_walk_init()
474 walk->pair_idx = 0; in ulptx_walk_init()
477 walk->last_sg_len = 0; in ulptx_walk_init()
494 if (walk->nents == 0) { in ulptx_walk_add_page()
513 int skip_len = 0; in ulptx_walk_add_sg()
521 skip_len = 0; in ulptx_walk_add_sg()
525 skip = 0; in ulptx_walk_add_sg()
529 if (sg && (walk->nents == 0)) { in ulptx_walk_add_sg()
541 skip_len = 0; in ulptx_walk_add_sg()
561 skip_len = 0; in ulptx_walk_add_sg()
581 int ret = 0; in cxgb4_is_crypto_q_full()
605 return 0; in generate_copy_rrkey()
613 int srclen = 0; in chcr_hash_ent_in_wr()
615 int soffset = 0, sless; in chcr_hash_ent_in_wr()
619 srcskip = 0; in chcr_hash_ent_in_wr()
629 soffset = 0; in chcr_hash_ent_in_wr()
630 srcskip = 0; in chcr_hash_ent_in_wr()
643 int srclen = 0, dstlen = 0; in chcr_sg_ent_in_wr()
645 int offset = 0, soffset = 0, less, sless = 0; in chcr_sg_ent_in_wr()
649 srcskip = 0; in chcr_sg_ent_in_wr()
653 dstskip = 0; in chcr_sg_ent_in_wr()
662 offset = 0; in chcr_sg_ent_in_wr()
673 offset = 0; in chcr_sg_ent_in_wr()
676 dstskip = 0; in chcr_sg_ent_in_wr()
681 srcskip = 0; in chcr_sg_ent_in_wr()
682 soffset = 0; in chcr_sg_ent_in_wr()
714 int ret = 0; in get_qidxs()
766 unsigned int txqidx = 0, rxqidx = 0; in create_wreq()
771 fid = u_ctx->lldi.rxq_ids[0]; in create_wreq()
810 unsigned int temp = 0, transhdr_len, dst_size; in create_cipher_wr()
842 FILL_SEC_CPL_CIPHERSTOP_HI(0, 0, IV + 1, 0); in create_cipher_wr()
845 FILL_SEC_CPL_AUTHINSERT(0, 0, 0, 0); in create_cipher_wr()
846 chcr_req->sec_cpl.seqno_numivs = FILL_SEC_CPL_SCMD0_SEQNO(reqctx->op, 0, in create_cipher_wr()
848 0, 0, IV >> 1); in create_cipher_wr()
849 chcr_req->sec_cpl.ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 0, in create_cipher_wr()
850 0, 1, dst_size); in create_cipher_wr()
881 + (reqctx->imm ? (wrparam->bytes) : 0); in create_cipher_wr()
882 create_wreq(c_ctx(tfm), chcr_req, &(wrparam->req->base), reqctx->imm, 0, in create_cipher_wr()
900 int ck_size = 0; in chcr_keyctx_ck_size()
909 ck_size = 0; in chcr_keyctx_ck_size()
932 u16 alignment = 0; in chcr_aes_cbc_setkey()
940 alignment = ck_size == CHCR_KEYCTX_CIPHER_KEY_SIZE_192 ? 8 : 0; in chcr_aes_cbc_setkey()
948 0, 0, context_size); in chcr_aes_cbc_setkey()
950 return 0; in chcr_aes_cbc_setkey()
952 ablkctx->enckey_len = 0; in chcr_aes_cbc_setkey()
963 u16 alignment = 0; in chcr_aes_ctr_setkey()
970 alignment = (ck_size == CHCR_KEYCTX_CIPHER_KEY_SIZE_192) ? 8 : 0; in chcr_aes_ctr_setkey()
977 0, 0, context_size); in chcr_aes_ctr_setkey()
980 return 0; in chcr_aes_ctr_setkey()
982 ablkctx->enckey_len = 0; in chcr_aes_ctr_setkey()
993 u16 alignment = 0; in chcr_aes_rfc3686_setkey()
1007 alignment = (ck_size == CHCR_KEYCTX_CIPHER_KEY_SIZE_192) ? 8 : 0; in chcr_aes_rfc3686_setkey()
1014 0, 0, context_size); in chcr_aes_rfc3686_setkey()
1017 return 0; in chcr_aes_rfc3686_setkey()
1019 ablkctx->enckey_len = 0; in chcr_aes_rfc3686_setkey()
1082 for (i = 0; i < round8; i++) in chcr_update_tweak()
1085 for (i = 0; i < (round % 8); i++) in chcr_update_tweak()
1092 return 0; in chcr_update_tweak()
1101 int ret = 0; in chcr_update_cipher_iv()
1111 ret = chcr_update_tweak(req, iv, 0); in chcr_update_cipher_iv()
1135 int ret = 0; in chcr_final_cipher_iv()
1181 bytes = chcr_sg_ent_in_wr(reqctx->srcsg, reqctx->dstsg, 0, in chcr_handle_cipher_resp()
1196 if (unlikely(bytes == 0)) { in chcr_handle_cipher_resp()
1218 skb->dev = u_ctx->lldi.ports[0]; in chcr_handle_cipher_resp()
1228 return 0; in chcr_handle_cipher_resp()
1256 reqctx->processed = 0; in process_cipher()
1257 reqctx->partial_req = 0; in process_cipher()
1261 if ((ablkctx->enckey_len == 0) || (ivsize > AES_BLOCK_SIZE) || in process_cipher()
1262 (req->cryptlen == 0) || in process_cipher()
1264 if (req->cryptlen == 0 && subtype != CRYPTO_ALG_SUB_TYPE_XTS) in process_cipher()
1283 unsigned int dnents = 0, transhdr_len, phys_dsgl, kctx_len; in process_cipher()
1286 CHCR_DST_SG_SIZE, 0); in process_cipher()
1295 reqctx->imm = 0; in process_cipher()
1299 bytes = chcr_sg_ent_in_wr(req->src, req->dst, 0, in process_cipher()
1301 0, 0); in process_cipher()
1327 if (unlikely(bytes == 0)) { in process_cipher()
1341 reqctx->src_ofst = 0; in process_cipher()
1342 reqctx->dst_ofst = 0; in process_cipher()
1355 return 0; in process_cipher()
1381 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_aes_encrypt()
1392 skb->dev = u_ctx->lldi.ports[0]; in chcr_aes_encrypt()
1427 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_aes_decrypt()
1435 skb->dev = u_ctx->lldi.ports[0]; in chcr_aes_decrypt()
1444 int err = 0, rxq_perchan; in chcr_device_init()
1472 ablkctx->sw_cipher = crypto_alloc_skcipher(alg->base.cra_name, 0, in chcr_init_tfm()
1494 ablkctx->sw_cipher = crypto_alloc_skcipher("ctr(aes)", 0, in chcr_rfc3686_init()
1547 return 0; in get_alg_config()
1571 unsigned int nents = 0, transhdr_len; in create_hash_wr()
1572 unsigned int temp = 0; in create_hash_wr()
1576 int error = 0; in create_hash_wr()
1585 nents += param->bfr_len ? 1 : 0; in create_hash_wr()
1596 FILL_SEC_CPL_OP_IVINSR(rx_channel_id, 2, 0); in create_hash_wr()
1601 FILL_SEC_CPL_CIPHERSTOP_HI(0, 0, 0, 0); in create_hash_wr()
1603 FILL_SEC_CPL_AUTHINSERT(0, 1, 0, 0); in create_hash_wr()
1605 FILL_SEC_CPL_SCMD0_SEQNO(0, 0, 0, param->alg_prm.auth_mode, in create_hash_wr()
1606 param->opad_needed, 0); in create_hash_wr()
1609 FILL_SEC_CPL_IVGEN_HDRLEN(param->last, param->more, 0, 1, 0, 0); in create_hash_wr()
1621 param->alg_prm.mk_size, 0, in create_hash_wr()
1628 if (param->bfr_len != 0) { in create_hash_wr()
1639 req_ctx->hctx_wr.dma_addr = 0; in create_hash_wr()
1644 (param->sg_len + param->bfr_len) : 0); in create_hash_wr()
1648 temp, 0); in create_hash_wr()
1664 u8 remainder = 0, bs; in chcr_ahash_update()
1682 + req_ctx->reqlen, nbytes, 0); in chcr_ahash_update()
1684 return 0; in chcr_ahash_update()
1692 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_ahash_update()
1708 HASH_SPACE_LEFT(params.kctx_len), 0); in chcr_ahash_update()
1713 params.opad_needed = 0; in chcr_ahash_update()
1715 params.last = 0; in chcr_ahash_update()
1717 params.scmd1 = 0; in chcr_ahash_update()
1737 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_update()
1750 memset(bfr_ptr, 0, bs); in create_last_hash_block()
1751 *bfr_ptr = 0x80; in create_last_hash_block()
1784 params.opad_needed = 0; in chcr_ahash_final()
1785 params.sg_len = 0; in chcr_ahash_final()
1793 params.opad_needed = 0; in chcr_ahash_final()
1800 if (req_ctx->reqlen == 0) { in chcr_ahash_final()
1802 params.last = 0; in chcr_ahash_final()
1804 params.scmd1 = 0; in chcr_ahash_final()
1810 params.more = 0; in chcr_ahash_final()
1818 req_ctx->reqlen = 0; in chcr_ahash_final()
1819 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_final()
1851 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_ahash_finup()
1870 params.opad_needed = 0; in chcr_ahash_finup()
1874 HASH_SPACE_LEFT(params.kctx_len), 0); in chcr_ahash_finup()
1878 params.opad_needed = 0; in chcr_ahash_finup()
1880 params.last = 0; in chcr_ahash_finup()
1885 params.scmd1 = 0; in chcr_ahash_finup()
1888 params.more = 0; in chcr_ahash_finup()
1898 if ((req_ctx->reqlen + req->nbytes) == 0) { in chcr_ahash_finup()
1900 params.last = 0; in chcr_ahash_finup()
1902 params.scmd1 = 0; in chcr_ahash_finup()
1910 req_ctx->reqlen = 0; in chcr_ahash_finup()
1912 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_finup()
1947 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_ahash_digest()
1967 params.opad_needed = 0; in chcr_ahash_digest()
1970 HASH_SPACE_LEFT(params.kctx_len), 0); in chcr_ahash_digest()
1974 params.opad_needed = 0; in chcr_ahash_digest()
1976 params.last = 0; in chcr_ahash_digest()
1978 params.scmd1 = 0; in chcr_ahash_digest()
1985 params.more = 0; in chcr_ahash_digest()
1989 params.bfr_len = 0; in chcr_ahash_digest()
1994 if (req->nbytes == 0) { in chcr_ahash_digest()
2006 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_digest()
2042 params.opad_needed = 0; in chcr_ahash_continue()
2044 params.sg_len = chcr_hash_ent_in_wr(hctx_wr->srcsg, 0, in chcr_ahash_continue()
2053 params.opad_needed = 0; in chcr_ahash_continue()
2055 params.last = 0; in chcr_ahash_continue()
2059 params.scmd1 = 0; in chcr_ahash_continue()
2062 params.more = 0; in chcr_ahash_continue()
2066 params.bfr_len = 0; in chcr_ahash_continue()
2074 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_continue()
2077 return 0; in chcr_ahash_continue()
2105 hctx_wr->dma_addr = 0; in chcr_handle_ahash_resp()
2110 hctx_wr->result = 0; in chcr_handle_ahash_resp()
2175 return 0; in chcr_ahash_export()
2191 return 0; in chcr_ahash_import()
2200 unsigned int i, err = 0, updated_digestsize; in chcr_ahash_setkey()
2218 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey()
2221 for (i = 0; i < bs / sizeof(int); i++) { in chcr_ahash_setkey()
2250 unsigned short context_size = 0; in chcr_aes_xts_setkey()
2268 memset(ablkctx->key + 24, 0, 8); in chcr_aes_xts_setkey()
2269 memset(ablkctx->key + 56, 0, 8); in chcr_aes_xts_setkey()
2274 0, context_size); in chcr_aes_xts_setkey()
2281 0, context_size); in chcr_aes_xts_setkey()
2284 return 0; in chcr_aes_xts_setkey()
2286 ablkctx->enckey_len = 0; in chcr_aes_xts_setkey()
2297 req_ctx->data_len = 0; in chcr_sha_init()
2298 req_ctx->reqlen = 0; in chcr_sha_init()
2303 return 0; in chcr_sha_init()
2334 return 0; in chcr_hmac_init()
2381 if (aeadctx->enckey_len == 0) in chcr_aead_common_init()
2397 return 0; in chcr_aead_common_init()
2408 if (((req->cryptlen - (op_type ? authsize : 0)) == 0) || in chcr_aead_need_fallback()
2413 return 0; in chcr_aead_need_fallback()
2447 unsigned int dst_size = 0, temp, subtype = get_aead_subtype(tfm); in create_authenc_wr()
2448 unsigned int kctx_len = 0, dnents, snents; in create_authenc_wr()
2452 int null = 0; in create_authenc_wr()
2459 if (req->cryptlen == 0) in create_authenc_wr()
2462 reqctx->b0_len = 0; in create_authenc_wr()
2472 (reqctx->op ? -authsize : authsize), CHCR_DST_SG_SIZE, 0); in create_authenc_wr()
2475 CHCR_SRC_SG_SIZE, 0); in create_authenc_wr()
2501 temp = (reqctx->op == CHCR_ENCRYPT_OP) ? 0 : authsize; in create_authenc_wr()
2512 null ? 0 : 1 + IV, in create_authenc_wr()
2513 null ? 0 : IV + req->assoclen, in create_authenc_wr()
2515 (temp & 0x1F0) >> 4); in create_authenc_wr()
2517 temp & 0xF, in create_authenc_wr()
2518 null ? 0 : req->assoclen + IV + 1, in create_authenc_wr()
2526 (reqctx->op == CHCR_ENCRYPT_OP) ? 1 : 0, in create_authenc_wr()
2530 chcr_req->sec_cpl.ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 1, in create_authenc_wr()
2531 0, 0, dst_size); in create_authenc_wr()
2562 kctx_len + (reqctx->imm ? (req->assoclen + req->cryptlen) : 0); in create_authenc_wr()
2564 transhdr_len, temp, 0); in create_authenc_wr()
2589 0 : authsize); in chcr_aead_dma_map()
2598 return 0; in chcr_aead_dma_map()
2606 reqctx->b0_dma = 0; in chcr_aead_dma_map()
2630 return 0; in chcr_aead_dma_map()
2650 0 : authsize); in chcr_aead_dma_unmap()
2691 buf, req->cryptlen + req->assoclen, 0); in chcr_add_aead_src_ent()
2698 req->assoclen, 0); in chcr_add_aead_src_ent()
2721 dsgl_walk_add_sg(&dsgl_walk, req->dst, temp, 0); in chcr_add_aead_dst_ent()
2786 param->sg_len, 0); in chcr_add_hash_src_ent()
2804 int error = 0; in chcr_hash_dma_map()
2807 return 0; in chcr_hash_dma_map()
2813 return 0; in chcr_hash_dma_map()
2826 req_ctx->hctx_wr.is_sg_map = 0; in chcr_hash_dma_unmap()
2854 return 0; in chcr_cipher_dma_map()
2877 memset(block, 0, csize); in set_msg_len()
2888 return 0; in set_msg_len()
2904 lp = b0[0]; in generate_b0()
2923 if (iv[0] < 1 || iv[0] > 7) in crypto_ccm_check_iv()
2926 return 0; in crypto_ccm_check_iv()
2938 int rc = 0; in ccm_format_packet()
2941 ivptr[0] = 3; in ccm_format_packet()
2942 memcpy(ivptr + 1, &aeadctx->salt[0], 3); in ccm_format_packet()
2944 memset(ivptr + 12, 0, 4); in ccm_format_packet()
2953 memset(ivptr + 15 - ivptr[0], 0, ivptr[0] + 1); in ccm_format_packet()
2971 unsigned int tag_offset = 0, auth_offset = 0; in fill_sec_cpl_for_aead()
2981 ((assoclen) ? CCM_AAD_FIELD_SIZE : 0); in fill_sec_cpl_for_aead()
2984 (req->assoclen + IV + 1 + ccm_xtra) : 0; in fill_sec_cpl_for_aead()
2989 auth_offset = 0; in fill_sec_cpl_for_aead()
2998 req->assoclen + IV + 1 + ccm_xtra, 0); in fill_sec_cpl_for_aead()
3000 sec_cpl->cipherstop_lo_authinsert = FILL_SEC_CPL_AUTHINSERT(0, in fill_sec_cpl_for_aead()
3002 (op_type == CHCR_ENCRYPT_OP) ? 0 : in fill_sec_cpl_for_aead()
3005 (op_type == CHCR_ENCRYPT_OP) ? 0 : 1, in fill_sec_cpl_for_aead()
3009 sec_cpl->ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 1, 0, in fill_sec_cpl_for_aead()
3010 0, dst_size); in fill_sec_cpl_for_aead()
3030 return 0; in aead_ccm_validate_input()
3045 unsigned int dst_size = 0, kctx_len, dnents, temp, snents; in create_aead_ccm_wr()
3057 reqctx->b0_len = CCM_B0_SIZE + (assoclen ? CCM_AAD_FIELD_SIZE : 0); in create_aead_ccm_wr()
3067 CHCR_DST_SG_SIZE, 0); in create_aead_ccm_wr()
3071 CHCR_SRC_SG_SIZE, 0); in create_aead_ccm_wr()
3117 reqctx->b0_len) : 0); in create_aead_ccm_wr()
3118 create_wreq(a_ctx(tfm), chcr_req, &req->base, reqctx->imm, 0, in create_aead_ccm_wr()
3119 transhdr_len, temp, 0); in create_aead_ccm_wr()
3143 unsigned int transhdr_len, dnents = 0, snents; in create_gcm_wr()
3144 unsigned int dst_size = 0, temp = 0, kctx_len, assoclen = req->assoclen; in create_gcm_wr()
3157 reqctx->b0_len = 0; in create_gcm_wr()
3163 CHCR_DST_SG_SIZE, 0); in create_gcm_wr()
3165 CHCR_SRC_SG_SIZE, 0); in create_gcm_wr()
3192 temp = (reqctx->op == CHCR_ENCRYPT_OP) ? 0 : authsize; in create_gcm_wr()
3198 assoclen ? 1 + IV : 0, in create_gcm_wr()
3199 assoclen ? IV + assoclen : 0, in create_gcm_wr()
3200 req->assoclen + IV + 1, 0); in create_gcm_wr()
3202 FILL_SEC_CPL_AUTHINSERT(0, req->assoclen + IV + 1, in create_gcm_wr()
3206 CHCR_ENCRYPT_OP) ? 1 : 0, in create_gcm_wr()
3210 chcr_req->sec_cpl.ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 1, in create_gcm_wr()
3211 0, 0, dst_size); in create_gcm_wr()
3220 /* S A L T | IV | 0x00000001 */ in create_gcm_wr()
3228 put_unaligned_be32(0x01, &ivptr[12]); in create_gcm_wr()
3235 kctx_len + (reqctx->imm ? (req->assoclen + req->cryptlen) : 0); in create_gcm_wr()
3253 aeadctx->sw_cipher = crypto_alloc_aead(alg->base.cra_name, 0, in chcr_aead_cra_init()
3425 int key_ctx_size = 0; in chcr_ccm_common_setkey()
3438 aeadctx->enckey_len = 0; in chcr_ccm_common_setkey()
3441 aeadctx->key_ctx_hdr = FILL_KEY_CTX_HDR(ck_size, mk_size, 0, 0, in chcr_ccm_common_setkey()
3446 return 0; in chcr_ccm_common_setkey()
3472 aeadctx->enckey_len = 0; in chcr_aead_rfc4309_setkey()
3492 int ret = 0, key_ctx_size = 0; in chcr_gcm_setkey()
3495 aeadctx->enckey_len = 0; in chcr_gcm_setkey()
3526 0, 0, in chcr_gcm_setkey()
3528 /* Calculate the H = CIPH(K, 0 repeated 16 times). in chcr_gcm_setkey()
3533 aeadctx->enckey_len = 0; in chcr_gcm_setkey()
3536 memset(gctx->ghash_h, 0, AEAD_H_SIZE); in chcr_gcm_setkey()
3553 int err = 0, i, key_ctx_len = 0; in chcr_authenc_setkey()
3554 unsigned char ck_size = 0; in chcr_authenc_setkey()
3555 unsigned char pad[CHCR_HASH_MAX_BLOCK_SIZE_128] = { 0 }; in chcr_authenc_setkey()
3568 if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) in chcr_authenc_setkey()
3633 memset(pad + keys.authkeylen, 0, bs - keys.authkeylen); in chcr_authenc_setkey()
3635 for (i = 0; i < bs >> 2; i++) in chcr_authenc_setkey()
3642 memset(pad + keys.authkeylen, 0, bs - keys.authkeylen); in chcr_authenc_setkey()
3644 for (i = 0; i < bs >> 2; i++) in chcr_authenc_setkey()
3657 0, 1, key_ctx_len >> 4); in chcr_authenc_setkey()
3662 return 0; in chcr_authenc_setkey()
3665 aeadctx->enckey_len = 0; in chcr_authenc_setkey()
3681 int key_ctx_len = 0; in chcr_aead_digest_null_setkey()
3682 unsigned char ck_size = 0; in chcr_aead_digest_null_setkey()
3691 if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) in chcr_aead_digest_null_setkey()
3722 aeadctx->key_ctx_hdr = FILL_KEY_CTX_HDR(ck_size, CHCR_KEYCTX_NO_KEY, 0, in chcr_aead_digest_null_setkey()
3723 0, key_ctx_len >> 4); in chcr_aead_digest_null_setkey()
3726 return 0; in chcr_aead_digest_null_setkey()
3728 aeadctx->enckey_len = 0; in chcr_aead_digest_null_setkey()
3757 if (cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_aead_op()
3765 crypto_ipsec_check_assoclen(req->assoclen) != 0) { in chcr_aead_op()
3779 skb->dev = u_ctx->lldi.ports[0]; in chcr_aead_op()
3805 return chcr_aead_op(req, 0, create_authenc_wr); in chcr_aead_encrypt()
3808 return chcr_aead_op(req, 0, create_aead_ccm_wr); in chcr_aead_encrypt()
3810 return chcr_aead_op(req, 0, create_gcm_wr); in chcr_aead_encrypt()
3832 size = 0; in chcr_aead_decrypt()
3854 .is_registered = 0,
3872 .is_registered = 0,
3890 .is_registered = 0,
3909 .is_registered = 0,
3928 .is_registered = 0,
3940 .is_registered = 0,
3952 .is_registered = 0,
3964 .is_registered = 0,
3976 .is_registered = 0,
3989 .is_registered = 0,
4001 .is_registered = 0,
4013 .is_registered = 0,
4025 .is_registered = 0,
4037 .is_registered = 0,
4050 .is_registered = 0,
4069 .is_registered = 0,
4089 .is_registered = 0,
4108 .is_registered = 0,
4127 .is_registered = 0,
4148 .is_registered = 0,
4170 .is_registered = 0,
4190 .is_registered = 0,
4211 .is_registered = 0,
4232 .is_registered = 0,
4246 .maxauthsize = 0,
4253 .is_registered = 0,
4274 .is_registered = 0,
4296 .is_registered = 0,
4316 .is_registered = 0,
4337 .is_registered = 0,
4358 .is_registered = 0,
4372 .maxauthsize = 0,
4387 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) { in chcr_unregister_alg()
4395 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4403 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4412 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4417 return 0; in chcr_unregister_alg()
4431 int err = 0, i; in chcr_register_alg()
4434 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) { in chcr_register_alg()
4449 driver_algs[i].alg.skcipher.base.cra_alignmask = 0; in chcr_register_alg()
4479 a_hash->halg.base.cra_alignmask = 0; in chcr_register_alg()
4505 return 0; in chcr_register_alg()
4530 return 0; in stop_crypto()