TA-REF
tee_api.h File Reference
#include <stddef.h>
#include <compiler.h>
#include <tee_api_defines.h>
#include <tee_api_types.h>
#include <trace.h>
+ Include dependency graph for tee_api.h:

Go to the source code of this file.

Functions

TEE_Result TEE_GetPropertyAsString (TEE_PropSetHandle propsetOrEnumerator, const char *name, char *valueBuffer, uint32_t *valueBufferLen)
 
TEE_Result TEE_GetPropertyAsBool (TEE_PropSetHandle propsetOrEnumerator, const char *name, bool *value)
 
TEE_Result TEE_GetPropertyAsU32 (TEE_PropSetHandle propsetOrEnumerator, const char *name, uint32_t *value)
 
TEE_Result TEE_GetPropertyAsBinaryBlock (TEE_PropSetHandle propsetOrEnumerator, const char *name, void *valueBuffer, uint32_t *valueBufferLen)
 
TEE_Result TEE_GetPropertyAsUUID (TEE_PropSetHandle propsetOrEnumerator, const char *name, TEE_UUID *value)
 
TEE_Result TEE_GetPropertyAsIdentity (TEE_PropSetHandle propsetOrEnumerator, const char *name, TEE_Identity *value)
 
TEE_Result TEE_AllocatePropertyEnumerator (TEE_PropSetHandle *enumerator)
 
void TEE_FreePropertyEnumerator (TEE_PropSetHandle enumerator)
 
void TEE_StartPropertyEnumerator (TEE_PropSetHandle enumerator, TEE_PropSetHandle propSet)
 
void TEE_ResetPropertyEnumerator (TEE_PropSetHandle enumerator)
 
TEE_Result TEE_GetPropertyName (TEE_PropSetHandle enumerator, void *nameBuffer, uint32_t *nameBufferLen)
 
TEE_Result TEE_GetNextProperty (TEE_PropSetHandle enumerator)
 
void TEE_Panic (TEE_Result panicCode)
 
TEE_Result TEE_OpenTASession (const TEE_UUID *destination, uint32_t cancellationRequestTimeout, uint32_t paramTypes, TEE_Param params[TEE_NUM_PARAMS], TEE_TASessionHandle *session, uint32_t *returnOrigin)
 
void TEE_CloseTASession (TEE_TASessionHandle session)
 
TEE_Result TEE_InvokeTACommand (TEE_TASessionHandle session, uint32_t cancellationRequestTimeout, uint32_t commandID, uint32_t paramTypes, TEE_Param params[TEE_NUM_PARAMS], uint32_t *returnOrigin)
 
bool TEE_GetCancellationFlag (void)
 
bool TEE_UnmaskCancellation (void)
 
bool TEE_MaskCancellation (void)
 
TEE_Result TEE_CheckMemoryAccessRights (uint32_t accessFlags, void *buffer, uint32_t size)
 
void TEE_SetInstanceData (const void *instanceData)
 
const void * TEE_GetInstanceData (void)
 
void * TEE_Malloc (uint32_t size, uint32_t hint)
 
void * TEE_Realloc (void *buffer, uint32_t newSize)
 
void TEE_Free (void *buffer)
 
void * TEE_MemMove (void *dest, const void *src, uint32_t size)
 
int32_t TEE_MemCompare (const void *buffer1, const void *buffer2, uint32_t size)
 
void * TEE_MemFill (void *buff, uint32_t x, uint32_t size)
 
void TEE_GetObjectInfo (TEE_ObjectHandle object, TEE_ObjectInfo *objectInfo)
 
TEE_Result TEE_GetObjectInfo1 (TEE_ObjectHandle object, TEE_ObjectInfo *objectInfo)
 Core Functions, Secure Storage Functions (data is isolated for each TA) More...
 
void TEE_RestrictObjectUsage (TEE_ObjectHandle object, uint32_t objectUsage)
 
TEE_Result TEE_RestrictObjectUsage1 (TEE_ObjectHandle object, uint32_t objectUsage)
 
TEE_Result TEE_GetObjectBufferAttribute (TEE_ObjectHandle object, uint32_t attributeID, void *buffer, uint32_t *size)
 
TEE_Result TEE_GetObjectValueAttribute (TEE_ObjectHandle object, uint32_t attributeID, uint32_t *a, uint32_t *b)
 
void TEE_CloseObject (TEE_ObjectHandle object)
 Core Functions, Secure Storage Functions (data is isolated for each TA) More...
 
TEE_Result TEE_AllocateTransientObject (TEE_ObjectType objectType, uint32_t maxKeySize, TEE_ObjectHandle *object)
 Crypto, Asymmetric key Verification Functions. More...
 
void TEE_FreeTransientObject (TEE_ObjectHandle object)
 Crypto, Asymmetric key Verification Functions. More...
 
void TEE_ResetTransientObject (TEE_ObjectHandle object)
 
TEE_Result TEE_PopulateTransientObject (TEE_ObjectHandle object, const TEE_Attribute *attrs, uint32_t attrCount)
 
void TEE_InitRefAttribute (TEE_Attribute *attr, uint32_t attributeID, const void *buffer, uint32_t length)
 Crypto, Asymmetric key Verification Functions. More...
 
void TEE_InitValueAttribute (TEE_Attribute *attr, uint32_t attributeID, uint32_t a, uint32_t b)
 Crypto, Asymmetric key Verification Functions. More...
 
void TEE_CopyObjectAttributes (TEE_ObjectHandle destObject, TEE_ObjectHandle srcObject)
 
TEE_Result TEE_CopyObjectAttributes1 (TEE_ObjectHandle destObject, TEE_ObjectHandle srcObject)
 
TEE_Result TEE_GenerateKey (TEE_ObjectHandle object, uint32_t keySize, const TEE_Attribute *params, uint32_t paramCount)
 Crypto, Asymmetric key Verification Functions. More...
 
TEE_Result TEE_OpenPersistentObject (uint32_t storageID, const void *objectID, uint32_t objectIDLen, uint32_t flags, TEE_ObjectHandle *object)
 Core Functions, Secure Storage Functions (data is isolated for each TA) More...
 
TEE_Result TEE_CreatePersistentObject (uint32_t storageID, const void *objectID, uint32_t objectIDLen, uint32_t flags, TEE_ObjectHandle attributes, const void *initialData, uint32_t initialDataLen, TEE_ObjectHandle *object)
 Core Functions, Secure Storage Functions (data is isolated for each TA) More...
 
void TEE_CloseAndDeletePersistentObject (TEE_ObjectHandle object)
 
TEE_Result TEE_CloseAndDeletePersistentObject1 (TEE_ObjectHandle object)
 
TEE_Result TEE_RenamePersistentObject (TEE_ObjectHandle object, const void *newObjectID, uint32_t newObjectIDLen)
 
TEE_Result TEE_AllocatePersistentObjectEnumerator (TEE_ObjectEnumHandle *objectEnumerator)
 
void TEE_FreePersistentObjectEnumerator (TEE_ObjectEnumHandle objectEnumerator)
 
void TEE_ResetPersistentObjectEnumerator (TEE_ObjectEnumHandle objectEnumerator)
 
TEE_Result TEE_StartPersistentObjectEnumerator (TEE_ObjectEnumHandle objectEnumerator, uint32_t storageID)
 
TEE_Result TEE_GetNextPersistentObject (TEE_ObjectEnumHandle objectEnumerator, TEE_ObjectInfo *objectInfo, void *objectID, uint32_t *objectIDLen)
 
