Lines Matching +full:hardware +full:- +full:accelerated
3 /*-
5 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
25 * Copyright (c) 2014-2021 The FreeBSD Foundation
28 * Portions of this software were developed by John-Mark Gurney
60 * Materiel Command, USAF, under agreement number F30602-01-2-0537.
164 #define CRYPTO_AES_CBC 11 /* 128 bit blocksize -- the same as above */
198 #define CRYPTO_ALGORITHM_MAX 42 /* Keep updated - see below */
211 #define CRYPTO_FLAG_HARDWARE 0x01000000 /* hardware accelerated */
320 #define CRYPTODEV_PROBE_HARDWARE (-100)
321 #define CRYPTODEV_PROBE_ACCEL_SOFTWARE (-200)
322 #define CRYPTODEV_PROBE_SOFTWARE (-500)
340 #define CSP_MODE_ETA 5 /* IPsec style encrypt-then-auth */
449 uint8_t crp_esn[4]; /* high-order ESN */
463 const void *crp_cipher_key; /* New cipher key if non-NULL. */
464 const void *crp_auth_key; /* New auth key if non-NULL. */
484 cb->cb_buf = buf; in _crypto_use_buf()
485 cb->cb_buf_len = len; in _crypto_use_buf()
486 cb->cb_type = CRYPTO_BUF_CONTIG; in _crypto_use_buf()
492 cb->cb_mbuf = m; in _crypto_use_mbuf()
493 cb->cb_type = CRYPTO_BUF_MBUF; in _crypto_use_mbuf()
499 cb->cb_mbuf = m; in _crypto_use_single_mbuf()
500 cb->cb_type = CRYPTO_BUF_SINGLE_MBUF; in _crypto_use_single_mbuf()
507 cb->cb_vm_page = pages; in _crypto_use_vmpage()
508 cb->cb_vm_page_len = len; in _crypto_use_vmpage()
509 cb->cb_vm_page_offset = offset; in _crypto_use_vmpage()
510 cb->cb_type = CRYPTO_BUF_VMPAGE; in _crypto_use_vmpage()
516 cb->cb_uio = uio; in _crypto_use_uio()
517 cb->cb_type = CRYPTO_BUF_UIO; in _crypto_use_uio()
523 _crypto_use_buf(&crp->crp_buf, buf, len); in crypto_use_buf()
529 _crypto_use_mbuf(&crp->crp_buf, m); in crypto_use_mbuf()
535 _crypto_use_single_mbuf(&crp->crp_buf, m); in crypto_use_single_mbuf()
541 _crypto_use_vmpage(&crp->crp_buf, pages, len, offset); in crypto_use_vmpage()
547 _crypto_use_uio(&crp->crp_buf, uio); in crypto_use_uio()
553 _crypto_use_buf(&crp->crp_obuf, buf, len); in crypto_use_output_buf()
559 _crypto_use_mbuf(&crp->crp_obuf, m); in crypto_use_output_mbuf()
565 _crypto_use_single_mbuf(&crp->crp_obuf, m); in crypto_use_output_single_mbuf()
572 _crypto_use_vmpage(&crp->crp_obuf, pages, len, offset); in crypto_use_output_vmpage()
578 _crypto_use_uio(&crp->crp_obuf, uio); in crypto_use_output_uio()
582 ((crp)->crp_obuf.cb_type != CRYPTO_BUF_NONE)
641 extern int crypto_devallowsoft; /* only use hardware crypto */
656 * Crypto-related utility routines used mainly by drivers.
699 csp = crypto_get_params(crp->crp_session); in crypto_read_iv()
700 if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) in crypto_read_iv()
701 memcpy(iv, crp->crp_iv, csp->csp_ivlen); in crypto_read_iv()
703 crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, iv); in crypto_read_iv()
710 const u_int L = 15 - csp->csp_ivlen; in ccm_max_payload_length()