devcrypto_aead_cipher_op_decrypt

Decrypt data using the specified AEAD cipher algorithm state

Synopsis:

#include <dev/crypto/devcrypto_plugin.h>
typedef int(* devcrypto_aead_cipher_op_decrypt)(devcrypto_state_ctx_t *sctx,
            const uint8_t *in,
            uint32_t insize,
            uint8_t *aad,
            uint32_t aadsize,
            uint8_t *tag,
            uint32_t tagsize,
            uint8_t *out,
            uint32_t *outsize);

Arguments:

sctx
The state context.
in
The ciphertext buffer to decrypt.
insize
The size of the input buffer.
aad
The Additional Authentication Data (AAD) buffer.
aadsize
The size of the AAD buffer.
tag
The tag value to use for decryption and verification.
tagsize
The size of the tag buffer.
out
The decrypted ciphertext (plaintext).
outsize
The size of the output buffer and the decrypted data.

Library:

devcr

Description:

Some algorithms (e.g., AES-CCM) require the tag value in the initialization phase.

Returns:

EOK if successful or errno if an error occurred.