Labels

EMV (13) ISO8583-1987 (11) services (10) site (10) Cards (9) AMEX (8) BER (7) MasterCard (7) TLV (7) CUP (6) ISO8583-1993 (6) host (6) JCB (5) VOTE (5) Visa (5) AEIPS (4) DCI (4) Diners (4) Discover (4) GCAG (4) ASN.1 (3) BASE_I (3) CIS (3) DFS (3) ISO7813 (3) ISO8583-2003 (3) J/Link (3) Tests (3) APDU (2) Clearing (2) GICC (2) GWS (2) ISO8825-1 (2) J/Smart (2) M/Chip (2) OmniPay (2) SSL (2) Settlement (2) TLS (2) UICC (2) VIS (2) Xpress (2) 3CAS (1) 80-Byte (1) ACI (1) ADVT (1) BASE24-eps (1) CB2A (1) Cirrus (1) DCISC (1) FS (1) GEDC (1) GFSG (1) HPDH (1) HTTPS_MSG (1) IPM (1) ISO18245 (1) ISO3166-1 (1) ISO4217 (1) ISO639 (1) ISO7501 (1) LIS5 (1) MDS (1) MRP (1) MRV (1) MRZ (1) Maestro (1) MarkII (1) NDEF (1) NFC (1) NFC Forum (1) Nets (1) OpenWay (1) PC/SC (1) RFC791 (1) RFC793 (1) SCL3711 (1) SCM (1) SDI (1) SPDH (1) TIC/TCI (1) TWO (1) Way4 (1) X4.16 (1) logs (1) stream (1) to-do (1) winscard (1)

2013-05-30

Smartcard data explanation

Hi,

2013/5/30 Hruday Ma***ck <hruday.ma***ck@ant***gt.com>
Dear,
     I am Hruday Ma***ck,wnat to know more about smart card. I have doubt on file creation in smart card.Kindly explain following code:
The Following code is a part of data used to prepare smart card commands in C/C++
UCHAR ucDataCreateMF[]={0x62,0x07,0x82,0x01,0x38,0x83,0x02,0x3F,0x00};

--- Cheef's YAML
BER: # ASN.1 Basic Encoding Rules (BER)
# 620782013883023F00
- tag: "62"
- len: "07"
- val: # 82013883023F00
- x82: # File descriptor
# 820138
- tag: "82"
- len: "01"
- val: # 38
- B1: "38" # File descriptor byte
# 0____000 - bits 3 to 1, EF structure, No information given
# 00______ - bits 8 to 7, File accessibility, Not shareable file
# 0_111000 - bits 6 to 1, DF
- x83: # File identifier
# 83023F00
- tag: "83"
- len: "02"
- val: "3F00" # // MF - Master File
UCHAR ucDataSelectMF[]={0x3F,0x00};
"3F00" #  //  MF - Master File
UCHAR ucDataSelectEF[]={0x36,0x19};
"3619" Some EF Identifier
UCHAR ucDataCreateEF[]={0x62,0x11,0x82,0x05,0x04,0x01,0x00,0x25,0x15,0x83,0x02,0x36,0x19,0x88,0x01,0x90,0x8A,0x01,0x01};

--- Cheef's YAML
BER: # ASN.1 Basic Encoding Rules (BER)
# 621182050401002515830236198801908A0101
- tag: "62"
- len: "11"
- val: # 82050401002515830236198801908A0101
- x82: # File descriptor
# 82050401002515
- tag: "82"
- len: "05"
- val: # 0401002515
- B1: "04" # File descriptor byte
# 0_000___ - bits 6 to 4, EF category, Working EF
# 00______ - bits 8 to 7, File accessibility, Not shareable file
# 0____100 - bits 3 to 1, EF structure, Linear structure, variable size, no further information - Record handling
- B2: "01" # Data coding byte
- B34: "0025" # Maximum record size (on one or two bytes) // 37
- B56: "15" # Number of records (on one or two bytes) // 21
- x83: # File identifier
# 83023619
- tag: "83"
- len: "02"
- val: "3619"
- x88: # Short EF identifier
# 880190
- tag: "88"
- len: "01"
- val: "90"
- x8A: # Life cycle status byte (LCS)
# 8A0101
- tag: "8A"
- len: "01"
- val: "01"
# 00000001 - Creation state
UCHAR ucDataWrite[]={0x31,0x32,0x33,0x34,0x35,0x36};
data to Write, string: "123456"
UCHAR ucDataUpdate[]={0x33,0x34,0x35,0x36,0x37,0x38,0x39}, ucResData[50]={0};
Data to Update, string: "3456789"
UCHAR ucDataAppend[]={0x4D,0x41,0x4C,0x41};
Data to Append, string: "MALA"
UINT iDataLen=0,ucRecordNum,Le,P1=0x00,P2=0x04,uiResDataLen=0,uiResLen,i=0,uiStatus=0;
Initial parameters for Smartcard APDU Command
Thanks,
Hruday
Welcome,
Cheef

No comments:

Post a Comment