Lines Matching refs:cryptlen
233 * the caller must have handled the cryptlen == 0 case already.
239 req->dst->length >= req->cryptlen &&
240 req->src->length >= req->cryptlen;
245 * or more times to en/decrypt 'cryptlen' bytes of data from the source
259 #define AES_CRYPT_SG(crypt_func, dst, src, cryptlen, start_pos, ...) \
261 unsigned int remaining = (cryptlen); \
353 if (unlikely(req->cryptlen % AES_BLOCK_SIZE))
355 AES_CRYPT_SG(aes_ecb_encrypt, req->dst, req->src, req->cryptlen, 0,
365 if (unlikely(req->cryptlen % AES_BLOCK_SIZE))
367 AES_CRYPT_SG(aes_ecb_decrypt, req->dst, req->src, req->cryptlen, 0,
375 unsigned int cryptlen,
378 AES_CRYPT_SG(aes_cbc_encrypt, req->dst, req->src, cryptlen, 0, req->iv,
383 unsigned int cryptlen,
386 AES_CRYPT_SG(aes_cbc_decrypt, req->dst, req->src, cryptlen, 0, req->iv,
395 if (unlikely(req->cryptlen % AES_BLOCK_SIZE))
397 crypto_aes_cbc_encrypt_sg(req, req->cryptlen, key);
406 if (unlikely(req->cryptlen % AES_BLOCK_SIZE))
408 crypto_aes_cbc_decrypt_sg(req, req->cryptlen, key);
424 unsigned int main_len = req->cryptlen;
459 if (unlikely(req->cryptlen < AES_BLOCK_SIZE))
464 req->cryptlen, req->iv, key);
476 if (unlikely(req->cryptlen < AES_BLOCK_SIZE))
481 req->cryptlen, req->iv, key);
494 AES_CRYPT_SG(aes_ctr, req->dst, req->src, req->cryptlen, 0, req->iv,
507 AES_CRYPT_SG(aes_xctr, req->dst, req->src, req->cryptlen, 0, &ctr,
550 unsigned int main_len = req->cryptlen;
581 if (unlikely(req->cryptlen < AES_BLOCK_SIZE))
586 req->cryptlen, req->iv, key, /* cont= */ false);
597 if (unlikely(req->cryptlen < AES_BLOCK_SIZE))
602 req->cryptlen, req->iv, key, /* cont= */ false);
780 req->cryptlen, req->assoclen, &ctx);
782 memcpy_to_sglist(req->dst, req->assoclen + req->cryptlen, authtag,
800 /* crypto_aead_decrypt() already checked cryptlen >= authtag_len. */
801 data_len = req->cryptlen - key->authtag_len;
964 err = crypto_aes_ccm_init(&ctx, req, req->cryptlen, key);
968 req->cryptlen, req->assoclen, &ctx);
970 memcpy_to_sglist(req->dst, req->assoclen + req->cryptlen, authtag,
985 /* crypto_aead_decrypt() already checked cryptlen >= authtag_len. */
986 data_len = req->cryptlen - key->authtag_len;