• Home
  • Raw
  • Download

Lines Matching +full:0 +full:x36000000

76 	0, 0, 16, 24, 40, 48, 64, 72, 88,
83 0, 32, 32, 48, 48, 64, 64, 80, 80,
90 0x01000000, 0x02000000, 0x04000000, 0x08000000,
91 0x10000000, 0x20000000, 0x40000000, 0x80000000,
92 0x1B000000, 0x36000000, 0x6C000000
135 memset(&reqctx->hctx_wr, 0, sizeof(struct chcr_hctx_per_wr)); in chcr_init_hctx_per_wr()
142 int nents = 0; in sg_nents_xlen()
144 unsigned int skip_len = 0; in sg_nents_xlen()
149 skip_len = 0; in sg_nents_xlen()
153 skip = 0; in sg_nents_xlen()
161 skip_len = 0; in sg_nents_xlen()
181 int cmp = 0; in chcr_verify_tag()
197 *err = 0; in chcr_verify_tag()
205 return 0; in chcr_inc_wrcount()
257 for (i = 0; i < nk; i++) in get_aes_decrypt_key()
260 i = 0; in get_aes_decrypt_key()
268 } else if (nk == 8 && (i % 4 == 0)) { in get_aes_decrypt_key()
276 for (k = 0, j = i % nk; k < nk; k++) { in get_aes_decrypt_key()
279 if (j < 0) in get_aes_decrypt_key()
290 base_hash = crypto_alloc_shash("sha1", 0, 0); in chcr_alloc_shash()
293 base_hash = crypto_alloc_shash("sha224", 0, 0); in chcr_alloc_shash()
296 base_hash = crypto_alloc_shash("sha256", 0, 0); in chcr_alloc_shash()
299 base_hash = crypto_alloc_shash("sha384", 0, 0); in chcr_alloc_shash()
302 base_hash = crypto_alloc_shash("sha512", 0, 0); in chcr_alloc_shash()
358 for (i = 0; i < (ds / sizeof(u64)); i++) in chcr_change_order()
362 for (i = 0; i < (ds / sizeof(u32)); i++) in chcr_change_order()
376 return 0; in is_hmac()
383 walk->nents = 0; in dsgl_walk_init()
395 | CPL_RX_PHYS_DSGL_ISRDMA_V(0)); in dsgl_walk_end()
397 htonl(CPL_RX_PHYS_DSGL_PCIRLXORDER_V(0) | in dsgl_walk_end()
398 CPL_RX_PHYS_DSGL_PCINOSNOOP_V(0) | in dsgl_walk_end()
399 CPL_RX_PHYS_DSGL_PCITPHNTENB_V(0) | in dsgl_walk_end()
400 CPL_RX_PHYS_DSGL_PCITPHNT_V(0) | in dsgl_walk_end()
401 CPL_RX_PHYS_DSGL_DCAID_V(0) | in dsgl_walk_end()
405 phys_cpl->rss_hdr_int.hash_val = 0; in dsgl_walk_end()
421 if ((j % 8) == 0) in dsgl_walk_add_page()
431 int skip_len = 0; in dsgl_walk_add_sg()
432 unsigned int left_size = slen, len = 0; in dsgl_walk_add_sg()
441 skip_len = 0; in dsgl_walk_add_sg()
445 skip = 0; in dsgl_walk_add_sg()
451 offset = 0; in dsgl_walk_add_sg()
460 if ((j % 8) == 0) in dsgl_walk_add_sg()
467 skip_len = 0; in dsgl_walk_add_sg()
477 walk->nents = 0; in ulptx_walk_init()
478 walk->pair_idx = 0; in ulptx_walk_init()
481 walk->last_sg_len = 0; in ulptx_walk_init()
498 if (walk->nents == 0) { in ulptx_walk_add_page()
517 int skip_len = 0; in ulptx_walk_add_sg()
525 skip_len = 0; in ulptx_walk_add_sg()
529 skip = 0; in ulptx_walk_add_sg()
533 if (sg && (walk->nents == 0)) { in ulptx_walk_add_sg()
545 skip_len = 0; in ulptx_walk_add_sg()
565 skip_len = 0; in ulptx_walk_add_sg()
585 int ret = 0; in cxgb4_is_crypto_q_full()
609 return 0; in generate_copy_rrkey()
617 int srclen = 0; in chcr_hash_ent_in_wr()
619 int soffset = 0, sless; in chcr_hash_ent_in_wr()
623 srcskip = 0; in chcr_hash_ent_in_wr()
633 soffset = 0; in chcr_hash_ent_in_wr()
634 srcskip = 0; in chcr_hash_ent_in_wr()
647 int srclen = 0, dstlen = 0; in chcr_sg_ent_in_wr()
649 int offset = 0, soffset = 0, less, sless = 0; in chcr_sg_ent_in_wr()
653 srcskip = 0; in chcr_sg_ent_in_wr()
657 dstskip = 0; in chcr_sg_ent_in_wr()
666 offset = 0; in chcr_sg_ent_in_wr()
677 offset = 0; in chcr_sg_ent_in_wr()
680 dstskip = 0; in chcr_sg_ent_in_wr()
685 srcskip = 0; in chcr_sg_ent_in_wr()
686 soffset = 0; in chcr_sg_ent_in_wr()
718 int ret = 0; in get_qidxs()
770 unsigned int txqidx = 0, rxqidx = 0; in create_wreq()
775 fid = u_ctx->lldi.rxq_ids[0]; in create_wreq()
817 unsigned int temp = 0, transhdr_len, dst_size; in create_cipher_wr()
849 FILL_SEC_CPL_CIPHERSTOP_HI(0, 0, IV + 1, 0); in create_cipher_wr()
852 FILL_SEC_CPL_AUTHINSERT(0, 0, 0, 0); in create_cipher_wr()
853 chcr_req->sec_cpl.seqno_numivs = FILL_SEC_CPL_SCMD0_SEQNO(reqctx->op, 0, in create_cipher_wr()
855 0, 0, IV >> 1); in create_cipher_wr()
856 chcr_req->sec_cpl.ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 0, in create_cipher_wr()
857 0, 1, dst_size); in create_cipher_wr()
888 + (reqctx->imm ? (wrparam->bytes) : 0); in create_cipher_wr()
889 create_wreq(c_ctx(tfm), chcr_req, &(wrparam->req->base), reqctx->imm, 0, in create_cipher_wr()
907 int ck_size = 0; in chcr_keyctx_ck_size()
916 ck_size = 0; in chcr_keyctx_ck_size()
939 u16 alignment = 0; in chcr_aes_cbc_setkey()
947 alignment = ck_size == CHCR_KEYCTX_CIPHER_KEY_SIZE_192 ? 8 : 0; in chcr_aes_cbc_setkey()
955 0, 0, context_size); in chcr_aes_cbc_setkey()
957 return 0; in chcr_aes_cbc_setkey()
959 ablkctx->enckey_len = 0; in chcr_aes_cbc_setkey()
970 u16 alignment = 0; in chcr_aes_ctr_setkey()
977 alignment = (ck_size == CHCR_KEYCTX_CIPHER_KEY_SIZE_192) ? 8 : 0; in chcr_aes_ctr_setkey()
984 0, 0, context_size); in chcr_aes_ctr_setkey()
987 return 0; in chcr_aes_ctr_setkey()
989 ablkctx->enckey_len = 0; in chcr_aes_ctr_setkey()
1000 u16 alignment = 0; in chcr_aes_rfc3686_setkey()
1014 alignment = (ck_size == CHCR_KEYCTX_CIPHER_KEY_SIZE_192) ? 8 : 0; in chcr_aes_rfc3686_setkey()
1021 0, 0, context_size); in chcr_aes_rfc3686_setkey()
1024 return 0; in chcr_aes_rfc3686_setkey()
1026 ablkctx->enckey_len = 0; in chcr_aes_rfc3686_setkey()
1089 for (i = 0; i < round8; i++) in chcr_update_tweak()
1092 for (i = 0; i < (round % 8); i++) in chcr_update_tweak()
1099 return 0; in chcr_update_tweak()
1108 int ret = 0; in chcr_update_cipher_iv()
1118 ret = chcr_update_tweak(req, iv, 0); in chcr_update_cipher_iv()
1142 int ret = 0; in chcr_final_cipher_iv()
1188 bytes = chcr_sg_ent_in_wr(reqctx->srcsg, reqctx->dstsg, 0, in chcr_handle_cipher_resp()
1203 if (unlikely(bytes == 0)) { in chcr_handle_cipher_resp()
1225 skb->dev = u_ctx->lldi.ports[0]; in chcr_handle_cipher_resp()
1235 return 0; in chcr_handle_cipher_resp()
1263 reqctx->processed = 0; in process_cipher()
1264 reqctx->partial_req = 0; in process_cipher()
1268 if ((ablkctx->enckey_len == 0) || (ivsize > AES_BLOCK_SIZE) || in process_cipher()
1269 (req->cryptlen == 0) || in process_cipher()
1271 if (req->cryptlen == 0 && subtype != CRYPTO_ALG_SUB_TYPE_XTS) in process_cipher()
1290 unsigned int dnents = 0, transhdr_len, phys_dsgl, kctx_len; in process_cipher()
1293 CHCR_DST_SG_SIZE, 0); in process_cipher()
1302 reqctx->imm = 0; in process_cipher()
1306 bytes = chcr_sg_ent_in_wr(req->src, req->dst, 0, in process_cipher()
1308 0, 0); in process_cipher()
1334 if (unlikely(bytes == 0)) { in process_cipher()
1348 reqctx->src_ofst = 0; in process_cipher()
1349 reqctx->dst_ofst = 0; in process_cipher()
1362 return 0; in process_cipher()
1388 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_aes_encrypt()
1399 skb->dev = u_ctx->lldi.ports[0]; in chcr_aes_encrypt()
1434 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_aes_decrypt()
1442 skb->dev = u_ctx->lldi.ports[0]; in chcr_aes_decrypt()
1451 int err = 0, rxq_perchan; in chcr_device_init()
1479 ablkctx->sw_cipher = crypto_alloc_skcipher(alg->base.cra_name, 0, in chcr_init_tfm()
1501 ablkctx->sw_cipher = crypto_alloc_skcipher("ctr(aes)", 0, in chcr_rfc3686_init()
1554 return 0; in get_alg_config()
1577 unsigned int nents = 0, transhdr_len; in create_hash_wr()
1578 unsigned int temp = 0; in create_hash_wr()
1582 int error = 0; in create_hash_wr()
1591 nents += param->bfr_len ? 1 : 0; in create_hash_wr()
1602 FILL_SEC_CPL_OP_IVINSR(rx_channel_id, 2, 0); in create_hash_wr()
1607 FILL_SEC_CPL_CIPHERSTOP_HI(0, 0, 0, 0); in create_hash_wr()
1609 FILL_SEC_CPL_AUTHINSERT(0, 1, 0, 0); in create_hash_wr()
1611 FILL_SEC_CPL_SCMD0_SEQNO(0, 0, 0, param->alg_prm.auth_mode, in create_hash_wr()
1612 param->opad_needed, 0); in create_hash_wr()
1615 FILL_SEC_CPL_IVGEN_HDRLEN(param->last, param->more, 0, 1, 0, 0); in create_hash_wr()
1627 param->alg_prm.mk_size, 0, in create_hash_wr()
1634 if (param->bfr_len != 0) { in create_hash_wr()
1645 req_ctx->hctx_wr.dma_addr = 0; in create_hash_wr()
1650 (param->sg_len + param->bfr_len) : 0); in create_hash_wr()
1654 temp, 0); in create_hash_wr()
1670 u8 remainder = 0, bs; in chcr_ahash_update()
1688 + req_ctx->reqlen, nbytes, 0); in chcr_ahash_update()
1690 return 0; in chcr_ahash_update()
1698 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_ahash_update()
1714 HASH_SPACE_LEFT(params.kctx_len), 0); in chcr_ahash_update()
1719 params.opad_needed = 0; in chcr_ahash_update()
1721 params.last = 0; in chcr_ahash_update()
1723 params.scmd1 = 0; in chcr_ahash_update()
1743 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_update()
1756 memset(bfr_ptr, 0, bs); in create_last_hash_block()
1757 *bfr_ptr = 0x80; in create_last_hash_block()
1790 params.opad_needed = 0; in chcr_ahash_final()
1791 params.sg_len = 0; in chcr_ahash_final()
1799 params.opad_needed = 0; in chcr_ahash_final()
1806 if (req_ctx->reqlen == 0) { in chcr_ahash_final()
1808 params.last = 0; in chcr_ahash_final()
1810 params.scmd1 = 0; in chcr_ahash_final()
1816 params.more = 0; in chcr_ahash_final()
1824 req_ctx->reqlen = 0; in chcr_ahash_final()
1825 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_final()
1857 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_ahash_finup()
1876 params.opad_needed = 0; in chcr_ahash_finup()
1880 HASH_SPACE_LEFT(params.kctx_len), 0); in chcr_ahash_finup()
1884 params.opad_needed = 0; in chcr_ahash_finup()
1886 params.last = 0; in chcr_ahash_finup()
1891 params.scmd1 = 0; in chcr_ahash_finup()
1894 params.more = 0; in chcr_ahash_finup()
1904 if ((req_ctx->reqlen + req->nbytes) == 0) { in chcr_ahash_finup()
1906 params.last = 0; in chcr_ahash_finup()
1908 params.scmd1 = 0; in chcr_ahash_finup()
1916 req_ctx->reqlen = 0; in chcr_ahash_finup()
1918 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_finup()
1953 if (unlikely(cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_ahash_digest()
1973 params.opad_needed = 0; in chcr_ahash_digest()
1976 HASH_SPACE_LEFT(params.kctx_len), 0); in chcr_ahash_digest()
1980 params.opad_needed = 0; in chcr_ahash_digest()
1982 params.last = 0; in chcr_ahash_digest()
1984 params.scmd1 = 0; in chcr_ahash_digest()
1991 params.more = 0; in chcr_ahash_digest()
1995 params.bfr_len = 0; in chcr_ahash_digest()
2000 if (req->nbytes == 0) { in chcr_ahash_digest()
2012 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_digest()
2048 params.opad_needed = 0; in chcr_ahash_continue()
2050 params.sg_len = chcr_hash_ent_in_wr(hctx_wr->srcsg, 0, in chcr_ahash_continue()
2059 params.opad_needed = 0; in chcr_ahash_continue()
2061 params.last = 0; in chcr_ahash_continue()
2065 params.scmd1 = 0; in chcr_ahash_continue()
2068 params.more = 0; in chcr_ahash_continue()
2072 params.bfr_len = 0; in chcr_ahash_continue()
2080 skb->dev = u_ctx->lldi.ports[0]; in chcr_ahash_continue()
2083 return 0; in chcr_ahash_continue()
2111 hctx_wr->dma_addr = 0; in chcr_handle_ahash_resp()
2116 hctx_wr->result = 0; in chcr_handle_ahash_resp()
2181 return 0; in chcr_ahash_export()
2197 return 0; in chcr_ahash_import()
2206 unsigned int i, err = 0, updated_digestsize; in chcr_ahash_setkey()
2224 memset(hmacctx->ipad + keylen, 0, bs - keylen); in chcr_ahash_setkey()
2227 for (i = 0; i < bs / sizeof(int); i++) { in chcr_ahash_setkey()
2256 unsigned short context_size = 0; in chcr_aes_xts_setkey()
2274 memset(ablkctx->key + 24, 0, 8); in chcr_aes_xts_setkey()
2275 memset(ablkctx->key + 56, 0, 8); in chcr_aes_xts_setkey()
2280 0, context_size); in chcr_aes_xts_setkey()
2287 0, context_size); in chcr_aes_xts_setkey()
2290 return 0; in chcr_aes_xts_setkey()
2292 ablkctx->enckey_len = 0; in chcr_aes_xts_setkey()
2303 req_ctx->data_len = 0; in chcr_sha_init()
2304 req_ctx->reqlen = 0; in chcr_sha_init()
2309 return 0; in chcr_sha_init()
2340 return 0; in chcr_hmac_init()
2387 if (aeadctx->enckey_len == 0) in chcr_aead_common_init()
2403 return 0; in chcr_aead_common_init()
2414 if (((req->cryptlen - (op_type ? authsize : 0)) == 0) || in chcr_aead_need_fallback()
2419 return 0; in chcr_aead_need_fallback()
2453 unsigned int dst_size = 0, temp, subtype = get_aead_subtype(tfm); in create_authenc_wr()
2454 unsigned int kctx_len = 0, dnents, snents; in create_authenc_wr()
2458 int null = 0; in create_authenc_wr()
2465 if (req->cryptlen == 0) in create_authenc_wr()
2468 reqctx->b0_len = 0; in create_authenc_wr()
2478 (reqctx->op ? -authsize : authsize), CHCR_DST_SG_SIZE, 0); in create_authenc_wr()
2481 CHCR_SRC_SG_SIZE, 0); in create_authenc_wr()
2507 temp = (reqctx->op == CHCR_ENCRYPT_OP) ? 0 : authsize; in create_authenc_wr()
2518 null ? 0 : 1 + IV, in create_authenc_wr()
2519 null ? 0 : IV + req->assoclen, in create_authenc_wr()
2521 (temp & 0x1F0) >> 4); in create_authenc_wr()
2523 temp & 0xF, in create_authenc_wr()
2524 null ? 0 : req->assoclen + IV + 1, in create_authenc_wr()
2532 (reqctx->op == CHCR_ENCRYPT_OP) ? 1 : 0, in create_authenc_wr()
2536 chcr_req->sec_cpl.ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 1, in create_authenc_wr()
2537 0, 0, dst_size); in create_authenc_wr()
2568 kctx_len + (reqctx->imm ? (req->assoclen + req->cryptlen) : 0); in create_authenc_wr()
2570 transhdr_len, temp, 0); in create_authenc_wr()
2595 0 : authsize); in chcr_aead_dma_map()
2604 return 0; in chcr_aead_dma_map()
2612 reqctx->b0_dma = 0; in chcr_aead_dma_map()
2636 return 0; in chcr_aead_dma_map()
2656 0 : authsize); in chcr_aead_dma_unmap()
2697 buf, req->cryptlen + req->assoclen, 0); in chcr_add_aead_src_ent()
2704 req->assoclen, 0); in chcr_add_aead_src_ent()
2727 dsgl_walk_add_sg(&dsgl_walk, req->dst, temp, 0); in chcr_add_aead_dst_ent()
2792 param->sg_len, 0); in chcr_add_hash_src_ent()
2810 int error = 0; in chcr_hash_dma_map()
2813 return 0; in chcr_hash_dma_map()
2819 return 0; in chcr_hash_dma_map()
2832 req_ctx->hctx_wr.is_sg_map = 0; in chcr_hash_dma_unmap()
2860 return 0; in chcr_cipher_dma_map()
2883 memset(block, 0, csize); in set_msg_len()
2894 return 0; in set_msg_len()
2910 lp = b0[0]; in generate_b0()
2929 if (iv[0] < 1 || iv[0] > 7) in crypto_ccm_check_iv()
2932 return 0; in crypto_ccm_check_iv()
2944 int rc = 0; in ccm_format_packet()
2947 ivptr[0] = 3; in ccm_format_packet()
2948 memcpy(ivptr + 1, &aeadctx->salt[0], 3); in ccm_format_packet()
2950 memset(ivptr + 12, 0, 4); in ccm_format_packet()
2959 memset(ivptr + 15 - ivptr[0], 0, ivptr[0] + 1); in ccm_format_packet()
2977 unsigned int tag_offset = 0, auth_offset = 0; in fill_sec_cpl_for_aead()
2987 ((assoclen) ? CCM_AAD_FIELD_SIZE : 0); in fill_sec_cpl_for_aead()
2990 (req->assoclen + IV + 1 + ccm_xtra) : 0; in fill_sec_cpl_for_aead()
2995 auth_offset = 0; in fill_sec_cpl_for_aead()
3004 req->assoclen + IV + 1 + ccm_xtra, 0); in fill_sec_cpl_for_aead()
3006 sec_cpl->cipherstop_lo_authinsert = FILL_SEC_CPL_AUTHINSERT(0, in fill_sec_cpl_for_aead()
3008 (op_type == CHCR_ENCRYPT_OP) ? 0 : in fill_sec_cpl_for_aead()
3011 (op_type == CHCR_ENCRYPT_OP) ? 0 : 1, in fill_sec_cpl_for_aead()
3015 sec_cpl->ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 1, 0, in fill_sec_cpl_for_aead()
3016 0, dst_size); in fill_sec_cpl_for_aead()
3036 return 0; in aead_ccm_validate_input()
3051 unsigned int dst_size = 0, kctx_len, dnents, temp, snents; in create_aead_ccm_wr()
3063 reqctx->b0_len = CCM_B0_SIZE + (assoclen ? CCM_AAD_FIELD_SIZE : 0); in create_aead_ccm_wr()
3073 CHCR_DST_SG_SIZE, 0); in create_aead_ccm_wr()
3077 CHCR_SRC_SG_SIZE, 0); in create_aead_ccm_wr()
3123 reqctx->b0_len) : 0); in create_aead_ccm_wr()
3124 create_wreq(a_ctx(tfm), chcr_req, &req->base, reqctx->imm, 0, in create_aead_ccm_wr()
3125 transhdr_len, temp, 0); in create_aead_ccm_wr()
3149 unsigned int transhdr_len, dnents = 0, snents; in create_gcm_wr()
3150 unsigned int dst_size = 0, temp = 0, kctx_len, assoclen = req->assoclen; in create_gcm_wr()
3163 reqctx->b0_len = 0; in create_gcm_wr()
3169 CHCR_DST_SG_SIZE, 0); in create_gcm_wr()
3171 CHCR_SRC_SG_SIZE, 0); in create_gcm_wr()
3198 temp = (reqctx->op == CHCR_ENCRYPT_OP) ? 0 : authsize; in create_gcm_wr()
3204 assoclen ? 1 + IV : 0, in create_gcm_wr()
3205 assoclen ? IV + assoclen : 0, in create_gcm_wr()
3206 req->assoclen + IV + 1, 0); in create_gcm_wr()
3208 FILL_SEC_CPL_AUTHINSERT(0, req->assoclen + IV + 1, in create_gcm_wr()
3212 CHCR_ENCRYPT_OP) ? 1 : 0, in create_gcm_wr()
3216 chcr_req->sec_cpl.ivgen_hdrlen = FILL_SEC_CPL_IVGEN_HDRLEN(0, 0, 1, in create_gcm_wr()
3217 0, 0, dst_size); in create_gcm_wr()
3226 /* S A L T | IV | 0x00000001 */ in create_gcm_wr()
3234 put_unaligned_be32(0x01, &ivptr[12]); in create_gcm_wr()
3241 kctx_len + (reqctx->imm ? (req->assoclen + req->cryptlen) : 0); in create_gcm_wr()
3259 aeadctx->sw_cipher = crypto_alloc_aead(alg->base.cra_name, 0, in chcr_aead_cra_init()
3431 int key_ctx_size = 0; in chcr_ccm_common_setkey()
3444 aeadctx->enckey_len = 0; in chcr_ccm_common_setkey()
3447 aeadctx->key_ctx_hdr = FILL_KEY_CTX_HDR(ck_size, mk_size, 0, 0, in chcr_ccm_common_setkey()
3452 return 0; in chcr_ccm_common_setkey()
3478 aeadctx->enckey_len = 0; in chcr_aead_rfc4309_setkey()
3498 int ret = 0, key_ctx_size = 0; in chcr_gcm_setkey()
3501 aeadctx->enckey_len = 0; in chcr_gcm_setkey()
3532 0, 0, in chcr_gcm_setkey()
3534 /* Calculate the H = CIPH(K, 0 repeated 16 times). in chcr_gcm_setkey()
3539 aeadctx->enckey_len = 0; in chcr_gcm_setkey()
3542 memset(gctx->ghash_h, 0, AEAD_H_SIZE); in chcr_gcm_setkey()
3559 int err = 0, i, key_ctx_len = 0; in chcr_authenc_setkey()
3560 unsigned char ck_size = 0; in chcr_authenc_setkey()
3561 unsigned char pad[CHCR_HASH_MAX_BLOCK_SIZE_128] = { 0 }; in chcr_authenc_setkey()
3574 if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) in chcr_authenc_setkey()
3639 memset(pad + keys.authkeylen, 0, bs - keys.authkeylen); in chcr_authenc_setkey()
3641 for (i = 0; i < bs >> 2; i++) in chcr_authenc_setkey()
3648 memset(pad + keys.authkeylen, 0, bs - keys.authkeylen); in chcr_authenc_setkey()
3650 for (i = 0; i < bs >> 2; i++) in chcr_authenc_setkey()
3663 0, 1, key_ctx_len >> 4); in chcr_authenc_setkey()
3668 return 0; in chcr_authenc_setkey()
3671 aeadctx->enckey_len = 0; in chcr_authenc_setkey()
3687 int key_ctx_len = 0; in chcr_aead_digest_null_setkey()
3688 unsigned char ck_size = 0; in chcr_aead_digest_null_setkey()
3697 if (crypto_authenc_extractkeys(&keys, key, keylen) != 0) in chcr_aead_digest_null_setkey()
3728 aeadctx->key_ctx_hdr = FILL_KEY_CTX_HDR(ck_size, CHCR_KEYCTX_NO_KEY, 0, in chcr_aead_digest_null_setkey()
3729 0, key_ctx_len >> 4); in chcr_aead_digest_null_setkey()
3732 return 0; in chcr_aead_digest_null_setkey()
3734 aeadctx->enckey_len = 0; in chcr_aead_digest_null_setkey()
3763 if (cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0], in chcr_aead_op()
3771 crypto_ipsec_check_assoclen(req->assoclen) != 0) { in chcr_aead_op()
3785 skb->dev = u_ctx->lldi.ports[0]; in chcr_aead_op()
3811 return chcr_aead_op(req, 0, create_authenc_wr); in chcr_aead_encrypt()
3814 return chcr_aead_op(req, 0, create_aead_ccm_wr); in chcr_aead_encrypt()
3816 return chcr_aead_op(req, 0, create_gcm_wr); in chcr_aead_encrypt()
3838 size = 0; in chcr_aead_decrypt()
3860 .is_registered = 0,
3878 .is_registered = 0,
3896 .is_registered = 0,
3915 .is_registered = 0,
3934 .is_registered = 0,
3946 .is_registered = 0,
3958 .is_registered = 0,
3970 .is_registered = 0,
3982 .is_registered = 0,
3995 .is_registered = 0,
4007 .is_registered = 0,
4019 .is_registered = 0,
4031 .is_registered = 0,
4043 .is_registered = 0,
4056 .is_registered = 0,
4075 .is_registered = 0,
4095 .is_registered = 0,
4114 .is_registered = 0,
4133 .is_registered = 0,
4154 .is_registered = 0,
4176 .is_registered = 0,
4196 .is_registered = 0,
4217 .is_registered = 0,
4238 .is_registered = 0,
4252 .maxauthsize = 0,
4259 .is_registered = 0,
4280 .is_registered = 0,
4302 .is_registered = 0,
4322 .is_registered = 0,
4343 .is_registered = 0,
4364 .is_registered = 0,
4378 .maxauthsize = 0,
4393 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) { in chcr_unregister_alg()
4401 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4409 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4418 driver_algs[i].is_registered = 0; in chcr_unregister_alg()
4423 return 0; in chcr_unregister_alg()
4437 int err = 0, i; in chcr_register_alg()
4440 for (i = 0; i < ARRAY_SIZE(driver_algs); i++) { in chcr_register_alg()
4455 driver_algs[i].alg.skcipher.base.cra_alignmask = 0; in chcr_register_alg()
4485 a_hash->halg.base.cra_alignmask = 0; in chcr_register_alg()
4511 return 0; in chcr_register_alg()
4536 return 0; in stop_crypto()