I am having some trouble with authentication with our DESFire EV1 tags with the Taplinx. I keep getting the error InvalidResponseLengthException Authentication Error from this:
mDesfireEv.authenticate(2, IDESFireEV1.AuthType.AES, KeyType.AES128, MainActivity.objKEY_INSTREAM_WRITE);
This happened when we switched our authentication keys from the factory default to our own values and AES encryption. I have downloaded and used the NXP TagInfo app and entered my key as a user key and it is able to read the tag. However, in my own app I cannot.
Our key looks like this: "112233445566778899AABBCCDDEEFF00". We convert that to a byte array. And we use
KeyInfoProvider infoProvider = KeyInfoProvider.getInstance(getApplicationContext());
infoProvider.setKey(ALIAS_KEY_INSTREAM_WRITE, SampleAppKeys.EnumKeyType.INSTREAM_KEY_WRITE, SampleAppKeys.INSTREAM_KEY_WRITE);
Our key is written to position 2 of the file. We are selecting our app id 0x010203 and that works OK. So my problem is the combination of parameters for authenticate. I have tried integers from 0-3 for the first, AuthType.Native as well as AES and KeyType.Unknown in addition to AES128. I have also convertes my key back to a hex string to be sure that is correct and it is. Our taplinx library is coming from url "http://maven.taplinx.nxp.com/nexus/content/repositories/taplinx/".
I am hoping you can offer some suggestions about what causes the "InvalidResponseLengthException Authentication Error" message and what else I can try to solve this issue. Thank you.
+ 1 | - 0
In this forum you will find different examples to change a key or change a cipher on a MIFARE DESFire with TapLinx.
Please have a look here:
The TapLinx team
+ 0 | - 0
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.