smartcard - EMV Smart Card TLV Format Error? -
i developing smartcard reader reading emv cards. working on mastercard card, , trying read specific record. result showed reading fine, when parse results, not seem follow tlv standard, results come in tag/template-length-value format. sample of results returned is:
70 - read record response tag
81 - should indicate length
e0 - should tag/template...?
8f -should indicate length of prev. tag...?
01 05 9f 32 ... 90 00
problem first few bytes. first byte indicates read record template, second byte should indicate length, , third should value, beginning of next tag. there no emv tag labelled e0, translating results wrongly or there missing. have read previous record using same command , results came out fine:
70 - tag
27
61 - tag/template indicator e.t.c.
25 4f 07 ... 90 00
what doing wrong? or how these results translated?
the length here coded in ber format. means 81 indicates there 1 length byte following (only lengths upto 7f can coded directly in 1 byte), e0 length , 8f tag. more details cf. iso 7816-4 (in 2005 version chapter 5.2.2.2 ber-tlv length fields). final 90 00 sw1/sw2 indicates read succeeded of course.
Comments
Post a Comment