-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FF tag #11
Comments
Hi Igor, Thank you for your report. It seems that 700C5F340101FFFFFF9F570208409000 is a Response APDU.
This response contains the private constructed tag 'FFFFFF9F57' with the value length 2. May be there are any rules regarding tags beginning with ‘FF’ ? |
As I could see from |
Igor, The library processes subsequent bytes with 0b11111. If we change BerTag code to this:
The test will pass. But it's not correct because we need to process FFFFFF9F57 as constructed not primitive. |
FF: 11 - private class, 1 - Constructed data object, 11111 - See subsequent bytes.
? |
Because FF is a Constructed data object we need to process its data '0840' as another TLV object. |
Yes, it looks like regular data |
Hi, guys. It looks like BerTlv is not as simple as it could be :) We also faced up with the problem -- and those bytes should be just skipped. The bad thing is that 00 and FF are able to be before, after, or between normal tags %) Look, what I've found: "ISO 7816 Annex D.1: BER-TLV data object" -- https://cardwerk.com/iso7816-4-annex-d-use-of-basic-encoding-rules-asn-1/
FYI, another team also do things to work out the issue: Shopify/grizzly_ber#13 Could you add fix for this? Example of APDU (From VISA CDET card 9): |
I encountered the same issue with the '00'. Any fix for this?
|
Dear Sirs,
I just trying to parse Visa CDET cards from https://play.google.com/store/apps/details?id=com.visa.app.cdet app. App's card 09 is marked as Card with '00' and 'FF' Padding.
When READ RECORD command performed:
00b2011400
Response from the card is:
700C5F340101FFFFFF9F570208409000
ber-tlv parser parses that string in the following manner:
BerTlvs{tlvs=[BerTlv{theTag=+ 70, theValue=null, theList=[BerTlv{theTag=- 5F34, theValue=[1], theList=null}, BerTlv{theTag=+ FFFFFF9F57, theValue=null, theList=[]}]}]}
But according Annex B of EMV 4.3 Book 3 value where bytes from 5 to 1 all = 1 mean "see subsequent bytes" ie all FF's should be ignored.
Could you fix this please?
Thanks in advance,
Igor
The text was updated successfully, but these errors were encountered: