Skip to content
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

(Vietnamese ID Card) Error reading tag: sw1 - 0x69, sw2 - 0x82 #187

Closed
leonacky opened this issue Jul 7, 2023 · 16 comments
Closed

(Vietnamese ID Card) Error reading tag: sw1 - 0x69, sw2 - 0x82 #187

leonacky opened this issue Jul 7, 2023 · 16 comments

Comments

@leonacky
Copy link

leonacky commented Jul 7, 2023

I tried to read Vietnamese ID Card and get this error
Error reading tag: sw1 - 0x69, sw2 - 0x82
Some application in appstore to read Vietnamese id card. I see that they don't need mrzkey to decode data, they just need id card number to read data.
Anyone can explain me how do they do?

My logs:

2023-07-07 12:8:50.4460 - Using version 1.1.4.1
2023-07-07 12:8:50.5440 - tagReaderSessionDidBecomeActive
2023-07-07 12:8:50.5890 - tagReaderSession:didDetect - iso7816(<NFCISO7816Tag: 0x28206ca50>)
2023-07-07 12:8:50.5900 - tagReaderSession:connected to tag - starting authentication
2023-07-07 12:8:50.6150 - Error reading tag: sw1 - 0x69, sw2 - 0x82
2023-07-07 12:8:50.6150 - reason: Security status not satisfied
2023-07-07 12:8:50.6160 - PACE Failed - falling back to BAC
2023-07-07 12:8:50.6160 - Re-selecting eMRTD Application
2023-07-07 12:8:50.6310 - Starting Basic Access Control (BAC)
2023-07-07 12:8:50.6310 - BACHandler - deriving Document Basic Access Keys
2023-07-07 12:8:50.6320 - BACHandler - Getting initial challenge
2023-07-07 12:8:50.6420 - BACHandler - Doing mutual authentication
2023-07-07 12:8:50.6660 - DATA - [129, 1, 155, 56, 243, 115, 97, 81, 77, 145, 227, 90, 35, 80, 91, 24, 112, 231, 59, 228, 178, 140, 249, 227, 124, 142, 90, 106, 170, 192, 236, 145, 115, 214, 221, 74, 237, 23, 169, 147]
2023-07-07 12:8:50.6670 - BACHandler - complete
2023-07-07 12:8:50.6670 - Basic Access Control (BAC) - SUCCESS!
2023-07-07 12:8:50.6730 - Reading tag - COM
2023-07-07 12:8:50.7050 - TagReader - Number of data bytes to read - 24
2023-07-07 12:8:50.7250 - DG Found - ["DG1", "DG2", "DG3", "DG13", "DG15", "DG14"]
2023-07-07 12:8:50.7270 - Reading tag - DG14
2023-07-07 12:8:50.7580 - TagReader - Number of data bytes to read - 382
2023-07-07 12:8:50.8600 - Performing Chip Authentication - number of public keys found - 1
2023-07-07 12:8:50.9850 - Public Key successfully sent to passport!
2023-07-07 12:8:50.9880 - Restarting secure messaging using AES encryption
2023-07-07 12:8:50.9890 - Reading tag - SOD
2023-07-07 12:8:51.0200 - TagReader - Number of data bytes to read - 1568
2023-07-07 12:8:51.3420 - Reading tag - DG1
2023-07-07 12:8:51.3740 - TagReader - Number of data bytes to read - 93
2023-07-07 12:8:51.3980 - Reading tag - DG2
2023-07-07 12:8:51.4320 - TagReader - Number of data bytes to read - 13194
2023-07-07 12:8:53.9890 - Reading tag - DG13
2023-07-07 12:8:54.0220 - TagReader - Number of data bytes to read - 422
2023-07-07 12:8:54.1120 - Reading tag - DG15
2023-07-07 12:8:54.1440 - TagReader - Number of data bytes to read - 294
2023-07-07 12:8:54.2050 - Performing Active Authentication
2023-07-07 12:8:54.5380 - tagReaderSession:failed to connect to tag - Tag response error / no response
2023-07-07 12:8:57.3050 - tagReaderSession:didInvalidateWithError - Session invalidated by user


@leonacky leonacky changed the title Error reading tag: sw1 - 0x69, sw2 - 0x82 (Vietnnamese ID Card)Error reading tag: sw1 - 0x69, sw2 - 0x82 Jul 7, 2023
@leonacky leonacky changed the title (Vietnnamese ID Card)Error reading tag: sw1 - 0x69, sw2 - 0x82 (Vietnamese ID Card)Error reading tag: sw1 - 0x69, sw2 - 0x82 Jul 7, 2023
@leonacky leonacky changed the title (Vietnamese ID Card)Error reading tag: sw1 - 0x69, sw2 - 0x82 (Vietnamese ID Card) Error reading tag: sw1 - 0x69, sw2 - 0x82 Jul 7, 2023
@LuuNguyen0811
Copy link

In Vietnamese card, you can decode from ID number to same data inside mrzkey

@tungtomvn
Copy link

In Vietnamese card, you can decode from ID number to same data inside mrzkey

can you give me the source code? Thanks!

@tungtomvn
Copy link

tungtomvn commented Jul 21, 2023

I tried to read Vietnamese ID Card and get this error Error reading tag: sw1 - 0x69, sw2 - 0x82 Some application in appstore to read Vietnamese id card. I see that they don't need mrzkey to decode data, they just need id card number to read data. Anyone can explain me how do they do?

My logs:

