---
name: "crypto_aead_decrypt"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/crypto_aead_decrypt"
---

# crypto\_aead\_decrypt(9)

decrypt ciphertext

## NAME

crypto\_aead\_decrypt - decrypt ciphertext

## SYNOPSIS

**int crypto\_aead\_decrypt(struct aead\_request \*** *req***);**

## ARGUMENTS

*req*

reference to the ablkcipher\_request handle that holds all information needed to perform the cipher operation

## DESCRIPTION

Decrypt ciphertext data using the aead\_request handle. That data structure and how it is filled with data is discussed with the aead\_request\_\* functions.

IMPORTANT NOTE The caller must concatenate the ciphertext followed by the authentication data / tag. That authentication data / tag must have the size defined by the crypto\_aead\_setauthsize invocation.

## RETURN

0 if the cipher operation was successful; -EBADMSG: The AEAD cipher operation performs the authentication of the data during the decryption operation. Therefore, the function returns this error if the authentication of the ciphertext was unsuccessful (i.e. the integrity of the ciphertext or the associated data was violated); \< 0 if an error occurred.

## AUTHORS

**Stephan Mueller** \<smueller@chronox.de\>

Author.

**Marek Vasut** \<marek@denx.de\>

Author.

## COPYRIGHT
