timmerk / nfc-tools

Automatically exported from code.google.com/p/nfc-tools
0 stars 0 forks source link

mifare_desfire_authenticate's doubt #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi everyone,

I want to make a program that accesses a DESFire and I have a doubt function 
mifare_desfire_authenticate(MifareTag tag, uint8_t key_no, MifareDESFireKey 
key). This function must be given as an argument MifareDESFireKey structure, 
this structure is the variable data, which I think is the encryption key, but 
the function don't use  this variable.

My question is, is this function can be started any card or only those that 
have an 0s encryption key?

Thanks

Original issue reported on code.google.com by esequ...@gmail.com on 16 Nov 2010 at 7:14

GoogleCodeExporter commented 9 years ago
Hi

Indeed it uses the key variable, see:
http://code.google.com/p/nfc-tools/source/browse/trunk/libfreefare/libfreefare/m
ifare_desfire.c#353
http://code.google.com/p/nfc-tools/source/browse/trunk/libfreefare/libfreefare/m
ifare_desfire.c#366
http://code.google.com/p/nfc-tools/source/browse/trunk/libfreefare/libfreefare/m
ifare_desfire.c#380
http://code.google.com/p/nfc-tools/source/browse/trunk/libfreefare/libfreefare/m
ifare_desfire.c#392

And yes, 'key' is the authentication key.  See the related man pages installed 
with the library and examples for details.

Original comment by romain.t...@gmail.com on 18 Nov 2010 at 12:47