Commit graph

238 commits

Author SHA1 Message Date
merlokk fffef000ea mac des/ev1 calculated 2021-07-06 16:46:05 +03:00
merlokk 5f0f6b8032 update crypto encode/decode 2021-07-06 16:22:01 +03:00
merlokk c22050b638 create new desfirecrypto 2021-07-06 12:39:06 +03:00
merlokk 20696fb44a make style 2021-07-06 12:16:19 +03:00
merlokk 0a51eb445d add mac sketch 2021-07-06 12:05:59 +03:00
merlokk d2491d342d move secure channel functions to separate file 2021-07-05 19:31:42 +03:00
merlokk 164a1db780 Merge branch 'desf_update' of https://github.com/merlokk/proxmark3i into desf_update 2021-07-05 14:15:58 +03:00
merlokk e9b8e18430 remove key_size 2021-07-05 14:15:39 +03:00
Oleg Moiseenko 6671563fb9
Merge branch 'master' into desf_update 2021-07-05 14:02:15 +03:00
merlokk 96d18a1cd7 splitbysize works correctly in the all the cases 2021-07-05 14:00:51 +03:00
merlokk 003a0b0de4 splitbysize now put length of message at the first bytes of array's memory 2021-07-05 12:40:07 +03:00
merlokk 5937fd4217 added lib 2021-07-05 12:12:42 +03:00
merlokk dece2b1bbd delete des from desfire_crypto 2021-07-05 12:09:08 +03:00
merlokk 1aedfc7b6e ev1 mac decode placeholder 2021-07-04 22:37:27 +03:00
merlokk 5d8fa054e5 added channel logic to d40 mode 2021-07-04 22:16:43 +03:00
merlokk aa8c4b3dca secure channel sketch 2021-07-04 17:49:11 +03:00
merlokk fce8affd48 fix des authentication 2021-07-04 15:43:57 +03:00
merlokk 1adfad07bd move des encrypt/decrypt to lib 2021-07-04 14:14:43 +03:00
merlokk db87af3bf8 Revert "fix DesfireAuthenticate for d40/ev1 mode"
This reverts commit 430f82730d.
2021-07-04 14:00:35 +03:00
merlokk 430f82730d fix DesfireAuthenticate for d40/ev1 mode 2021-07-04 13:38:12 +03:00
merlokk 6124b49c99 DesfirePrintContext prints session state 2021-07-04 12:47:09 +03:00
merlokk 2abd930ef7 simplify cliparser optinlist. added mfdes default 2021-07-04 12:20:09 +03:00
merlokk fe5f9ec9d5 native channel works 2021-07-04 11:21:31 +03:00
merlokk 1b2442ec36 regactoring desfire commands. textual fixes 2021-07-03 17:31:12 +03:00
merlokk 0d00f56777 CmdHF14ADesGetAppNames works 2021-07-03 13:11:17 +03:00
merlokk acca624752 added cli text options to command 2021-07-03 00:08:45 +03:00
merlokk 7af924eadd add get key size function 2021-07-03 00:07:55 +03:00
merlokk 0aad993711 remove comments and text fixes 2021-07-02 18:17:21 +03:00
merlokk d354ac90fd fix warning 2021-07-02 18:07:46 +03:00
merlokk 636a1dd457 DesfireGetAIDList works 2021-07-02 18:06:13 +03:00
merlokk e5d24ff81f authentication works 2021-07-02 17:37:15 +03:00
merlokk b5ee999c73 rename GetErrorString -> DesfireGetErrorString 2021-07-01 20:47:02 +03:00
merlokk 73db86bcc7 exchange returns result. select works 2021-07-01 20:32:04 +03:00
merlokk ecfcc21ded select works (somehow) 2021-07-01 20:06:33 +03:00
merlokk 2fa6c4643e desfire channel sketch 2021-07-01 19:53:57 +03:00
iceman1001 e2ca0a4abd style 2021-06-24 18:47:11 +02:00
iceman1001 ffddfea841 textual 2021-06-24 15:09:11 +02:00
iceman1001 c522de5b79 added "hf mf gview" to view contents of a magic gen3 gtu card 2021-06-24 14:59:33 +02:00
mwalker33 bcc137af1d Update desfire_crypto.c
Coverty 344484 - ensure AES IV is at least 16 bytes long.
2021-06-22 18:55:23 +10:00
iceman1001 ba76aabdf8 hf mf fchk - output style 2021-06-21 09:15:18 +02:00
iceman1001 0f6b6cb650 fix coverity CID 349331 2021-06-21 07:30:46 +02:00
iceman1001 f6534e18be style 2021-06-20 16:36:31 +02:00
Philippe Teuwen 323c391f4d nfc commands 2021-05-30 14:23:13 +02:00
iceman1001 59b86af1a8 fix #1286 - wrong pwd/key length checks 2021-05-24 21:54:09 +02:00
iceman1001 8bf5a99bca codestyle prefer calloc 2021-05-19 18:07:19 +02:00
iceman1001 3418d747d9 fix cppchecker 2021-05-07 11:58:39 +02:00
iceman1001 d2646122e7 style 2021-04-16 17:10:08 +02:00
iceman1001 96f8cad9a5 hf mf decrypt - now use cliparser 2021-04-11 18:18:13 +02:00
iceman1001 e448d58291 hf mf csetuid - now supports cliparser. Also experimental 7byte support. Not seen one in the wild. untested 2021-04-11 12:48:06 +02:00
iceman1001 916e5d7ba2 versbose text 2021-04-10 08:05:33 +02:00
iceman1001 007b916643 style 2021-04-08 11:08:39 +02:00
Ryan Saridar e223258aa2
Fix error typo 2021-04-07 22:17:57 +01:00
iceman1001 871820f8f7 fixing padding @anon 2021-04-07 09:13:45 +02:00
Iceman 1d6b4b2722
Merge pull request #1230 from VortixDev/VortixDev-patch-mfpauth
Fix mfpauth error printout
2021-03-31 08:57:54 +02:00
Ryan Saridar b2f535f788
Make error verbose 2021-03-31 02:45:37 +01:00
Ryan Saridar 2f0b944554
Fix error byte index 2021-03-31 02:42:03 +01:00
iceman1001 62031e640c swap arrays 2021-03-30 09:34:17 +02:00
iceman1001 b7be78a8fb cbc is already done in mifare_cypher_single_block (anon) 2021-03-29 21:52:36 +02:00
iceman1001 f0510cc0d5 style 2021-03-27 10:21:54 +01:00
iceman1001 ad2b0879fc added: mem spiffs view - to view a file on SPIFFS\n mem spiffs dump - now uses cliparser and NG 2021-03-09 14:38:31 +01:00
iceman1001 f5aa78e668 cppchecker shadow 2021-02-24 00:02:59 +01:00
iceman1001 9293a25e3e hf 14a info - add MFC EV1 signature checks 2021-02-19 13:39:35 +01:00
iceman1001 4cafbcc259 hf mfdes - keeping track in the tag object of rf_field active status 2020-11-18 23:47:54 +01:00
Ave 7c5e3a29de
Fix old UID display on hf mf csetuid 2020-11-15 20:14:08 +03:00
iceman1001 0f4e31bfb0 adapt return codes 2020-11-12 21:51:05 +01:00
iceman1001 243d509203 remove dump.c step2 2020-11-12 18:43:03 +01:00
NZSmartie b788054aca
Add initial suport for MIFARE Key Diversification
This adds two new options to `hf mfdes auth`

