#ifndef ASR_AES_OPTEE_H | |
#define ASR_AES_OPTEE_H | |
#define ASR_AES_ACCESS_UUID \ | |
{ \ | |
0xba1b496f, 0xf07d, 0x466e, \ | |
{ 0x99, 0x09, 0xeb, 0xe3, 0x55, 0x43, 0xa0, 0x1c } \ | |
} | |
/* | |
* AES ECB encrypt/decrypt data with HWKEY(RKEK) | |
* | |
* [in] params[0].memref.buffer plain/cipher text to encrypt/decrypt | |
* [in] params[0].memref.size length of plain/cipher text | |
* [out] pParams[1].memref.buffer cipher/plain text after encrypt/decrypt | |
* [in] pParams[2].value.a keysize | |
* [in] pParams[2].value.b op_mode: 1--encrypt, 0--decrypt | |
*/ | |
#define CMD_AES_HWKEY_ECB 0x1 | |
/* | |
* AES CBC encrypt/decrypt data with HWKEY(RKEK) | |
* | |
* [in] params[0].memref.buffer plain/cipher text to encrypt/decrypt | |
* [in] params[0].memref.size length of plain/cipher text | |
* [out] pParams[1].memref.buffer cipher/plain text after encrypt/decrypt | |
* [in] pParams[2].value.a keysize | |
* [in] pParams[2].value.b op_mode: 1--encrypt, 0--decrypt | |
* [in] pParams[3].memref.buffer initial vector | |
*/ | |
#define CMD_AES_HWKEY_CBC 0x2 | |
/* | |
* Check AES RKEK status | |
* 0: RKEK(hwkey) is not burned | |
* 1: RKEK(hwkey) is burned and software access is disabled | |
* 2: RKEK(hwkey) is burned but software access is not disabled) | |
* | |
* [out] pParams[0].value.a status | |
*/ | |
#define CMD_AES_HWKEY_STATUS 0x3 | |
#include "asr-aes.h" | |
#endif |