1
GP APDU 指令参考(GlobalPlatform 第九章)
1.1
State Returned
meaning
Logical Channel already closed
Card Life Cycle State is CARD_LOCKED
More data available
No specific diagnosis
Memory failure
Wrong length in Lc
Logical channel not supported or is not active
sw2
00
83
10
00
81
00
81
82 Secure messaging not supported
82 Security status not satisfied
85 Conditions of use not satisfied
Sw1
62
62
63
64
65
67
68
68
69
69
6A 80
6A 81 Function not supported e.g. card Life Cycle State is CARD_LOCKED
6A 82 Selected Application / file not found
6A 84 Not enough memory space
6A 86
6A 88 Referenced data not found
6D 00
6E 00
94
Incorrect values in command data
Incorrect P1 P2
Invalid instruction
Invalid class
84 Algorithm not supported
1.2 基本指令
CLA INF
command
(80\84) E4
Delete command
(00\80\84) CA
GET DATA Command
(80\84)F2
GET STATUS Command
(80\84)E6
INSTALL Command
(80\84)E8
LOAD Command
MANAGE CHANNEL Command 00 70
(80\84)D8
PUT KEY Command
SELECT Command
00 A4
(80\84)F0
SET STATUS Command
STORE DATA Command
(80\84)E2
(9.2)
(9.3)
(9.4)
(9.5)
(9.6)
(9.7)
(9.8)
(9.9)
(9.10)
(9.11)
2
PBOC 指令参考(中国金融集成电路 1、2)
2.1 基本指令
command
CLA INF
APPLICATION BLOCK
84 1E
APPLICATION UNBLOCK 84 18
CARD BLOCK
84 16
EXTERNAL AUTHENTICATION 00 82
GET CHALLENGE
00 84
GET RESPONSE
00 C0
INTERNAL AUTHENTICATION 00 88
PIN UNBLOCK
84 24
READ BINARY
READ RECORD
SELECT
(00\04)B0
(00\04)B2
00 A4
UPDATE BINARY
(00\04)D6
UPDATE RECORD
(00\04)DC
VERIFY
00 20
说明
使当前选择的应用失效(6.2.3)
用于恢复当前应用(6.2.4)
使卡中所有应用永久失效(6.2.5)
要求 IC 卡中的应用验证密码(6.2.6)
请求一个用于安全相关过程的随机
数(6.2.7)
提供了一种从卡片向接口设备传送 APDU
的传输方法 (6.2.8)
提供了利用接口设备发来的随机数和自
身存储的相关密钥进行数据认证的功能
(6.2.9)
为发卡方提供了解锁个人密码的功能
(6.2.10)
用于读取二进制文件的内容(6.2.11)
用于读取记录文件的内容(6.2.12)
通过文件名或 AID 来选择 IC 卡中的
PSE、DDF 或 ADF(6.2.13)
报文使用命令 APDU 中给定的数据修改
EF 文件中已有的数据(6.2.14)
报文用命令 APDU 中给定的数据更改指
定的记录(6.2.15)
用于校验命令数据域中的个人密码的正
确性(6.2.16)
(1)
(5.2.4)
80 5E 01 00
80 52 00 00
CHANGE PIN(修改个人密码)
CREDIT FOR LOAD(圈存)
DEBIT FOR PURCHASE/CASH WITHDRAW(消费/取现) 80 54 01 00
DEBIT FOR UNLOAD(圈提)
80 54 03 00
GET BALANCE(读余额)
80 5C 00 0x
GET TRANSACTION PROVE(取交易认证) 80 5A 00 xx
INITIALIZE FOR CASH WITHDRAW(取现初始化) 80 50 02 01
INITIALIZE FOR LOAD(圈存初始化)
80 50 00 0x
INITIALIZE FOR PURCHASE(消费初始化) 80 50 01 0x
80 50 05 01
INITIALIZE FOR UNLOAD(圈提初始化)
INITIALIZE FOR UPDATE(修改初始化)
80 50 04 01
RELOAD PIN(重装个人密码)
80 5E 00 00
UPDATE OVERDRAW LIMIT(修改透支限额) 80 58 00 00
(5.2.2)
(5.2.3)
(5.2.5)
(5.2.6)
(5.2.7)
(5.2.8)
(5.2.9)
(5.2.10)
(5.2.11)
(5.2.12)
(5.2.13)
(5.2.14)
2.2
State Returned
(2)
性质
警告
警告
警告
警告
错误
错误
错误
错误
Sw1 sw2 meaning
61
xx 正常处理
00 无信息提供
62
81 回送数据可能出错
62
62
82 文件长度
3
7816 指令参考(7816-4)
3.1 基本指令
command
CLA INF
说明
00 B0
00 D0
00 D6
00 0E
00 B2
00 D2
00 E2
00 DC
00 CA
00 DA
00 A4
00 20
READ BINARY
WRITE BINARY command
UPDATE BINARY command
ERASE BINARY command
READ RECORD(S) command
WRITE RECORD command
APPEND RECORD
UPDATE RECORD command
GET DATA command
PUT DATA command
SELECT FILE command
VERIFY command
INTERNAL AUTHENTICATE command 00 88
EXTERNAL AUTHENTICATE command 00 B2
GET CHALLENGE command
MANAGE CHANNEL command
00 B4
00 70
(6.1)
(6.2)
(6.3)
(6.4)
(6.5)
(6.6)
(6.7)
(6.8)
(6.9)
(6.10)
(6.11)
(6.12)
(6.13)
(6.14)
(6.15)
(6.16)
3.2
State Returned
meaning
00 No information is given
81 Part of returned data may be corrupted
82 End of file reached befeore reading Le bytes
Sw1 sw2
62
62
62
62 83 Selected file invalidated
62 84 FCI not formatted according to 5.1.5
62
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 provided
65 81 Memory failure (unsuccessful writing)
67 00 Wrong length (wrong Le field)
69 81 Command incompatible with file structure
69 82 Security status not satisfied
69 83 Authentication method blocked
69 84 Referenced data invalidated
69 85 Conditions of use not satisfied
69 86 Command not allowed (no current EF)
6A 80 Incorrect parameters in the data field
6A 81 Function not supported
6A 82 File not found
6A 83 Record not found
6A 84 Not enough memory space in the file
6A 85 Lc inconsistent with TLV structure
6A 86 Incorrect parameters P1-P2
6a 87 Lc inconsistent with P1-P2
6A 88 Referenced data (data objects) not found
6B 00 Wrong parameters (offset outside the EF)
6C XX Wrong length (wrong Le field: 'XX' indicates the exact length)