![]() |
nrfxlib API 3.3.99
|
| int ocrypto_aes_gcm_decrypt | ( | uint8_t * | pt, |
| const uint8_t * | tag, | ||
| size_t | tag_len, | ||
| const uint8_t * | ct, | ||
| size_t | ct_len, | ||
| const uint8_t * | key, | ||
| size_t | size, | ||
| const uint8_t | iv[12], | ||
| const uint8_t * | aa, | ||
| size_t | aa_len ) |
#include <crypto/nrf_oberon/include/ocrypto_aes_gcm.h>
AES-GCM decryption.
| [out] | pt | Plaintext. |
| tag | Authentication tag. | |
| tag_len | Authentication tag length, 0 < tag_len <= 16. | |
| ct | Ciphertext. | |
| ct_len | Ciphertext length, 0 < ct_len < 2^36-32 bytes. | |
| key | AES key. | |
| size | Key size (16, 24, or 32 bytes). | |
| iv | Initial vector. | |
| aa | Additional authentication data. | |
| aa_len | Additional authentication data length, 0 < aa_len < 2^61 bytes. |
ct may be same as pt.| 0 | If tag is valid. |
| -1 | Otherwise. |