2023-07-07 12:8:50.4460 - Using version 1.1.4.1
2023-07-07 12:8:50.5440 - tagReaderSessionDidBecomeActive
2023-07-07 12:8:50.5890 - tagReaderSession:didDetect - iso7816(<NFCISO7816Tag: 0x28206ca50>)
2023-07-07 12:8:50.5900 - tagReaderSession:connected to tag - starting authentication
2023-07-07 12:8:50.6150 - Error reading tag: sw1 - 0x69, sw2 - 0x82
2023-07-07 12:8:50.6150 - reason: Security status not satisfied
2023-07-07 12:8:50.6160 - PACE Failed - falling back to BAC
2023-07-07 12:8:50.6160 - Re-selecting eMRTD Application
2023-07-07 12:8:50.6310 - Starting Basic Access Control (BAC)
2023-07-07 12:8:50.6310 - BACHandler - deriving Document Basic Access Keys
2023-07-07 12:8:50.6320 - BACHandler - Getting initial challenge
2023-07-07 12:8:50.6420 - BACHandler - Doing mutual authentication
2023-07-07 12:8:50.6660 - DATA - [129, 1, 155, 56, 243, 115, 97, 81, 77, 145, 227, 90, 35, 80, 91, 24, 112, 231, 59, 228, 178, 140, 249, 227, 124, 142, 90, 106, 170, 192, 236, 145, 115, 214, 221, 74, 237, 23, 169, 147]
2023-07-07 12:8:50.6670 - BACHandler - complete
2023-07-07 12:8:50.6670 - Basic Access Control (BAC) - SUCCESS!
2023-07-07 12:8:50.6730 - Reading tag - COM
2023-07-07 12:8:50.7050 - TagReader - Number of data bytes to read - 24
2023-07-07 12:8:50.7250 - DG Found - ["DG1", "DG2", "DG3", "DG13", "DG15", "DG14"]
2023-07-07 12:8:50.7270 - Reading tag - DG14
2023-07-07 12:8:50.7580 - TagReader - Number of data bytes to read - 382
2023-07-07 12:8:50.8600 - Performing Chip Authentication - number of public keys found - 1
2023-07-07 12:8:50.9850 - Public Key successfully sent to passport!
2023-07-07 12:8:50.9880 - Restarting secure messaging using AES encryption
2023-07-07 12:8:50.9890 - Reading tag - SOD
2023-07-07 12:8:51.0200 - TagReader - Number of data bytes to read - 1568
2023-07-07 12:8:51.3420 - Reading tag - DG1
2023-07-07 12:8:51.3740 - TagReader - Number of data bytes to read - 93
2023-07-07 12:8:51.3980 - Reading tag - DG2
2023-07-07 12:8:51.4320 - TagReader - Number of data bytes to read - 13194
2023-07-07 12:8:53.9890 - Reading tag - DG13
2023-07-07 12:8:54.0220 - TagReader - Number of data bytes to read - 422
2023-07-07 12:8:54.1120 - Reading tag - DG15
2023-07-07 12:8:54.1440 - TagReader - Number of data bytes to read - 294
2023-07-07 12:8:54.2050 - Performing Active Authentication
2023-07-07 12:8:54.5380 - tagReaderSession:failed to connect to tag - Tag response error / no response
2023-07-07 12:8:57.3050 - tagReaderSession:didInvalidateWithError - Session invalidated by user

For ICAO, with PACE auth type CAN, just need ID card number but BAC need id card, date of birth, date of expired

@Niraj91
Copy link

Niraj91 commented Aug 7, 2023

Hi @tungtomvn @LuuNguyen0811 @leonacky ,

I have the same issue with OMAN resident card, Do guys find any solutions?

Thanks

@leonacky
Copy link
Author

A recommend for Vietnamese guy. Try to read with MRZ and read DG13

@duyanhv
Copy link

duyanhv commented Aug 20, 2023

imo, they use the api given by RAR service to query mrz data from the card's ID -> no need for OCR or input by hand. VND 3000 / request

@duyanhv
Copy link

duyanhv commented Aug 20, 2023

A recommend for Vietnamese guy. Try to read with MRZ and read DG13

do you have trouble decoding DG13? i tried decoding it but the return value is a mess

@AndyQ
Copy link
Owner

AndyQ commented Aug 30, 2023

There is a PR for authenticating with CAN that may be of use, I've not merged it as I have no way of testing this as none of my available passports support this.

Would be interested in knowing is this works for you.

@leonacky
Copy link
Author

A recommend for Vietnamese guy. Try to read with MRZ and read DG13

do you have trouble decoding DG13? i tried decoding it but the return value is a mess

Try to decode it with ASN1

@leonacky
Copy link
Author

Hi @tungtomvn @LuuNguyen0811 @leonacky ,

I have the same issue with OMAN resident card, Do guys find any solutions?

Thanks

I don't know about OMAN ID Card

@leonacky
Copy link
Author

I have resolved this issue

@TranHoaiHung
Copy link

@leonacky Hello bro, how to read it?

@starptit
Copy link

starptit commented Oct 3, 2023

@leonacky Was you able to do passive auth? With the generated pem file?

@kevinarch
Copy link

How did you solve this Security status not satisfied error ?

@longcon9999
Copy link

I have resolved this issue

Hi @leonacky, Could you use PACE with Vietnamese ID Card?

@vijaysahani4115
Copy link

While doing Canada passport read via BAC , showing Not genuine , failing Country signing certificate.
Screenshot 2024-06-21 at 7 40 45 PM
Screenshot 2024-06-21 at 7 40 52 PM

Any specific reason ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests