Lines Matching refs:ciphertext
174 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, in aes_encrypt_atomic() argument
185 ASSERT(ciphertext != NULL); in aes_encrypt_atomic()
207 if (ciphertext->cd_length < length_needed) { in aes_encrypt_atomic()
208 ciphertext->cd_length = length_needed; in aes_encrypt_atomic()
213 saved_offset = ciphertext->cd_offset; in aes_encrypt_atomic()
214 saved_length = ciphertext->cd_length; in aes_encrypt_atomic()
221 ret = crypto_update_iov(&aes_ctx, plaintext, ciphertext, in aes_encrypt_atomic()
225 ret = crypto_update_uio(&aes_ctx, plaintext, ciphertext, in aes_encrypt_atomic()
235 ciphertext, AES_BLOCK_LEN, aes_encrypt_block, in aes_encrypt_atomic()
242 ciphertext, AES_BLOCK_LEN, aes_encrypt_block, in aes_encrypt_atomic()
251 if (plaintext != ciphertext) { in aes_encrypt_atomic()
252 ciphertext->cd_length = in aes_encrypt_atomic()
253 ciphertext->cd_offset - saved_offset; in aes_encrypt_atomic()
256 ciphertext->cd_length = saved_length; in aes_encrypt_atomic()
258 ciphertext->cd_offset = saved_offset; in aes_encrypt_atomic()
273 crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext, in aes_decrypt_atomic() argument
299 length_needed = ciphertext->cd_length - aes_ctx.ac_tag_len; in aes_decrypt_atomic()
318 switch (ciphertext->cd_format) { in aes_decrypt_atomic()
320 ret = crypto_update_iov(&aes_ctx, ciphertext, plaintext, in aes_decrypt_atomic()
324 ret = crypto_update_uio(&aes_ctx, ciphertext, plaintext, in aes_decrypt_atomic()
342 (ciphertext != plaintext)) { in aes_decrypt_atomic()
354 (ciphertext != plaintext)) { in aes_decrypt_atomic()