Unknown tags when parsing DE 55

252 views
Skip to first unread message

Abdulrahman Ashraf Abu-Hamadi

unread,
Mar 3, 2023, 5:35:07 PM3/3/23
to jPOS Users
Assalamu alaikum

byte[] emvData = ISOUtil.hex2byte("02109f1a0206829f380c9f66049f02069f37045f2a02bf0c089f5a0560068206829f3602010d9f3704cc122c7c5f3401019f120a566973612044656269749f100706011103a020009f1101015f2a0206825f2d046172656e500a56495341204445424954950500000000009f6c02060057114323287973688638d2411201111900250f9f4e1000112233445566778899aabbccddeeff9f6e04207000009f2701809a032301159c01009f2608db24f9744f5aca5d9f02060000000012009f660424804000820220008407a0000000031010870102")

When i try to parse this sample , i found this : 
 
TLVList tlv = new TLVList();
tlv.unpack (emvData);
tlv.dump (System.out, "");

<tlvlist>
   <tag id='2' value='9F1A0206829F380C9F66049F02069F37' />
   <tag id='4' value='2A02BF0C089F5A0560068206829F3602010D9F3704CC122C7C5F3401019F120A566973612044656269749F100706011103A020009F1101015F2A0206825F2D046172656E500A56495341204445424954950500000000009F6C020600571143' />
   <tag id='23' value='7973688638D2411201111900250F9F4E1000112233445566778899AABBCCDDEEFF9F6E0420700000' />
   <tag id='9f27' value='80' />
   <tag id='9a' value='230115' />
   <tag id='9c' value='00' />
   <tag id='9f26' value='DB24F9744F5ACA5D' />
   <tag id='9f02' value='000000001200' />
   <tag id='9f66' value='24804000' />
   <tag id='82' value='2000' />
   <tag id='84' value='A0000000031010' />
   <tag id='87' value='02' />
</tlvlist>

In the switch specifications there is no existence for the first two tags "2 , 4"
The terminal send the icc related data DE55 Encrypted , the switch needs it to be sent Decrypted , when i tries to list the tags of this DE55 sample , i find these two unknown tags , although there are some tags isn` t listed there as i were expecting but after looking carefully i found that the values of the tags iam expecting are part of the two unknown tags


do i need to somehow decode these two unknown tags "2" ,"4" or i need to decode the whole DE55 in another way ?


Thanks in advance

Souraf Mulla

unread,
Mar 3, 2023, 10:48:43 PM3/3/23
to jpos-...@googlegroups.com
Remove first two bytes i.e. 0210 and use remaining data for parsing and you will get proper tags - 

Check this image for the data I have parsed for you - 



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/b97d8e4c-e722-4b76-9f4c-89f44b2c5bd0n%40googlegroups.com.

Abdulrahman Ashraf Abu-Hamadi

unread,
Mar 4, 2023, 7:44:22 AM3/4/23
to jPOS Users
Why we needed to remove the first two bytes 0210 ?

Mark Salter

unread,
Mar 4, 2023, 7:48:00 AM3/4/23
to jpos-...@googlegroups.com
What does the spec you are working to describe the start of this field as?

It might be a length or some form of 'dataset' header, but it looks peripheral to the EMV tlv.

-- 
Mark


Sent from Proton Mail mobile



-------- Original Message --------
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/1a4f3644-0aed-4523-9c5f-507640e95c2bn%40googlegroups.com.
signature.asc

Abdulrahman Ashraf Abu-Hamadi

unread,
Mar 4, 2023, 8:01:30 AM3/4/23
to jPOS Users
Yes Bro by removing the first two bytes , i got the proper tags 

Thank you so much for your time , help & quick response

Abdulrahman Ashraf Abu-Hamadi

unread,
Mar 4, 2023, 8:05:31 AM3/4/23
to jPOS Users
But how did you decode it , online TLV decoder or ?

Abdulrahman Ashraf Abu-Hamadi

unread,
Mar 4, 2023, 8:17:25 AM3/4/23
to jPOS Users
Because when i decoded it using  https://neapa y.com/online-tools/emv-tlv-decoder.html or Manually using JPOS 
I got the Application Label : 56495341204445424954
But i see the value after you decoded it :  V I S A D E B I T.
Any hint

On Saturday, March 4, 2023 at 2:48:00 PM UTC+2 Mark Salter wrote:

Souraf Mulla

unread,
Mar 4, 2023, 9:43:17 AM3/4/23
to jpos-...@googlegroups.com
What you see is in hex/binary format. I shared was ascii representation of that value. 

I used 
https://emvlab.org/tlvutils/ for decoding it. 


Reply all
Reply to author
Forward
0 new messages