Commit graph

97 commits

Author SHA1 Message Date
Methodius
1e09034e23
Merge remote-tracking branch 'upstream/dev' into emv-fixes 2024-02-11 00:09:52 +09:00
Nikita Vostokov
ab609bc294 WIP: Test for some visa cards
* Could break communication with another cards
2024-02-10 01:38:46 +00:00
MX
5b97ddc842
Merge branch 'ofw_dev' into dev [ci skip] 2024-02-10 02:38:42 +03:00
Tolly Hill
50e0521bf7
NFC: Custom UID entry when adding manually (#3363)
* NFC: Custom UID entry when adding manually
* Fix incorrect types
* Add Change UID option post-generation
* Update UID derived data when using set_uid method
* Fix PVS warnings

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:36:06 +07:00
gornekich
6bc63b7734
[FL-3676] Slix disable privacy (#3425)
* slix: add unlock option
* slix: add features for nxp get info and signature commands
* slix: working unlock
* nfc app: rewrite slix unlock
* slix poller: simplify unlock state handler
* nfc app: fix slix key setting
* nfc app: fix navigation
* slix poller: code clean up
* slix: resolve TODO, clean code
* nfc app: fix naming
* nfc app: rework slix unlock success scene
* slix poller: add documentation
* slix listener: fix password comparison

Co-authored-by: あく <alleteam@gmail.com>
2024-02-09 15:07:54 +07:00
Nikita Vostokov
d195de502e Fix PDOL parsing 2024-02-09 00:06:34 +00:00
Methodius
ec356626fa code cleanup, gui fixes 2024-02-08 23:59:48 +00:00
Nikita Vostokov
b1674711a1 [EMV] Add Effective date and Preferred Name 2024-02-08 23:58:52 +00:00
Nikita Vostokov
9ceae3a3b2 [EMV] Fix crash while PDOL parsing 2024-02-08 23:58:52 +00:00
MX
2d78e23d25
Merge branch 'ofw_dev' into dev 2024-02-06 21:23:11 +03:00
Leptopt1los
ed34dfa1c6
NFC: MF Classic parsers read() fix (dictionary attack skip) (#3355)
* NFC: MF Classic lib: MfClassicErrorPartialRead added

* unnecessary imports removed

* MfClassicError refactor by @gornekich

Co-authored-by: gornekich <n.gorbadey@gmail.com>

---------

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-02-06 20:53:42 +04:00
Nikita Vostokov
51d8b18f3e Read SFI until PAN find
* get rid of input result buffers
2024-01-30 00:26:16 +00:00
Methodius
ce80586822
Merge remote-tracking branch 'upstream/dev' into dev 2024-01-30 02:22:28 +09:00
Methodius
fee4a5a8f7
EMV save/load dump options added 2024-01-30 02:22:21 +09:00
Methodius
3612814a18
back to parser 2024-01-29 23:12:17 +09:00
Nikita Vostokov
1165e25f00 Read all files 2024-01-29 13:48:33 +00:00
Nikita Vostokov
653af9a5cd Read PIN tries and transactions counters 2024-01-29 00:07:17 +00:00
Nikita Vostokov
786f3568c0 Fix retry loop (on Android HCE) 2024-01-28 20:18:17 +00:00
Nikita Vostokov
4b786fb77e Refactor response decoder
Read transactions history
2024-01-28 03:57:12 +00:00
MX
acd6445d3b
fix NFC V dumps v3 crashing at info page 2024-01-27 03:20:53 +03:00
Nikita Vostokov
5e384ccc43 Fix log 2024-01-23 22:40:38 +00:00
Nikita Vostokov
3fce83eb79 Process error codes 2024-01-23 22:40:38 +00:00
Nikita Vostokov
3f6092d95c Don't stop if SELECT APPLICATION failed 2024-01-23 22:40:38 +00:00
Methodius
84abb53712
Track2 support
Co-authored-by: Nikita Vostokov <1042932+wosk@users.noreply.github.com>
2024-01-23 19:51:59 +09:00
Methodius
ecabcbc58a
Kostyly for iso14443-4a poller (pwt_ext)
Co-authored-by: Nikita Vostokov <1042932+wosk@users.noreply.github.com>
2024-01-20 05:42:35 +09:00
gornekich
7db8d5aa82
[FL-3648] Mf DESFire fixes (#3367)
* mf desfire: process loading applications with 0 files
* mf desfire: add HID desfire support
* nfc: fix mfdes loading and rendering crashes
* mf desfire: change handling HID cards
* mf desfire: fix PVS warnings
* mf desfire: fix cmp logic

Co-authored-by: あく <alleteam@gmail.com>
2024-01-19 23:24:38 +03:00
Methodius
b5964b9795
Enum order fixes by Willy-JL
Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
2024-01-20 05:18:16 +09:00
gornekich
4f50ef9b54
[FL-3648] Mf DESFire fixes (#3367)
* mf desfire: process loading applications with 0 files
* mf desfire: add HID desfire support
* nfc: fix mfdes loading and rendering crashes
* mf desfire: change handling HID cards
* mf desfire: fix PVS warnings
* mf desfire: fix cmp logic

Co-authored-by: あく <alleteam@gmail.com>
2024-01-16 18:41:51 +09:00
Methodius
4b7b0ad6b9
EMV parser added 2024-01-16 02:43:17 +09:00
Nikita Vostokov
08a5adf18e
Fix EMV reading
2 MasterCard were successfully read

Issues: some VISA and Mastercard and all UnionPay can't be read

TODO: currency, country, Application name
TODO: Support multi application mode to read co-branded card.
2024-01-15 19:03:31 +09:00
Methodius
3a82b3aa3c
Merge remote-tracking branch 'upstream/dev' into dev 2024-01-15 19:03:15 +09:00
Methodius
d337222cbe
minor fixes 2024-01-12 22:14:21 +09:00
Leptopt1los
d289545bf8
NFC: system dict skip when user dict is skipped fix (#3356)
* NFC: system dict skip when user dict is skipped fix
* MFC poller allocator fix (by gornekich)

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-12 17:41:19 +09:00
Methodius
e8b468b492
EMV Poller fix 2024-01-12 17:08:34 +09:00
Methodius
e9454b629b
NFC fap: EMV protocol added 2024-01-11 18:11:54 +09:00
Methodius
d0c466ccc0
EMV protocol added 2024-01-11 00:48:55 +09:00
gornekich
a7b60bf2a6
MFC emulation fixes (#3324)
* mf classic listener: fix write block
* nfc: go to idle state instead of sleep
* lib nfc: fix documentation
2023-12-29 12:24:20 +09:00
gornekich
09540929c3
[FL-3717] MFC emulation fix (#3291)
* mf classic listener: reset state before sleep and after nack
* Fix PVS warnings
* Fix PVS and compiler disagree on builtins

Co-authored-by: あく <alleteam@gmail.com>
2023-12-15 17:51:20 +00:00
gornekich
155e4e9fa4
[FL-3706], [FL-3674] NFC NTAG and ISO14443-3b reading fix (#3285)
* mf ultralight poller: reset field after reading tearing flags
* iso14443-3b poller: change cid comparison in ATTRIB cmd

Co-authored-by: あく <alleteam@gmail.com>
2023-12-12 15:24:06 +00:00
gornekich
82baf1e923
[FL-3701] NFC fixes (#3264)
* nfc app: fix unlock with manual password crash
* nfc app: preserve card detected state
* nfc app: fix mf keys scene switch
* nfc app: fix multiple protocol tag detect notification
* nfc plugin: fix retrun in function body in aime parser
* iso14443-3b poller: rework ATTRIB response check
* nfc app: fix navigation after file load failur
* iso14443-3b poller: fix PVS warning
* mfc listener: add crutch in mfc emulation
2023-12-05 22:40:06 +09:00
pborsutzki
c6a14e1a67
Fixed a zero allocation error when reading an iso15693 nfc tag with no additional blocks. (#3229)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2023-12-02 16:27:58 +09:00
RebornedBrain
6a5d63803a
[FL-3675] Ntag21x write (#3246)
* New scenes for ultralight poller write mode
* Added new button and transition logic for write operation
   For now write is only possible for NTAG21x cards with default password and no AUTHLIM set
* Poller states extended
* Enums and datatypes extended for new poller mode
* Added mode field to poller instance datatype
* New states for poller added in order to implement write mode
* Added new event type for locked cards in order to simplify state flow
* New logic for poller write commands
* Scenes adjustments
* Scenes renamed
* New field added to poller instance
* Now we write in 'page per call' mode
* Now function takes callback return value into account
* Callback will be called only in write mode
* Event type added
* Log adjusted and start page to write set
* Logs added and check in now false at start, then it moves to true
* Now mf_ultralight_poller_handler_request_write_data halts card in case of check failure and stops poller
* All fail events now returns NfcCommandStop callback
* In case of fail we move back properly
* Remove garbage

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-12-02 13:45:47 +09:00
Augusto Zanellato
b51a754fd9
Mifare Classic nested auth support (#3238)
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 22:25:53 +09:00
Augusto Zanellato
c1e0d02afc
ST25TB poller refining + write support (#3239)
* nfc: st25tb: rework async poller
* nfc: st25tb: introduce sync poller
* nfc: st25tb: add write support
* nfc: st25tb: rewrite poller to use better states
* nfc: st25tb: move to mode request state after success
* nfc: st25tb: minor bug fixes
* type wasn't properly set on ready event
* sending NfcCustomEventPollerFailure on St25tbPollerEventTypeFailure caused poller to being freed and ultimately resulted in a thread crash

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:42:00 +09:00
hedger
890c9e87ce
[FL-3690] Libraries cleanup; u2f crypto rework to use mbedtls (#3234)
* examples: plugins: utilize fal_embedded
* libs: removed fnv1a_hash
* furi: added FURI_PACKED; apps, libs: changed to use FURI_PACKED
* lib: mbedtls: using custom config
* lib: toolbox: removed md5, switched to mbedtls
* targets: f18: link fix
* lib: added mbedtls_cfg.h
* apps: nfc: explicit dependency on libmbedtls
* u2f: reworking to mbedtls
* u2f: replaced sha256 & hmac with mbedtls
* u2f: functional rework using mbedtls
* libs: dropped micro-ecc
* u2f: dropped old implementation
* toolbox: removed sha256 impl
* mcheck() for mbedtls
* libs: removed libmisc; split into smaller libs
* apps: debug: fixed display_test
* apps: include cleanups
* fbt: fixed VERSIONCOMSTR
* furi: added FURI_CHECK_RETURN
* lib: removed qrcode
* cleanup
* fbt: lint_py+format_py: fixed excessive command length
* api: Removed bzero from f7
* api: Removed bzero from f18
* Bump API Symbols

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-12-01 18:16:48 +09:00
Astra
f9101d8084
[FL-3686] Mifare Classic fixes (#3221)
* Update Mifare Classic generators to create more accuate data
* Check the transfer buffer validity for NACK
* Fix the AC issues
* CRC errors don't really affect emulation, checking for them isn't worth it
* Make ATQA logic a bit easier to understand
* mf classic: change log level
* mf classic: fix log level

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-26 17:20:49 +09:00
RebornedBrain
1c3cbec661
[FL-3640] NFC: Felica UID emulation (#3190)
* Added basic template of Felica listener
* Raw nfc felica listener functions
* Added functions to setup chip for felica listener
* Cleanup function templates from unnecessary parts
* Removed todo comment
* Updated api versions
* Adjusted chip config for felica
* Set proper chip passive target mode for felica
* Added felica function to unit tests
* Update furi_hal_nfc_felica.c
* Removed duplication

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2023-11-26 17:10:33 +09:00
gornekich
c00776ca22
[FL-3666] NFC API improvements (#3214)
* drivers: expose st25r3916 driver API
* nfc poller: add start with custom callback
* mf classic: rework sync API with poller custom start
* mf ultralight: rework sync API with poller custom start
* iso14443_3a poller: remove unused col res state
* nfc: rework nfc poller custom start
* mf ultralight: rename sync API
* mf classic: rename sync API
* iso14443-3a: rename sync API
* nfc: remove async prefix in internal functions
* nfc: expose internal API
* nfc: fix sync api include and docs
* targets: fix f18 build
* nfc: rework NfcGenericEventEx type
* nfc poller: add documentation
* iso14443-3a poller: add documentation
* felica poller: add documentation
* iso14443_3b poller: add documentation
* so14443_4a poller: add documentation
* iso14443_4b poller: add documentation
* iso15693 poller: add documentation
* slix poller: add documentation
* mf desfire poller: add documentation
* mf ultralight poller: fix API and add documentation
* mf classic poller: add documentation

Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 17:32:45 +09:00
RebornedBrain
d0b9a3a4ae
[NFC] MF Ultralight no pwd polling adjustment (#3207)
* Listener log level changed to Trace
* Show pages count without pwd pages in case of no auth success
* Fixed unit tests

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 17:02:35 +09:00
Tobias Jost
dc246ddb09
Fix limited_credit_value having wrong value in mf_desfire_file_settings_parse (#3204)
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
2023-11-15 16:39:29 +09:00