My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions
otz_tee_crypto_api.h File Reference
#include "otz_api.h"
#include "otz_tee_api.h"

Go to the source code of this file.

Classes

struct  __TEE_OperationInfo
 
struct  __TEE_OperationHandle
 opaque structure definition for an operation handle. It contains almost all the elements of operation info structure and if possible few other elements for book-keeping purposes. More...
 

Macros

#define SW_RSA_KEYLEN   1024
 This is the size of the key that would be used for RSA. More...
 
#define ALGORITHM_NAME_LENGTH   128
 
#define SW_DSA_KEYLEN   1024
 This is the size of the key that would be used for DSA. More...
 
#define SW_CRYPTO_TRUE   1
 Definition of some truth values. More...
 
#define SW_CRYPTO_FALSE   0
 
#define SW_RSA_USE_PUBLIC   1
 
#define SW_RSA_USE_PRIVATE   2
 
#define AES_128_CBC_MAX_KEY_LEN   16
 
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA224   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
 
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
 
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
 
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
 
#define TEE_ALG_AES_ECB_NOPAD   0x10000010
 
#define TEE_ALG_AES_CBC_NOPAD   0x10000110
 
#define TEE_ALG_AES_CTR   0x10000210
 
#define TEE_ALG_AES_CTS   0x10000310
 
#define TEE_ALG_AES_XTS   0x10000410
 
#define TEE_ALG_AES_CBC_MAC_NOPAD   0x30000110
 
#define TEE_ALG_AES_CBC_MAC_PKCS5   0x30000510
 
#define TEE_ALG_AES_CMAC   0x30000610
 
#define TEE_ALG_AES_CCM   0x40000710
 
#define TEE_ALG_AES_GCM   0x40000810
 
#define TEE_ALG_DES_ECB_NOPAD   0x10000011
 
#define TEE_ALG_DES_CBC_NOPAD   0x10000111
 
#define TEE_ALG_DES_CBC_MAC_NOPAD   0x30000111
 
#define TEE_ALG_DES_CBC_MAC_PKCS5   0x30000511
 
#define TEE_ALG_DES3_ECB_NOPAD   0x10000013
 
#define TEE_ALG_DES3_CBC_NOPAD   0x10000113
 
#define TEE_ALG_DES3_CBC_MAC_NOPAD   0x30000113
 
#define TEE_ALG_DES3_CBC_MAC_PKCS5   0x30000513
 
#define TEE_ALG_RSASSA_PKCS1_V1_5_MD5   0x70001830
 
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA1   0x70002830
 
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA224   0x70003830
 
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA256   0x70004830
 
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA384   0x70005830
 
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA512   0x70006830
 
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA1   0x70212930
 
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA224   0x70313930
 
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256   0x70414930
 
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA384   0x70515930
 
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA512   0x70616930
 
#define TEE_ALG_RSAES_PKCS1_V1_5   0x60000130
 
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1   0x60210230
 
#define TEE_ALG_RSA_NOPAD   0x60000030
 
#define TEE_ALG_DSA_SHA1   0x70002131
 
#define TEE_ALG_DH_DERIVE_SHARED_SECRET   0x80000032
 
#define TEE_ALG_MD5   0x50000001
 
#define TEE_ALG_SHA1   0x50000002
 
#define TEE_ALG_SHA224   0x50000003
 
#define TEE_ALG_SHA256   0x50000004
 
#define TEE_ALG_SHA384   0x50000005
 
#define TEE_ALG_SHA512   0x50000006
 
#define TEE_ALG_HMAC_MD5   0x30000001
 
#define TEE_ALG_HMAC_SHA1   0x30000002
 
#define TEE_ALG_HMAC_SHA224   0x30000003
 
#define TEE_ALG_HMAC_SHA256   0x30000004
 
#define TEE_ALG_HMAC_SHA384   0x30000005
 
#define TEE_ALG_HMAC_SHA512   0x30000006
 

Typedefs

typedef enum
__TEE_Operation_Constants 
TEE_Operation_Constants
 
typedef enum
__TEE_Valid_Tag_Lengths 
TEE_Valid_Tag_Lengths
 
typedef enum __TEE_OperationMode TEE_OperationMode
 
typedef struct __TEE_OperationInfo TEE_OperationInfo
 
typedef struct
__TEE_OperationHandle
TEE_OperationHandle
 
typedef struct
__TEE_OperationHandle 
TEE_OperationHandleVar
 
typedef struct __TEE_ObjectHandle TEE_ObjectHandleVar
 

Enumerations

