Commit Graph
14313 Commits
Author SHA1 Message Date
Travis Weathers cce14d43e3 fix(client): stop the Indala demod printing a debug line at INFO level
detectindala() reports the bit count it gave up on through
PrintAndLogEx(INFO, ...), so every failed Indala demodulation prints

  [=] DEBUG: detectindala | 56

in normal output. It is the failure path: found_size < 64 means the
demodulator did not find a valid Indala (64 or 224 bits) and is returning
-5. Any noisy LF read hits it, so `lf search` with no card on the antenna
shows a developer's debug line to every user.

Every sibling in the same function already uses DEBUG, including the one
nine lines above it at "DEBUG: Warning - Indala had to invert bits", so
this is an oversight rather than a deliberate level. ui.c drops DEBUG when
g_debugMode is 0, which is the default, so the line stays available under
`data setdebugmode -1` and is simply no longer in the way.

Checked the whole client for the same class: the only other "DEBUG"
strings printed above DEBUG level are cmddata.c FSKToNRZ, and both of
those are already wrapped in `if (g_debugMode > 1)`, so they are correct
and are left alone.

Before, `lf search` over a reader field with no card:

  [=] Checking for known tags...
  [=] DEBUG: detectindala | 56
  [-] No known 125/134 kHz tags found!

After:

  [=] Checking for known tags...
  [-] No known 125/134 kHz tags found!

