![]() |
Samsung Internal API reference
2.0
|
Secure Objects API. More...
Go to the source code of this file.
Macros | |
| #define | SO_TAG_LEN (16) |
| #define | SO_IV_LEN (16) |
| #define | SO_AC_LEN (4) |
| #define | SO_MAGIC_NUMBER_LEN (4) |
| #define | SO_TA_ID_LEN (16) |
| #define | SO_AUTH_ID_LEN (16) |
| #define | SO_HEADER_SIZE_STATIC ((SO_TAG_LEN) + (SO_IV_LEN) + (SO_AC_LEN) + (SO_MAGIC_NUMBER_LEN)) |
| #define | SO_OUT_BUF_SIZE(in_len, delegated) ((in_len) + SO_HEADER_SIZE_STATIC + ((delegated) ? (SO_TA_ID_LEN + SO_AUTH_ID_LEN) : 0)) |
Functions | |
| TEE_Result | TEES_WrapSecureObject (const unsigned char *in, uint32_t in_len, unsigned char *out, uint32_t *out_len, SO_AccessControlInfoType *ac) |
| Encrypt and sign input data. More... | |
| TEE_Result | TEES_UnwrapSecureObject (const unsigned char *in, uint32_t in_len, unsigned char *out, uint32_t *out_len) |
| Decrypt and verify wrapped data. More... | |
| TEE_Result | TEES_CheckSecureObjectCreator (const unsigned char *in, uint32_t in_len, SO_AccessControlInfoType *ac) |
| Check UUID and AUTH_ID of creator on wrapped data. More... | |
Secure Objects API.
Secure Object APIs provide a TEE service for protecting TA sensitive data.
Secure Object is a wrapped and protected data that only authorized access holder can read. Data is protected by encrypting it with a key that only authorized trusted application can retrieve from the TEE. This process is called wrapping.
Secure Object consists of:
Structure of wrapped object:
The following data structures are used for implementing Access Control, based on KDF function:
access_flags - is a bit-mask indicating the access control restrictions.
auth_id and ta_id and Current TA Id and Current TA Authority are used as input to KDF. auth_id and ta_id are considered as delegated.auth_id and Current TA Id and Current TA Authority are used as input to KDF. auth_id is considered as delegated.UUID - A Universally Unique IDentifier of another Trusted Application with which the Secure Object needs to be shared. User needs to define this only if the Secure Object is to be shared with another TA and TA_ID_AC is set.
AUTHORITY - This is the name of the TA Authority access group with which the SO may be shared. User needs to define this only if Secure Object needs to be shared with another TA Authority and TA access flag AUTH_ID_AC is set.