enum  __TEE_Operation_Constants {
  TEE_OPERATION_CIPHER = 0x1, TEE_OPERATION_MAC, TEE_OPERATION_AE, TEE_OPERATION_DIGEST,
  TEE_OPERATION_ASYMMETRIC_CIPHER, TEE_OPERATION_ASYMMETRIC_SIGNATURE, TEE_OPERATION_KEY_DERIVATION
}
 Typedefs for various crypto operation constants. More...
 
enum  __TEE_Valid_Tag_Lengths {
  TEE_TAG_LEN_32 = 32, TEE_TAG_LEN_48 = 48, TEE_TAG_LEN_64 = 64, TEE_TAG_LEN_96 = 96,
  TEE_TAG_LEN_104 = 104, TEE_TAG_LEN_112 = 112, TEE_TAG_LEN_120 = 120, TEE_TAG_LEN_128 = 128
}
 Valid tag lengths for Asymmetric cipher encryption. More...
 
enum  __TEE_OperationMode {
  TEE_MODE_ENCRYPT = 0x0, TEE_MODE_DECRYPT, TEE_MODE_SIGN, TEE_MODE_VERIFY,
  TEE_MODE_MAC, TEE_MODE_DIGEST, TEE_MODE_DERIVE
}
 Typedefs for various crypto operation modes. More...
 

Functions

TEEC_Result TEE_AllocateOperation (TEE_OperationHandle *operation, uint32_t algorithm, uint32_t mode, uint32_t maxKeySize)
 
void TEE_FreeOperation (TEE_OperationHandle operation)
 Deallocates all resources associated with an operation handle. After this function is called, the operation handle is no longer valid. More...
 
void TEE_GetOperationInfo (TEE_OperationHandle operation, TEE_OperationInfo *operationInfo)
 Returns information about operation handle. More...
 
void TEE_ResetOperation (TEE_OperationHandle operation)
 Resets the operation state before initialization But after the key has been set. More...
 
TEEC_Result TEE_SetOperationKey (TEE_OperationHandle operation, TEE_ObjectHandle *key)
 Programs the key of an operation Associates an operation with a key. More...
 
TEEC_Result TEE_SetOperationKey2 (TEE_OperationHandle operation, TEE_ObjectHandle *key1, TEE_ObjectHandle *key2)
 Initializes an existing operation with two keys. This is used only for the algorithm TEE_ALG_AES_XTS. More...
 
void TEE_CopyOperation (TEE_OperationHandle dstOperation, TEE_OperationHandle srcOperation)
 copies an operation state from dstOperation to srcOperation More...
 
void TEE_DigestUpdate (TEE_OperationHandle operation, void *chunk, size_t chunkSize)
 This function is called to accumulate message data for hashing. More...
 
TEEC_Result TEE_DigestDoFinal (TEE_OperationHandle operation, void *chunk, size_t chunkLen, void *hash, size_t *hashLen)
 Finalizes the message digest operation and produces the message hash. More...
 
void TEE_CipherInit (TEE_OperationHandle operation, void *IV, size_t IVLen)
 This function is used to start the symmetric cipher operation. More...
 
TEEC_Result TEE_CipherUpdate (TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, size_t *destLen)
 This function is used to encrypt or decrypt the input data. More...
 
TEEC_Result TEE_CipherDoFinal (TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, size_t *destLen)
 Finalizes the cipher operation, processing data that has not been processed by previous calls to TEE_CipherUpdate as well as data supplied in srcData. More...
 
void TEE_MACInit (TEE_OperationHandle operation, void *IV, size_t IVLen)
 Initializes a MAC operation. More...
 
void TEE_MACUpdate (TEE_OperationHandle operation, void *chunk, size_t chunkSize)
 Accumulates data for a MAC calculation. More...
 
TEEC_Result TEE_MACComputeFinal (TEE_OperationHandle operation, void *message, size_t messageLen, void *mac, size_t *macLen)
 Finalizes the MAC operation with a last chunk of message and computes the MAC. More...
 
TEEC_Result TEE_MACCompareFinal (TEE_OperationHandle operation, void *message, size_t messageLen, void *mac, size_t *macLen)
 Finalizes the MAC operation and compares the MAC with the buffer passed to the function. More...
 
TEEC_Result TEE_AEInit (TEE_OperationHandle operation, void *nonce, size_t nonceLen, uint32_t tagLen, uint32_t AADLen, uint32_t payloadLen)
 Initializes an authentication encryption operation. More...
 
void TEE_AEUpdateAAD (TEE_OperationHandle operation, void *AADdata, size_t AADdataLen)
 Feeds a new chunk of Additional Authentication Data (AAD) to the AE operation. More...
 