```
    -d, --kdf <kdf>                Key Derivation Function (KDF) (0=None, 1=AN10922)
    -i, --kdfi <kdfi>              KDF input (HEX 1-31 bytes)
```

By specifying `-d 1` and some kdf data `-i 00112233`, the key will be
diversified using AN10922.
2020-10-31 21:17:35 +13:00
Philippe Teuwen fdd11c3fb2 Fix MAD decoding for DESFire 2020-10-27 20:46:51 +01:00
Philippe Teuwen 55fa5e7c35 make style 2020-10-11 22:40:05 +02:00
iceman1001 02df6ebbf7 bad memcpy based on size 2020-10-06 23:45:04 +02:00
Philippe Teuwen 31909ff140 text 2020-10-06 12:01:11 +02:00
Philippe Teuwen 9c856fd9f4 Gen3 detection: be prudent, false positives are possible 2020-10-05 22:33:33 +02:00
Philippe Teuwen 7d4c6e8faa Fix Gen3 detection bug against MFUL 2020-09-23 12:25:30 +02:00
iceman1001 8b2279dd05 fix a potential overflow 2020-09-18 19:50:45 +02:00
Philippe Teuwen ecbcba18dd identify gen3 2020-09-11 18:17:58 +02:00
iceman1001 28ecc8fea8 renamed gen3, textual 2020-09-11 16:38:28 +02:00
iceman1001 5b695153b6 improved staticnonce tristate processing 2020-09-11 16:15:58 +02:00
iceman1001 866f4b6313 hf 14a info - ntag21x identification 2020-09-10 20:40:12 +02:00
iceman1001 25c45ef659 textual 2020-09-10 16:20:29 +02:00
iceman1001 9ced99a853 cident super card 2020-09-10 01:31:54 +02:00
iceman1001 5d6f8053c6 textual 2020-09-07 12:11:21 +02:00
iceman1001 5d357a6039 style 2020-09-07 10:39:15 +02:00
Eloff 70be7ef4d8 Magic gen 3 cards support 2020-09-05 22:32:11 +03:00
iceman1001 71fc3e18d9 fixing return codes for Autopwn, added staticnested to autopwn 2020-09-02 12:16:11 +02:00
iceman1001 2089edbba9 adapt chunksize as we progress 2020-08-31 03:05:18 +02:00
iceman1001 11695eb55c textual 2020-08-31 01:16:56 +02:00
iceman1001 4cb6e0d42e remore magic wipe 2020-08-30 02:08:17 +02:00
iceman1001 e3da69410b reenable manual wipe 2020-08-30 02:06:07 +02:00
iceman1001 110a173e6d no printf 2020-08-29 14:38:46 +02:00
Philippe Teuwen 4ed57c7c4d make style 2020-08-13 12:25:04 +02:00
iceman1001 d5b379207e fix coverity 2020-06-29 11:22:09 +02:00
iceman1001 5d08dae554 fix coverity 290769, 290768 2020-06-29 11:10:02 +02:00
iceman1001 56e171b9dc chg: data ndef - now decodes w and wo NDEF header 2020-06-21 16:34:56 +02:00
Philippe Teuwen f69739da79 make style 2020-06-19 18:34:47 +02:00
Bjoern Kerler e7b2dbd5e8 Remove unnecessary crc 2020-06-13 17:58:47 +02:00
Bjoern Kerler 9a07c06596 Fix htole32 issue 2020-06-13 17:16:17 +02:00
Bjoern Kerler 631be7af32 Fixes 2020-06-13 15:11:10 +02:00
Bjoern Kerler e0bf636aaf Make style 2020-06-13 14:25:40 +02:00
Bjoern Kerler 5adc8e876a Fix DES authentification and format picc 2020-06-13 14:19:21 +02:00
iceman1001 9c6ce5be50 chg: "hf mf cwipe" - speed up using backdoor wipe cmd 2020-06-12 22:35:08 +02:00
Lukas Kuzmiak edff230d55 fix a bug in MADInfoByteDecode (did not return 0x00), textual fixes 2020-06-10 14:59:53 -07:00
iceman1001 d7377e7ccc textual 2020-06-10 13:33:08 +02:00
iceman1001 cb22004635 chg "hf mf cwipe" - textual and also use magic wipe card 2020-06-10 08:43:29 +02:00
Lukas Kuzmiak 9d71f66d16 Mifare MAD Card Holder Information 2020-06-09 18:34:59 -07:00
Lukas Kuzmiak ca30ff9bc2 highlight sector line instead of printing it twice, update Changelog 2020-06-09 15:39:17 -07:00
Lukas Kuzmiak 33662bdd59 Decode MAD Info Byte and show info about sector it points to 2020-06-09 14:43:00 -07:00
iceman1001 dcabb7e37d chg: hf 14a info - dont print some hints if magic 2020-06-09 21:29:59 +02:00
Philippe Teuwen 9a15632689 MAD swap again 2020-06-09 20:53:33 +02:00
Philippe Teuwen 35c6ee1bbb rework a bit mfc mad 2020-06-09 20:17:08 +02:00
Philippe Teuwen 33144d1be8 mfc mad get_aid_description: add verbose passthru 2020-06-09 18:46:07 +02:00
Philippe Teuwen 242c276bfb mfc mad_print compare 2020-06-09 18:45:37 +02:00
iceman1001 a93e54374e working case-insense 2020-06-09 17:52:32 +02:00
iceman1001 cb4369f3ec fix: hf mf mad - return value 2020-06-09 17:38:29 +02:00
iceman1001 17f56479ea fix coverity 2020-06-09 16:59:20 +02:00
iceman1001 158251b2d9 look up mad directory json 2020-06-09 16:21:54 +02:00
iceman1001 5b10df9b4c textual 2020-06-09 11:32:19 +02:00
iceman1001 d12606cb26 reverse crc check 2020-06-09 11:14:40 +02:00
Lukas Kuzmiak 3cbad6fa4c Merge remote-tracking branch 'public/master' into mifare-mad-fix 2020-06-09 02:06:27 -07:00
iceman1001 a0cbaee138 chg: mad makeover 2020-06-09 08:51:12 +02:00
Lukas Kuzmiak e3d16649b8 MAD application code & cluster code were swapped 2020-06-08 21:22:40 -07:00
iceman1001 66fd599c70 fix: 'hf mfu ndef' - now prints ID field correct if present 2020-06-04 11:32:33 +02:00
iceman1001 96076c1945 chg: remove unused code from "hf mf sim" 2020-06-02 11:46:59 +02:00
iceman1001 c81f0c7d0f fix coverity 290270 2020-06-02 11:05:21 +02:00
Philippe Teuwen b6077df68e less global vars 2020-06-02 00:51:21 +02:00
Philippe Teuwen ff1f945291 desfire_crypto: remove global vars 2020-06-02 00:49:54 +02:00
iceman1001 045f2a8587 OLD->MIX 2020-05-27 11:55:32 +02:00
Philippe Teuwen 72acec5806 Makefile & CMake rework 2020-05-25 02:15:06 +02:00
iceman1001 e444640068 printandlogex 2020-05-14 16:59:02 +02:00
iceman1001 827439bddf cppcheck function name mis 2020-05-14 09:20:27 +02:00
Philippe Teuwen e695223d3b mf textual 2020-05-09 11:58:47 +02:00
Philippe Teuwen 723503b74e unshadow vars 2020-05-03 22:50:03 +02:00
Philippe Teuwen c94eae0046 fix warning about cast realignment, WIP 2020-05-03 17:34:01 +02:00
Philippe Teuwen b3f84bf7b3 make style 2020-04-29 19:41:45 +02:00
iceman1001 7303dd8c5d coverity fix 279922 , div by zero 2020-04-28 14:51:47 +02:00
Philippe Teuwen 8bdda55115 Fix prompt colors in log -> spurious space in color macros -> adjust lots of files... 2020-04-22 02:22:55 +02:00
Philippe Teuwen 07f3022aa6 make/cmake add common_fpga 2020-04-19 13:01:51 +02:00
Philippe Teuwen 26c28c188a minor 2020-04-18 18:20:19 +02:00
Bjoern Kerler 81bc0bc2b9 Reorder client src directories 2020-04-16 10:53:24 +02:00