当前位置:文档之家› APDU指令集合

APDU指令集合

1GP APDU 指令参考(GlobalPlatform 第九章)1.1State ReturnedSw1 sw2 meaning62 00 Logical Channel already closed62 83 Card Life Cycle State is CARD_LOCKED63 10 More data available64 00 No specific diagnosis65 81 Memory failure67 00 Wrong length in Lc68 81 Logical channel not supported or is not active68 82 Secure messaging not supported69 82 Security status not satisfied69 85 Conditions of use not satisfied6A 80 Incorrect values in command data6A 81 Function not supported e.g. card Life Cycle State is CARD_LOCKED6A 82 Selected Application / file not found6A 84 Not enough memory space6A 86 Incorrect P1 P26A 88 Referenced data not found6D 00 Invalid instruction6E 00 Invalid class94 84 Algorithm not supported1.2基本指令command CLA INFDelete command (80\84) E4 (9.2)GET DATA Command (00\80\84) CA (9.3)GET STATUS Command (80\84)F2 (9.4)INSTALL Command (80\84)E6 (9.5)LOAD Command (80\84)E8 (9.6)MANAGE CHANNEL Command 00 70 (9.7)PUT KEY Command (80\84)D8 (9.8)SELECT Command 00 A4 (9.9)SET STATUS Command (80\84)F0 (9.10)STORE DATA Command (80\84)E2 (9.11)2PBOC 指令参考(中国金融集成电路1、2) 2.1基本指令command CLA INF 说明APPLICATION BLOCK 84 1E 使当前选择的应用失效(6.2.3)APPLICATION UNBLOCK 84 18 用于恢复当前应用(6.2.4)CARD BLOCK 84 16 使卡中所有应用永久失效(6.2.5)EXTERNAL AUTHENTICATION 00 82 要求IC卡中的应用验证密码(6.2.6) GET CHALLENGE 00 84 请求一个用于安全相关过程的随机数(6.2.7)GET RESPONSE 00 C0 提供了一种从卡片向接口设备传送APDU的传输方法 (6.2.8) INTERNAL AUTHENTICA TION 00 88 提供了利用接口设备发来的随机数和自身存储的相关密钥进行数据认证的功能(6.2.9)PIN UNBLOCK 84 24 为发卡方提供了解锁个人密码的功能(6.2.10)READ BINARY (00\04)B0 用于读取二进制文件的内容(6.2.11) READ RECORD (00\04)B2 用于读取记录文件的内容(6.2.12)SELECT 00 A4 通过文件名或AID来选择IC卡中的PSE、DDF或ADF(6.2.13) UPDATE BINARY (00\04)D6 报文使用命令APDU中给定的数据修改EF文件中已有的数据(6.2.14) UPDATE RECORD (00\04)DC 报文用命令APDU中给定的数据更改指定的记录(6.2.15)VERIFY 00 20 用于校验命令数据域中的个人密码的正确性(6.2.16)(1)CHANGE PIN(修改个人密码) 80 5E 01 00 (5.2.2)CREDIT FOR LOAD(圈存) 80 52 00 00 (5.2.3)DEBIT FOR PURCHASE/CASH WITHDRAW(消费/取现) 80 54 01 00 (5.2.4)DEBIT FOR UNLOAD(圈提) 80 54 03 00 (5.2.5)GET BALANCE(读余额) 80 5C 00 0x (5.2.6)GET TRANSACTION PROVE(取交易认证) 80 5A 00 xx (5.2.7)INITIALIZE FOR CASH WITHDRAW(取现初始化) 80 50 02 01 (5.2.8)INITIALIZE FOR LOAD(圈存初始化) 80 50 00 0x (5.2.9)INITIALIZE FOR PURCHASE(消费初始化) 80 50 01 0x (5.2.10)INITIALIZE FOR UNLOAD(圈提初始化) 80 50 05 01 (5.2.11)INITIALIZE FOR UPDATE(修改初始化) 80 50 04 01 (5.2.12)RELOAD PIN(重装个人密码) 80 5E 00 00 (5.2.13)UPDATE OVERDRAW LIMIT(修改透支限额) 80 58 00 00 (5.2.14)(2) 2.2State ReturnedSw1 sw2 meaning 性质61 xx 正常处理62 00 无信息提供警告62 81 回送数据可能出错警告62 82 文件长度<Le62 83 选择文件无效警告63 00 认证失败警告63 cx 使用内部重试程序更新成功警告64 00 状态位未变错误65 81 内存错误错误67 00 Lc长度错误错误68 82 不支持安全报文错误69 00 不能处理69 01 命令不接受(无效状态) 错误69 81 命令与文件结构不相容错误69 82 不满足安全状态错误69 83 认证方法锁定错误69 84 引用数据无效错误69 85 使用条件不满足错误69 86 不满足命令执行的条件(非当前EF) 错误69 87 安全报文数据项丢失错误69 88 安全报文数据项不正确错误6A 80 数据域参数不正确错误6A 81 不支持此功能警告6A 82 文件未找到错误6A 83 未找到记录错误6A 84 文件中存储空间不够错误6A 86 参数P1 P2不正确错误6A 88 未找到引用数据错误6B 00 参数错误(偏移地址超出了EF) 错误6C xx 长度错误(Le不正确,xx表示实际长度) 错误6D 00 INS不支持或错误错误6E 00 CLA不支持或错误错误6F 00 数据无效错误93 02 MAC无效错误93 03 应用永久锁定警告\错误(block\unblock)94 01 金额不足错误94 03 密钥索引不支持错误94 06 所需MAC不可用错误37816 指令参考(7816-4)3.1基本指令command CLA INF 说明READ BINARY 00 B0 (6.1)WRITE BINARY command 00 D0 (6.2)UPDATE BINARY command 00 D6 (6.3)ERASE BINARY command 00 0E (6.4)READ RECORD(S) command 00 B2 (6.5)WRITE RECORD command 00 D2 (6.6)APPEND RECORD 00 E2 (6.7)UPDATE RECORD command 00 DC (6.8)GET DATA command 00 CA (6.9)PUT DATA command 00 DA (6.10)SELECT FILE command 00 A4 (6.11)VERIFY command 00 20 (6.12)INTERNAL AUTHENTICA TE command 00 88 (6.13)EXTERNAL AUTHENTICATE command 00 B2 (6.14)GET CHALLENGE command 00 B4 (6.15)MANAGE CHANNEL command 00 70 (6.16)3.2State ReturnedSw1 sw2 meaning62 00 No information is given62 81 Part of returned data may be corrupted62 82 End of file reached befeore reading Le bytes62 83 Selected file invalidated62 84 FCI not formatted according to 5.1.562 CX Counter (successful writing, but after using an internal retry routine. 'X'!='0'indicates the number of retries: 'X'='0' means that no counter is provided)63 00 No information given (verification failed)63 CX Counter (successful storing, but after using an internal retry routine, 'X'!='0'indicates the number of retries. 'X'='0' means that no counter is provided65 81 Memory failure (unsuccessful writing)67 00 Wrong length (wrong Le field)69 81 Command incompatible with file structure69 82 Security status not satisfied69 83 Authentication method blocked69 84 Referenced data invalidated69 85 Conditions of use not satisfied69 86 Command not allowed (no current EF)6A 80 Incorrect parameters in the data field6A 81 Function not supported6A 82 File not found6A 83 Record not found6A 84 Not enough memory space in the file6A 85 Lc inconsistent with TLV structure6A 86 Incorrect parameters P1-P26a 87 Lc inconsistent with P1-P26A 88 Referenced data (data objects) not found6B 00 Wrong parameters (offset outside the EF)6C XX Wrong length (wrong Le field: 'XX' indicates the exact length)。

相关主题