TEEC_Result TEE_AEUpdate (TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, size_t *destLen)
 Accumulates data for an Authentication Encryption Operation. More...
 
TEEC_Result TEE_AEEncryptFinal (TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, size_t *destLen, void *tag, size_t *tagLen)
 Processes data that has not been processed by previous calls to TEE_AEUpdate as well as data supplied in srcData. More...
 
TEEC_Result TEE_AEDecryptFinal (TEE_OperationHandle operation, void *srcData, size_t srcLen, void *destData, size_t *destLen, void *tag, size_t tagLen)
 Processes data that has not been processed by previous calls to TEE_AEUpdate as well as data supplied in srcData. More...
 
TEEC_Result TEE_AsymmetricEncrypt (TEE_OperationHandle operation, TEE_Attribute *params, uint32_t paramCount, void *srcData, size_t srcLen, void *destData, size_t *destLen)
 Encrypts a message with an asymmetric operation. More...
 
TEEC_Result TEE_AsymmetricDecrypt (TEE_OperationHandle operation, TEE_Attribute *params, uint32_t paramCount, void *srcData, size_t srcLen, void *destData, size_t *destLen)
 Decrypts a message with an assymetric operation. More...
 
TEEC_Result TEE_AsymmetricSignDigest (TEE_OperationHandle operation, TEE_Attribute *params, uint32_t paramCount, void *digest, size_t digestLen, void *signature, size_t *signatureLen)
 Signs a message digest signature with an asymmetric operation. More...
 
TEEC_Result TEE_AsymmetricVerifyDigest (TEE_OperationHandle operation, TEE_Attribute *params, uint32_t paramCount, void *digest, size_t digestLen, void *signature, size_t signatureLen)
 Verifies a message digest signature with an asymmetric operation. More...
 
void TEE_DeriveKey (TEE_OperationHandle operation, TEE_Attribute *params, uint32_t paramCount, TEE_ObjectHandle *derivedKey)
 Can only be used with the algorithm TEE_ALG_DH_DERIVE_SHARED_SECRET. More...
 
void TEE_GenerateRandom (void *randomBuffer, size_t randomBufferLen)
 Generates random data. More...
 
void TEE_Panic (TEE_Result panicCode)
 

Macro Definition Documentation

#define AES_128_CBC_MAX_KEY_LEN   16
#define ALGORITHM_NAME_LENGTH   128
#define SW_CRYPTO_FALSE   0
#define SW_CRYPTO_TRUE   1

Definition of some truth values.

#define SW_DSA_KEYLEN   1024

This is the size of the key that would be used for DSA.

#define SW_RSA_KEYLEN   1024

This is the size of the key that would be used for RSA.

#define SW_RSA_USE_PRIVATE   2
#define SW_RSA_USE_PUBLIC   1
#define TEE_ALG_AES_CBC_MAC_NOPAD   0x30000110
#define TEE_ALG_AES_CBC_MAC_PKCS5   0x30000510
#define TEE_ALG_AES_CBC_NOPAD   0x10000110
#define TEE_ALG_AES_CCM   0x40000710
#define TEE_ALG_AES_CMAC   0x30000610
#define TEE_ALG_AES_CTR   0x10000210
#define TEE_ALG_AES_CTS   0x10000310
#define TEE_ALG_AES_ECB_NOPAD   0x10000010
#define TEE_ALG_AES_GCM   0x40000810
#define TEE_ALG_AES_XTS   0x10000410
#define TEE_ALG_DES3_CBC_MAC_NOPAD   0x30000113
#define TEE_ALG_DES3_CBC_MAC_PKCS5   0x30000513
#define TEE_ALG_DES3_CBC_NOPAD   0x10000113
#define TEE_ALG_DES3_ECB_NOPAD   0x10000013
#define TEE_ALG_DES_CBC_MAC_NOPAD   0x30000111
#define TEE_ALG_DES_CBC_MAC_PKCS5   0x30000511
#define TEE_ALG_DES_CBC_NOPAD   0x10000111
#define TEE_ALG_DES_ECB_NOPAD   0x10000011
#define TEE_ALG_DH_DERIVE_SHARED_SECRET   0x80000032
#define TEE_ALG_DSA_SHA1   0x70002131
#define TEE_ALG_HMAC_MD5   0x30000001
#define TEE_ALG_HMAC_SHA1   0x30000002
#define TEE_ALG_HMAC_SHA224   0x30000003
#define TEE_ALG_HMAC_SHA256   0x30000004
#define TEE_ALG_HMAC_SHA384   0x30000005
#define TEE_ALG_HMAC_SHA512   0x30000006
#define TEE_ALG_MD5   0x50000001
#define TEE_ALG_RSA_NOPAD   0x60000030
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1   0x60210230
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA224   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
#define TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512   TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1
#define TEE_ALG_RSAES_PKCS1_V1_5   0x60000130
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA1   0x70212930
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA224   0x70313930
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256   0x70414930
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA384   0x70515930
#define TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA512   0x70616930
#define TEE_ALG_RSASSA_PKCS1_V1_5_MD5   0x70001830
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA1   0x70002830
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA224   0x70003830
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA256   0x70004830
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA384   0x70005830
#define TEE_ALG_RSASSA_PKCS1_V1_5_SHA512   0x70006830
#define TEE_ALG_SHA1   0x50000002
#define TEE_ALG_SHA224   0x50000003
#define TEE_ALG_SHA256   0x50000004
#define TEE_ALG_SHA384   0x50000005
#define TEE_ALG_SHA512   0x50000006

