tananaev / passport-reader

e-Passport NFC Reader Android app
324 stars 125 forks source link

ECDH key agreement requires ECPrivateKey #3

Open codecandy2015 opened 7 years ago

codecandy2015 commented 7 years ago

Hi Anton, I am having the following error when I scan the passport.

This happens in the doPACE call

01-28 09:33:47.132 8665-9619/com.pass.test W/MainActivity: org.jmrtd.PACEException: PCD side error in mapping nonce step: ECDH key agreement requires ECPrivateKey for initialisation

But when I run your app, it is working fine. Am I missing something ? is there something specific like a certificate or so which I need to invlude ?

any help would be highly appreciated Kind regards Densil

tananaev commented 7 years ago

Check following answer:

http://stackoverflow.com/a/13871178/2548565

codecandy2015 commented 7 years ago

I am getting the error while testing the same code as in github with a passport but the app is working. Is your APK in Google play different than the github version ?

tananaev commented 7 years ago

The app is built using code from GitHub. There should be no difference.

codecandy2015 commented 7 years ago

you are not using any certificates in your Android project right Anton ? and the app is started using the MainActivity and not the LoginActivity?

tananaev commented 7 years ago

There is obviously a certificate to upload it to the Google Play, but it has nothing to do with the error. Everything else is exactly the same.

mbpz commented 7 years ago

Hi,can you provide the command API documents for me ?

tananaev commented 7 years ago

@apples398, what API?

mbpz commented 7 years ago

The command for send C-APDU and R-APDU .For read card information.

tananaev commented 7 years ago

Not sure why you are asking on this thread. I don't have any documentation.

mbpz commented 7 years ago

Ok.I get it.I should take more time to read you projection.

codecandy2015 commented 7 years ago

Hi Anton,I finally got the app working on my phone. Was able to read a document.It was some crazy Android Studio settings with Gradle that pulled me out. Your code works fine. Thanks for sharingRegardsD