and with `data setdebugmode -1` the detectindala lines come back, now
carrying the [#] debug prefix like the rest of them.

Passes `make style` unmodified.
2026-09-15 10:57:02 -04:00
iceman1001andClaude Opus 5 2d70fcb4ff hf mfdes sim: self contained DESFire simulation, and stop bitstream downloads eating emulator memory
The DESFire simulation gets its own ISO 14443-A loop in armsrc/desfiresim.c
rather than hooking into SimulateIso14443aTag(). That function is complicated
enough without a DESFire state machine threaded through it, and the hook had
already got the ATQA wrong once. It still borrows the library helpers from
iso14443a.c -- the precompiled activation answers, the receive call, the send
calls -- so there is no duplicated state machine, and iso14443a.c goes back to
knowing nothing about DESFire. desfiresim.h exports one symbol.

Three fixes were needed to make it actually answer a reader.

1. ISO 7816 wrapping. A reader sends `02 90 60 00 00 00`, not `02 60`. The
   simulation read in[0] as the DESFire command and so saw 0x90, the class
   byte, answering ILLEGAL_COMMAND_CODE to everything -- and in native form
   (status || data) when the reader wanted the wrapped form (data || 91 SW).
   Both framings are handled now, including the Lc/Le distinction: five bytes
   means no data and in[4] is Le, longer means in[4] is Lc with data following.

2. A bitstream download frees and clears BigBuf to get scratch space for the
   decompressor. SimulateIso14443aTagEx() and Mifare1ksim() both guard against
   this by calling FpgaDownloadAndGo_keep_EM() before they allocate anything;
   the new loop did not, so iso14443a_setup() wiped the emulator memory holding
   the card image and the precompiled answers after they had been filled. The
   pointers survive, the bytes do not, and the tag then clocks out zeros.

3. iso14443a_setup() itself used the plain FpgaDownloadAndGo(), which does
   BigBuf_free() and BigBuf_Clear_ext() -- taking the emulator memory with it.
   Every 14a command comes through there, so a card image that `eload` had just
   put in place was destroyed by the next `hf 14a` command whenever the HF
   bitstream was not already resident. Demonstrated before and after:
   `eload` then `hf 14a reader` then `eview` used to report "No DESFire card
   image in emulator memory" and now returns the image intact. This affected
   every emulator memory user, not only DESFire.

Verified against a second Proxmark3 acting as reader, simulating a real
DESFire EV1 8K dump: activation (UID 04268512A25680, ATQA 03 44, SAK 20,
ATS 06 75 77 81 02 80), the three frame GetVersion chain over 0xAF, GetFreeMem,
GetApplicationIDs, SelectApplication, GetKeySettings and GetFileSettings.
`hf mfdes info`, `getaids`, `freemem`, `lsapp` and `lsfiles` all read correctly,
including per application key types (AES, 2TDEA, 3TDEA) and all five EV1 file
types with their real settings -- a value file holding 1000 with limits
[0..10000], a linear record 2/8 of 16 bytes, a cyclic record 1/4 of 24 bytes,
standard files of 256 and 64 bytes, and a backup file of 128 bytes in MAC mode
with keyed rights 1200.

Not implemented yet: GetDFNames (0x6D) and GetISOFileIDs (0x61), so a reader
sees empty ISO IDs and DF names. Everything else answers
ILLEGAL_COMMAND_CODE, which is what a PICC says to a command it does not have.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 14:43:52 +02:00
iceman1001 d882c716af adaptations of VIGIK parsers 2026-09-15 14:39:14 +02:00
iceman1001 a528d5ac1b text 2026-09-15 11:16:15 +02:00
iceman1001 7eb4ecb332 text 2026-09-14 22:31:35 +02:00
iceman1001 c0e20a9121 text 2026-09-14 22:27:58 +02:00
iceman1001 7b16d091ac text 2026-09-14 22:27:31 +02:00
iceman1001 b706d715b9 text 2026-09-14 22:27:01 +02:00
iceman1001 59cd76905f minor fix, obey 2026-09-14 22:18:27 +02:00
iceman1001 72f3f15dd3 found a new public key! 2026-09-14 22:17:13 +02:00
iceman1001andClaude Opus 5 8225d76ccd hf mfdes: stop GetDFNames from permanently disabling DESFire EV1 cards
Sending GetDFNames (0x6D) inside an authenticated session destroys DESFire EV1
silicon. When the response chains, the card answers the first 0xAF continuation
frame with 0xC1 PICC_INTEGRITY_ERROR, "PICC will be disabled", and from that
moment every command returns 0xCD PICC_DISABLED_ERROR. The ATS historical byte
changes 0x80 -> 0x90. Three cards were destroyed establishing this.

It is reached by `hf mfdes dump`, `hf mfdes lsapp` and `hf mfdes info --files`,
all of which authenticate and then call DesfireFillAppList.

HOW IT WAS ISOLATED

One variable at a time, on a card that survived all of it. Unauthenticated, the
identical frames are answered normally:

  - 0x6D on a blank card
  - 0x6D with an application that has no DF name (empty, per 9.4.4)
  - 0x6D with one DF name, single frame, no chaining
  - 0x6D chained over two and then three DF names, sent by hand
  - the chain abandoned mid-way with the field dropped
  - a stray 0xAF with no chain open, answered 91 1C
  - the client's own chaining code with splitbysize

Authenticated, the same card died on the first continuation frame. The client
appends no MAC to 0x6D -- it is not in EV1D40TransmitMAC -- so the bytes on the
wire are `90 6D 00 00 00` then `90 AF 00 00 00` either way, byte for byte
identical to the probes that passed. Only the card's session state differs.

Ruled out along the way:

  - Failed or wrong-algorithm authentication. `hf mfdes chk` has fired hundreds
    of failed auths per card for years without harm.
  - Abandoned authentication chains. DesfireCheckAuthCmd sends only the first
    frame of an auth and then drops the field, six times per `hf mfdes info`
    run; 30 of them left the test card healthy.
  - Malformed commands. The only out-of-spec command in the original sequence
    (UpdateRecord, 18 bytes into a 16 byte record) was refused client-side and
    never reached the card.
  - Chaining itself, DF names themselves, and the record count.

THE FIX

Drop the PICC session around the call and restore it afterwards.

It is the card's session that has to go, not the context. Clearing
DesfireContext_t alone would leave the card authenticated and change nothing, so
SelectApplication is used: "each SelectApplication command invalidates the
current authentication status" (M134034 9.4.5).

The session is then re-established on whatever AID was selected when we were
called, not on 000000. The issuer info path enters DesfireFillAppList with an
application already selected, and re-authenticating the PICC with that
application's key would silently fail. A context selected by DF name has no AID
to return to, so the DF name list is skipped rather than guessed at.

No configuration forces the unsafe order. Key settings bit 1 governs whether the
directory commands need authentication, and its "needs auth" branch names only
GetApplicationIDs and GetKeySettings, not GetDFNames (M134034 p.39). A card that
refuses the plain command costs the DF name column; sending it authenticated
costs the card.

WHAT THE DATASHEETS SAY

EV1 never specifies how secure messaging applies across 0xAF frames. EV3 had to
write the rule down later, ev3.pdf 7.3.2.2: "the secure messaging is applied as
if the command or response would have been sent in a single large frame. The
0xAF command and response codes are ignored for these calculations." The exact
interaction that destroys these cards is the one EV1 left unwritten.

EV2 and EV3 then deleted the whole self-disable family: ev3.pdf contains zero
occurrences of PICC_DISABLED or PICC_INTEGRITY, which M134034 defines. EV3
renames 0xEE to MEMORY_ERROR and says the part may execute a reset rather than
disable itself.

Whether the disabled state is recoverable is SILENT in every direction. The five
codes appear once each, in one status table, with no prose anywhere, and there is
no lifecycle command in DESFire to rehabilitate a PICC. Measured on a dead card,
nothing works: FormatPICC cannot authenticate (0x1A -> 91 CD) and is refused raw
(90 FC -> 91 CD); SelectApplication is refused (91 CD) even though it needs no
authentication and no bit can gate it; every ISO 7816 command including ACTIVATE
FILE and TERMINATE DF answers 65 81 "Memory failure". A malformed GetVersion
still answers 91 7E LENGTH_ERROR, so anticollision, RATS, the command parser and
length validation all still run -- only the application layer underneath is gone.

Note M075031 is the D40 datasheet, not EV1; the EV1 document is M134034.

ALSO IN THIS CHANGE, because without them the cause was invisible

Every card error collapsed to PM3_EAPDU_FAIL before reaching a caller, and both
send paths only printed the status when -a was given. That is why the first two
cards told us nothing about how they died.

  - The five codes M134034 Table 11 footnotes as "not expected to appear during
    normal operation" (0xC1, 0xCD, 0xA1, 0xF1, 0xEE) are now reported from both
    DESFIRESendRaw and DESFIRESendApduEx whether or not -a is given. Ordinary
    refusals stay at debug level, so chk and the ISO file id probes stay quiet.
  - A chained 0xAF is attributed to the command it is continuing, so a failure
    reads "command 0x6D frame 0xAF -> 0xC1" rather than a bare 0xAF.
  - DesfireContext_t keeps lastRespCode, set where both exchange paths meet.

A command error also ends the authentication on the PICC, so the client now
drops its side of the session rather than continuing to MAC into a session the
card has thrown away. The tree already did this at one call site
(DesfireGetFileISOIDList); it is now done at the choke point every native
command passes through, plus the paths that bypass it: DesfireReadSignature,
DesfireCreateDelegatedApplication, DesfireISOSelectEx, the ISO data plane
(ReadBinary, UpdateBinary, ReadRecords, AppendRecord) and GetDelegateInfo. The
three ISO authentication wrappers are deliberately left alone, since they run
before a session exists and clearing would wipe the handshake's own state.

`hf mfdes pc` checked only the transport result and treated a card error as
success: DesfireExchangeEx returns PM3_SUCCESS with the card's status in
respcode, so PreparePC, the proximity check rounds and VerifyPC went on to parse
error responses as data. They now check respcode.

DesfireFillFileList discarded the result of DesfireFileSettingsStruct, so a file
whose settings could not be read became a zeroed entry indistinguishable from a
valid 0 byte standard data file. FileListElm_t now carries fileSettingsRead and
five consumers honour it: the ISO id mapping loop (positional, an unread file
would shift every id after it onto the wrong file), `hf mfdes chk`'s used-key
set, lsfiles, the application walk print, and `hf mfdes dump`, where settings_ok
was being set true unconditionally.

DesfireFillAppList tested a stale `res` after DesfireGetKeySettings, whose return
value was discarded; only an incidental buflen guard kept it from consuming
garbage key settings.

`hf mfdes sim` now runs through the shared ISO14443-A simulation loop as tag
type 3 rather than a duplicate 14a loop, which had got the ATQA wrong. The
DESFire logic stays in armsrc/desfiresim.c behind a small hook API.

KNOWN, NOT FIXED HERE

DesfireFillAppList reads the DF name list into uint8_t buf[250] while
DesfireCommandEx copies records * 24 bytes. The EV1 limit of 28 applications
would write 672 bytes into it. Harmless at the record counts seen here, but a
stack overflow waiting for a full card.

VERIFICATION

On a fourth card from the same lot (batch B9 0C 17 49 70, week 27 / 2017, EV1 8K,
HW 04010101001A05, SW 04010101041A05): the sequence that killed the third card
now completes, the chained 0xAF is answered 91 00, and the card is healthy
afterwards. The APDU log shows GetDFNames and its continuation carrying no MAC
while the commands either side of them do, confirming the session is dropped and
restored. A full `hf mfdes dump` of three applications (AES, 2TDEA, 3TDEA) and
all five EV1 file types completes and round-trips through the dump format.

Scope: all four cards are from one production lot. This is not established as an
EV1-wide erratum.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 21:50:21 +02:00
iceman1001 52f3225661 parser adaptation 2026-09-14 21:13:52 +02:00
iceman1001 a7b1276781 phase 1 simulation and desfire fixes... 2026-09-14 21:13:10 +02:00
iceman1001 e5a44e1874 fix more parsing 2026-09-14 20:30:15 +02:00
iceman1001 e72bcdb1c0 fix identifyer 2026-09-14 20:04:18 +02:00
iceman1001andClaude Opus 5 (1M context) ee2d55fafb hf mfdes: put a DESFire card image in emulator memory
Adds the on-device card image a DESFire simulation will read, the client
side that packs a dump into it, and eload / esave / eview.

The layout is in include/desfire_em.h. Tables grow up from the header,
file data grows down from the end, and an allocation only has to leave
the two frontiers apart -- so a three-file card spends a few hundred
bytes rather than a worst case, and the space between them is what the
card has left. The PICC is application 000000 and uses the same struct
as any other application, so key settings and keys are always stated
against an AID. Delete sets a tombstone rather than compacting, which is
not a shortcut: a real card does not reclaim on delete either, measured
as 2080 bytes free with zero applications before an experiment and 2560
after FormatPICC.

Two size limits, and a reader only ever sees the first. cardsize is what
the emulated card claims to hold, so GetFreeMem answers from that and
CreateFile will refuse with OUT_OF_EEPROM when it runs out. Without it a
card impersonating a 2K part would report 7434 bytes free, which no 2K
part does. The image size is what emulator memory physically holds, is
the harder limit, and is never visible.

cardsize is anchored to the free memory the real card reported when the
dump was taken -- observed free plus what we reserve for the same content
-- so the emulation answers what its original answered. That is also a
check on the reservation rule rather than only a convenience: for the
bench card it computed 576 bytes spent, and 1984 + 576 is 2560, exactly
what that card reports when formatted.

Reservation follows what CommitTransaction covers. Backup data, value and
record files each get a shadow region because writes to them are staged
until commit; a standard data file writes through and does not. Sizes
round to a 32 byte granule, which is the granule a real card allocates in.
It deliberately does not reproduce NXP's allocator -- that is
undocumented and does not fit a simple model, a declared 1024 byte record
file costs 1088 on silicon -- so what matters is that the figure is
self-consistent and shrinks as the reader writes.

No new device command. Emulator memory is one shared region, so
CMD_HF_MIFARE_EML_MEMSET and BIG_BUF_EML already reach it, and both
inherit the bounds checking those paths gained earlier.

Verified with the client only, no simulation yet: packing a dump taken
from a DESFire EV2 and walking it back reproduces every field including
file contents byte for byte, the same round trip through the device via
eload and esave is identical, and an image too large is refused by name
rather than truncated -- 'Out of emulator memory laying out AID 112233
file 00: needs 4066 more bytes'.

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-14 19:48:45 +02:00
iceman1001 669319b690 update desfire dumpformat to support verison HW,SW,PROD 2026-09-14 19:39:42 +02:00
iceman1001 95f6072e94 minor parse fix for vigik 2026-09-14 19:35:34 +02:00
iceman1001 064f8dd071 added a warning for anti clone counter measures 2026-09-14 18:32:53 +02:00
Niel Nielsen 5f641c6f75 Merge branch 'RfidResearchGroup:master' into master 2026-09-14 16:20:54 +02:00
iceman1001 d2dd2d9f32 text 2026-09-14 14:58:54 +02:00
Niel Nielsen 259f15e7df Merge branch 'RfidResearchGroup:master' into master 2026-09-14 13:11:49 +02:00
iceman1001 8393783548 one more entry in the mad 2026-09-14 12:40:51 +02:00
iceman1001 8f5fd048d3 improve emulator downloads with out of bounds checks 2026-09-14 12:27:06 +02:00
iceman1001 465deeda39 text 2026-09-14 12:24:31 +02:00
iceman1001 aae70014e0 - VIGIK service badge fields now show which ones the RSA signature actually covers 2026-09-14 12:21:47 +02:00
iceman1001 9caa6d6117 minor change we device now reports back EMULATOR memory size to the client. Had to bump capability version number to 11. 2026-09-14 12:16:51 +02:00
iceman1001andClaude Opus 5 (1M context) 6f4643a637 hf mf: add the MAD helpers parseproac needs, and register AID 0x4982
b82f60362 landed parseproac.c without them, so a clean checkout does not
build.

 - mad.c / mad.h: mad_find_aid() and mad_count_aid(); DetectHID() delegates
   to the first, it was already generic
 - mad.json: 0x4982 PROAC, sorted in after NORALSY's 0x4980

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-14 12:13:35 +02:00
iceman1001 b82f603622 urmet parsing 2026-09-14 12:11:42 +02:00
Niel Nielsen 2cbd193d7b Update BLE function comments for clarity and consistency
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-14 11:47:32 +02:00
Niel Nielsen 5922a7112f Update BLE name resolution to use BlueZ mgmt API
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-14 11:47:08 +02:00
iceman1001andClaude Opus 5 (1M context) 82783eae26 hf mf: decode the Hexact payload
Sectors 9 and 11 were printed raw and marked 'not decoded'.

 - remove the XOR keystream and print the ten eight byte records
 - check the eighteen record bytes that are XOR combinations of sector 0,
   sector 15 and the UID, plus three record to record ties
 - 'hf mf view --selftest' now covers the decoder, using a synthetic card
 - sector 15 marker compare ignores case, factory blanks were not matched
 - an all FF or all 00 payload is named, not decrypted
 - sector 15 block 2 is text on a blank, so only read a serial there when
   the first four bytes are not printable

Research. The remaining 58 payload bytes are issuer data and are printed
without interpretation.

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-14 09:19:05 +02:00
iceman1001andClaude Opus 5 (1M context) 8fd9bcbebc hf mfdes: dump a whole card to json, and view it back
'hf mfdes dump' walked one application and printed it. It now walks
every application on the PICC, keeps what it reads, and saves a
'hf-mfdes-<UID>-dump.json' card image. '--aid' / '--isoid' / '--dfname'
still narrow it to one application, '--ns' skips the save.

The format is 'mfdes v1', written and read in fileutils.c and documented
in doc/mfdes_dump_format.md. Two decisions worth stating:

 - The PICC level is application 000000, so every key in the file says
   which AID it opens. Key version and key value are separate: a version
   with no key is the normal shape for a key that was found but never
   recovered, and a missing key never means the key is zero.

 - Every file carries a 'Read' flag. A file whose contents could not be
   fetched is recorded as unread with no data at all, rather than as a
   run of zeros. A simulator built on this must not confuse '8 bytes of
   00' with 'we could not read 8 bytes'.

'hf mfdes view -f <fn>' prints such a file with no device attached.

With no '--keys', the dump looks for 'hf-mfdes-<UID>-keys.json' by
itself, so a 'hf mfdes chk -j' run is picked up on the next dump without
naming the file again.

Two fixes fell out of testing against a DESFire EV2:

 - DesfireSetKey() calls DesfireClearContext(), which wipes command set,
   comm mode, KDF and UID, not just the key. Swapping in a per-application
   key that way left the context at 'Communication mode: n/a' and
   DesfireFillFileList() then returned junk file ids. Use
   DesfireSetKeyNoClear().

 - GetVersion and the originality signature are answered unauthenticated.
   Asking for them from inside the authenticated session produced a
   'Wrong communication mode' warning and a run of MAC mismatches.

hex_to_buffer() treats hex_max_len as a byte count while every sprint_hex*
caller passes sizeof(buf) - 1, a character count, so it writes two or
three times the buffer size. Measured, sprint_hex_inrow overflowed at
4098 input bytes. Doubling UTIL_BUFFER_SIZE_SPRINT to 16384 moves that to
8192; the mixed semantics still need auditing across ~30 call sites.

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-14 09:11:38 +02:00
Niel Nielsen 1b9eb458ec Merge branch 'RfidResearchGroup:master' into esp32-c2 2026-09-13 18:22:48 +02:00
iceman1001 64b5db4ddd text 2026-09-13 18:22:27 +02:00
Niel Nielsen 284e4b385c Refactor BLE error handling and time functions
Refactor BLE error handling to return standard error codes instead of PM3_* constants. Update time-related functions to use a consistent method for obtaining the current time.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 17:58:45 +02:00
Niel Nielsen 583f05198a Add parsehexact.c to CMakeLists.txt
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 17:57:07 +02:00
Niel Nielsen 0a90b714cc Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 17:31:12 +02:00
Niel Nielsen bf703c24ff Merge branch 'RfidResearchGroup:master' into esp32-c2 2026-09-13 17:03:14 +02:00
Niel Nielsen 50e07859e8 Refactor error handling in select function
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 16:25:09 +02:00
iceman1001andClaude Opus 5 (1M context) e19c6755fe hf mf: stop a refused nested auth from hanging autopwn and eating the keys
MifareNested collected nonces in 'while (target_nt[i] == 0)' with no
attempt counter. When the tag NAKs the nested authentication the loop
re-sent the identical frame forever, so the client's 2s wait expired and
autopwn returned PM3_ETIMEOUT — throwing away every key recovered up to
that point. Reported on a card whose sector 16 refuses the standard MFC
EV1 keys: 32 keys cracked, nothing saved.

A NAK is a refusal, not a glitch, so the device now gives up on it and
reports PM3_EWRONGANSWER. autopwn names the sector it skipped and carries
on, and a timeout falls through to the key table and the dump whenever
anything was recovered.

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-13 15:56:41 +02:00
iceman1001 c615ef8930 adapting parser 2026-09-13 15:52:39 +02:00
Niel Nielsen 510767f51e Update return values in ble_posix.h documentation
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 14:54:45 +02:00
Niel Nielsen cdc4d7ad26 Refactor BLE connection error handling and logging
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 14:54:07 +02:00
Niel Nielsen 52fac7ca1b Add parsehexact.c to Makefile build list
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 13:44:42 +02:00
Niel Nielsen ea585bacd6 Fix include directive for dependency files in Makefile
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 13:18:57 +02:00
Niel Nielsen 28daf3e2c4 Enhance BLE capabilities hint and connection logic
Add hints for granting BLE scanning privileges and improve error handling in connection functions.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-13 13:15:40 +02:00
Niel Nielsen 84dd953cf4 Merge branch 'RfidResearchGroup:master' into esp32-c2 2026-09-13 13:12:32 +02:00
iceman1001andClaude Opus 5 (1M context) 66f9a6b51f hf mfdes: report a select/auth failure once, not twice
DesfireSelectAndAuthenticate*() and its callers both printed the same
error at different severities, so every failure came out as two lines.
The core helper now owns the message and names the AID and the step;
the 23 restatements in cmdhfmfdes.c are gone. Same duplicate pair fixed
in cmdhfgallagher.c.

Also: DesfireAuthErrorToStr() falls back to DesfireGetErrorString() for
the PM3_E* codes the select paths pass through, which used to print an
empty reason, and auth error 7 no longer reuses the text of error 1.

Co-Authored-By: Claude Opus 5 (1M context)
2026-09-13 12:58:46 +02:00
iceman1001 7142ddc9bd added hexact parser 2026-09-13 12:55:43 +02:00