Home
last modified time | relevance | path

Searched refs:crd (Results 1 – 25 of 34) sorted by relevance

12

/freebsd-12.1/sys/geom/eli/
H A Dg_eli_crypto.c66 struct cryptodesc *crd; in g_eli_crypto_cipher() local
87 crd = (struct cryptodesc *)p; p += sizeof(*crd); in g_eli_crypto_cipher()
89 crd->crd_skip = 0; in g_eli_crypto_cipher()
90 crd->crd_len = datasize; in g_eli_crypto_cipher()
93 crd->crd_flags |= CRD_F_ENCRYPT; in g_eli_crypto_cipher()
94 crd->crd_alg = algo; in g_eli_crypto_cipher()
95 crd->crd_key = __DECONST(void *, key); in g_eli_crypto_cipher()
96 crd->crd_klen = keysize; in g_eli_crypto_cipher()
97 bzero(crd->crd_iv, sizeof(crd->crd_iv)); in g_eli_crypto_cipher()
98 crd->crd_next = NULL; in g_eli_crypto_cipher()
[all …]
H A Dg_eli_privacy.c235 struct cryptodesc *crd; in g_eli_crypto_run() local
257 size += sizeof(*crd) * nsec; in g_eli_crypto_run()
280 crd = (struct cryptodesc *)p; p += sizeof(*crd); in g_eli_crypto_run()
295 crp->crp_desc = crd; in g_eli_crypto_run()
297 crd->crd_skip = 0; in g_eli_crypto_run()
298 crd->crd_len = secsize; in g_eli_crypto_run()
304 crd->crd_alg = sc->sc_ealgo; in g_eli_crypto_run()
306 crd->crd_klen = sc->sc_ekeylen; in g_eli_crypto_run()
308 crd->crd_klen <<= 1; in g_eli_crypto_run()
310 sizeof(crd->crd_iv)); in g_eli_crypto_run()
[all …]
/freebsd-12.1/sys/opencrypto/
H A Dcryptosoft.c139 crd->crd_key, crd->crd_klen / 8); in swcr_encdec()
159 iov[0].iov_len = crd->crd_skip + crd->crd_len; in swcr_encdec()
174 count = crd->crd_skip; in swcr_encdec()
181 i = crd->crd_len; in swcr_encdec()
421 err = swcr_authprepare(axf, sw, crd->crd_key, crd->crd_klen); in swcr_authcompute()
428 err = crypto_apply(flags, buf, crd->crd_skip, crd->crd_len, in swcr_authcompute()
518 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in swcr_authenc()
531 crde = crd; in swcr_authenc()
543 crda = crd; in swcr_authenc()
751 crypto_copydata(flags, buf, crd->crd_skip, crd->crd_len, data); in swcr_compdec()
[all …]
H A Dcrypto.c1236 struct cryptodesc *crd; in crypto_invoke() local
1248 for (crd = crp->crp_desc; crd->crd_next; crd = crd->crd_next) in crypto_invoke()
1249 crd->CRD_INI.cri_next = &(crd->crd_next->CRD_INI); in crypto_invoke()
1273 struct cryptodesc *crd; in crypto_freereq() local
1303 while ((crd = crp->crp_desc) != NULL) { in crypto_freereq()
1304 crp->crp_desc = crd->crd_next; in crypto_freereq()
1305 uma_zfree(cryptodesc_zone, crd); in crypto_freereq()
1316 struct cryptodesc *crd; in crypto_getreq() local
1323 if (crd == NULL) { in crypto_getreq()
1328 crd->crd_next = crp->crp_desc; in crypto_getreq()
[all …]
/freebsd-12.1/sys/kgssapi/krb5/
H A Dkcrypto_des3.c181 struct cryptodesc *crd; in des3_encrypt_1() local
185 crd = crp->crp_desc; in des3_encrypt_1()
187 crd->crd_skip = skip; in des3_encrypt_1()
188 crd->crd_len = len; in des3_encrypt_1()
193 bzero(crd->crd_iv, 8); in des3_encrypt_1()
195 crd->crd_next = NULL; in des3_encrypt_1()
242 crd = crp->crp_desc; in des3_checksum()
244 crd->crd_skip = skip; in des3_checksum()
245 crd->crd_len = inlen; in des3_checksum()
247 crd->crd_flags = 0; in des3_checksum()
[all …]
H A Dkcrypto_aes.c145 struct cryptodesc *crd; in aes_encrypt_1() local
149 crd = crp->crp_desc; in aes_encrypt_1()
151 crd->crd_skip = skip; in aes_encrypt_1()
152 crd->crd_len = len; in aes_encrypt_1()
157 bzero(crd->crd_iv, 16); in aes_encrypt_1()
159 crd->crd_next = NULL; in aes_encrypt_1()
328 crd = crp->crp_desc; in aes_checksum()
330 crd->crd_skip = skip; in aes_checksum()
331 crd->crd_len = inlen; in aes_checksum()
333 crd->crd_flags = 0; in aes_checksum()
[all …]
H A Dkcrypto_des.c171 struct cryptodesc *crd; in des1_encrypt_1() local
175 crd = crp->crp_desc; in des1_encrypt_1()
177 crd->crd_skip = skip; in des1_encrypt_1()
178 crd->crd_len = len; in des1_encrypt_1()
179 crd->crd_flags = CRD_F_IV_EXPLICIT | CRD_F_IV_PRESENT | encdec; in des1_encrypt_1()
181 bcopy(ivec, crd->crd_iv, 8); in des1_encrypt_1()
183 bzero(crd->crd_iv, 8); in des1_encrypt_1()
185 crd->crd_next = NULL; in des1_encrypt_1()
186 crd->crd_alg = CRYPTO_DES_CBC; in des1_encrypt_1()
/freebsd-12.1/sys/dev/glxsb/
H A Dglxsb.c666 if (crd == NULL || (crd->crd_len % SB_AES_BLOCK_SIZE) != 0) in glxsb_crypto_encdec()
671 GLXSB_MAX_AES_LEN : crd->crd_len; in glxsb_crypto_encdec()
683 if (crd->crd_flags & CRD_F_ENCRYPT) { in glxsb_crypto_encdec()
685 if (crd->crd_flags & CRD_F_IV_EXPLICIT) in glxsb_crypto_encdec()
696 if (crd->crd_flags & CRD_F_IV_EXPLICIT) in glxsb_crypto_encdec()
705 tlen = crd->crd_len; in glxsb_crypto_encdec()
741 if (crd->crd_flags & CRD_F_ENCRYPT) in glxsb_crypto_encdec()
818 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in glxsb_crypto_process()
819 switch (crd->crd_alg) { in glxsb_crypto_process()
831 maccrd = crd; in glxsb_crypto_process()
[all …]
H A Dglxsb_hash.c84 glxsb_authcompute(struct glxsb_session *ses, struct cryptodesc *crd, in glxsb_authcompute() argument
94 error = crypto_apply(flags, buf, crd->crd_skip, crd->crd_len, in glxsb_authcompute()
105 crypto_copyback(flags, buf, crd->crd_inject, in glxsb_authcompute()
/freebsd-12.1/sys/crypto/blake2/
H A Dblake2_cryptodev.c237 struct cryptodesc *crd, *authcrd; in blake2_process() local
253 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in blake2_process()
254 switch (crd->crd_alg) { in blake2_process()
261 authcrd = crd; in blake2_process()
371 struct cryptodesc *crd; in blake2_cipher_process() local
375 crd = crp->crp_desc; in blake2_cipher_process()
387 if (crd->crd_flags != 0) in blake2_cipher_process()
402 error = crypto_apply(crp->crp_flags, crp->crp_buf, crd->crd_skip, in blake2_cipher_process()
403 crd->crd_len, blake2b_applicator, &bctx.sb); in blake2_cipher_process()
423 error = crypto_apply(crp->crp_flags, crp->crp_buf, crd->crd_skip, in blake2_cipher_process()
[all …]
/freebsd-12.1/sys/mips/cavium/cryptocteon/
H A Dcryptocteon.c264 struct cryptodesc *crd; in cryptocteon_process() local
317 crd = crp->crp_desc; in cryptocteon_process()
318 if (crd->crd_alg == od->octo_encalg) in cryptocteon_process()
319 enccrd = crd; in cryptocteon_process()
321 maccrd = crd; in cryptocteon_process()
322 crd = crd->crd_next; in cryptocteon_process()
323 if (crd) { in cryptocteon_process()
325 enccrd = crd; in cryptocteon_process()
327 maccrd = crd; in cryptocteon_process()
328 crd = crd->crd_next; in cryptocteon_process()
[all …]
/freebsd-12.1/sys/crypto/ccp/
H A Dccp.c588 crd = crp->crp_desc; in ccp_process()
606 ccp_init_hmac_digest(s, crd->crd_alg, crd->crd_key, in ccp_process()
607 crd->crd_klen); in ccp_process()
613 crd->crd_klen); in ccp_process()
616 ccp_aes_setkey(s, crd->crd_alg, crd->crd_key, in ccp_process()
617 crd->crd_klen); in ccp_process()
628 crde = crd; in ccp_process()
629 crda = crd->crd_next; in ccp_process()
637 crda = crd; in ccp_process()
664 crde = crd; in ccp_process()
[all …]
H A Dccp_hardware.c1246 struct cryptodesc *crd; in ccp_hmac_done() local
1250 crd = crp->crp_desc; in ccp_hmac_done()
1275 crd->crd_skip, crd->crd_len); in ccp_do_hmac()
1300 struct cryptodesc *crd; in ccp_hmac() local
1302 crd = crp->crp_desc; in ccp_hmac()
1346 struct cryptodesc *crd) in ccp_collect_iv() argument
1521 ccp_collect_iv(s, crp, crd); in ccp_do_blkcipher()
1541 switch (crd->crd_alg) { in ccp_do_blkcipher()
1613 crd->crd_skip, crd->crd_len); in ccp_do_blkcipher()
1686 struct cryptodesc *crd; in ccp_blkcipher() local
[all …]
/freebsd-12.1/sys/dev/cxgbe/crypto/
H A Dt4_crypto.c487 crd->crd_skip, crd->crd_len); in ccr_hash()
517 crd->crd_len); in ccr_hash()
633 crd->crd_skip, crd->crd_len); in ccr_blkcipher()
2697 ccr_init_hmac_digest(s, crd->crd_alg, crd->crd_key, in ccr_process()
2709 ccr_aes_setkey(s, crd->crd_alg, crd->crd_key, in ccr_process()
2727 crde = crd; in ccr_process()
2735 crda = crd; in ccr_process()
2767 crde = crd; in ccr_process()
2770 crda = crd; in ccr_process()
2805 crde = crd; in ccr_process()
[all …]
/freebsd-12.1/sys/dev/usb/
H A Dusb_dev.c200 memset(crd, 0, sizeof(*crd)); in usb_ref_device()
240 crd->is_uref = 1; in usb_ref_device()
257 crd->txfifo = f; in usb_ref_device()
273 crd->rxfifo = f; in usb_ref_device()
291 if (crd->is_read) { in usb_ref_device()
311 memset(crd, 0, sizeof(*crd)); in usb_ref_device()
333 if (crd->is_uref) in usb_usb_ref_device()
366 crd->is_read = 0; in usb_unref_device()
375 crd->is_uref = 0; in usb_unref_device()
427 crd->txfifo = f; in usb_fifo_create()
[all …]
/freebsd-12.1/sys/crypto/aesni/
H A Daesni.c346 struct cryptodesc *crd, *enccrd, *authcrd; in aesni_process() local
365 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in aesni_process()
366 switch (crd->crd_alg) { in aesni_process()
378 enccrd = crd; in aesni_process()
395 authcrd = crd; in aesni_process()
895 if ((crd->crd_flags & ~CRD_F_KEY_EXPLICIT) != 0) { in aesni_cipher_mac()
897 (crd->crd_flags & ~CRD_F_KEY_EXPLICIT)); in aesni_cipher_mac()
900 if ((crd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { in aesni_cipher_mac()
901 error = aesni_authprepare(ses, crd->crd_klen, crd->crd_key); in aesni_cipher_mac()
952 0x36, crp->crp_buf, crd->crd_skip, crd->crd_len, in aesni_cipher_mac()
[all …]
/freebsd-12.1/sys/crypto/via/
H A Dpadlock.c235 struct cryptodesc *crd, *enccrd, *maccrd; in padlock_process() local
249 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in padlock_process()
250 switch (crd->crd_alg) { in padlock_process()
262 maccrd = crd; in padlock_process()
269 enccrd = crd; in padlock_process()
H A Dpadlock_hash.c290 padlock_authcompute(struct padlock_session *ses, struct cryptodesc *crd, in padlock_authcompute() argument
301 error = crypto_apply(flags, buf, crd->crd_skip, crd->crd_len, in padlock_authcompute()
314 crypto_copyback(flags, buf, crd->crd_inject, in padlock_authcompute()
/freebsd-12.1/sys/contrib/octeon-sdk/
H A Dcvmx-iob-defs.h1682 uint64_t crd : 7;
1708 uint64_t crd : 7;
1734 uint64_t crd : 7;
1760 uint64_t crd : 7;
1786 uint64_t crd : 7;
1812 uint64_t crd : 7;
1838 uint64_t crd : 7;
1864 uint64_t crd : 7;
1890 uint64_t crd : 7;
1916 uint64_t crd : 7;
[all …]
/freebsd-12.1/sys/crypto/armv8/
H A Darmv8_crypto.c284 struct cryptodesc *crd, *enccrd; in armv8_crypto_process() local
300 for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { in armv8_crypto_process()
301 switch (crd->crd_alg) { in armv8_crypto_process()
307 enccrd = crd; in armv8_crypto_process()
/freebsd-12.1/sys/mips/nlm/dev/sec/
H A Dnlmsec.c292 struct cryptodesc *crd = NULL; in nlm_xlpsec_msgring_handler() local
313 crd = cmd->enccrd; in nlm_xlpsec_msgring_handler()
317 if (crd != NULL) { in nlm_xlpsec_msgring_handler()
318 if ((crd->crd_alg == CRYPTO_DES_CBC || in nlm_xlpsec_msgring_handler()
319 crd->crd_alg == CRYPTO_3DES_CBC || in nlm_xlpsec_msgring_handler()
320 crd->crd_alg == CRYPTO_AES_CBC) && in nlm_xlpsec_msgring_handler()
321 (crd->crd_flags & CRD_F_ENCRYPT)) { in nlm_xlpsec_msgring_handler()
322 ivlen = ((crd->crd_alg == CRYPTO_AES_CBC) ? in nlm_xlpsec_msgring_handler()
325 crd->crd_skip + crd->crd_len - ivlen, ivlen, in nlm_xlpsec_msgring_handler()
/freebsd-12.1/sys/dev/safe/
H A Dsafe.c1441 struct cryptodesc *crd; in safe_callback() local
1478 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in safe_callback()
1481 if (crd->crd_alg == CRYPTO_DES_CBC || in safe_callback()
1482 crd->crd_alg == CRYPTO_3DES_CBC) { in safe_callback()
1489 crd->crd_skip + crd->crd_len - ivsize, ivsize, in safe_callback()
1497 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in safe_callback()
1498 if (!(crd->crd_alg == CRYPTO_MD5_HMAC || in safe_callback()
1499 crd->crd_alg == CRYPTO_SHA1_HMAC || in safe_callback()
1500 crd->crd_alg == CRYPTO_NULL_HMAC)) in safe_callback()
1502 if (crd->crd_alg == CRYPTO_SHA1_HMAC) { in safe_callback()
[all …]
/freebsd-12.1/sys/dev/hifn/
H A Dhifn7751.c2699 struct cryptodesc *crd; in hifn_callback() local
2754 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in hifn_callback()
2755 if (crd->crd_alg != CRYPTO_DES_CBC && in hifn_callback()
2756 crd->crd_alg != CRYPTO_3DES_CBC && in hifn_callback()
2757 crd->crd_alg != CRYPTO_AES_CBC) in hifn_callback()
2762 crd->crd_skip + crd->crd_len - ivlen, ivlen, in hifn_callback()
2769 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in hifn_callback()
2772 if (crd->crd_alg != CRYPTO_MD5 && in hifn_callback()
2773 crd->crd_alg != CRYPTO_SHA1 && in hifn_callback()
2774 crd->crd_alg != CRYPTO_MD5_HMAC && in hifn_callback()
[all …]
/freebsd-12.1/sys/dev/cesa/
H A Dcesa.c1706 struct cryptodesc *crd; in cesa_process() local
1713 crd = crp->crp_desc; in cesa_process()
1727 if (cesa_is_hash(crd->crd_alg)) in cesa_process()
1728 mac = crd; in cesa_process()
1730 enc = crd; in cesa_process()
1732 crd = crd->crd_next; in cesa_process()
1734 if (crd) { in cesa_process()
1736 enc = crd; in cesa_process()
1738 if (!mac && cesa_is_hash(crd->crd_alg)) in cesa_process()
1739 mac = crd; in cesa_process()
[all …]
/freebsd-12.1/sys/dev/ubsec/
H A Dubsec.c1500 struct cryptodesc *crd; in ubsec_callback() local
1527 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in ubsec_callback()
1528 if (crd->crd_alg != CRYPTO_DES_CBC && in ubsec_callback()
1529 crd->crd_alg != CRYPTO_3DES_CBC) in ubsec_callback()
1532 crd->crd_skip + crd->crd_len - 8, 8, in ubsec_callback()
1538 for (crd = crp->crp_desc; crd; crd = crd->crd_next) { in ubsec_callback()
1539 if (crd->crd_alg != CRYPTO_MD5_HMAC && in ubsec_callback()
1540 crd->crd_alg != CRYPTO_SHA1_HMAC) in ubsec_callback()
1542 crypto_copyback(crp->crp_flags, crp->crp_buf, crd->crd_inject, in ubsec_callback()

12