Commit Graph
56 Commits
Author SHA1 Message Date
NZSmartie c9a10631de Gallagher key checking is now supported on MIFARE Desfire
Both `hf mfdes auth` and `hf mfdes chk` now support Key Diversification for
AN10922 and as special treat, Gallagher issued cards.

For `hf mfdes auth`:
```
    -d, --kdf <kdf>                Key Derivation Function (KDF) (0=None, 1=AN10922, 2=Gallagher)
    -i, --kdfi <kdfi>              KDF input (HEX 1-31 bytes)
```

And for `hf mfdes chk`:
```
    -f, --kdf <kdf>                Key Derivation Function (KDF) (0=None, 1=AN10922, Gallagher)
    -i, --kdfi <kdfi>              KDF input (HEX 1-31 bytes)
```

Examples:
- `hf mfdes auth -a 2081f4 -m 3 -t 4 -d 2 -n 2 -k 00112233445566778899aabbccddeeff`
  Will diversify the key for key `2` on AID `2081F4` for Gallagher issued cards

- `hf mfdes chk -f 1 -i 00112233 -d mfdes_default_keys`
  Will read in all the default keys from the dictionary, and diversify them
  using AN10922 with the input data `00112233`

- `hf mfdes chk -f 2 -d mfdes_default_keys`
  Will read in all the default keys from the dictionary, and diversify them
  using AN10922 but with input data generated from the card's UID, AID and
  key number.
2020-11-02 01:41:48 +13: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
iceman1001 64f9bb5e01 style 2020-10-06 18:00:00 +02:00
iceman1001 235cca276d moved old type 2020-10-02 14:32:16 +02:00
iceman1001 46352dfccc 14b_chaining 2020-09-30 17:06:39 +02:00
iceman1001 50d2597fcb remove some cluttering down of list when cardhelper is active 2020-07-29 10:19:25 +02:00
Bjoern Kerler 7aa27cfefb Auth of des, 3des and aes working. 2020-04-12 17:10:27 +02:00
Bjoern Kerler 637103224d Fixes 2020-04-11 11:32:31 +02:00
iceman1001 fe0d9c8d9f hf mfdes enum - fixes WIP 2020-03-17 11:37:38 +01:00
Thomas Sutter bb53a40adb Add auth1 output - experimental.
Add auth2 command - experimental.
2019-12-17 13:09:14 +01:00
Thomas Sutter a65cfc5f4b Fix auth1 response. 2019-12-17 08:19:42 +01:00
Thomas Sutter 601b8d281a Add command request system code.
Add command request specification version.
Add command reset mode.
Make Style.
2019-11-04 10:24:29 +01:00
Thomas Sutter 2e60cb4fa6 Add write without encryption command. 2019-10-29 11:14:38 +01:00
Thomas Sutter 498c4b8377 Refactor FeliCa structs. 2019-10-29 10:22:47 +01:00
Thomas Sutter bfd5214cd5 Add read_without_encryption command. 2019-10-24 16:08:44 +02:00
Thomas Sutter 3b0447fbb3 Draft read without encryption 2019-10-24 08:44:20 +02:00
Thomas Sutter 1f7dd3e2a7 Add request response command for felica Mode. 2019-10-23 14:48:23 +02:00
Thomas Sutter 3f56116615 Add felica request service all nodes command.
Make style.
2019-10-22 17:03:54 +02:00
Thomas Sutter 6144e2d09b Add felica request service command.
Add cmd parser functions.
2019-10-22 15:56:05 +02:00
iceman1001 065a1b6848 chg: enforce PACKED on more structs 2019-10-17 22:32:09 +02:00
merlokk 20d13d5509 added PACKED attribute for structures and reorganize include folder 2019-07-16 14:50:38 +03:00
Eloff 66ee8dc09e used predefined constants, common types moved to common header files 2019-04-23 21:14:20 +03:00
vratiskol 3b06c9d8ee Merge remote-tracking branch 'upstream/master' into hf_mf_sim 2019-03-21 20:46:56 +01:00
iceman1001 ca9061bd32 changed byte_t -> uint8_t 2019-03-21 15:19:18 +01:00
vratiskol c2c4aac7ff Merge remote-tracking branch 'upstream/master' into hf_mf_sim 2019-03-18 21:51:29 +01:00