Lines Matching refs:ciphertext
337 crypto_data_t *ciphertext, crypto_req_handle_t req) in blowfish_encrypt() argument
354 BLOWFISH_ARG_INPLACE(plaintext, ciphertext); in blowfish_encrypt()
360 if (ciphertext->cd_length < plaintext->cd_length) { in blowfish_encrypt()
361 ciphertext->cd_length = plaintext->cd_length; in blowfish_encrypt()
368 ret = blowfish_encrypt_update(ctx, plaintext, ciphertext, req); in blowfish_encrypt()
378 blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext, in blowfish_decrypt() argument
390 if ((ciphertext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0) in blowfish_decrypt()
396 BLOWFISH_ARG_INPLACE(ciphertext, plaintext); in blowfish_decrypt()
402 if (plaintext->cd_length < ciphertext->cd_length) { in blowfish_decrypt()
403 plaintext->cd_length = ciphertext->cd_length; in blowfish_decrypt()
410 ret = blowfish_decrypt_update(ctx, ciphertext, plaintext, req); in blowfish_decrypt()
421 crypto_data_t *ciphertext, crypto_req_handle_t req) in blowfish_encrypt_update() argument
429 BLOWFISH_ARG_INPLACE(plaintext, ciphertext); in blowfish_encrypt_update()
438 if (ciphertext->cd_length < out_len) { in blowfish_encrypt_update()
439 ciphertext->cd_length = out_len; in blowfish_encrypt_update()
443 saved_offset = ciphertext->cd_offset; in blowfish_encrypt_update()
444 saved_length = ciphertext->cd_length; in blowfish_encrypt_update()
452 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks, in blowfish_encrypt_update()
457 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks, in blowfish_encrypt_update()
462 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks, in blowfish_encrypt_update()
470 if (plaintext != ciphertext) in blowfish_encrypt_update()
471 ciphertext->cd_length = in blowfish_encrypt_update()
472 ciphertext->cd_offset - saved_offset; in blowfish_encrypt_update()
474 ciphertext->cd_length = saved_length; in blowfish_encrypt_update()
476 ciphertext->cd_offset = saved_offset; in blowfish_encrypt_update()
483 blowfish_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext, in blowfish_decrypt_update() argument
492 BLOWFISH_ARG_INPLACE(ciphertext, plaintext); in blowfish_decrypt_update()
497 out_len += ciphertext->cd_length; in blowfish_decrypt_update()
512 switch (ciphertext->cd_format) { in blowfish_decrypt_update()
515 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks, in blowfish_decrypt_update()
520 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks, in blowfish_decrypt_update()
525 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks, in blowfish_decrypt_update()
533 if (ciphertext != plaintext) in blowfish_decrypt_update()
596 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, in blowfish_encrypt_atomic() argument
604 BLOWFISH_ARG_INPLACE(plaintext, ciphertext); in blowfish_encrypt_atomic()
615 if (ciphertext->cd_length < plaintext->cd_length) { in blowfish_encrypt_atomic()
616 ciphertext->cd_length = plaintext->cd_length; in blowfish_encrypt_atomic()
634 saved_offset = ciphertext->cd_offset; in blowfish_encrypt_atomic()
635 saved_length = ciphertext->cd_length; in blowfish_encrypt_atomic()
643 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks, in blowfish_encrypt_atomic()
648 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks, in blowfish_encrypt_atomic()
653 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks, in blowfish_encrypt_atomic()
668 if (plaintext != ciphertext) in blowfish_encrypt_atomic()
669 ciphertext->cd_length = in blowfish_encrypt_atomic()
670 ciphertext->cd_offset - saved_offset; in blowfish_encrypt_atomic()
672 ciphertext->cd_length = saved_length; in blowfish_encrypt_atomic()
674 ciphertext->cd_offset = saved_offset; in blowfish_encrypt_atomic()
683 crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext, in blowfish_decrypt_atomic() argument
691 BLOWFISH_ARG_INPLACE(ciphertext, plaintext); in blowfish_decrypt_atomic()
698 if ((ciphertext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0) in blowfish_decrypt_atomic()
702 if (plaintext->cd_length < ciphertext->cd_length) { in blowfish_decrypt_atomic()
703 plaintext->cd_length = ciphertext->cd_length; in blowfish_decrypt_atomic()
727 switch (ciphertext->cd_format) { in blowfish_decrypt_atomic()
730 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks, in blowfish_decrypt_atomic()
735 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks, in blowfish_decrypt_atomic()
740 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks, in blowfish_decrypt_atomic()
755 if (ciphertext != plaintext) in blowfish_decrypt_atomic()