Lines Matching refs:crp

273 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()
315 encflag = CRYPTO_OP_IS_ENCRYPT(crp->crp_op); in armv8_crypto_cipher_process()
321 if (crp->crp_aad != NULL) in armv8_crypto_cipher_process()
322 authbuf = crp->crp_aad; in armv8_crypto_cipher_process()
324 authbuf = armv8_crypto_cipher_alloc(crp, crp->crp_aad_start, in armv8_crypto_cipher_process()
325 crp->crp_aad_length, &authallocated); in armv8_crypto_cipher_process()
329 crypto_cursor_init(&fromc, &crp->crp_buf); in armv8_crypto_cipher_process()
330 crypto_cursor_advance(&fromc, crp->crp_payload_start); in armv8_crypto_cipher_process()
331 if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { in armv8_crypto_cipher_process()
332 crypto_cursor_init(&toc, &crp->crp_obuf); in armv8_crypto_cipher_process()
333 crypto_cursor_advance(&toc, crp->crp_payload_output_start); in armv8_crypto_cipher_process()
338 if (crp->crp_cipher_key != NULL) { in armv8_crypto_cipher_process()
339 armv8_crypto_cipher_setup(ses, csp, crp->crp_cipher_key, in armv8_crypto_cipher_process()
343 crypto_read_iv(crp, iv); in armv8_crypto_cipher_process()
350 if ((crp->crp_payload_length % AES_BLOCK_LEN) != 0) { in armv8_crypto_cipher_process()
356 crp->crp_payload_length, &fromc, &toc, iv); in armv8_crypto_cipher_process()
359 crp->crp_payload_length, &fromc, &toc, iv); in armv8_crypto_cipher_process()
364 &ses->xts_schedule.aes_key, crp->crp_payload_length, in armv8_crypto_cipher_process()
368 &ses->xts_schedule.aes_key, crp->crp_payload_length, in armv8_crypto_cipher_process()
375 crp->crp_payload_length, &fromc, &toc, in armv8_crypto_cipher_process()
376 crp->crp_aad_length, authbuf, tag, iv, ses->Htable); in armv8_crypto_cipher_process()
377 crypto_copyback(crp, crp->crp_digest_start, sizeof(tag), in armv8_crypto_cipher_process()
380 crypto_copydata(crp, crp->crp_digest_start, sizeof(tag), in armv8_crypto_cipher_process()
383 crp->crp_payload_length, &fromc, &toc, in armv8_crypto_cipher_process()
384 crp->crp_aad_length, authbuf, tag, iv, ses->Htable); in armv8_crypto_cipher_process()