Lines Matching defs:ciphertext
337 crypto_data_t *ciphertext, crypto_req_handle_t req)
354 BLOWFISH_ARG_INPLACE(plaintext, ciphertext);
360 if (ciphertext->cd_length < plaintext->cd_length) {
361 ciphertext->cd_length = plaintext->cd_length;
368 ret = blowfish_encrypt_update(ctx, plaintext, ciphertext, req);
378 blowfish_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
390 if ((ciphertext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0)
396 BLOWFISH_ARG_INPLACE(ciphertext, plaintext);
402 if (plaintext->cd_length < ciphertext->cd_length) {
403 plaintext->cd_length = ciphertext->cd_length;
410 ret = blowfish_decrypt_update(ctx, ciphertext, plaintext, req);
421 crypto_data_t *ciphertext, crypto_req_handle_t req)
429 BLOWFISH_ARG_INPLACE(plaintext, ciphertext);
431 /* compute number of bytes that will hold the ciphertext */
438 if (ciphertext->cd_length < out_len) {
439 ciphertext->cd_length = out_len;
443 saved_offset = ciphertext->cd_offset;
444 saved_length = ciphertext->cd_length;
452 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks,
457 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks,
462 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks,
470 if (plaintext != ciphertext)
471 ciphertext->cd_length =
472 ciphertext->cd_offset - saved_offset;
474 ciphertext->cd_length = saved_length;
476 ciphertext->cd_offset = saved_offset;
483 blowfish_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
492 BLOWFISH_ARG_INPLACE(ciphertext, plaintext);
497 out_len += ciphertext->cd_length;
512 switch (ciphertext->cd_format) {
515 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks,
520 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks,
525 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks,
533 if (ciphertext != plaintext)
579 * There must be no unprocessed ciphertext.
580 * This happens if the length of the last ciphertext is
596 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext,
604 BLOWFISH_ARG_INPLACE(plaintext, ciphertext);
615 if (ciphertext->cd_length < plaintext->cd_length) {
616 ciphertext->cd_length = plaintext->cd_length;
634 saved_offset = ciphertext->cd_offset;
635 saved_length = ciphertext->cd_length;
643 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks,
648 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks,
653 plaintext, ciphertext, blowfish_encrypt_contiguous_blocks,
668 if (plaintext != ciphertext)
669 ciphertext->cd_length =
670 ciphertext->cd_offset - saved_offset;
672 ciphertext->cd_length = saved_length;
674 ciphertext->cd_offset = saved_offset;
683 crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext,
691 BLOWFISH_ARG_INPLACE(ciphertext, plaintext);
698 if ((ciphertext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0)
702 if (plaintext->cd_length < ciphertext->cd_length) {
703 plaintext->cd_length = ciphertext->cd_length;
727 switch (ciphertext->cd_format) {
730 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks,
735 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks,
740 ciphertext, plaintext, blowfish_decrypt_contiguous_blocks,
755 if (ciphertext != plaintext)