Hi
I am using the OM‑SE050ARD‑E development board and https://github.com/NXPPlugNTrust/nano-package.
Se05x_API_GetFreeMemoryfrom SE-PLUG-TRUST-MW_04.07.00
1. I called Se05x_API_GetFreeMemory() and obtained the following memory data.
kSE05x_MemoryType_PERSISTENT get 616
kSE05x_MemoryType_TRANSIENT_RESET 796
kSE05x_MemoryType_TRANSIENT_DESELECT 784
Is this normal? The free memory seems rather low—could you please let me know approximately how much memory the SE050E provides by default?
2. Since I’ve forgotten which keys I previously set, I tried to use ex_se05x_ReadIDList() to read the list of key IDs, but it always fails with error codes 69 85.
a. SCP03 is enabled, and I have updated the ENC and MAC keys according to AN12436.
b. ex_se05x_GetInfo() runs successfully, so the SCP03 setup should be correct.
Thanks
ex_se05x_ReadIDList
I: Plug and Trust nano package - version: 1.5.4
APDU Tx>
00 a4 04 00 10 a0 00 00 |........
03 96 54 53 00 00 00 01 |..TS....
03 00 00 00 00 00 |......
APDU Rx<
07 02 00 3f 9f ff ff 90 |...?....
00 |.
I: Establish Secure Channel to SE05x !
hostChallenge ==>
11 22 33 44 55 66 77 88 |."3DUfw.
Sending GP Initialize Update Command !!!
APDU Tx>
80 50 0b 00 08 11 22 33 |.P...."3
44 55 66 77 88 |DUfw.
APDU Rx<
90 03 13 47 00 00 43 20 |...G..C
23 16 0b 03 00 05 43 7d |#.....C}
4e 3c 21 3d 20 c4 d8 89 |N<!= ...
c1 27 02 64 c4 90 00 |.'.d...
Output: keyDivData
90 03 13 47 00 00 43 20 |...G..C
23 16 |#.
Output: keyInfo
0b 03 00 |...
Output: cardChallenge
05 43 7d 4e 3c 21 3d 20 |.C}N<!=
Output: cardCryptoGram
c4 d8 89 c1 27 02 64 c4 |....'.d.
Set the Derviation data to generate Session ENC key
Output:scp03_session_enc_Key ==>
01 2c 3f cd b3 4f 6c ff |.,?..Ol.
7e 34 4d 07 5b d0 48 cb |~4M.[.H.
Set the Derviation data to generate Session MAC key
Output:scp03_session_mac_Key ==>
5c ae 32 de a3 a3 61 5e |\.2...a^
2a ae 30 8d 74 22 77 e0 |*.0.t"w.
Set the Derviation data to generate Session RMAC key
Output:scp03_session_rmac_Key ==>
5f bb b8 83 f3 6e 0f 2c |_....n.,
43 58 13 08 83 c7 d4 71 |CX.....q
Output:cardCryptogram ==>
c4 d8 89 c1 27 02 64 c4 |....'.d.
b1 7a db 0a ce a0 ec 5f |.z....._
cardCryptoGram ==>
c4 d8 89 c1 27 02 64 c4 |....'.d.
CardCryptogram verified successfully...Calculate HostCryptogram
Output:hostCryptogram ==>
f0 0f 60 91 b6 f1 fd ee |..`.....
05 af 41 11 75 a2 f6 b5 |..A.u...
hostCryptogram ==>
f0 0f 60 91 b6 f1 fd ee |..`.....
Output: Calculated MAC ==>
bc d1 9e 29 c7 83 89 2d |...)...-
16 28 09 3a b9 e3 b6 4e |.(.:...N
Add calculated MAC Value to cmd Data
Sending GP External Authenticate Command !!!
APDU Tx>
84 82 33 00 10 f0 0f 60 |..3....`
91 b6 f1 fd ee bc d1 9e |........
29 c7 83 89 2d |)...-
APDU Rx<
90 00 |..
Authentication Successful!!!
I: Created scp03 Session
APDU - Se05x_API_ReadIDList []
APDU :DEBUG:kSE05x_TAG_1["output offset"] = 0x0
APDU :DEBUG:kSE05x_TAG_2["filter"] = 0xFF
SCP03: Encrypted Data ==>
84 02 00 25 18 30 34 24 |...%.04$
cf 3a df b5 5a 45 cb e5 |.:..ZE..
f9 87 4d 53 a1 0e 8f 9f |..MS....
7a 36 e8 84 c8 |z6...
APDU Tx>
84 02 00 25 18 30 34 24 |...%.04$
cf 3a df b5 5a 45 cb e5 |.:..ZE..
f9 87 4d 53 a1 0e 8f 9f |..MS....
7a 36 e8 84 c8 |z6...
APDU Rx<
69 85 |i.
E: Error in Se05x_API_ReadIDList
ex_se05x_GetInfo()
I: Plug and Trust nano package - version: 1.5.4
APDU Tx>
00 a4 04 00 0b d2 76 00 |......v.
00 85 30 4a 43 4f 90 03 |..0JCO..
00 |.
APDU Rx<
6f 13 84 0b d2 76 00 00 |o....v..
85 30 4a 43 4f 90 03 a5 |.0JCO...
04 9f 65 01 ff 90 00 |..e....
I: Establish Secure Channel to SE05x !
hostChallenge ==>
11 22 33 44 55 66 77 88 |."3DUfw.
Sending GP Initialize Update Command !!!
APDU Tx>
80 50 0b 00 08 11 22 33 |.P...."3
44 55 66 77 88 |DUfw.
APDU Rx<
90 03 13 47 00 00 43 20 |...G..C
23 16 0b 03 00 27 fc 81 |#....'..
6b 41 63 1e c9 e1 60 44 |kAc...`D
5c ec 7a e2 a3 90 00 |\.z....
Output: keyDivData
90 03 13 47 00 00 43 20 |...G..C
23 16 |#.
Output: keyInfo
0b 03 00 |...
Output: cardChallenge
27 fc 81 6b 41 63 1e c9 |'..kAc..
Output: cardCryptoGram
e1 60 44 5c ec 7a e2 a3 |.`D\.z..
Set the Derviation data to generate Session ENC key
Output:scp03_session_enc_Key ==>
6d da 65 67 04 5d 16 c3 |m.eg.]..
98 a8 c5 38 fb b3 38 4f |...8..8O
Set the Derviation data to generate Session MAC key
Output:scp03_session_mac_Key ==>
19 b3 ac 95 02 2f 09 86 |...../..
29 ff 36 9b 1b 74 a5 34 |).6..t.4
Set the Derviation data to generate Session RMAC key
Output:scp03_session_rmac_Key ==>
c7 d4 9a d2 8b d1 b5 6b |.......k
89 92 20 ac 07 ab 16 f1 |.. .....
Output:cardCryptogram ==>
e1 60 44 5c ec 7a e2 a3 |.`D\.z..
bf 39 c3 38 44 2f cc 7f |.9.8D/..
cardCryptoGram ==>
e1 60 44 5c ec 7a e2 a3 |.`D\.z..
CardCryptogram verified successfully...Calculate HostCryptogram
Output:hostCryptogram ==>
50 39 0d fd ad cb f2 04 |P9......
0c b5 26 7d e4 99 52 30 |..&}..R0
hostCryptogram ==>
50 39 0d fd ad cb f2 04 |P9......
Output: Calculated MAC ==>
ad 14 d0 c1 36 cd cb 40 |....6..@
6b 8d e8 3b 75 70 b2 f7 |k..;up..
Add calculated MAC Value to cmd Data
Sending GP External Authenticate Command !!!
APDU Tx>
84 82 33 00 10 50 39 0d |..3..P9.
fd ad cb f2 04 ad 14 d0 |........
c1 36 cd cb 40 |.6..@
APDU Rx<
90 00 |..
Authentication Successful!!!
I: Created scp03 Session
APDU Tx>
00 a4 04 00 10 a0 00 00 |........
03 96 54 53 00 00 00 01 |..TS....
03 30 00 00 00 00 |.0....
APDU Rx<
6a 82 |j.
W: No SemsLite Applet Available.
APDU - Se05x_API_SessionClose []
I: Plug and Trust nano package - version: 1.5.4
APDU Tx>
00 a4 04 00 10 a0 00 00 |........
03 96 54 53 00 00 00 01 |..TS....
03 00 00 00 00 00 |......
APDU Rx<
07 02 00 3f 9f ff ff 90 |...?....
00 |.
I: Establish Secure Channel to SE05x !
hostChallenge ==>
11 22 33 44 55 66 77 88 |."3DUfw.
Sending GP Initialize Update Command !!!
APDU Tx>
80 50 0b 00 08 11 22 33 |.P...."3
44 55 66 77 88 |DUfw.
APDU Rx<
90 03 13 47 00 00 43 20 |...G..C
23 16 0b 03 00 0b 2e 61 |#......a
d3 d4 f3 11 f4 85 d3 e5 |........
8c 6d 1a 91 c9 90 00 |.m.....
Output: keyDivData
90 03 13 47 00 00 43 20 |...G..C
23 16 |#.
Output: keyInfo
0b 03 00 |...
Output: cardChallenge
0b 2e 61 d3 d4 f3 11 f4 |..a.....
Output: cardCryptoGram
85 d3 e5 8c 6d 1a 91 c9 |....m...
Set the Derviation data to generate Session ENC key
Output:scp03_session_enc_Key ==>
22 bc 3b 23 72 d7 8d f6 |".;#r...
47 60 1d 60 92 46 dc 89 |G`.`.F..
Set the Derviation data to generate Session MAC key
Output:scp03_session_mac_Key ==>
83 68 f7 10 b3 92 d1 82 |.h......
be 3c 76 d8 69 da fe 7a |.<v.i..z
Set the Derviation data to generate Session RMAC key
Output:scp03_session_rmac_Key ==>
9a ec 4e 1c a0 3a f6 17 |..N..:..
d8 a1 88 58 49 da 35 6b |...XI.5k
Output:cardCryptogram ==>
85 d3 e5 8c 6d 1a 91 c9 |....m...
e5 22 b2 ca 08 e4 1b c7 |."......
cardCryptoGram ==>
85 d3 e5 8c 6d 1a 91 c9 |....m...
CardCryptogram verified successfully...Calculate HostCryptogram
Output:hostCryptogram ==>
94 c9 8c 24 22 64 e3 21 |...$"d.!
b0 50 c3 19 25 e7 82 f5 |.P..%...
hostCryptogram ==>
94 c9 8c 24 22 64 e3 21 |...$"d.!
Output: Calculated MAC ==>
17 6f cc 1d 37 59 87 36 |.o..7Y.6
f7 66 26 97 d1 dc b4 60 |.f&....`
Add calculated MAC Value to cmd Data
Sending GP External Authenticate Command !!!
APDU Tx>
84 82 33 00 10 94 c9 8c |..3.....
24 22 64 e3 21 17 6f cc |$"d.!.o.
1d 37 59 87 36 |.7Y.6
APDU Rx<
90 00 |..
Authentication Successful!!!
I: Created scp03 Session
APDU - CheckObjectExists []
APDU :DEBUG:kSE05x_TAG_1["object id"] = 0x7FFF0206
SCP03: Encrypted Data ==>
84 04 00 27 18 ca eb 81 |...'....
92 76 1d 78 d4 d1 5b b1 |.v.x..[.
69 87 2a 05 8c d7 78 19 |i.*...x.
aa 4e 06 43 64 |.N.Cd
APDU Tx>
84 04 00 27 18 ca eb 81 |...'....
92 76 1d 78 d4 d1 5b b1 |.v.x..[.
69 87 2a 05 8c d7 78 19 |i.*...x.
aa 4e 06 43 64 |.N.Cd
APDU Rx<
f1 a9 ae ff fa c8 c3 7e |.......~
08 05 47 f9 a3 62 56 28 |..G..bV(
bc 2f 1a 36 77 dc c3 fe |./.6w...
90 00 |..
SCP03: RMAC verified successfully...Decrypt Response Data
SCP03: Decrypted Data ==>
41 01 01 90 00 |A....
APDU - ReadObject []
APDU :DEBUG:kSE05x_TAG_1["object id"] = 0x7FFF0206
APDU :DEBUG:kSE05x_TAG_2["offset"] = 0x0
APDU :DEBUG:kSE05x_TAG_3["length"] = 0x12
SCP03: Encrypted Data ==>
84 02 00 00 00 00 18 9e |........
84 55 05 58 c3 7a 9e 37 |.U.X.z.7
ba 9a 51 a3 6d d6 41 52 |..Q.m.AR
37 b3 44 a0 81 a5 e1 00 |7.D.....
00 |.
APDU Tx>
84 02 00 00 00 00 18 9e |........
84 55 05 58 c3 7a 9e 37 |.U.X.z.7
ba 9a 51 a3 6d d6 41 52 |..Q.m.AR
37 b3 44 a0 81 a5 e1 00 |7.D.....
00 |.
APDU Rx<
b6 66 54 5a f9 2a 21 ab |.fTZ.*!.
fb cd 3e 41 e5 aa 06 12 |..>A....
c4 57 eb 78 9c 1a 5c 09 |.W.x..\.
fb 03 81 80 51 c4 4d a2 |....Q.M.
46 83 45 5c d3 50 66 f1 |F.E\.Pf.
90 00 |..
SCP03: RMAC verified successfully...Decrypt Response Data
SCP03: Decrypted Data ==>
41 82 00 12 04 00 50 01 |A.....P.
05 da 80 0f 3a c4 35 04 |....:.5.
2a 00 b2 59 10 90 90 00 |*..Y....
W: #####################################################
uid
04 00 50 01 05 da 80 0f |..P.....
3a c4 35 04 2a 00 b2 59 |:.5.*..Y
10 90 |..
APDU - GetVersion []
SCP03: Encrypted Data ==>
84 04 00 20 08 9d 01 1e |... ....
25 63 8a c1 f4 |%c...
APDU Tx>
84 04 00 20 08 9d 01 1e |... ....
25 63 8a c1 f4 |%c...
APDU Rx<
ae fe 5f 01 b8 d2 9f fd |.._.....
1b f8 f8 80 a6 cd 28 98 |......(.
7b 58 ea 3b 18 6c 2c 81 |{X.;.l,.
90 00 |..
SCP03: RMAC verified successfully...Decrypt Response Data
SCP03: Decrypted Data ==>
41 82 00 07 07 02 00 3f |A......?
9f ff ff 90 00 |.....
W: #####################################################
I: Applet Major = 7
I: Applet Minor = 2
I: Applet patch = 0
I: AppletConfig = 3F9F
I: With ECDSA_ECDH_ECDHE
I:
I: With EDDSA
I:
I: With DH_MONT
I:
I: With HMAC
I:
I: WithOut RSA_PLAIN
I:
I: WithOut RSA_CRT
I:
I: With AES
I:
I: With DES
I:
I: With PBKDF
I:
I: With TLS
I:
I: With MIFARE
I:
I: With I2CM
I:
APDU Tx>
00 a4 04 00 00 |.....
APDU Rx<
6f 10 84 08 a0 00 00 01 |o.......
51 00 00 00 a5 04 9f 65 |Q......e
01 ff 90 00 |....
APDU Tx>
80 ca 00 fe 02 df 28 00 |......(.
APDU Rx<
fe 45 df 28 42 01 0c 00 |.E.(B...
01 a9 21 89 0a 6f 56 4a |..!..oVJ
23 9c 41 02 08 00 00 00 |#.A.....
00 00 00 00 01 03 18 4a |.......J
33 52 33 35 31 30 32 39 |3R351029
42 34 31 31 31 30 30 1a |B411100.
08 fa 50 67 b5 f2 56 05 |..Pg..V.
01 00 07 01 00 08 08 2e |........
5a d8 84 09 c9 ba db 90 |Z.......
00 |.
W: #####################################################
I: Tag value - proprietary data 0xFE = 0xFE
I: Length of following data 0x45 = 0x45
Tag card identification data
df 28 |.(
I: Length of card identification data = 0x42
I: Tag configuration ID (Must be 0x01) = 0x01
Length configuration ID 0x0C = 0x0C
Configuration ID
00 01 a9 21 89 0a 6f 56 |...!..oV
4a 23 9c 41 |J#.A
I: OEF ID = 0xA9 0x21
I: Tag patch ID (Must be 0x02) = 0x02
Length patch ID 0x08 = 0x08
Patch ID
00 00 00 00 00 00 00 01 |........
I: Tag platform build ID1 (Must be 0x03) = 0x03
Length platform build ID 0x18 = 0x18
Platform build ID
4a 33 52 33 35 31 30 32 |J3R35102
39 42 34 31 31 31 30 30 |9B411100
1a 08 fa 50 67 b5 f2 56 |...Pg..V
I: JCOP Platform ID = J3R351029B411100
I: Tag FIPS mode (Must be 0x05) = 0x05
Length FIPS mode 0x01 = 0x01
I: FIPS mode var = 0x00
I: Tag pre-perso state (Must be 0x07) = 0x07
Length pre-perso state 0x01 = 0x01
I: Bit mask of pre-perso state var = 0x00
I: Tag ROM ID (Must be 0x08) = 0x08
Length ROM ID 0x08 = 0x08
ROM ID
2e 5a d8 84 09 c9 ba db |.Z......
Status Word (SW)
90 00 |..
I: se05x_GetInfoPlainApplet Example Success !!!...
APDU Tx>
80 ca 9f 7f 00 |.....
APDU Rx<
9f 7f 2a 47 90 d3 21 47 |..*G..!G
00 00 00 00 00 13 47 00 |......G.
00 43 20 23 16 00 00 00 |.C #....
00 00 00 00 00 01 2a 00 |......*.
30 30 30 34 33 00 00 00 |00043...
00 00 00 00 00 90 00 |.......
W: #####################################################
cplc_data IC_fabricator
47 90 |G.
cplc_data IC_type1
d3 21 |.!
cplc_data Operating_system_identifier
47 00 |G.
cplc_data Operating_system_release_date
00 00 |..
cplc_data Operating_system_release_level
00 00 |..
cplc_data IC_fabrication_date
13 47 |.G
cplc_data IC_Serial_number
00 00 43 20 |..C
cplc_data IC_Batch_identifier
23 16 |#.
cplc_data IC_module_fabricator
00 00 |..
cplc_data IC_module_packaging_date
00 00 |..
cplc_data ICC_manufacturer
00 00 |..
cplc_data IC_embedding_date
00 00 |..
cplc_data IC_OS_initializer
01 2a |.*
cplc_data IC_OS_initialization_date
00 30 |.0
cplc_data IC_OS_initialization_equipment
30 30 34 33 |0043
cplc_data IC_personalizer
00 00 |..
cplc_data IC_personalization_date
00 00 |..
cplc_data IC_personalization_equipment_ID
00 00 00 00 |....
cplc_data SW
90 00 |..
APDU - Se05x_API_SessionClose []