flipperzero-firmware
flipperzero-firmware copied to clipboard
NFC: support parsing DESFire, add myki and Opal parsers
What's new
- Add DESFire support for NFC card parsers
- Add parser for myki (Melbourne, Australia) image
- Add parser for Opal (Sydney, Australia) image
https://user-images.githubusercontent.com/13267947/213913551-d78e3341-86db-45d3-aebd-1883063abb7c.mov
Verification
For each of the following cards: NFC -> Saved -> [card] -> Info
Checklist (For Reviewer)
- [ ] PR has description of feature/bug or link to Confluence/Jira task
- [ ] Description contains actions to verify feature/bugfix
- [ ] I've built this code, uploaded it to the device and verified feature/bugfix
I'm not a maintainer, but I think it's bad idea to read the tag 3 times (mf_df_read_card is called in every parser and in nfc_worker_read_mf_desfire). I think the best option would be to run parsers after reading the tag (mf_df_read_card only in nfc_worker_read_mf_desfire) and if someone need additional data (for example with private keys) they can always read it later. Or you can read applications list in every parser via 0x6A command (MF_DF_GET_APPLICATION_IDS) and then read only required data (not whole tag).
@AloneLiberty that's a good point. I'll look at implementing that. Thanks!
Hello @emilytrau Thanks for the PR! I don't have these cards but I tested with attached files and everything works fine.
However, I am not sure that we can merge your code right now. Flipper has too little free flash memory left. Your code increases firmware size by 4kB and is useful to relatively small number of users.
The best solution here is to implement all supported NFC cards as a library and store it on SD card. Please, give me some time to think about further steps here.
@gornekich Yes I agree it would be better if there was a way for parsers to live on the SD card especially as more are added. Would allow for more detail and functionality without impact on flash size. Happy to put this on hold and looking forward to hear about how we could proceed. Thanks!
@emilytrau , I need to estimate how much time it will take to rework all parsers to live on SD card. I will convert your PR to draft and come back next week.
Hey @gornekich, there hasn't been any news since 7 months ago, is this on hold due to waiting for #2529 to land in Master ?
@AkechiShiro yes, we are waiting for that PR. Also in branch with refactoring we already added opal parser as a plugin, launching from SD card
@emilytrau we implemented opal and myki parses as plugins in #3050 . You can update the flipper to the latest release and test it. Thanks a lot for your PR!
@gornekich thank you!