I have been trying for more than a week to make an Android phone authenticate with a Mifare Ultralight C. I have confirmed I can write to the tag (by writing to an unsecured memory page and then reading what I wrote). I can also write to the key pages (44-47) and have written 0x00 for all 16 key bytes.
When I try to authenticate, the following is an example of the data involved during one exchange - it is from a log written by my application. Can anyone tell me if I am doing something incorrect? I AM under non-disclosure and have access to the full data sheets. Note that the hexadecimal strings below are obviously human readable versions of the data being sent and received, which in the code consists of byte arrays.
Send authenticate command
Received rndB: 8A5735694D9D7542
Key: 00000000000000000000000000000000
IV: 0000000000000000
Decrypted rndB: EF340C62E1B866D4
rndB': 340C62E1B866D4EF
rndA: 6E262630E299F94F
rndA+rndB': 6E262630E299F94F340C62E1B866D4EF
Key: 00000000000000000000000000000000
IV: 8A5735694D9D7542
ek(RndA+rndB'): E36C6C46FAAC60BA45DDF5F5A0802C79
After sending 0xAF + E36C6C46FAAC60BA45DDF5F5A0802C79
I immediately lose the connection with the tag. I've gone through the data sheet and read every post I can find here. I have also looked at the libfreefare code and I honestly can't figure out what I'm doing wrong.
NXP technical support had been completely unresponsive.
Any ideas? I am at a loss.