Lines Matching defs:ciphertext
530 crypto_data_t *ciphertext, crypto_req_handle_t req)
547 DES_ARG_INPLACE(plaintext, ciphertext);
553 if (ciphertext->cd_length < plaintext->cd_length) {
554 ciphertext->cd_length = plaintext->cd_length;
561 ret = des_encrypt_update(ctx, plaintext, ciphertext, req);
571 des_decrypt(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
583 if ((ciphertext->cd_length & (DES_BLOCK_LEN - 1)) != 0)
589 DES_ARG_INPLACE(ciphertext, plaintext);
595 if (plaintext->cd_length < ciphertext->cd_length) {
596 plaintext->cd_length = ciphertext->cd_length;
603 ret = des_decrypt_update(ctx, ciphertext, plaintext, req);
614 crypto_data_t *ciphertext, crypto_req_handle_t req)
622 DES_ARG_INPLACE(plaintext, ciphertext);
624 /* compute number of bytes that will hold the ciphertext */
630 if (ciphertext->cd_length < out_len) {
631 ciphertext->cd_length = out_len;
635 saved_offset = ciphertext->cd_offset;
636 saved_length = ciphertext->cd_length;
644 plaintext, ciphertext, des_encrypt_contiguous_blocks,
649 plaintext, ciphertext, des_encrypt_contiguous_blocks,
654 plaintext, ciphertext, des_encrypt_contiguous_blocks,
662 if (plaintext != ciphertext)
663 ciphertext->cd_length =
664 ciphertext->cd_offset - saved_offset;
666 ciphertext->cd_length = saved_length;
668 ciphertext->cd_offset = saved_offset;
675 des_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
684 DES_ARG_INPLACE(ciphertext, plaintext);
688 out_len += ciphertext->cd_length;
703 switch (ciphertext->cd_format) {
706 ciphertext, plaintext, des_decrypt_contiguous_blocks,
711 ciphertext, plaintext, des_decrypt_contiguous_blocks,
716 ciphertext, plaintext, des_decrypt_contiguous_blocks,
724 if (ciphertext != plaintext)
737 des_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *ciphertext,
754 ciphertext->cd_length = 0;
770 * There must be no unprocessed ciphertext.
771 * This happens if the length of the last ciphertext is
787 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext,
797 DES_ARG_INPLACE(plaintext, ciphertext);
808 if (ciphertext->cd_length < plaintext->cd_length) {
809 ciphertext->cd_length = plaintext->cd_length;
844 saved_offset = ciphertext->cd_offset;
845 saved_length = ciphertext->cd_length;
852 ret = crypto_update_iov(&des_ctx, plaintext, ciphertext,
856 ret = crypto_update_uio(&des_ctx, plaintext, ciphertext,
860 ret = crypto_update_mp(&des_ctx, plaintext, ciphertext,
874 if (plaintext != ciphertext)
875 ciphertext->cd_length =
876 ciphertext->cd_offset - saved_offset;
878 ciphertext->cd_length = saved_length;
880 ciphertext->cd_offset = saved_offset;
890 crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext,
900 DES_ARG_INPLACE(ciphertext, plaintext);
907 if ((ciphertext->cd_length & (DES_BLOCK_LEN - 1)) != 0)
911 if (plaintext->cd_length < ciphertext->cd_length) {
912 plaintext->cd_length = ciphertext->cd_length;
953 switch (ciphertext->cd_format) {
955 ret = crypto_update_iov(&des_ctx, ciphertext, plaintext,
959 ret = crypto_update_uio(&des_ctx, ciphertext, plaintext,
963 ret = crypto_update_mp(&des_ctx, ciphertext, plaintext,
977 if (ciphertext != plaintext)