Search code examples
smartcardjavacardmifareemulation

JavaCard applet emulating DESFireEV1


My question is simple: is there any existing opensource JavaCard applet emulating the functionality of Mifare DESFireEV1?

(the API would have to be a little modified, of course, Select Application 112233 would be for example 80 5A 00 00 03 33 22 11 00 instead of native DESFire command 5A 33 22 11 etc.)

I found just one attempt emulating common Mifare DESFire, but it seems to be unfinished and it contains some serious problems (variables in EEPROM instead of RAM, calling "new byte[]" in loops ...) https://code.google.com/p/java-card-desfire-emulation/source/browse/trunk/java-card-desfire-emulation/Desfire/src/des/DesfireCard.java?r=14


Solution

    1. The open source project you already found is indeed unfinished, incomplete, incorrect.

    2. NXP features an emulation that is avaiable by activation during prepersonalization (not on all cards i suppose)

    3. I have implemented an almost complete and tested DESFire applet(only supports transparent files and does not support native mode but is easily extendable) which is not open source. You can contact me for details on that if you are interessted

    4. I don't know of any other Open Source implementation

    5. If you plan to implement it yourself: You definitly need the full documentation and libfreefare is a good terminal emulation for validation as well as a good amount of time to go through all the test cases in