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 flag- decrypt.
- 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 the- decryptflag, or it does not permit the requested algorithm.
- PsaErrorInvalidArgument: The- keyis not compatible with- alg.
- 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.