TEE_Result TEE_ReadObjectData (TEE_ObjectHandle object, void *buffer, uint32_t size, uint32_t *count)
 Core Functions, Secure Storage Functions (data is isolated for each TA) More...
 
TEE_Result TEE_WriteObjectData (TEE_ObjectHandle object, const void *buffer, uint32_t size)
 Core Functions, Secure Storage Functions (data is isolated for each TA) More...
 
TEE_Result TEE_TruncateObjectData (TEE_ObjectHandle object, uint32_t size)
 
TEE_Result TEE_SeekObjectData (TEE_ObjectHandle object, int32_t offset, TEE_Whence whence)
 
TEE_Result TEE_AllocateOperation (TEE_OperationHandle *operation, uint32_t algorithm, uint32_t mode, uint32_t maxKeySize)
 Crypto, for all Crypto Functions. More...
 
void TEE_FreeOperation (TEE_OperationHandle operation)
 Crypto, for all Crypto Functions. More...
 
void TEE_GetOperationInfo (TEE_OperationHandle operation, TEE_OperationInfo *operationInfo)
 
TEE_Result TEE_GetOperationInfoMultiple (TEE_OperationHandle operation, TEE_OperationInfoMultiple *operationInfoMultiple, uint32_t *operationSize)
 
void TEE_ResetOperation (TEE_OperationHandle operation)
 
TEE_Result TEE_SetOperationKey (TEE_OperationHandle operation, TEE_ObjectHandle key)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_SetOperationKey2 (TEE_OperationHandle operation, TEE_ObjectHandle key1, TEE_ObjectHandle key2)
 
void TEE_CopyOperation (TEE_OperationHandle dstOperation, TEE_OperationHandle srcOperation)
 
TEE_Result TEE_IsAlgorithmSupported (uint32_t algId, uint32_t element)
 
void TEE_DigestUpdate (TEE_OperationHandle operation, const void *chunk, uint32_t chunkSize)
 Crypto, Message Digest Functions. More...
 
TEE_Result TEE_DigestDoFinal (TEE_OperationHandle operation, const void *chunk, uint32_t chunkLen, void *hash, uint32_t *hashLen)
 