Typedef Documentation

Enumeration Type Documentation

Typedefs for various crypto operation constants.

Enumerator
TEE_OPERATION_CIPHER 
TEE_OPERATION_MAC 
TEE_OPERATION_AE 
TEE_OPERATION_DIGEST 
TEE_OPERATION_ASYMMETRIC_CIPHER 
TEE_OPERATION_ASYMMETRIC_SIGNATURE 
TEE_OPERATION_KEY_DERIVATION 

Typedefs for various crypto operation modes.

Enumerator
TEE_MODE_ENCRYPT 
TEE_MODE_DECRYPT 
TEE_MODE_SIGN 
TEE_MODE_VERIFY 
TEE_MODE_MAC 
TEE_MODE_DIGEST 
TEE_MODE_DERIVE 

Valid tag lengths for Asymmetric cipher encryption.

Enumerator
TEE_TAG_LEN_32 
TEE_TAG_LEN_48 
TEE_TAG_LEN_64 
TEE_TAG_LEN_96 
TEE_TAG_LEN_104 
TEE_TAG_LEN_112 
TEE_TAG_LEN_120 
TEE_TAG_LEN_128 

Function Documentation

TEEC_Result TEE_AEDecryptFinal ( TEE_OperationHandle  operation,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen,
void *  tag,
size_t  tagLen 
)

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

Parameters
operation
srcData
srcLen
destData
destLen
tag
tagLen
Returns
TEEC_Result TEE_AEEncryptFinal ( TEE_OperationHandle  operation,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen,
void *  tag,
size_t tagLen 
)

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

Parameters
operation
srcData
srcLen
destData
destLen
tag
tagLen
Returns
TEEC_Result TEE_AEInit ( TEE_OperationHandle  operation,
void *  nonce,
size_t  nonceLen,
uint32_t  tagLen,
uint32_t  AADLen,
uint32_t  payloadLen 
)

Initializes an authentication encryption operation.

Parameters
operation
nonce
nonceLen
tagLen
AADLen
payloadLen
Returns
TEEC_Result TEE_AEUpdate ( TEE_OperationHandle  operation,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen 
)

Accumulates data for an Authentication Encryption Operation.

Parameters
operation
srcData
srcLen
destData
destLen
Returns
void TEE_AEUpdateAAD ( TEE_OperationHandle  operation,
void *  AADdata,
size_t  AADdataLen 
)

Feeds a new chunk of Additional Authentication Data (AAD) to the AE operation.

Parameters
operation
AADdata
AADdataLen
TEEC_Result TEE_AllocateOperation ( TEE_OperationHandle operation,
uint32_t  algorithm,
uint32_t  mode,
uint32_t  maxKeySize 
)
Parameters
operation
algorithm
mode
maxKeySize
Returns
TEEC_Result TEE_AsymmetricDecrypt ( TEE_OperationHandle  operation,
TEE_Attribute params,
uint32_t  paramCount,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen 
)

Decrypts a message with an assymetric operation.

Parameters
operation
params
paramCount
srcData
srcLen
destData
destLen
Returns
TEEC_Result TEE_AsymmetricEncrypt ( TEE_OperationHandle  operation,
TEE_Attribute params,
uint32_t  paramCount,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen 
)

Encrypts a message with an asymmetric operation.

Parameters
operation
params
paramCount
srcData
srcLen
destData
destLen
Returns
TEEC_Result TEE_AsymmetricSignDigest ( TEE_OperationHandle  operation,
TEE_Attribute params,
uint32_t  paramCount,
void *  digest,
size_t  digestLen,
void *  signature,
size_t signatureLen 
)

Signs a message digest signature with an asymmetric operation.

