Lines Matching defs:plaintext

529 des_encrypt(crypto_ctx_t *ctx, crypto_data_t *plaintext,
541 if ((plaintext->cd_length & (DES_BLOCK_LEN - 1)) != 0)
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);
572 crypto_data_t *plaintext, crypto_req_handle_t req)
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);
613 des_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext,
622 DES_ARG_INPLACE(plaintext, ciphertext);
626 out_len += plaintext->cd_length;
641 switch (plaintext->cd_format) {
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)
676 crypto_data_t *plaintext, crypto_req_handle_t req)
684 DES_ARG_INPLACE(ciphertext, plaintext);
686 /* compute number of bytes that will hold the plaintext */
692 if (plaintext->cd_length < out_len) {
693 plaintext->cd_length = out_len;
697 saved_offset = plaintext->cd_offset;
698 saved_length = plaintext->cd_length;
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)
725 plaintext->cd_length =
726 plaintext->cd_offset - saved_offset;
728 plaintext->cd_length = saved_length;
730 plaintext->cd_offset = saved_offset;
746 * There must be no unprocessed plaintext.
761 des_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *plaintext,
778 plaintext->cd_length = 0;
787 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext,
797 DES_ARG_INPLACE(plaintext, ciphertext);
804 if ((plaintext->cd_length & (DES_BLOCK_LEN - 1)) != 0)
808 if (ciphertext->cd_length < plaintext->cd_length) {
809 ciphertext->cd_length = plaintext->cd_length;
850 switch (plaintext->cd_format) {
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)
890 crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext,
900 DES_ARG_INPLACE(ciphertext, plaintext);
911 if (plaintext->cd_length < ciphertext->cd_length) {
912 plaintext->cd_length = ciphertext->cd_length;
947 saved_offset = plaintext->cd_offset;
948 saved_length = plaintext->cd_length;
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)
978 plaintext->cd_length =
979 plaintext->cd_offset - saved_offset;
981 plaintext->cd_length = saved_length;
983 plaintext->cd_offset = saved_offset;