void TEE_CipherInit (TEE_OperationHandle operation, const void *IV, uint32_t IVLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_CipherUpdate (TEE_OperationHandle operation, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_CipherDoFinal (TEE_OperationHandle operation, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen)
 
void TEE_MACInit (TEE_OperationHandle operation, const void *IV, uint32_t IVLen)
 
void TEE_MACUpdate (TEE_OperationHandle operation, const void *chunk, uint32_t chunkSize)
 
TEE_Result TEE_MACComputeFinal (TEE_OperationHandle operation, const void *message, uint32_t messageLen, void *mac, uint32_t *macLen)
 
TEE_Result TEE_MACCompareFinal (TEE_OperationHandle operation, const void *message, uint32_t messageLen, const void *mac, uint32_t macLen)
 
TEE_Result TEE_AEInit (TEE_OperationHandle operation, const void *nonce, uint32_t nonceLen, uint32_t tagLen, uint32_t AADLen, uint32_t payloadLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
void TEE_AEUpdateAAD (TEE_OperationHandle operation, const void *AADdata, uint32_t AADdataLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_AEUpdate (TEE_OperationHandle operation, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_AEEncryptFinal (TEE_OperationHandle operation, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen, void *tag, uint32_t *tagLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_AEDecryptFinal (TEE_OperationHandle operation, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen, void *tag, uint32_t tagLen)
 Crypto, Authenticated Encryption with Symmetric key Verification Functions. More...
 
TEE_Result TEE_AsymmetricEncrypt (TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen)
 
TEE_Result TEE_AsymmetricDecrypt (TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, const void *srcData, uint32_t srcLen, void *destData, uint32_t *destLen)
 
TEE_Result TEE_AsymmetricSignDigest (TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, const void *digest, uint32_t digestLen, void *signature, uint32_t *signatureLen)
 Crypto, Asymmetric key Verification Functions. More...
 
TEE_Result TEE_AsymmetricVerifyDigest (TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, const void *digest, uint32_t digestLen, const void *signature, uint32_t signatureLen)
 Crypto, Asymmetric key Verification Functions. More...
 
void TEE_DeriveKey (TEE_OperationHandle operation, const TEE_Attribute *params, uint32_t paramCount, TEE_ObjectHandle derivedKey)
 
void TEE_GenerateRandom (void *randomBuffer, uint32_t randomBufferLen)
 Crypto, common. More...
 
void TEE_GetSystemTime (TEE_Time *time)
 Core Functions, Time Functions. More...
 
TEE_Result TEE_Wait (uint32_t timeout)
 
TEE_Result TEE_GetTAPersistentTime (TEE_Time *time)
 
TEE_Result TEE_SetTAPersistentTime (const TEE_Time *time)
 
void TEE_GetREETime (TEE_Time *time)
 Core Functions, Time Functions. More...
 
uint32_t TEE_BigIntFMMSizeInU32 (uint32_t modulusSizeInBits)
 
uint32_t TEE_BigIntFMMContextSizeInU32 (uint32_t modulusSizeInBits)
 
void TEE_BigIntInit (TEE_BigInt *bigInt, uint32_t len)
 
void TEE_BigIntInitFMMContext (TEE_BigIntFMMContext *context, uint32_t len, const TEE_BigInt *modulus)
 
void TEE_BigIntInitFMM (TEE_BigIntFMM *bigIntFMM, uint32_t len)
 
TEE_Result TEE_BigIntConvertFromOctetString (TEE_BigInt *dest, const uint8_t *buffer, uint32_t bufferLen, int32_t sign)
 
TEE_Result TEE_BigIntConvertToOctetString (uint8_t *buffer, uint32_t *bufferLen, const TEE_BigInt *bigInt)
 
void TEE_BigIntConvertFromS32 (TEE_BigInt *dest, int32_t shortVal)
 
TEE_Result TEE_BigIntConvertToS32 (int32_t *dest, const TEE_BigInt *src)
 
int32_t TEE_BigIntCmp (const TEE_BigInt *op1, const TEE_BigInt *op2)
 
int32_t TEE_BigIntCmpS32 (const TEE_BigInt *op, int32_t shortVal)
 
void TEE_BigIntShiftRight (TEE_BigInt *dest, const TEE_BigInt *op, size_t bits)
 
bool TEE_BigIntGetBit (const TEE_BigInt *src, uint32_t bitIndex)
 
uint32_t TEE_BigIntGetBitCount (const TEE_BigInt *src)
 
void TEE_BigIntAdd (TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2)
 
void TEE_BigIntSub (TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2)
 
void TEE_BigIntNeg (TEE_BigInt *dest, const TEE_BigInt *op)
 
void TEE_BigIntMul (TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2)
 
void TEE_BigIntSquare (TEE_BigInt *dest, const TEE_BigInt *op)
 
void TEE_BigIntDiv (TEE_BigInt *dest_q, TEE_BigInt *dest_r, const TEE_BigInt *op1, const TEE_BigInt *op2)
 
void TEE_BigIntMod (TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n)
 
void TEE_BigIntAddMod (TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n)
 
void TEE_BigIntSubMod (TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n)
 
void TEE_BigIntMulMod (TEE_BigInt *dest, const TEE_BigInt *op1, const TEE_BigInt *op2, const TEE_BigInt *n)
 
void TEE_BigIntSquareMod (TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n)
 
void TEE_BigIntInvMod (TEE_BigInt *dest, const TEE_BigInt *op, const TEE_BigInt *n)
 
bool TEE_BigIntRelativePrime (const TEE_BigInt *op1, const TEE_BigInt *op2)
 
void TEE_BigIntComputeExtendedGcd (TEE_BigInt *gcd, TEE_BigInt *u, TEE_BigInt *v, const TEE_BigInt *op1, const TEE_BigInt *op2)
 
int32_t TEE_BigIntIsProbablePrime (const TEE_BigInt *op, uint32_t confidenceLevel)
 
void TEE_BigIntConvertToFMM (TEE_BigIntFMM *dest, const TEE_BigInt *src, const TEE_BigInt *n, const TEE_BigIntFMMContext *context)
 
void TEE_BigIntConvertFromFMM (TEE_BigInt *dest, const TEE_BigIntFMM *src, const TEE_BigInt *n, const TEE_BigIntFMMContext *context)
 
void TEE_BigIntFMMConvertToBigInt (TEE_BigInt *dest, const TEE_BigIntFMM *src, const TEE_BigInt *n, const TEE_BigIntFMMContext *context)
 
void TEE_BigIntComputeFMM (TEE_BigIntFMM *dest, const TEE_BigIntFMM *op1, const TEE_BigIntFMM *op2, const TEE_BigInt *n, const TEE_BigIntFMMContext *context)
 

Function Documentation

◆ TEE_AEDecryptFinal()

TEE_Result TEE_AEDecryptFinal ( TEE_OperationHandle  operation,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen,
void *  tag,
uint32_t  tagLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_AEDecryptFinal() - Processes data that has not been processed by previous calls to TEE_AEUpdate as well as data supplied in srcData.

This function completes the AE operation and compares the computed tag with the tag supplied in the parameter tag .The operation handle can be reused or newly initialized.The buffers srcData and destData shall be either completely disjoint or equal in their starting positions.The operation may be in either initial or active state and enters initial state afterwards.

Parameters
operationHandle of a running AE operation
srcDataReference to final chunk of input data to be encrypted
srcLenlength of the input data
destDataOutput buffer. Can be omitted if the output is to be discarded.
destLenlength of the buffer.
tagOutput buffer filled with the computed tag
tagLenlength of the tag.
Returns
0 on success.
TEE_ERROR_SHORT_BUFFER If the output buffer is not large enough to contain the output
TEE_ERROR_MAC_INVALID If the computed tag does not match the supplied tag

◆ TEE_AEEncryptFinal()

TEE_Result TEE_AEEncryptFinal ( TEE_OperationHandle  operation,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen,
void *  tag,
uint32_t *  tagLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_AEEncryptFinal() - processes data that has not been processed by previous calls to TEE_AEUpdate as well as data supplied in srcData .

TEE_AEEncryptFinal completes the AE operation and computes the tag. The operation handle can be reused or newly initialized. The buffers srcData and destData SHALL be either completely disjoint or equal in their starting positions.The operation may be in either initial or active state and enters initial state afterwards.

Parameters
operationHandle of a running AE operation
srcDataReference to final chunk of input data to be encrypted
srcLenlength of the input data
destDataOutput buffer. Can be omitted if the output is to be discarded.
destLenlength of the buffer.
tagOutput buffer filled with the computed tag
tagLenlength of the tag.
Returns
0 on success.
TEE_ERROR_SHORT_BUFFER If the output or tag buffer is not large enoughto contain the output.

◆ TEE_AEInit()

TEE_Result TEE_AEInit ( TEE_OperationHandle  operation,
const void *  nonce,
uint32_t  nonceLen,
uint32_t  tagLen,
uint32_t  AADLen,
uint32_t  payloadLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_AEInit() - Initializes an Authentication Encryption operation.

The operation must be in initial state and remains in the initial state afterwards.

Parameters
operationA handle on the operation.
nonceThe operation nonce or IV
nonceLenlength of nonce
tagLenSize in bits of the tag
AADLenLength in bytes of the AAD
payloadLenLength in bytes of the payload.
Returns
0 on success.
TEE_ERROR_NOT_SUPPORTED If the tag length is not supported by the algorithm.

◆ TEE_AEUpdate()

TEE_Result TEE_AEUpdate ( TEE_OperationHandle  operation,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_AEUpdate() - Accumulates data for an Authentication Encryption operation

This function describes Input data does not have to be a multiple of block size. Subsequent calls to this function are possible. Unless one or more calls of this function have supplied sufficient input data,no output is generated. when using this routine to decrypt the returned data may be corrupt since the integrity check is not performed until all the data has been processed. If this is a concern then only use the TEE_AEDecryptFinal routine.

Parameters
operationHandle of a running AE operation.
srcDataInput data buffer to be encrypted or decrypted
srcLenlength of the input buffer.
destDataOutput buffer
destLenlength of the out put buffer.
Returns
0 on success.
TEE_ERROR_SHORT_BUFFER if the output buffer is not large enough to contain the output.

◆ TEE_AEUpdateAAD()

void TEE_AEUpdateAAD ( TEE_OperationHandle  operation,
const void *  AADdata,
uint32_t  AADdataLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_AEUpdateAAD() - Feeds a new chunk of Additional Authentication Data (AAD) to the AE operation. Subsequent calls to this function are possible.

The TEE_AEUpdateAAD function feeds a new chunk of Additional Authentication Data (AAD) to the AE operation. Subsequent calls to this function are possible.The buffers srcData and destData shall be either completely disjoint or equal in their starting positions.The operation SHALL be in initial state and remains in initial state afterwards.

Parameters
operationHandle on the AE operation
AADdataInput buffer containing the chunk of AAD
AADdataLenlength of the chunk of AAD.

◆ TEE_AllocateOperation()

TEE_Result TEE_AllocateOperation ( TEE_OperationHandle operation,
uint32_t  algorithm,
uint32_t  mode,
uint32_t  maxKeySize 
)

Crypto, for all Crypto Functions.

TEE_AllocateOperation() - Allocates a handle for a new cryptographic operation and sets the mode and algorithm type.

If this function does not return with TEE_SUCCESS then there is no valid handle value.Once a cryptographic operation has been created, the implementation shall guarantee that all resources necessary for the operation are allocated and that any operation with a key of at most maxKeySize bits can be performed. For algorithms that take multiple keys, for example the AES XTS algorithm, the maxKeySize parameter specifies the size of the largest key. It is up to the implementation to properly allocate space for multiple keys if the algorithm so requires.

Parameters
operationreference to generated operation handle.
algorithmOne of the cipher algorithms.
modeThe operation mode.
maxKeySizeMaximum key size in bits for the operation.
Returns
0 in case of success
TEE_ERROR_OUT_OF_MEMORY If there are not enough resources to allocate the operation.
TEE_ERROR_NOT_SUPPORTED If the mode is not compatible with the algorithm or key size or if the algorithm is not one of the listed algorithms or if maxKeySize is not appropriate for the algorithm.

◆ TEE_AllocatePersistentObjectEnumerator()

TEE_Result TEE_AllocatePersistentObjectEnumerator ( TEE_ObjectEnumHandle objectEnumerator)

◆ TEE_AllocatePropertyEnumerator()

TEE_Result TEE_AllocatePropertyEnumerator ( TEE_PropSetHandle enumerator)

◆ TEE_AllocateTransientObject()

TEE_Result TEE_AllocateTransientObject ( TEE_ObjectType  objectType,
uint32_t  maxKeySize,
TEE_ObjectHandle object 
)

Crypto, Asymmetric key Verification Functions.

TEE_AllocateTransientObject() - Allocates an uninitialized transient object. Transient objects are used to hold a cryptographic object (key or key-pair).

The value TEE_KEYSIZE_NO_KEY should be used for maxObjectSize for object types that do not require a key so that all the container resources can be pre-allocated. As allocated, the container is uninitialized. It can be initialized by subsequently importing the object material,generating an object, deriving an object, or loading an object from the Trusted Storage.

Parameters
objectTypeType of uninitialized object container to be created
maxKeySizeKey Size of the object.
objectFilled with a handle on the newly created key container.
Returns
0 on success
TEE_ERROR_OUT_OF_MEMORY If not enough resources are available to allocate the object handle.
TEE_ERROR_NOT_SUPPORTED If the key size is not supported or the object
type is not supported.

◆ TEE_AsymmetricDecrypt()

TEE_Result TEE_AsymmetricDecrypt ( TEE_OperationHandle  operation,
const TEE_Attribute params,
uint32_t  paramCount,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen 
)

◆ TEE_AsymmetricEncrypt()

TEE_Result TEE_AsymmetricEncrypt ( TEE_OperationHandle  operation,
const TEE_Attribute params,
uint32_t  paramCount,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen 
)

◆ TEE_AsymmetricSignDigest()

TEE_Result TEE_AsymmetricSignDigest ( TEE_OperationHandle  operation,
const TEE_Attribute params,
uint32_t  paramCount,
const void *  digest,
uint32_t  digestLen,
void *  signature,
uint32_t *  signatureLen 
)

Crypto, Asymmetric key Verification Functions.

TEE_AsymmetricSignDigest() - Signs a message digest within an asymmetric operation.

Parameters
operationHandle on the operation, which SHALL have been suitably set up with an operation key.
paramsOptional operation parameters
paramCountsize of param
digestInput buffer containing the input message digest
digestLenlength of input buffer.
signatureOutput buffer written with the signature of the digest
signatureLenlength of output buffer.
Returns
0 on sccess
TEE_ERROR_SHORT_BUFFER If the signature buffer is not large enough to hold the result

◆ TEE_AsymmetricVerifyDigest()

TEE_Result TEE_AsymmetricVerifyDigest ( TEE_OperationHandle  operation,
const TEE_Attribute params,
uint32_t  paramCount,
const void *  digest,
uint32_t  digestLen,
const void *  signature,
uint32_t  signatureLen 
)

Crypto, Asymmetric key Verification Functions.

TEE_AsymmetricVerifyDigest() - verifies a message digest signature within an asymmetric operation.

This function describes the message digest signature verify by calling ed25519_verify().

Parameters
operationHandle on the operation, which SHALL have been suitably set up with an operation key.
paramsOptional operation parameters
paramCountsize of param.
digestInput buffer containing the input message digest
digestLenlength of input buffer.
signatureOutput buffer written with the signature of the digest
signatureLenlength of output buffer.
Returns
TEE_SUCCESS on success
TEE_ERROR_SIGNATURE_INVALID if the signature is invalid.

◆ TEE_BigIntAdd()

void TEE_BigIntAdd ( TEE_BigInt dest,
const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntAddMod()

void TEE_BigIntAddMod ( TEE_BigInt dest,
const TEE_BigInt op1,
const TEE_BigInt op2,
const TEE_BigInt n 
)

◆ TEE_BigIntCmp()

int32_t TEE_BigIntCmp ( const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntCmpS32()

int32_t TEE_BigIntCmpS32 ( const TEE_BigInt op,
int32_t  shortVal 
)

◆ TEE_BigIntComputeExtendedGcd()

void TEE_BigIntComputeExtendedGcd ( TEE_BigInt gcd,
TEE_BigInt u,
TEE_BigInt v,
const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntComputeFMM()

void TEE_BigIntComputeFMM ( TEE_BigIntFMM dest,
const TEE_BigIntFMM op1,
const TEE_BigIntFMM op2,
const TEE_BigInt n,
const TEE_BigIntFMMContext *  context 
)

◆ TEE_BigIntConvertFromFMM()

void TEE_BigIntConvertFromFMM ( TEE_BigInt dest,
const TEE_BigIntFMM src,
const TEE_BigInt n,
const TEE_BigIntFMMContext *  context 
)

◆ TEE_BigIntConvertFromOctetString()

TEE_Result TEE_BigIntConvertFromOctetString ( TEE_BigInt dest,
const uint8_t *  buffer,
uint32_t  bufferLen,
int32_t  sign 
)

◆ TEE_BigIntConvertFromS32()

void TEE_BigIntConvertFromS32 ( TEE_BigInt dest,
int32_t  shortVal 
)

◆ TEE_BigIntConvertToFMM()

void TEE_BigIntConvertToFMM ( TEE_BigIntFMM dest,
const TEE_BigInt src,
const TEE_BigInt n,
const TEE_BigIntFMMContext *  context 
)

◆ TEE_BigIntConvertToOctetString()

TEE_Result TEE_BigIntConvertToOctetString ( uint8_t *  buffer,
uint32_t *  bufferLen,
const TEE_BigInt bigInt 
)

◆ TEE_BigIntConvertToS32()

TEE_Result TEE_BigIntConvertToS32 ( int32_t *  dest,
const TEE_BigInt src 
)

◆ TEE_BigIntDiv()

void TEE_BigIntDiv ( TEE_BigInt dest_q,
TEE_BigInt dest_r,
const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntFMMContextSizeInU32()

uint32_t TEE_BigIntFMMContextSizeInU32 ( uint32_t  modulusSizeInBits)

◆ TEE_BigIntFMMConvertToBigInt()

void TEE_BigIntFMMConvertToBigInt ( TEE_BigInt dest,
const TEE_BigIntFMM src,
const TEE_BigInt n,
const TEE_BigIntFMMContext *  context 
)

◆ TEE_BigIntFMMSizeInU32()

uint32_t TEE_BigIntFMMSizeInU32 ( uint32_t  modulusSizeInBits)

◆ TEE_BigIntGetBit()

bool TEE_BigIntGetBit ( const TEE_BigInt src,
uint32_t  bitIndex 
)

◆ TEE_BigIntGetBitCount()

uint32_t TEE_BigIntGetBitCount ( const TEE_BigInt src)

◆ TEE_BigIntInit()

void TEE_BigIntInit ( TEE_BigInt bigInt,
uint32_t  len 
)

◆ TEE_BigIntInitFMM()

void TEE_BigIntInitFMM ( TEE_BigIntFMM bigIntFMM,
uint32_t  len 
)

◆ TEE_BigIntInitFMMContext()

void TEE_BigIntInitFMMContext ( TEE_BigIntFMMContext *  context,
uint32_t  len,
const TEE_BigInt modulus 
)

◆ TEE_BigIntInvMod()

void TEE_BigIntInvMod ( TEE_BigInt dest,
const TEE_BigInt op,
const TEE_BigInt n 
)

◆ TEE_BigIntIsProbablePrime()

int32_t TEE_BigIntIsProbablePrime ( const TEE_BigInt op,
uint32_t  confidenceLevel 
)

◆ TEE_BigIntMod()

void TEE_BigIntMod ( TEE_BigInt dest,
const TEE_BigInt op,
const TEE_BigInt n 
)

◆ TEE_BigIntMul()

void TEE_BigIntMul ( TEE_BigInt dest,
const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntMulMod()

void TEE_BigIntMulMod ( TEE_BigInt dest,
const TEE_BigInt op1,
const TEE_BigInt op2,
const TEE_BigInt n 
)

◆ TEE_BigIntNeg()

void TEE_BigIntNeg ( TEE_BigInt dest,
const TEE_BigInt op 
)

◆ TEE_BigIntRelativePrime()

bool TEE_BigIntRelativePrime ( const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntShiftRight()

void TEE_BigIntShiftRight ( TEE_BigInt dest,
const TEE_BigInt op,
size_t  bits 
)

◆ TEE_BigIntSquare()

void TEE_BigIntSquare ( TEE_BigInt dest,
const TEE_BigInt op 
)

◆ TEE_BigIntSquareMod()

void TEE_BigIntSquareMod ( TEE_BigInt dest,
const TEE_BigInt op,
const TEE_BigInt n 
)

◆ TEE_BigIntSub()

void TEE_BigIntSub ( TEE_BigInt dest,
const TEE_BigInt op1,
const TEE_BigInt op2 
)

◆ TEE_BigIntSubMod()

void TEE_BigIntSubMod ( TEE_BigInt dest,
const TEE_BigInt op1,
const TEE_BigInt op2,
const TEE_BigInt n 
)

◆ TEE_CheckMemoryAccessRights()

TEE_Result TEE_CheckMemoryAccessRights ( uint32_t  accessFlags,
void *  buffer,
uint32_t  size 
)

◆ TEE_CipherDoFinal()

TEE_Result TEE_CipherDoFinal ( TEE_OperationHandle  operation,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen 
)

TEE_CipherDoFinal() - Finalizes the cipher operation, processing data that has not been processed by previous calls to TEE_CipherUpdate as well as data supplied in srcData .

This function describes The operation handle can be reused or re-initialized. The buffers srcData and destData shall be either completely disjoint or equal in their starting positions.The operation SHALL be in active state and is set to initial state afterwards.

Parameters
operationHandle of a running Cipher operation
srcDataInput data buffer to be encrypted or decrypted
srcLenlength of input buffer
destDataoutput buffer
destLenouput buffer length.
Returns
0 on success
TEE_ERROR_SHORT_BUFFER If the output buffer is not large enough to contain the output

◆ TEE_CipherInit()

void TEE_CipherInit ( TEE_OperationHandle  operation,
const void *  nonce,
uint32_t  nonceLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_CipherInit() - starts the symmetric cipher operation.

The operation shall have been associated with a key. If the operation is in active state, it is reset and then initialized. If the operation is in initial state, it is moved to active state.

Parameters
operationA handle on an opened cipher operation setup with a key
nonceBuffer containing the operation Initialization Vector as appropriate.
nonceLenlength of the buffer

◆ TEE_CipherUpdate()

TEE_Result TEE_CipherUpdate ( TEE_OperationHandle  operation,
const void *  srcData,
uint32_t  srcLen,
void *  destData,
uint32_t *  destLen 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_CipherUpdate() - encrypts or decrypts input data.

Input data does not have to be a multiple of block size. Subsequent calls to this function are possible. Unless one or more calls of this function have supplied sufficient input data, no output is generated. The cipher operation is finalized with a call to TEE_CipherDoFinal .The buffers srcData and destData SHALL be either completely disjoint or equal in their starting positions.The operation SHALL be in active state.

Parameters
operationHandle of a running Cipher operation
srcDataInput data buffer to be encrypted or decrypted
srcLenlength of input buffer
destDataoutput buffer
destLenouput buffer length.
Returns
0 on success else
TEE_ERROR_SHORT_BUFFER If the output buffer is not large enough to contain the output. In this case, the input is not fed into the algorithm.

◆ TEE_CloseAndDeletePersistentObject()

void TEE_CloseAndDeletePersistentObject ( TEE_ObjectHandle  object)

◆ TEE_CloseAndDeletePersistentObject1()

TEE_Result TEE_CloseAndDeletePersistentObject1 ( TEE_ObjectHandle  object)

◆ TEE_CloseObject()

void TEE_CloseObject ( TEE_ObjectHandle  object)

Core Functions, Secure Storage Functions (data is isolated for each TA)

TEE_CloseObject() - Closes an opened object handle.

The object can be persistent or transient.For transient objects, TEE_CloseObject is equivalent to TEE_FreeTransientObject.

Parameters
objectHandle of the object.
Returns
TEE_SUCCESS if success else error occured.

TEE_CloseObject() - Function closes an opened object handle.

The object can be persistent or transient.For transient objects, TEE_CloseObject is equivalent to TEE_FreeTransientObject.

Parameters
objectHandle of the object
Returns
TEE_SUCCESS if success else error occured.

◆ TEE_CloseTASession()

void TEE_CloseTASession ( TEE_TASessionHandle  session)

◆ TEE_CopyObjectAttributes()

void TEE_CopyObjectAttributes ( TEE_ObjectHandle  destObject,
TEE_ObjectHandle  srcObject 
)

◆ TEE_CopyObjectAttributes1()

TEE_Result TEE_CopyObjectAttributes1 ( TEE_ObjectHandle  destObject,
TEE_ObjectHandle  srcObject 
)

◆ TEE_CopyOperation()

void TEE_CopyOperation ( TEE_OperationHandle  dstOperation,
TEE_OperationHandle  srcOperation 
)

◆ TEE_CreatePersistentObject()

TEE_Result TEE_CreatePersistentObject ( uint32_t  storageID,
const void *  objectID,
uint32_t  objectIDLen,
uint32_t  flags,
TEE_ObjectHandle  attributes,
const void *  initialData,
uint32_t  initialDataLen,
TEE_ObjectHandle object 
)

Core Functions, Secure Storage Functions (data is isolated for each TA)

TEE_CreatePersistentObject() - Creates a persistent object with initial attributes.

In this function an initial data stream content returns either a handle on the created object or TEE_HANDLE_NULL upon failure.

Parameters
storageIDThe storage to use.
objectIDThe object identifier
objectIDLenThe object identifier
flagsThe flags which determine the settings under which the object is opened.
attributesA handle on a persistent object or an initialized transient object from which to take the persistent object attributes
initialDataThe initial data content of the persistent object
initialDataLenThe initial data content of the persistent object
objectA pointer to the handle which contains the opened handle upon successful completion
Returns
0 if success else error occured.

TEE_CreatePersistentObject() - Creates a persistent object with initial attributes.

An initial data stream content, and optionally returns either a handle on the created object, or TEE_HANDLE_NULL upon failure.

Parameters
storageIDThe storage to use.
objectIDThe object identifier
objectIDLenThe object identifier
flagsThe flags which determine the settings under which the object is opened.
attributesA handle on a persistent object or an initialized transient object from which to take the persistent object attributes
initialDataThe initial data content of the persistent object
initialDataLenThe initial data content of the persistent object
objectA pointer to the handle, which contains the opened handle upon successful completion
Returns
0 if success, else error occured.

◆ TEE_DeriveKey()

void TEE_DeriveKey ( TEE_OperationHandle  operation,
const TEE_Attribute params,
uint32_t  paramCount,
TEE_ObjectHandle  derivedKey 
)

◆ TEE_DigestDoFinal()

TEE_Result TEE_DigestDoFinal ( TEE_OperationHandle  operation,
const void *  chunk,
uint32_t  chunkLen,
void *  hash,
uint32_t *  hashLen 
)

TEE_DigestDoFinal() - Finalizes the message digest operation and produces the message hash.

This function finalizes the message digest operation and produces the message hash. Afterwards the Message Digest operation is reset to initial state and can be reused.

Parameters
operationHandle of a running Message Digest operation.
chunkChunk of data to be hashed.
chunkLensize of the chunk.
hashOutput buffer filled with the message hash.
hashLenlenth of the mesaage hash.
Returns
0 on success
TEE_ERROR_SHORT_BUFFER If the output buffer is too small. In this case, the operation is not finalized.

◆ TEE_DigestUpdate()

void TEE_DigestUpdate ( TEE_OperationHandle  operation,
const void *  chunk,
uint32_t  chunkSize 
)

Crypto, Message Digest Functions.

TEE_DigestUpdate()- Accumulates message data for hashing.

This function describes the message does not have to be block aligned. Subsequent calls to this function are possible.The operation may be in either initial or active state and becomes active.

Parameters
operationHandle of a running Message Digest operation.
chunkChunk of data to be hashed
chunkSizesize of the chunk.

◆ TEE_Free()

void TEE_Free ( void *  buffer)

TEE_Free() - causes the space pointed to by buffer to be deallocated;that is made available for further allocation.

This function describes if buffer is a NULL pointer, TEE_Free does nothing. Otherwise, it is a Programmer Error if the argument does not match a pointer previously returned by the TEE_Malloc or TEE_Realloc if the space has been deallocated by a call to TEE_Free or TEE_Realloc.

Parameters
bufferThe pointer to the memory block to be freed.

◆ TEE_FreeOperation()

void TEE_FreeOperation ( TEE_OperationHandle  operation)

Crypto, for all Crypto Functions.

TEE_FreeOperation() - Deallocates all resources associated with an operation handle.

This function deallocates all resources associated with an operation handle. After this function is called, the operation handle is no longer valid. All cryptographic material in the operation is destroyed. The function does nothing if operation is TEE_HANDLE_NULL.

Parameters
operationReference to operation handle.
Returns
nothing after the operation free.

◆ TEE_FreePersistentObjectEnumerator()

void TEE_FreePersistentObjectEnumerator ( TEE_ObjectEnumHandle  objectEnumerator)

◆ TEE_FreePropertyEnumerator()

void TEE_FreePropertyEnumerator ( TEE_PropSetHandle  enumerator)

◆ TEE_FreeTransientObject()

void TEE_FreeTransientObject ( TEE_ObjectHandle  object)

Crypto, Asymmetric key Verification Functions.

TEE_FreeTransientObject() - Deallocates a transient object previously allocated with TEE_AllocateTransientObject .

this function describes the object handle is no longer valid and all resources associated with the transient object shall have been reclaimed after the TEE_AllocateTransientObject() call.

Parameters
objectHandle on the object to free.

◆ TEE_GenerateKey()

TEE_Result TEE_GenerateKey ( TEE_ObjectHandle  object,
uint32_t  keySize,
const TEE_Attribute params,
uint32_t  paramCount 
)

Crypto, Asymmetric key Verification Functions.

TEE_GenerateKey () - Generates a random key or a key-pair and populates a transient key object with the generated key material.

The size of the desired key is passed in the keySize parameter and shall be less than or equal to the maximum key size specified when the transient object was created.

Parameters
objectHandle on an uninitialized transient key to populate with the generated key.
keySizeRequested key size shall be less than or equal to the maximum key size specified when the object container was created
paramsParameters for the key generation.
paramCountThe values of all parameters are copied nto the object so that the params array and all the memory buffers it points to may be freed after this routine returns without affecting the object.
Returns
0 on succes
TEE_ERROR_BAD_PARAMETERS If an incorrect or inconsistent attribute is detected. The checks that are performed depend on the implementation.

◆ TEE_GenerateRandom()

void TEE_GenerateRandom ( void *  randomBuffer,
uint32_t  randomBufferLen 
)

Crypto, common.

TEE_GenerateRandom() - Generates random data.

This function generates random data of random buffer length and is stored in to random Buffer by calling wc_RNG_GenerateBlock().If ret is not equal
to 0 then TEE_Panic is called.

Parameters
randomBufferReference to generated random data
randomBufferLenByte length of requested random data
Returns
random data random data will be returned.

TEE_GenerateRandom() - Generates random data.

This function generates random data of random bufferlength and is stored in to randomBuffer by calling sgx_read_rand().

Parameters
randomBufferReference to generated random data
randomBufferLenByte length of requested random data

◆ TEE_GetCancellationFlag()

bool TEE_GetCancellationFlag ( void  )

◆ TEE_GetInstanceData()

const void * TEE_GetInstanceData ( void  )

◆ TEE_GetNextPersistentObject()

TEE_Result TEE_GetNextPersistentObject ( TEE_ObjectEnumHandle  objectEnumerator,
TEE_ObjectInfo objectInfo,
void *  objectID,
uint32_t *  objectIDLen 
)

◆ TEE_GetNextProperty()

TEE_Result TEE_GetNextProperty ( TEE_PropSetHandle  enumerator)

◆ TEE_GetObjectBufferAttribute()

TEE_Result TEE_GetObjectBufferAttribute ( TEE_ObjectHandle  object,
uint32_t  attributeID,
void *  buffer,
uint32_t *  size 
)

◆ TEE_GetObjectInfo()

void TEE_GetObjectInfo ( TEE_ObjectHandle  object,
TEE_ObjectInfo objectInfo 
)

◆ TEE_GetObjectInfo1()

TEE_Result TEE_GetObjectInfo1 ( TEE_ObjectHandle  object,
TEE_ObjectInfo objectInfo 
)

Core Functions, Secure Storage Functions (data is isolated for each TA)

TEE_GetObjectInfo1() - Returns the characteristics of an object.

This function returns a handle which can be used to access the object’s attributes and data stream.

Parameters
objectInfoPointer to a structure filled with the object information
objectHandle of the object
Returns
0 if success else error occured.

TEE_GetObjectInfo1() - Function returns the characteristics of an object.

It returns a handle that can be used to access the object’s attributes and data stream.

Parameters
objectInfoPointer to a structure filled with the object information
objectHandle of the object
Returns
0 if success else error occured.

◆ TEE_GetObjectValueAttribute()

TEE_Result TEE_GetObjectValueAttribute ( TEE_ObjectHandle  object,
uint32_t  attributeID,
uint32_t *  a,
uint32_t *  b 
)

◆ TEE_GetOperationInfo()

void TEE_GetOperationInfo ( TEE_OperationHandle  operation,
TEE_OperationInfo operationInfo 
)

◆ TEE_GetOperationInfoMultiple()

TEE_Result TEE_GetOperationInfoMultiple ( TEE_OperationHandle  operation,
TEE_OperationInfoMultiple operationInfoMultiple,
uint32_t *  operationSize 
)

◆ TEE_GetPropertyAsBinaryBlock()

TEE_Result TEE_GetPropertyAsBinaryBlock ( TEE_PropSetHandle  propsetOrEnumerator,
const char *  name,
void *  valueBuffer,
uint32_t *  valueBufferLen 
)

◆ TEE_GetPropertyAsBool()

TEE_Result TEE_GetPropertyAsBool ( TEE_PropSetHandle  propsetOrEnumerator,
const char *  name,
bool *  value 
)

◆ TEE_GetPropertyAsIdentity()

TEE_Result TEE_GetPropertyAsIdentity ( TEE_PropSetHandle  propsetOrEnumerator,
const char *  name,
TEE_Identity value 
)

◆ TEE_GetPropertyAsString()

TEE_Result TEE_GetPropertyAsString ( TEE_PropSetHandle  propsetOrEnumerator,
const char *  name,
char *  valueBuffer,
uint32_t *  valueBufferLen 
)

◆ TEE_GetPropertyAsU32()

TEE_Result TEE_GetPropertyAsU32 ( TEE_PropSetHandle  propsetOrEnumerator,
const char *  name,
uint32_t *  value 
)

◆ TEE_GetPropertyAsUUID()

TEE_Result TEE_GetPropertyAsUUID ( TEE_PropSetHandle  propsetOrEnumerator,
const char *  name,
TEE_UUID value 
)

◆ TEE_GetPropertyName()

TEE_Result TEE_GetPropertyName ( TEE_PropSetHandle  enumerator,
void *  nameBuffer,
uint32_t *  nameBufferLen 
)

◆ TEE_GetREETime()

void TEE_GetREETime ( TEE_Time time)

Core Functions, Time Functions.

TEE_GetREETime() - Retrieves the current REE system time.

This function retrieves the current time as seen from the point of view of
the REE.

Parameters
timeFilled with the number of seconds and milliseconds

TEE_GetREETime() - Function retrieves the current REE system time.

This function retrieves the current time as seen from the point of view of the REE.

Parameters
timeFilled with the number of seconds and milliseconds.

◆ TEE_GetSystemTime()

void TEE_GetSystemTime ( TEE_Time time)

Core Functions, Time Functions.

TEE_GetSystemTime() - Retrieves the current system time.

This function describes the system time has an arbitrary implementation
defined origin that can vary across TA instances. The minimum guarantee
is that the system time shall be monotonic for a given TA instance.

Parameters
timeFilled with the number of seconds and milliseconds

TEE_GetSystemTime() - Retrieves the current system time.

The system time has an arbitrary implementation-defined origin that can vary across TA instances

Parameters
timeFilled with the number of seconds and milliseconds.

◆ TEE_GetTAPersistentTime()

TEE_Result TEE_GetTAPersistentTime ( TEE_Time time)

◆ TEE_InitRefAttribute()

void TEE_InitRefAttribute ( TEE_Attribute attr,
uint32_t  attributeID,
const void *  buffer,
uint32_t  length 
)

Crypto, Asymmetric key Verification Functions.

TEE_InitRefAttribute() - The helper function can be used to populate a single attribute either with a reference to a buffer or with integer values.

In TEE_InitRefAttribute () only the buffer pointer is copied, not the content of the buffer. This means that the attribute structure maintains a pointer back to the supplied buffer. It is the responsibility of the TA author to ensure that the contents of the buffer maintain their value until the attributes array is no longer in use.

Parameters
attrattribute structure to initialize.
attributeIDIdentifier of the attribute to populate.
bufferinput buffer that holds the content of the attribute.
lengthbuffer length.

◆ TEE_InitValueAttribute()

void TEE_InitValueAttribute ( TEE_Attribute attr,
uint32_t  attributeID,
uint32_t  a,
uint32_t  b 
)

Crypto, Asymmetric key Verification Functions.

TEE_InitValueAttribute() - The helper function can be used to populate a single attribute either with a reference to a buffer or with integer values.

Parameters
attrattribute structure to initialize.
attributeIDIdentifier of the attribute to populate.
aunsigned integer value to assign to the a member of the attribute structure.
bunsigned integer value to assign to the b member of the attribute structure

◆ TEE_InvokeTACommand()

TEE_Result TEE_InvokeTACommand ( TEE_TASessionHandle  session,
uint32_t  cancellationRequestTimeout,
uint32_t  commandID,
uint32_t  paramTypes,
TEE_Param  params[TEE_NUM_PARAMS],
uint32_t *  returnOrigin 
)

◆ TEE_IsAlgorithmSupported()

TEE_Result TEE_IsAlgorithmSupported ( uint32_t  algId,
uint32_t  element 
)

◆ TEE_MACCompareFinal()

TEE_Result TEE_MACCompareFinal ( TEE_OperationHandle  operation,
const void *  message,
uint32_t  messageLen,
const void *  mac,
uint32_t  macLen 
)

◆ TEE_MACComputeFinal()

TEE_Result TEE_MACComputeFinal ( TEE_OperationHandle  operation,
const void *  message,
uint32_t  messageLen,
void *  mac,
uint32_t *  macLen 
)

◆ TEE_MACInit()

void TEE_MACInit ( TEE_OperationHandle  operation,
const void *  IV,
uint32_t  IVLen 
)

◆ TEE_MACUpdate()

void TEE_MACUpdate ( TEE_OperationHandle  operation,
const void *  chunk,
uint32_t  chunkSize 
)

◆ TEE_Malloc()

void * TEE_Malloc ( uint32_t  size,
uint32_t  hint 
)

TEE_Malloc() - Allocates space for an object whose size in bytes is specified in the parameter size.

This function describes the pointer returned is guaranteed to be aligned
such that it may be assigned as a pointer to any basic C type.The valid hint values are a bitmask and can be independently set. This parameter allows Trusted Applications to refer to various pools of memory or to
request special characteristics for the allocated memory by using an
implementation-defined hint. Future versions of this specification may introduce additional standard hints.

Parameters
sizeThe size of the buffer to be allocated.
hintA hint to the allocator.
Returns
Upon successful completion, with size not equal to zero, the function returns a pointer to the allocated space.

◆ TEE_MaskCancellation()

bool TEE_MaskCancellation ( void  )

◆ TEE_MemCompare()

int32_t TEE_MemCompare ( const void *  buffer1,
const void *  buffer2,
uint32_t  size 
)

◆ TEE_MemFill()

void * TEE_MemFill ( void *  buff,
uint32_t  x,
uint32_t  size 
)

◆ TEE_MemMove()

void * TEE_MemMove ( void *  dest,
const void *  src,
uint32_t  size 
)

◆ TEE_OpenPersistentObject()

TEE_Result TEE_OpenPersistentObject ( uint32_t  storageID,
const void *  objectID,
uint32_t  objectIDLen,
uint32_t  flags,
TEE_ObjectHandle object 
)

Core Functions, Secure Storage Functions (data is isolated for each TA)

TEE_OpenPersistentObject() - Opens a handle on an existing persistent object.

This function returns a handle which can be used to access the object’s attributes and data stream.

Parameters
storageIDThe storage to use
objectIDThe object identifier
objectIDLenThe object identifier
flagsThe flags which determine the settings under which the object is opened.
objectA pointer to the handle, which contains the opened handle upon successful completion
Returns
0 if success else error occured.

TEE_OpenPersistentObject() - Opens a handle on an existing persistent object.

This function returns a handle that can be used to access the object’s attributes and data stream.

Parameters
storageIDThe storage to use.
objectIDThe object identifier
objectIDLenThe object identifier
flagsThe flags which determine the settings under which the object is opened.
objectA pointer to the handle, which contains the opened handle upon successful completion
Returns
0 if success, else error occured.

◆ TEE_OpenTASession()

TEE_Result TEE_OpenTASession ( const TEE_UUID destination,
uint32_t  cancellationRequestTimeout,
uint32_t  paramTypes,
TEE_Param  params[TEE_NUM_PARAMS],
TEE_TASessionHandle session,
uint32_t *  returnOrigin 
)

◆ TEE_Panic()

void TEE_Panic ( TEE_Result  panicCode)

◆ TEE_PopulateTransientObject()

TEE_Result TEE_PopulateTransientObject ( TEE_ObjectHandle  object,
const TEE_Attribute attrs,
uint32_t  attrCount 
)

◆ TEE_ReadObjectData()

TEE_Result TEE_ReadObjectData ( TEE_ObjectHandle  object,
void *  buffer,
uint32_t  size,
uint32_t *  count 
)

Core Functions, Secure Storage Functions (data is isolated for each TA)

TEE_ReadObjectData() - Attempts to read size bytes from the data stream associated with the object into the buffer pointed to by buffer.

The bytes are read starting at the position in the data stream currently stored in the object handle. The handle’s position is incremented by the number of bytes actually read. On completion of TEE_ReadObjectData sets the number of bytes actually read in the "uint32_t" pointed to by count. The value written to *count may be less than size if the number of bytes until the end-of3067 stream is less than size. It is set to 0 if the position at the start of the read operation is at or beyond the end-of-stream. These are the only cases where *count may be less than size.

Parameters
objectHandle of the object
bufferThe buffer containing the data to be written
sizeThe number of bytes to write
countsize of the buffer.
Returns
TEE_SUCCESS if success else error occured.

TEE_ReadObjectData() - Attempts to read size bytes from the data stream associated with the object object into the buffer pointed to by buffer.

The bytes are read starting at the position in the data stream currently stored in the object handle. The handle’s position is incremented by the number of bytes actually read. On completion TEE_ReadObjectData sets the number of bytes actually read in the uint32_t pointed to by count. The value written to *count may be less than size if the number of bytes until the end-of3067 stream is less than size. It is set to 0 if the position at the start of the read operation is at or beyond the end-of-stream. These are the only cases where *count may be less than size.

Parameters
objectHandle of the object
bufferThe buffer containing the data to be written
sizeThe number of bytes to write
countsize of the buffer.
Returns
TEE_SUCCESS if success, else error occured.

◆ TEE_Realloc()

void * TEE_Realloc ( void *  buffer,
uint32_t  newSize 
)

TEE_Realloc() - Changes the size of the memory object pointed to by buffer to the size specified by new size.

This function describes the content of the object remains unchanged up to the lesser of the new and old sizes. Space in excess of the old size contains unspecified content. If the new size of the memory object requires movement of the object, the space for the previous instantiation of the object is deallocated. If the space cannot be allocated, the original object remains allocated, and this function returns a NULL pointer.

Parameters
bufferThe pointer to the object to be reallocated.
newSizeThe new size required for the object
Returns
Upon successful completion, TEE_Realloc returns a pointer to the (possibly moved) allocated space. If there is not enough available memory, TEE_Realloc returns a NULL pointer and the original buffer is still allocated and unchanged.

◆ TEE_RenamePersistentObject()

TEE_Result TEE_RenamePersistentObject ( TEE_ObjectHandle  object,
const void *  newObjectID,
uint32_t  newObjectIDLen 
)

◆ TEE_ResetOperation()

void TEE_ResetOperation ( TEE_OperationHandle  operation)

◆ TEE_ResetPersistentObjectEnumerator()

void TEE_ResetPersistentObjectEnumerator ( TEE_ObjectEnumHandle  objectEnumerator)

◆ TEE_ResetPropertyEnumerator()

void TEE_ResetPropertyEnumerator ( TEE_PropSetHandle  enumerator)

◆ TEE_ResetTransientObject()

void TEE_ResetTransientObject ( TEE_ObjectHandle  object)

◆ TEE_RestrictObjectUsage()

void TEE_RestrictObjectUsage ( TEE_ObjectHandle  object,
uint32_t  objectUsage 
)

◆ TEE_RestrictObjectUsage1()

TEE_Result TEE_RestrictObjectUsage1 ( TEE_ObjectHandle  object,
uint32_t  objectUsage 
)

◆ TEE_SeekObjectData()

TEE_Result TEE_SeekObjectData ( TEE_ObjectHandle  object,
int32_t  offset,
TEE_Whence  whence 
)

◆ TEE_SetInstanceData()

void TEE_SetInstanceData ( const void *  instanceData)

◆ TEE_SetOperationKey()

TEE_Result TEE_SetOperationKey ( TEE_OperationHandle  operation,
TEE_ObjectHandle  key 
)

Crypto, Authenticated Encryption with Symmetric key Verification Functions.

TEE_SetOperationKey() - Programs the key of an operation; that is, it associates an operation with a key.

The key material is copied from the key object handle into the operation. After the key has been set, there is no longer any link between the operation and the key object. The object handle can be closed or reset and this will not affect the operation. This copied material exists until the operation is freed using TEE_FreeOperation or another key is set into the operation.

Parameters
operationOperation handle.
keyA handle on a key object.
Returns
0 on success return
TEE_ERROR_CORRUPT_OBJECT If the object is corrupt. The object handle is closed.
TEE_ERROR_STORAGE_NOT_AVAILABLE If the persistent object is stored in a storage area which is currently inaccessible.

◆ TEE_SetOperationKey2()

TEE_Result TEE_SetOperationKey2 ( TEE_OperationHandle  operation,
TEE_ObjectHandle  key1,
TEE_ObjectHandle  key2 
)

◆ TEE_SetTAPersistentTime()

TEE_Result TEE_SetTAPersistentTime ( const TEE_Time time)

◆ TEE_StartPersistentObjectEnumerator()

TEE_Result TEE_StartPersistentObjectEnumerator ( TEE_ObjectEnumHandle  objectEnumerator,
uint32_t  storageID 
)

◆ TEE_StartPropertyEnumerator()

void TEE_StartPropertyEnumerator ( TEE_PropSetHandle  enumerator,
TEE_PropSetHandle  propSet 
)

◆ TEE_TruncateObjectData()

TEE_Result TEE_TruncateObjectData ( TEE_ObjectHandle  object,
uint32_t  size 
)

◆ TEE_UnmaskCancellation()

bool TEE_UnmaskCancellation ( void  )

◆ TEE_Wait()

TEE_Result TEE_Wait ( uint32_t  timeout)

◆ TEE_WriteObjectData()

TEE_Result TEE_WriteObjectData ( TEE_ObjectHandle  object,
const void *  buffer,
uint32_t  size 
)

Core Functions, Secure Storage Functions (data is isolated for each TA)

TEE_WriteObjectData() - Writes the buffer data in to persistent objects.

In this function it checks if object is present or not, the encryption/ decryption buffer is taken by calling mbedtls_aes_crypt_cbc() then that buffer data is encrypted and mapped to object.On the base of object creation TEE_SUCCESS appears else TEE_ERROR_GENERIC appears.

Parameters
objectHandle of the object
bufferThe buffer containing the data to be written
sizeThe number of bytes to write
Returns
TEE_SUCCESS if success else error occured.

TEE_WriteObjectData() - writes size bytes from the buffer pointed to by buffer to the data stream associated with the open object handle object.

If the current data position points before the end-of-stream, then size bytes are written to the data stream, overwriting bytes starting at the current data position. If the current data position points beyond the stream’s end, then the data stream is first extended with zero bytes until the length indicated by the data position indicator is reached, and then size bytes are written to the stream.

Parameters
objectHandle of the object
bufferThe buffer containing the data to be written
sizeThe number of bytes to write
Returns
TEE_SUCCESS if success else error occured.