没有合适的资源?快使用搜索试试~ 我知道了~
trustonic GP TEE 接口 API (GPD-TEE-Internal-Core-API)
需积分: 5 4 下载量 129 浏览量
2023-04-19
17:49:46
上传
评论
收藏 4.18MB PDF 举报
温馨提示
试读
366页
GPD_TEE_Internal_Core_API_Specification Version 1.2.1.31 [target v1.3] September 2020 最新版 包含TA的接口,TEE的功能函数说明,返回值与错误码说明等
资源推荐
资源详情
资源评论
Copyright
2011-2020 GlobalPlatform, Inc. All Rights Reserved.
Recipients of this document are invited to submit, with their comments, notification of any relevant patents
or other intellectual property rights (collectively, “IPR”) of which they may be aware which might be
necessarily infringed by the implementation of the specification or other work product set forth in this
document, and to provide supporting documentation. This document is currently in draft form, and the
technology provided or described herein may be subject to updates, revisions, extensions, review, and
enhancement by GlobalPlatform or its Committees or Working Groups. Prior to publication of this
document by GlobalPlatform, neither Members nor third parties have any right to use this document for
anything other than review and study purposes. Use of this information is governed by the GlobalPlatform
license agreement and any use inconsistent with that agreement is strictly prohibited.
GlobalPlatform Technology
TEE Internal Core API Specification
Version 1.2.1.31 [target v1.3]
Public Review
September 2020
Document Reference: GPD_SPE_010
TEE Internal Core API Specification – Public Review v1.2.1.31
Copyright
2011-2020 GlobalPlatform, Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by GlobalPlatform. Use of this
information is governed by the GlobalPlatform license agreement and any use inconsistent with that agreement is strictly
prohibited.
THIS SPECIFICATION OR OTHER WORK PRODUCT IS BEING OFFERED WITHOUT ANY WARRANTY
WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NON-INFRINGEMENT IS EXPRESSLY
DISCLAIMED. ANY IMPLEMENTATION OF THIS SPECIFICATION OR OTHER WORK PRODUCT SHALL
BE MADE ENTIRELY AT THE IMPLEMENTER’S OWN RISK, AND NEITHER THE COMPANY, NOR ANY
OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY
IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER DIRECTLY
OR INDIRECTLY ARISING FROM THE IMPLEMENTATION OF THIS SPECIFICATION OR OTHER
WORK PRODUCT.
TEE Internal Core API Specification – Public Review v1.2.1.31 3 / 366
Copyright
2011-2020 GlobalPlatform, Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by GlobalPlatform. Use of this
information is governed by the GlobalPlatform license agreement and any use inconsistent with that agreement is strictly
prohibited.
Contents
1 Introduction .......................................................................................................................... 14
1.1 Audience ............................................................................................................................................. 14
1.2 IPR Disclaimer..................................................................................................................................... 15
1.3 References .......................................................................................................................................... 15
1.4 Terminology and Definitions ................................................................................................................ 17
1.5 Abbreviations and Notations ............................................................................................................... 21
1.6 Revision History .................................................................................................................................. 24
2 Overview of the TEE Internal Core API Specification ........................................................ 27
2.1 Trusted Applications ............................................................................................................................ 28
2.1.1 TA Interface .................................................................................................................................. 29
2.1.2 Instances, Sessions, Tasks, and Commands .............................................................................. 30
2.1.3 Sequential Execution of Entry Points ........................................................................................... 30
2.1.4 Cancellations ................................................................................................................................ 30
2.1.5 Unexpected Client Termination .................................................................................................... 31
2.1.6 Instance Types ............................................................................................................................. 31
2.1.7 Configuration, Development, and Management .......................................................................... 31
2.2 TEE Internal Core APIs ....................................................................................................................... 32
2.2.1 Trusted Core Framework API ...................................................................................................... 32
2.2.2 Trusted Storage API for Data and Keys ....................................................................................... 32
2.2.3 Cryptographic Operations API ..................................................................................................... 33
2.2.4 Time API ....................................................................................................................................... 33
2.2.5 TEE Arithmetical API .................................................................................................................... 33
2.2.6 Peripheral and Event APIs ........................................................................................................... 34
2.3 Error Handling ..................................................................................................................................... 34
2.3.1 Normal Errors ............................................................................................................................... 34
2.3.2 Programmer Errors ...................................................................................................................... 34
2.3.3 Panics ........................................................................................................................................... 35
2.4 Opaque Handles ................................................................................................................................. 37
2.5 Properties ............................................................................................................................................ 38
2.6 Peripheral Support .............................................................................................................................. 38
3 Common Definitions ............................................................................................................ 39
3.1 Header File .......................................................................................................................................... 39
3.1.1 API Version .................................................................................................................................. 39
3.1.2 Target and Version Optimization.................................................................................................. 40
3.1.3 Support for Optional Capabilities ................................................................................................. 41
3.2 Data Types .......................................................................................................................................... 42
3.2.1 Basic Types .................................................................................................................................. 42
3.2.2 Bit Numbering............................................................................................................................... 42
3.2.3 TEE_Result, TEEC_Result .......................................................................................................... 43
3.2.4 TEE_UUID, TEEC_UUID ............................................................................................................. 44
3.3 Constants ............................................................................................................................................ 45
3.3.1 Return Code Ranges and Format ................................................................................................ 45
3.3.2 Return Codes ............................................................................................................................... 45
3.4 Parameter Annotations ....................................................................................................................... 47
3.4.1 [in], [out], and [inout] ..................................................................................................................... 47
3.4.2 [outopt] ......................................................................................................................................... 47
3.4.3 [inbuf] and [inoutbuf] ..................................................................................................................... 48
3.4.4 [outbuf] ......................................................................................................................................... 48
4 / 366 TEE Internal Core API Specification – Public Review v1.2.1.31
Copyright
2011-2020 GlobalPlatform, Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by GlobalPlatform. Use of this
information is governed by the GlobalPlatform license agreement and any use inconsistent with that agreement is strictly
prohibited.
3.4.5 [outbufopt] .................................................................................................................................... 49
3.4.6 [instring] and [instringopt] ............................................................................................................. 49
3.4.7 [outstring] and [outstringopt] ......................................................................................................... 49
3.4.8 [ctx] ............................................................................................................................................... 49
3.5 Backward Compatibility ....................................................................................................................... 49
3.5.1 Version Compatibility Definitions.................................................................................................. 50
4 Trusted Core Framework API .............................................................................................. 52
4.1 Data Types .......................................................................................................................................... 53
4.1.1 TEE_Identity ................................................................................................................................. 53
4.1.2 TEE_Param .................................................................................................................................. 53
4.1.3 TEE_TASessionHandle ............................................................................................................... 54
4.1.4 TEE_PropSetHandle .................................................................................................................... 54
4.2 Constants ............................................................................................................................................ 55
4.2.1 Parameter Types .......................................................................................................................... 55
4.2.2 Login Types .................................................................................................................................. 55
4.2.3 Origin Codes ................................................................................................................................ 56
4.2.4 Property Set Pseudo-Handles...................................................................................................... 56
4.2.5 Memory Access Rights ................................................................................................................ 56
4.3 TA Interface ......................................................................................................................................... 57
4.3.1 TA_CreateEntryPoint ................................................................................................................... 60
4.3.2 TA_DestroyEntryPoint .................................................................................................................. 60
4.3.3 TA_OpenSessionEntryPoint ........................................................................................................ 61
4.3.4 TA_CloseSessionEntryPoint ........................................................................................................ 63
4.3.5 TA_InvokeCommandEntryPoint ................................................................................................... 64
4.3.6 Operation Parameters in the TA Interface ................................................................................... 65
4.4 Property Access Functions ................................................................................................................. 69
4.4.1 TEE_GetPropertyAsString ........................................................................................................... 71
4.4.2 TEE_GetPropertyAsBool ............................................................................................................. 72
4.4.3 TEE_GetPropertyAsUnn .............................................................................................................. 73
4.4.4 TEE_GetPropertyAsBinaryBlock.................................................................................................. 75
4.4.5 TEE_GetPropertyAsUUID ............................................................................................................ 76
4.4.6 TEE_GetPropertyAsIdentity ......................................................................................................... 77
4.4.7 TEE_AllocatePropertyEnumerator ............................................................................................... 78
4.4.8 TEE_FreePropertyEnumerator .................................................................................................... 78
4.4.9 TEE_StartPropertyEnumerator .................................................................................................... 79
4.4.10 TEE_ResetPropertyEnumerator .................................................................................................. 79
4.4.11 TEE_GetPropertyName ............................................................................................................... 80
4.4.12 TEE_GetNextProperty ................................................................................................................. 81
4.5 Trusted Application Configuration Properties ..................................................................................... 82
4.6 Client Properties .................................................................................................................................. 85
4.7 Implementation Properties .................................................................................................................. 87
4.7.1 Specification Version Number Property ....................................................................................... 94
4.8 Panics .................................................................................................................................................. 95
4.8.1 TEE_Panic ................................................................................................................................... 95
4.9 Internal Client API ............................................................................................................................... 96
4.9.1 TEE_OpenTASession .................................................................................................................. 96
4.9.2 TEE_CloseTASession .................................................................................................................. 98
4.9.3 TEE_InvokeTACommand ............................................................................................................ 99
4.9.4 Operation Parameters in the Internal Client API ........................................................................ 101
4.10 Cancellation Functions ...................................................................................................................... 103
4.10.1 TEE_GetCancellationFlag .......................................................................................................... 104
4.10.2 TEE_UnmaskCancellation ......................................................................................................... 105
TEE Internal Core API Specification – Public Review v1.2.1.31 5 / 366
Copyright
2011-2020 GlobalPlatform, Inc. All Rights Reserved.
The technology provided or described herein is subject to updates, revisions, and extensions by GlobalPlatform. Use of this
information is governed by the GlobalPlatform license agreement and any use inconsistent with that agreement is strictly
prohibited.
4.10.3 TEE_MaskCancellation .............................................................................................................. 105
4.11 Memory Management Functions....................................................................................................... 106
4.11.1 TEE_CheckMemoryAccessRights ............................................................................................. 106
4.11.2 TEE_SetInstanceData ................................................................................................................ 109
4.11.3 TEE_GetInstanceData ............................................................................................................... 110
4.11.4 TEE_Malloc ................................................................................................................................ 111
4.11.5 TEE_Realloc .............................................................................................................................. 113
4.11.6 TEE_Free ................................................................................................................................... 115
4.11.7 TEE_MemMove.......................................................................................................................... 116
4.11.8 TEE_MemCompare ................................................................................................................... 117
4.11.9 TEE_MemFill .............................................................................................................................. 118
5 Trusted Storage API for Data and Keys ............................................................................ 119
5.1 Summary of Features and Design .................................................................................................... 119
5.2 Trusted Storage and Rollback Protection ......................................................................................... 123
5.3 Data Types ........................................................................................................................................ 124
5.3.1 TEE_Attribute ............................................................................................................................. 124
5.3.2 TEE_ObjectInfo .......................................................................................................................... 125
5.3.3 TEE_Whence ............................................................................................................................. 126
5.3.4 TEE_ObjectHandle .................................................................................................................... 126
5.3.5 TEE_ObjectEnumHandle ........................................................................................................... 126
5.4 Constants .......................................................................................................................................... 127
5.4.1 Constants Used in Trusted Storage API for Data and Keys ...................................................... 127
5.4.2 Constants Used in Cryptographic Operations API ..................................................................... 129
5.5 Generic Object Functions .................................................................................................................. 130
5.5.1 TEE_GetObjectInfo1 .................................................................................................................. 130
5.5.2 TEE_RestrictObjectUsage1 ....................................................................................................... 132
5.5.3 TEE_GetObjectBufferAttribute ................................................................................................... 133
5.5.4 TEE_GetObjectValueAttribute ................................................................................................... 135
5.5.5 TEE_CloseObject ....................................................................................................................... 136
5.6 Transient Object Functions ............................................................................................................... 137
5.6.1 TEE_AllocateTransientObject .................................................................................................... 137
5.6.2 TEE_FreeTransientObject ......................................................................................................... 141
5.6.3 TEE_ResetTransientObject ....................................................................................................... 141
5.6.4 TEE_PopulateTransientObject................................................................................................... 142
5.6.5 TEE_InitRefAttribute, TEE_InitValueAttribute ............................................................................ 147
5.6.6 TEE_CopyObjectAttributes1 ...................................................................................................... 149
5.6.7 TEE_GenerateKey ..................................................................................................................... 151
5.7 Persistent Object Functions .............................................................................................................. 155
5.7.1 TEE_OpenPersistentObject ....................................................................................................... 155
5.7.2 TEE_CreatePersistentObject ..................................................................................................... 157
5.7.3 Persistent Object Sharing Rules ................................................................................................ 160
5.7.4 TEE_CloseAndDeletePersistentObject1 .................................................................................... 162
5.7.5 TEE_RenamePersistentObject .................................................................................................. 163
5.8 Persistent Object Enumeration Functions ......................................................................................... 164
5.8.1 TEE_AllocatePersistentObjectEnumerator ................................................................................ 164
5.8.2 TEE_FreePersistentObjectEnumerator ..................................................................................... 164
5.8.3 TEE_ResetPersistentObjectEnumerator ................................................................................... 165
5.8.4 TEE_StartPersistentObjectEnumerator ..................................................................................... 166
5.8.5 TEE_GetNextPersistentObject ................................................................................................... 167
5.9 Data Stream Access Functions ......................................................................................................... 169
5.9.1 TEE_ReadObjectData ................................................................................................................ 169
5.9.2 TEE_WriteObjectData ................................................................................................................ 171
剩余365页未读,继续阅读
资源评论
IceSea7
- 粉丝: 39
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功