PsaAeadDecrypt
Process an authenticated decryption operation. Opcode: 18 (0x0012)
Parameters
| Name | Type | Description |
|---|---|---|
key_name | String | Name of the key to use for the operation |
alg | Aead | The AEAD algorithm to compute |
nonce | Vector of unsigned bytes | Nonce or IV to use |
additional_data | Vector of unsigned bytes | Additional data that has been authenticated but not encrypted |
ciphertext | Vector of unsigned bytes | Data that has been authenticated and encrypted |
key_namemust allow the usage flagdecrypt.noncemust be appropriate for the selected algorithm.- For algorithms where the encrypted data and the authentication tag are defined as separate inputs,
ciphertextmust contain the encrypted data followed by the authentication tag.
Results
| Name | Type | Description |
|---|---|---|
plaintext | Vector of unsigned bytes | Buffer containing the decrypted data |
Specific response status codes
PsaErrorInvalidSignature: The ciphertext is not authentic.PsaErrorNotPermitted: The key does not have thedecryptflag, or it does not permit the requested algorithm.PsaErrorInvalidArgument: Thekeyis not compatible withalg.PsaErrorNotSupported:algis not supported.
Description
Authenticates and decrypts the given data using the given AEAD algorithm. Process an authenticated decryption operation.
Contract
Copyright 2020 Contributors to the Parsec project.