Home
last modified time | relevance | path

Searched refs:crp (Results 1 – 25 of 60) sorted by relevance

123

/freebsd/sys/opencrypto/
H A Dktls_ocf.c177 ktls_ocf_callback_sync(struct cryptop *crp __unused) in ktls_ocf_callback_sync()
183 ktls_ocf_callback_async(struct cryptop *crp) in ktls_ocf_callback_async() argument
187 oo = crp->crp_opaque; in ktls_ocf_callback_async()
196 ktls_ocf_dispatch(struct ktls_ocf_session *os, struct cryptop *crp) in ktls_ocf_dispatch() argument
205 crp->crp_opaque = &oo; in ktls_ocf_dispatch()
207 async = !CRYPTO_SESS_SYNC(crp->crp_session); in ktls_ocf_dispatch()
208 crp->crp_callback = async ? ktls_ocf_callback_async : in ktls_ocf_dispatch()
211 error = crypto_dispatch(crp); in ktls_ocf_dispatch()
221 if (crp->crp_etype != EAGAIN) { in ktls_ocf_dispatch()
222 error = crp in ktls_ocf_dispatch()
235 ktls_ocf_dispatch_async_cb(struct cryptop * crp) ktls_ocf_dispatch_async_cb() argument
261 ktls_ocf_dispatch_async(struct ktls_ocf_encrypt_state * state,struct cryptop * crp) ktls_ocf_dispatch_async() argument
281 struct cryptop *crp; ktls_ocf_tls_cbc_encrypt() local
442 struct cryptop crp; ktls_ocf_tls_cbc_decrypt() local
554 struct cryptop *crp; ktls_ocf_tls12_aead_encrypt() local
635 struct cryptop crp; ktls_ocf_tls12_aead_decrypt() local
731 struct cryptop crp; ktls_ocf_tls12_aead_recrypt() local
792 struct cryptop *crp; ktls_ocf_tls13_aead_encrypt() local
865 struct cryptop crp; ktls_ocf_tls13_aead_decrypt() local
918 struct cryptop crp; ktls_ocf_tls13_aead_recrypt() local
[all...]
H A Dcrypto.c215 static int crypto_invoke(struct cryptocap *cap, struct cryptop *crp, int hint);
217 static void crypto_batch_enqueue(struct cryptop *crp);
1255 crp_sanity(struct cryptop *crp) in crp_sanity() argument
1261 KASSERT(crp->crp_session != NULL, ("incoming crp without a session")); in crp_sanity()
1262 KASSERT(crp->crp_obuf.cb_type >= CRYPTO_BUF_NONE && in crp_sanity()
1263 crp->crp_obuf.cb_type <= CRYPTO_BUF_LAST, in crp_sanity()
1265 KASSERT(crp->crp_etype == 0, ("incoming crp with error")); in crp_sanity()
1266 KASSERT(!(crp->crp_flags & CRYPTO_F_DONE), in crp_sanity()
1269 csp = &crp->crp_session->csp; in crp_sanity()
1270 cb_sanity(&crp->crp_buf, "input"); in crp_sanity()
[all …]
H A Dcryptosoft.c88 swcr_null(const struct swcr_session *ses, struct cryptop *crp) in swcr_null() argument
98 swcr_encdec(const struct swcr_session *ses, struct cryptop *crp) in swcr_encdec() argument
117 csp = crypto_get_params(crp->crp_session); in swcr_encdec()
121 if ((crp->crp_payload_length % exf->blocksize) != 0) in swcr_encdec()
129 (crp->crp_flags & CRYPTO_F_IV_SEPARATE) == 0) in swcr_encdec()
133 if (crp->crp_cipher_key != NULL) { in swcr_encdec()
134 error = exf->setkey(ctx, crp->crp_cipher_key, in swcr_encdec()
141 crypto_read_iv(crp, blk); in swcr_encdec()
144 crypto_cursor_init(&cc_in, &crp->crp_buf); in swcr_encdec()
145 crypto_cursor_advance(&cc_in, crp->crp_payload_start); in swcr_encdec()
[all …]
H A Dcryptodev.h521 crypto_use_buf(struct cryptop *crp, void *buf, int len) in crypto_use_buf() argument
523 _crypto_use_buf(&crp->crp_buf, buf, len); in crypto_use_buf()
527 crypto_use_mbuf(struct cryptop *crp, struct mbuf *m) in crypto_use_mbuf() argument
529 _crypto_use_mbuf(&crp->crp_buf, m); in crypto_use_mbuf()
533 crypto_use_single_mbuf(struct cryptop *crp, struct mbuf *m) in crypto_use_single_mbuf() argument
535 _crypto_use_single_mbuf(&crp->crp_buf, m); in crypto_use_single_mbuf()
539 crypto_use_vmpage(struct cryptop *crp, vm_page_t *pages, int len, int offset) in crypto_use_vmpage() argument
541 _crypto_use_vmpage(&crp->crp_buf, pages, len, offset); in crypto_use_vmpage()
545 crypto_use_uio(struct cryptop *crp, struct uio *uio) in crypto_use_uio() argument
547 _crypto_use_uio(&crp->crp_buf, uio); in crypto_use_uio()
[all …]
H A Dcryptodev.c618 cryptodev_cb(struct cryptop *crp) in cryptodev_cb() argument
620 struct cryptop_data *cod = crp->crp_opaque; in cryptodev_cb()
639 struct cryptop *crp = NULL; in cryptodev_op() local
673 crp = crypto_getreq(cse->cses, M_WAITOK); in cryptodev_op()
680 crp->crp_payload_start = 0; in cryptodev_op()
681 crp->crp_payload_length = cop->len; in cryptodev_op()
683 crp->crp_digest_start = cop->len; in cryptodev_op()
690 crp->crp_op = CRYPTO_OP_COMPRESS; in cryptodev_op()
693 crp->crp_op = CRYPTO_OP_DECOMPRESS; in cryptodev_op()
710 crp->crp_op = CRYPTO_OP_ENCRYPT; in cryptodev_op()
[all …]
/freebsd/sys/crypto/aesni/
H A Daesni.c71 static int aesni_cipher_process(struct aesni_session *ses, struct cryptop *crp);
72 static int aesni_cipher_crypt(struct aesni_session *ses, struct cryptop *crp,
74 static int aesni_cipher_mac(struct aesni_session *ses, struct cryptop *crp,
310 aesni_process(device_t dev, struct cryptop *crp, int hint __unused) in aesni_process() argument
315 ses = crypto_get_driver_session(crp->crp_session); in aesni_process()
317 error = aesni_cipher_process(ses, crp); in aesni_process()
319 crp->crp_etype = error; in aesni_process()
320 crypto_done(crp); in aesni_process()
325 aesni_cipher_alloc(struct cryptop *crp, int start, int length, bool *allocated) in aesni_cipher_alloc() argument
329 addr = crypto_contiguous_subsegment(crp, start, length); in aesni_cipher_alloc()
[all …]
/freebsd/sys/crypto/openssl/
H A Dossl_chacha20.c56 ossl_chacha20(struct ossl_session_cipher *s, struct cryptop *crp, in ossl_chacha20() argument
69 if (crp->crp_cipher_key != NULL) in ossl_chacha20()
70 cipher_key = crp->crp_cipher_key; in ossl_chacha20()
75 crypto_read_iv(crp, counter); in ossl_chacha20()
79 resid = crp->crp_payload_length; in ossl_chacha20()
80 crypto_cursor_init(&cc_in, &crp->crp_buf); in ossl_chacha20()
81 crypto_cursor_advance(&cc_in, crp->crp_payload_start); in ossl_chacha20()
83 if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { in ossl_chacha20()
84 crypto_cursor_init(&cc_out, &crp->crp_obuf); in ossl_chacha20()
85 crypto_cursor_advance(&cc_out, crp->crp_payload_output_start); in ossl_chacha20()
[all …]
H A Dossl_aes.c76 ossl_aes_cbc(struct ossl_session_cipher *s, struct cryptop *crp, in ossl_aes_cbc() argument
91 encrypt = CRYPTO_OP_IS_ENCRYPT(crp->crp_op); in ossl_aes_cbc()
92 plen = crp->crp_payload_length; in ossl_aes_cbc()
98 if (crp->crp_cipher_key != NULL) { in ossl_aes_cbc()
100 error = cipher->set_encrypt_key(crp->crp_cipher_key, in ossl_aes_cbc()
103 error = cipher->set_decrypt_key(crp->crp_cipher_key, in ossl_aes_cbc()
114 crypto_read_iv(crp, iv); in ossl_aes_cbc()
117 crypto_cursor_init(&cc_in, &crp->crp_buf); in ossl_aes_cbc()
118 crypto_cursor_advance(&cc_in, crp->crp_payload_start); in ossl_aes_cbc()
120 if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { in ossl_aes_cbc()
[all …]
H A Dossl.c312 ossl_process_hash(struct ossl_session *s, struct cryptop *crp, in ossl_process_hash() argument
322 if (crp->crp_auth_key == NULL) { in ossl_process_hash()
327 axf->Setkey(&ctx, crp->crp_auth_key, in ossl_process_hash()
330 hmac_init_ipad(axf, crp->crp_auth_key, in ossl_process_hash()
335 if (crp->crp_aad != NULL) in ossl_process_hash()
336 error = axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); in ossl_process_hash()
338 error = crypto_apply(crp, crp->crp_aad_start, in ossl_process_hash()
339 crp in ossl_process_hash()
380 ossl_process_cipher(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_cipher() argument
387 ossl_process_eta(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_eta() argument
406 ossl_process_aead(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_aead() argument
420 ossl_process(device_t dev,struct cryptop * crp,int hint) ossl_process() argument
[all...]
/freebsd/sys/dev/cxgbe/crypto/
H A Dt4_crypto.c431 u_int sgl_len, u_int hash_size, struct cryptop *crp) in ccr_populate_wreq() argument
457 crwr->wreq.cookie = htobe64((uintptr_t)crp); in ccr_populate_wreq()
476 ccr_hash(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) in ccr_hash() argument
487 if (crp->crp_payload_length > MAX_REQUEST_SIZE) in ccr_hash()
513 if (crp->crp_payload_length == 0) { in ccr_hash()
517 } else if (ccr_use_imm_data(transhdr_len, crp->crp_payload_length)) { in ccr_hash()
518 imm_len = crp->crp_payload_length; in ccr_hash()
525 crp->crp_payload_start, crp->crp_payload_length); in ccr_hash()
544 hash_size_in_response, crp); in ccr_hash()
600 ccr_hash_done(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp,const struct cpl_fw6_pld * cpl,int error) ccr_hash_done() argument
620 ccr_cipher(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp) ccr_cipher() argument
783 ccr_cipher_done(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp,const struct cpl_fw6_pld * cpl,int error) ccr_cipher_done() argument
812 ccr_eta(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp) ccr_eta() argument
1106 ccr_eta_done(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp,const struct cpl_fw6_pld * cpl,int error) ccr_eta_done() argument
1117 ccr_gcm(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp) ccr_gcm() argument
1377 ccr_gcm_done(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp,const struct cpl_fw6_pld * cpl,int error) ccr_gcm_done() argument
1413 generate_ccm_b0(struct cryptop * crp,u_int hash_size_in_response,const char * iv,char * b0) generate_ccm_b0() argument
1445 ccr_ccm(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp) ccr_ccm() argument
1743 ccr_ccm_done(struct ccr_softc * sc,struct ccr_session * s,struct cryptop * crp,const struct cpl_fw6_pld * cpl,int error) ccr_ccm_done() argument
1761 ccr_soft_done(struct cryptop * crp) ccr_soft_done() argument
1773 ccr_soft(struct ccr_session * s,struct cryptop * crp) ccr_soft() argument
2523 ccr_process(device_t dev,struct cryptop * crp,int hint) ccr_process() argument
2655 struct cryptop *crp; do_cpl6_fw_pld() local
[all...]
/freebsd/sys/netipsec/
H A Dxform_esp.c107 static int esp_output_cb(struct cryptop *crp);
274 struct cryptop *crp; in esp_input() local
358 crp = crypto_getreq(cryptoid, M_NOWAIT); in esp_input()
359 if (crp == NULL) { in esp_input()
375 crp->crp_op = CRYPTO_OP_VERIFY_DIGEST; in esp_input()
377 crp->crp_aad_length = 8; /* RFC4106 5, SPI + SN */ in esp_input()
379 crp->crp_aad_length = hlen; in esp_input()
381 csp = crypto_get_params(crp->crp_session); in esp_input()
386 crp->crp_aad_length += sizeof(seqh); in esp_input()
387 crp->crp_aad = malloc(crp->crp_aad_length, M_ESP, M_NOWAIT); in esp_input()
[all …]
H A Dxform_ipcomp.c95 static int ipcomp_input_cb(struct cryptop *crp);
96 static int ipcomp_output_cb(struct cryptop *crp);
201 struct cryptop *crp; in ipcomp_input() local
235 crp = crypto_getreq(cryptoid, M_NOWAIT); in ipcomp_input()
236 if (crp == NULL) { in ipcomp_input()
246 crypto_freereq(crp); in ipcomp_input()
251 crp->crp_op = CRYPTO_OP_DECOMPRESS; in ipcomp_input()
252 crp->crp_payload_start = skip + hlen; in ipcomp_input()
253 crp->crp_payload_length = m->m_pkthdr.len - (skip + hlen); in ipcomp_input()
256 crp->crp_flags = CRYPTO_F_CBIFSYNC; in ipcomp_input()
[all …]
H A Dxform_ah.c539 struct cryptop *crp; in ah_input() local
609 crp = crypto_getreq(cryptoid, M_NOWAIT); in ah_input()
610 if (crp == NULL) { in ah_input()
618 crp->crp_payload_start = 0; in ah_input()
619 crp->crp_payload_length = m->m_pkthdr.len; in ah_input()
620 crp->crp_digest_start = skip + rplen; in ah_input()
628 crypto_freereq(crp); in ah_input()
652 crypto_freereq(crp); in ah_input()
658 crp->crp_op = CRYPTO_OP_COMPUTE_DIGEST; in ah_input()
659 crp->crp_flags = CRYPTO_F_CBIFSYNC; in ah_input()
[all …]
/freebsd/sys/geom/eli/
H A Dg_eli_privacy.c87 g_eli_crypto_read_done(struct cryptop *crp) in g_eli_crypto_read_done() argument
92 if (crp->crp_etype == EAGAIN) { in g_eli_crypto_read_done()
93 if (g_eli_crypto_rerun(crp) == 0) in g_eli_crypto_read_done()
96 bp = (struct bio *)crp->crp_opaque; in g_eli_crypto_read_done()
98 if (crp->crp_etype == 0) { in g_eli_crypto_read_done()
101 bp->bio_completed += crp->crp_payload_length; in g_eli_crypto_read_done()
104 bp->bio_inbed, bp->bio_children, crp->crp_etype); in g_eli_crypto_read_done()
106 bp->bio_error = crp->crp_etype; in g_eli_crypto_read_done()
109 if (sc != NULL && crp->crp_cipher_key != NULL) in g_eli_crypto_read_done()
110 g_eli_key_drop(sc, __DECONST(void *, crp->crp_cipher_key)); in g_eli_crypto_read_done()
[all …]
H A Dg_eli_crypto.c49 g_eli_crypto_done(struct cryptop *crp) in g_eli_crypto_done() argument
52 crp->crp_opaque = (void *)crp; in g_eli_crypto_done()
53 wakeup(crp); in g_eli_crypto_done()
62 struct cryptop *crp; in g_eli_crypto_cipher() local
78 crp = crypto_getreq(sid, M_NOWAIT); in g_eli_crypto_cipher()
79 if (crp == NULL) { in g_eli_crypto_cipher()
84 crp->crp_payload_start = 0; in g_eli_crypto_cipher()
85 crp->crp_payload_length = datasize; in g_eli_crypto_cipher()
86 crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_IV_SEPARATE; in g_eli_crypto_cipher()
87 crp->crp_op = enc ? CRYPTO_OP_ENCRYPT : CRYPTO_OP_DECRYPT; in g_eli_crypto_cipher()
[all …]
H A Dg_eli_integrity.c126 g_eli_auth_read_done(struct cryptop *crp) in g_eli_auth_read_done() argument
131 if (crp->crp_etype == EAGAIN) { in g_eli_auth_read_done()
132 if (g_eli_crypto_rerun(crp) == 0) in g_eli_auth_read_done()
135 bp = (struct bio *)crp->crp_opaque; in g_eli_auth_read_done()
138 if (crp->crp_etype == 0) { in g_eli_auth_read_done()
139 bp->bio_completed += crp->crp_payload_length; in g_eli_auth_read_done()
141 bp->bio_inbed, bp->bio_children, crp->crp_payload_length, (intmax_t)bp->bio_completed); in g_eli_auth_read_done()
156 rel_sec = ((crp->crp_buf.cb_buf + crp->crp_payload_start) - in g_eli_auth_read_done()
161 *errorp = crp->crp_etype; in g_eli_auth_read_done()
164 bp->bio_inbed, bp->bio_children, crp->crp_etype); in g_eli_auth_read_done()
[all …]
/freebsd/sys/crypto/armv8/
H A Darmv8_crypto.c273 armv8_crypto_process(device_t dev, struct cryptop *crp, int hint __unused) in armv8_crypto_process() argument
277 ses = crypto_get_driver_session(crp->crp_session); in armv8_crypto_process()
278 crp->crp_etype = armv8_crypto_cipher_process(ses, crp); in armv8_crypto_process()
279 crypto_done(crp); in armv8_crypto_process()
284 armv8_crypto_cipher_alloc(struct cryptop *crp, int start, int length, int *allocated) in armv8_crypto_cipher_alloc() argument
288 addr = crypto_contiguous_subsegment(crp, start, length); in armv8_crypto_cipher_alloc()
293 addr = malloc(crp->crp_payload_length, M_ARMV8_CRYPTO, M_NOWAIT); in armv8_crypto_cipher_alloc()
296 crypto_copydata(crp, start, length, addr); in armv8_crypto_cipher_alloc()
304 struct cryptop *crp) in armv8_crypto_cipher_process() argument
314 csp = crypto_get_params(crp->crp_session); in armv8_crypto_cipher_process()
[all …]
/freebsd/sys/kgssapi/krb5/
H A Dkcrypto_aes.c117 aes_crypto_cb(struct cryptop *crp) in aes_crypto_cb() argument
120 struct aes_state *as = (struct aes_state *) crp->crp_opaque; in aes_crypto_cb()
122 if (CRYPTO_SESS_SYNC(crp->crp_session)) in aes_crypto_cb()
125 error = crp->crp_etype; in aes_crypto_cb()
127 error = crypto_dispatch(crp); in aes_crypto_cb()
129 if (error || (crp->crp_flags & CRYPTO_F_DONE)) in aes_crypto_cb()
130 wakeup(crp); in aes_crypto_cb()
141 struct cryptop *crp; in aes_encrypt_1() local
144 crp = crypto_getreq(as->as_session_aes, M_WAITOK); in aes_encrypt_1()
146 crp->crp_payload_start = skip; in aes_encrypt_1()
[all …]
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dcrypto_os.c137 freebsd_zfs_crypt_done(struct cryptop *crp) in freebsd_zfs_crypt_done() argument
141 ses = crp->crp_opaque; in freebsd_zfs_crypt_done()
145 wakeup(crp); in freebsd_zfs_crypt_done()
150 freebsd_zfs_crypt_done_sync(struct cryptop *crp) in freebsd_zfs_crypt_done_sync() argument
165 zfs_crypto_dispatch(freebsd_crypt_session_t *session, struct cryptop *crp) in zfs_crypto_dispatch() argument
169 crp->crp_opaque = session; in zfs_crypto_dispatch()
172 boolean_t async = ((crypto_ses2caps(crp->crp_session) & in zfs_crypto_dispatch()
175 boolean_t async = !CRYPTO_SESS_SYNC(crp->crp_session); in zfs_crypto_dispatch()
177 crp->crp_callback = async ? freebsd_zfs_crypt_done : in zfs_crypto_dispatch()
179 error = crypto_dispatch(crp); in zfs_crypto_dispatch()
[all …]
/freebsd/sys/crypto/via/
H A Dpadlock_cipher.c164 padlock_cipher_alloc(struct cryptop *crp, int *allocated) in padlock_cipher_alloc() argument
168 addr = crypto_contiguous_subsegment(crp, crp->crp_payload_start, in padlock_cipher_alloc()
169 crp->crp_payload_length); in padlock_cipher_alloc()
176 addr = malloc(crp->crp_payload_length + 16, M_PADLOCK, M_NOWAIT); in padlock_cipher_alloc()
181 padlock_cipher_process(struct padlock_session *ses, struct cryptop *crp, in padlock_cipher_process() argument
191 buf = padlock_cipher_alloc(crp, &allocated); in padlock_cipher_process()
197 if (crp->crp_cipher_key != NULL) { in padlock_cipher_process()
198 padlock_cipher_key_setup(ses, crp->crp_cipher_key, in padlock_cipher_process()
208 crypto_read_iv(crp, iv); in padlock_cipher_process()
210 if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { in padlock_cipher_process()
[all …]
/freebsd/sys/dev/wg/
H A Dwg_crypto.c208 crypto_callback(struct cryptop *crp) in crypto_callback() argument
218 struct cryptop crp; in chacha20poly1305_encrypt_mbuf() local
223 crypto_initreq(&crp, chacha20_poly1305_sid); in chacha20poly1305_encrypt_mbuf()
224 crp.crp_op = CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST; in chacha20poly1305_encrypt_mbuf()
225 crp.crp_flags = CRYPTO_F_IV_SEPARATE | CRYPTO_F_CBIMM; in chacha20poly1305_encrypt_mbuf()
226 crypto_use_mbuf(&crp, m); in chacha20poly1305_encrypt_mbuf()
227 crp.crp_payload_length = m->m_pkthdr.len - POLY1305_HASH_LEN; in chacha20poly1305_encrypt_mbuf()
228 crp.crp_digest_start = crp.crp_payload_length; in chacha20poly1305_encrypt_mbuf()
229 le64enc(crp.crp_iv, nonce); in chacha20poly1305_encrypt_mbuf()
230 crp.crp_cipher_key = key; in chacha20poly1305_encrypt_mbuf()
[all …]
/freebsd/sys/dev/glxsb/
H A Dglxsb_hash.c63 glxsb_authcompute(struct glxsb_session *ses, struct cryptop *crp) in glxsb_authcompute() argument
72 error = crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, in glxsb_authcompute()
76 error = crypto_apply(crp, crp->crp_payload_start, in glxsb_authcompute()
77 crp->crp_payload_length, axf->Update, &ctx); in glxsb_authcompute()
89 if (crp->crp_op & CRYPTO_OP_VERIFY_DIGEST) { in glxsb_authcompute()
92 crypto_copydata(crp, crp->crp_digest_start, ses->ses_mlen, in glxsb_authcompute()
98 crypto_copyback(crp, crp->crp_digest_start, ses->ses_mlen, in glxsb_authcompute()
133 const struct crypto_session_params *csp, struct cryptop *crp) in glxsb_hash_process() argument
137 if (crp->crp_auth_key != NULL) in glxsb_hash_process()
138 glxsb_hash_key_setup(ses, crp->crp_auth_key, in glxsb_hash_process()
[all …]
H A Dglxsb.c622 glxsb_crypto_encdec(struct cryptop *crp, struct glxsb_session *ses, in glxsb_crypto_encdec() argument
634 if ((crp->crp_payload_length % SB_AES_BLOCK_SIZE) != 0) in glxsb_crypto_encdec()
638 xlen = crp->crp_payload_length > GLXSB_MAX_AES_LEN ? in glxsb_crypto_encdec()
639 GLXSB_MAX_AES_LEN : crp->crp_payload_length; in glxsb_crypto_encdec()
651 if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) in glxsb_crypto_encdec()
656 crypto_read_iv(crp, op_iv); in glxsb_crypto_encdec()
659 tlen = crp->crp_payload_length; in glxsb_crypto_encdec()
661 if (crp->crp_cipher_key != NULL) in glxsb_crypto_encdec()
662 key = crp->crp_cipher_key; in glxsb_crypto_encdec()
669 crypto_copydata(crp, crp->crp_payload_start + offset, len, in glxsb_crypto_encdec()
[all …]
/freebsd/sys/crypto/blake2/
H A Dblake2_cryptodev.c55 struct cryptop *crp);
147 blake2_process(device_t dev, struct cryptop *crp, int hint __unused) in blake2_process() argument
152 ses = crypto_get_driver_session(crp->crp_session); in blake2_process()
153 error = blake2_cipher_process(ses, crp); in blake2_process()
155 crp->crp_etype = error; in blake2_process()
156 crypto_done(crp); in blake2_process()
251 blake2_cipher_process(struct blake2_session *ses, struct cryptop *crp) in blake2_cipher_process() argument
263 csp = crypto_get_params(crp->crp_session); in blake2_cipher_process()
264 if (crp->crp_auth_key != NULL) in blake2_cipher_process()
265 key = crp->crp_auth_key; in blake2_cipher_process()
[all …]
/freebsd/sys/dev/sec/
H A Dsec.c75 struct sec_dma_mem *dma_mem, struct cryptop *crp, bus_size_t size,
83 u_int n, struct cryptop *crp, bus_size_t doffset, bus_size_t dsize);
90 static int sec_process(device_t dev, struct cryptop *crp, int hint);
93 struct cryptop *crp);
96 struct cryptop *crp);
104 struct cryptop *crp);
113 struct cryptop *crp);
515 struct cryptop *crp; in sec_primary_intr() local
565 crp = desc->sd_crp; in sec_primary_intr()
566 crp->crp_etype = desc->sd_error; in sec_primary_intr()
[all …]

123