Lines Matching defs:plaintext
336 blowfish_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext,
348 if ((plaintext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0)
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);
379 crypto_data_t *plaintext, crypto_req_handle_t req)
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);
420 blowfish_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext,
429 BLOWFISH_ARG_INPLACE(plaintext, ciphertext);
434 out_len += plaintext->cd_length;
449 switch (plaintext->cd_format) {
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)
484 crypto_data_t *plaintext, crypto_req_handle_t req)
492 BLOWFISH_ARG_INPLACE(ciphertext, plaintext);
494 /* compute number of bytes that will hold the plaintext */
501 if (plaintext->cd_length < out_len) {
502 plaintext->cd_length = out_len;
506 saved_offset = plaintext->cd_offset;
507 saved_length = plaintext->cd_length;
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)
534 plaintext->cd_length =
535 plaintext->cd_offset - saved_offset;
537 plaintext->cd_length = saved_length;
539 plaintext->cd_offset = saved_offset;
596 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext,
604 BLOWFISH_ARG_INPLACE(plaintext, ciphertext);
611 if ((plaintext->cd_length & (BLOWFISH_BLOCK_LEN - 1)) != 0)
615 if (ciphertext->cd_length < plaintext->cd_length) {
616 ciphertext->cd_length = plaintext->cd_length;
640 switch (plaintext->cd_format) {
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)
683 crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext,
691 BLOWFISH_ARG_INPLACE(ciphertext, plaintext);
702 if (plaintext->cd_length < ciphertext->cd_length) {
703 plaintext->cd_length = ciphertext->cd_length;
721 saved_offset = plaintext->cd_offset;
722 saved_length = plaintext->cd_length;
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)
756 plaintext->cd_length =
757 plaintext->cd_offset - saved_offset;
759 plaintext->cd_length = saved_length;
761 plaintext->cd_offset = saved_offset;