1015 Commits
Author SHA1 Message Date
iceman1001andClaude Opus 5 (1M context) 2cd5285cb2 hf mfdes chk: track found keys per application
foundKeys was indexed [keytype][keyno] with no AID dimension and was
never reset between applications, so a key number recovered on one AID
was skipped without a single auth attempt on every later AID.  On a card
with AES key 00 set on two apps, only the first one was ever reported.

Give every application its own desfire_app_keys_t and hand that to the
checker.  Saving to json now uses a new 'mfdes v2' format keyed by AID,
with a loader that round-trips it; v1 is kept for existing files.

Also in the same path:
 - one auth error below 7 broke out of the key number loop, abandoning
   every remaining key number for the AID.  Only an algo mismatch (4, 50,
   51) skips the key type now; an invalid key number (3) skips just that
   key number, and a transmit error retries after a reselect
 - 3TDEA keys were stored 16 bytes wide and written out as 24
 - -k with a 24 byte key was rejected by the parser, making the 24 byte
   branch unreachable
 - DesfireGetAIDList() wrote unbounded into a 78 byte app_ids buffer

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-11 10:38:57 +02:00
kormaxandmxcdoam 1ecbcb74be Add ISO14443-3 Type A timeslot support to 'hf 14a info' and 'hf 14a reader'
Co-authored-by: mxcdoam <72457810+mxcdoam@users.noreply.github.com>
2026-09-07 22:55:24 +03:00
Iceman 9f641c3ced Merge pull request #3427 from Sanduuz/feature/st25ta_ndef_sim
Added support for emulating ST25TA tag (IKEA Rothult) with custom NDEF response
2026-09-07 15:38:46 +07:00
xilni 342cc37cca docs(bwm): fix stale hw bwm command references 2026-09-07 00:07:07 -04:00
Iceman 2da575ab36 Merge branch 'master' into master
Signed-off-by: Iceman <iceman@iuse.se>
2026-09-06 21:25:31 +07:00
dxl fc355df050 Added IO test capabilities to the factory QC for PM5. 2026-09-05 18:09:46 +02:00
dxl ea5485b4b8 Rename CMD_PM5_QC_TEST to CMD_PM5_QC_TEST_HW
and delete repeated def: CMD_PM5_BWM_SET_CAP
2026-09-05 18:09:46 +02:00
Antiklesys 57a42e3ce9 Stability fix for sc-bigbuf traces 2026-09-05 22:31:52 +08:00
Niel Nielsen eb5b9eb561 Added removed comment again
Added removed comment again

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-05 09:12:39 +02:00
Niel Nielsen 96e13303c8 Update PM3_FPC_MAX_DATA to 2048
Increase maximum data size for FPC from 240 to 2048 bytes.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-05 08:33:03 +02:00
Niel Nielsen cf3730e1b4 Merge branch 'RfidResearchGroup:master' into BWM-work 2026-09-04 14:29:26 +02:00
iceman1001 ace5d63ff9 hitag2: fix simulation against genuine readers, add restore, fix info
Simulation now completes the full exchange with a genuine Paxton reader in
password mode, and crypto mode read/write passes Proxmark-to-Proxmark.

Firmware:
- SOF was one bit period short. The lead-in that compensated for the lost
  head half bit was removed and nothing replaced it, so readers rejected
  every answer with a second START_AUTH. Default is now 6.
- The edge-detect threshold was latched before being measured, so the value
  chosen depended on whether the Proxmark was in a field when sim started.
  It is now measured on field entry and re-armed when the reader leaves.
- The percentile walk latched on run-scoped variables, so one attempt made
  outside a field poisoned every later one.
- Field loss was detected from TIMESTAMP, which is free-running MCU time and
  never stalls. Detect it from receive silence instead.
- Frames of a length the protocol does not have no longer reach the state
  machine; our own modulation tail was resetting the session and breaking
  every write.
- A dropped edge merges two or three reader bit periods into one gap. Those
  bits were discarded; they are now recovered by decomposition, which is what
  made crypto mode work (AUTH decode 15% -> 100%).
- Threshold selection is limited to 20 and 32 and settles in under 25 ms.

Client:
- lf hitag info printed a hardcoded 0x06 and reported 'Password mode' for
  every tag. It now reads page 3, takes -k (4 bytes password, 6 bytes
  crypto), and says so when the config cannot be read.
- lf hitag restore: writes a dump back in dependency order - user pages,
  then key material, then config last - validates the config byte, and
  prints the credential the tag will require afterwards.
- lf hitag crack2 now reports why it failed instead of a bare 'fail'.
- trace list: bit count moved to its own column, relative mode shows a
  Frame Delay Time row rather than renaming Start/End, --frame and -r
  rejected together.
2026-09-04 13:20:29 +02:00
Niel Nielsen 9d12204135 Change BWM_OTA_CHUNK_MAX to 240
Updated maximum firmware bytes per WRITE action from 2048 to 240.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 09:56:04 +02:00
Niel Nielsen fa7aa4e594 Increase PM3_FPC_MAX_DATA from 2048 to 240
240 seems the best choise

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 09:17:49 +02:00
Niel Nielsen ef09ab673b Update BWM_OTA_CHUNK_MAX to allow larger firmware writes
Increased the maximum firmware bytes per WRITE action from 196 to 2048.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 09:15:11 +02:00
Niel Nielsen c1d47f2be9 Reduce BWM_OTA_CHUNK_MAX from 240 to 196
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 09:10:45 +02:00
Niel Nielsen f5029c265f Increase BWM_OTA_CHUNK_MAX from 236 to 240
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 08:31:54 +02:00
Niel Nielsen c4cc31e06b Reduce BWM_OTA_CHUNK_MAX from 248 to 236
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 08:27:17 +02:00
Niel Nielsen 857a85557a Reduce BWM_OTA_CHUNK_MAX from 264 to 248
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 08:22:58 +02:00
Niel Nielsen dec0185b5a Increase BWM_OTA_CHUNK_MAX from 240 to 264
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-04 08:18:39 +02:00
Niel Nielsen 0245e99fde Add new OTA action definitions
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 12:58:44 +02:00
Niel Nielsen 1c184f4028 Decrease BWM_OTA_CHUNK_MAX from 256 to 240
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 11:49:39 +02:00
Niel Nielsen 9f265e81ea Define BWM_OTA_ACTION_ABORT for OTA commands
Add BWM_OTA_ACTION_ABORT constant for OTA actions.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 11:07:18 +02:00
Niel Nielsen e5ed0d52e1 Add BWM OTA chunk size definition
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 09:16:21 +02:00
Niel Nielsen a0573bf3cc Update pm3_cmd.h
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-03 07:04:56 +02:00