Parameters
operation
params
paramCount
digest
digestLen
signature
signatureLen
Returns
TEEC_Result TEE_AsymmetricVerifyDigest ( TEE_OperationHandle  operation,
TEE_Attribute params,
uint32_t  paramCount,
void *  digest,
size_t  digestLen,
void *  signature,
size_t  signatureLen 
)

Verifies a message digest signature with an asymmetric operation.

Parameters
operation
params
paramCount
digest
digestLen
signature
signatureLen
Returns
TEEC_Result TEE_CipherDoFinal ( TEE_OperationHandle  operation,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen 
)

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

Parameters
operation
srcData
srcLen
destData
destLen
Returns
void TEE_CipherInit ( TEE_OperationHandle  operation,
void *  IV,
size_t  IVLen 
)

This function is used to start the symmetric cipher operation.

Parameters
operation
IV
IVLen
TEEC_Result TEE_CipherUpdate ( TEE_OperationHandle  operation,
void *  srcData,
size_t  srcLen,
void *  destData,
size_t destLen 
)

This function is used to encrypt or decrypt the input data.

Parameters
operation
srcData
srcLen
destData
destLen
Returns
void TEE_CopyOperation ( TEE_OperationHandle  dstOperation,
TEE_OperationHandle  srcOperation 
)

copies an operation state from dstOperation to srcOperation

Parameters
dstOperation
srcOperation
void TEE_DeriveKey ( TEE_OperationHandle  operation,
TEE_Attribute params,
uint32_t  paramCount,
TEE_ObjectHandle derivedKey 
)

Can only be used with the algorithm TEE_ALG_DH_DERIVE_SHARED_SECRET.

Parameters
operation
params
paramCount
derivedKey
TEEC_Result TEE_DigestDoFinal ( TEE_OperationHandle  operation,
void *  chunk,
size_t  chunkLen,
void *  hash,
size_t hashLen 
)

Finalizes the message digest operation and produces the message hash.

Parameters
operation
chunk
chunkLen
hash
hashLen
Returns
void TEE_DigestUpdate ( TEE_OperationHandle  operation,
void *  chunk,
size_t  chunkSize 
)

This function is called to accumulate message data for hashing.

Parameters
operation
chunk
chunkSize
void TEE_FreeOperation ( TEE_OperationHandle  operation)

Deallocates all resources associated with an operation handle. After this function is called, the operation handle is no longer valid.

Parameters
operation
void TEE_GenerateRandom ( void *  randomBuffer,
size_t  randomBufferLen 
)

Generates random data.

Parameters
randomBufferreference to generated random data
randomBufferLenbyte length of requested random data
void TEE_GetOperationInfo ( TEE_OperationHandle  operation,
TEE_OperationInfo operationInfo 
)

Returns information about operation handle.

Parameters
operation
operationInfo
TEEC_Result TEE_MACCompareFinal ( TEE_OperationHandle  operation,
void *  message,
size_t  messageLen,
void *  mac,
size_t macLen 
)

Finalizes the MAC operation and compares the MAC with the buffer passed to the function.

Parameters
operation
message
messageLen
mac
macLen
Returns
TEEC_Result TEE_MACComputeFinal ( TEE_OperationHandle  operation,
void *  message,
size_t  messageLen,
void *  mac,
size_t macLen 
)

Finalizes the MAC operation with a last chunk of message and computes the MAC.

Parameters
operation
message
messageLen
mac
macLen
Returns
void TEE_MACInit ( TEE_OperationHandle  operation,
void *  IV,
size_t  IVLen 
)

Initializes a MAC operation.

Parameters
operation
IV
IVLen
void TEE_MACUpdate ( TEE_OperationHandle  operation,
void *  chunk,
size_t  chunkSize 
)

Accumulates data for a MAC calculation.

Parameters
operation
chunk
chunkSize
void TEE_Panic ( TEE_Result  panicCode)
Parameters
panicCode
void TEE_ResetOperation ( TEE_OperationHandle  operation)

Resets the operation state before initialization But after the key has been set.

Parameters
operation
TEEC_Result TEE_SetOperationKey ( TEE_OperationHandle  operation,
TEE_ObjectHandle key 
)

Programs the key of an operation Associates an operation with a key.

Parameters
operation
key
Returns
TEEC_Result TEE_SetOperationKey2 ( TEE_OperationHandle  operation,
TEE_ObjectHandle key1,
TEE_ObjectHandle key2 
)

Initializes an existing operation with two keys. This is used only for the algorithm TEE_ALG_AES_XTS.

Parameters
operation
key1
key2
Returns