Commit Graph

6661 Commits

Author SHA1 Message Date
kormax d06106b538 Add 'hf calypso info' command 2026-05-01 22:41:42 +03:00
Iceman b5e3fed77f Merge pull request #3276 from kormax/duox-cleanup
DUOX-related cleanup
2026-04-30 17:22:51 +07:00
kormax bf6458171a Add identification of known AID names for DESFire 2026-04-29 21:31:02 +03:00
kormax e8dcd666e2 Add MFD app selection helpers 2026-04-28 21:26:16 +03:00
kormax 5fe1d1ddc8 Use LEAF root key from file 2026-04-28 17:30:25 +03:00
kormax f5328cece3 Minor desfire AID parsing code dedupe 2026-04-28 16:59:22 +03:00
kormax 63848f24ea Add pcrypto_rng_fill_oneshot util 2026-04-28 16:55:03 +03:00
Iceman 8ff8479c18 Merge pull request #3271 from pcunning/leaf
Leaf Verified Open Application Read/Verify
2026-04-28 08:21:02 +07:00
kormax 3492896feb Add 'felica_ic_code_list.json' file for FeliCa IC code reference 2026-04-27 21:22:26 +03:00
Patrick Cunningham 32619bb4a6 update text 2026-04-26 18:25:46 -07:00
Patrick Cunningham b0af0a80cc refactor shared code
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 17:47:40 -07:00
Patrick Cunningham efc3a23c52 working leaf read/verify
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 15:59:04 -07:00
iceman1001 a94dcff3d3 text 2026-04-26 20:39:32 +07:00
iceman1001 045c0072a8 text 2026-04-26 20:25:27 +07:00
lolbird 6d61352fc8 allow specifying data tag with hf seos write
Signed-off-by: lolbird <65594081+lolbird123@users.noreply.github.com>
2026-04-26 12:56:44 +00:00
Iceman cc56e9a756 Merge pull request #3265 from sco3/master
The fob with raw 00000000000009xxxxxxxxx9 cannot be written with lf hid clone -r
2026-04-26 16:11:44 +07:00
Iceman fc381b0571 Merge pull request #3268 from kormax/felica-info-speedup
Speedup 'hf felica info' by introducing block read cache, skipping commands for FeliCa lite
2026-04-26 10:09:26 +07:00
kormax c37fb81242 Speedup 'hf felica info' by introducing block read cache, skipping commands for FeliCa lite 2026-04-25 21:07:37 +03:00
kormax 226f049599 Make clearing the trace an explicit flag in FeliCa module 2026-04-25 20:26:44 +03:00
Dima Zakharov cb0d013213 works for my fob 2026-04-25 16:19:37 +01:00
kormax a46cf9f291 Add 'hf mfdes vdesign' command 2026-04-24 21:17:03 +03:00
Joe Rozner 73799a6c69 Raise simaid selectaid_response cap to 256
The selectaid_response buffer in `hf 14a simaid` was capped at 100
bytes, which is well below the ISO 14443A frame maximum of 256 bytes
and prevents users from emulating tags whose SELECT AID response is
larger than a trivial status word.

This bumps selectaid_response from 100 to 256 in all three locations
(ARM packet handler, client locals, client payload struct) along with
the argparse help text. getdata_response is left at 100. The payload
struct overlays PM3_CMD_DATA_SIZE (512) via packet->data.asBytes;
with the new sizes it totals 435 bytes, so it still fits.

Pairs with the earlier tosend bounds check / DYNAMIC_MODULATION_BUFFER2
fix, which raised the actual transmit ceiling to the 256-byte frame
limit — this change lets callers supply a response up to that limit.
2026-04-22 23:38:18 -07:00
Antiklesys bf8c2faf6e Update cipher_bs_avx512.c
Updated comments
2026-04-22 16:34:10 +08:00
Iceman 0a8b475b48 Merge pull request #3257 from Antiklesys/master
Update cipher_bs_avx512.c
2026-04-22 08:18:23 +07:00
iceman1001 eecf447b57 text 2026-04-22 08:17:03 +07:00
iceman1001 46bd7b9631 bad strings 2026-04-22 06:41:01 +07:00
Antiklesys bf27cb673c Update cipher_bs_avx512.c
Pushing a potential fix for https://github.com/RfidResearchGroup/proxmark3/issues/3250

Use the masked variant with an explicit zero source. _mm512_maskz_andnot_epi32(0xFFFF, a, b) is semantically identical to _mm512_andnot_si512(a, b) but goes through a different code path that takes a proper src argument instead of calling _mm512_undefined_epi32(). No uninitialized read, no warning, single instruction.
It compiles to the exact same single vpandnd instruction as _mm512_andnot_si512. The all-ones mask is resolved at compile time and folded away — the encoder just emits the unmasked form. Zero cycle difference, zero code-size difference.
2026-04-21 15:06:12 +08:00
iceman1001 7c0f9d0991 ai and their love for emdash or utf characters 2026-04-21 13:26:34 +07:00
iceman1001 3cf1dbb5fb text 2026-04-21 13:22:11 +07:00
iceman1001 eb54497704 added the command "hf iclass liberate" , it checks for drm markers and removes them, thus liberates them. Now if someone wants to make drm tags, they can easily just make a "hf iclass drm" command with the reverse of this command 2026-04-21 11:17:11 +07:00
kormax e604aaa857 Print DFC and ARB value for FeliCa lite system in 'hf felica info' 2026-04-20 21:19:22 +03:00
iceman1001 0e2f546707 style 2026-04-20 09:15:40 +07:00
iceman1001 a0b77b23e5 style 2026-04-20 09:14:51 +07:00
team-orangeBlue 12ea3f087c Bodge: fix mfpreadsector
Looks like either I, or someone else, has never thought about encrypted mode enforcement in mfpreadsector.

Now during readouts data is decrypted on the fly.
Checked on real tag.

Signed-off-by: team-orangeBlue <63470411+team-orangeBlue@users.noreply.github.com>
2026-04-19 22:34:45 +03:00
Antiklesys 9a46fd7301 Update hf iclass legbrute progress counter
Freeing up additional cpu cycles and increasing speed by reducing print statement frequency.
2026-04-19 21:05:27 +08:00
kormax 072b82bb8e Implement block-data-based service detection in 'hf felica info' 2026-04-19 11:58:37 +03:00
iceman1001 69f40df005 unified some minor hint text messages. added a ndef detection to hf mfu dump, hf mfu view, hf mfu eview in order to suggest that there is actually a ndefmessage 2026-04-19 08:52:16 +07:00
Iceman ba22b7e4ef Merge pull request #3247 from kormax/felica-info-service-detection
Add detection of nested services present on a FeliCa system
2026-04-19 06:06:13 +07:00
Iceman 5e6b208c42 Merge pull request #3246 from kormax/duox-internal-auth
Implement DUOX internal authentication
2026-04-19 06:05:26 +07:00
kormax 141c21749a Add per-system inner service discovery to 'hf felica info' 2026-04-18 20:05:42 +03:00
kormax 6a4ed240b4 Implement 'hf mfdes intauth' command 2026-04-17 20:39:38 +03:00
Antiklesys 5f08a3073a Update hf iclass encode to accept -k and not just --ki 2026-04-17 16:43:30 +08:00
Iceman d3fa7fd681 Merge pull request #3244 from kormax/pcrypto-ensure-ec-pubkey
Add crypto helper methods for loading public EC keys of various formats
2026-04-17 04:20:14 +07:00
Iceman 766c04647c Merge pull request #3243 from Antiklesys/master
Fix for circular buffer error during hf iclass sim
2026-04-17 04:19:37 +07:00
kormax 67db3b15c6 Support compressed public EC points 2026-04-16 23:57:30 +03:00
kormax f99af1b706 Add crypto helper methods for loading public EC keys of various formats 2026-04-16 23:30:37 +03:00
Antiklesys 0ffe244a6b Fix for circular buffer error during hf iclass sim
Issue origin:
Commit 6b7665ed5 "Added live fc/cn update to hf iclass tagsim" added a data_available() poll inside the per-byte DMA loop of GetIso15693CommandFromReader so the ARM could drop out of RF-listen and process live emulator updates.

Before that commit, that tight loop had no USB poll at all — only gotFrame / BUTTON_PRESS / WDT_HIT. Verified via git show 6b7665ed5^:armsrc/iso15693.c.

Why it shows up on sim -t 3/6/7: those are the FULL sim modes that share do_iclass_simulation. Between reader commands the decoder sits in STATE_READER_UNSYNCD, so the gated poll at iso15693.c:1570-1575 fires every byte (reading UDP peripheral registers). With DMA filling at ~1 byte / ~19 µs, the added USB register reads plus jitter occasionally push the CPU past the 90% lag threshold → behindBy 461 with DMA_BUFFER_SIZE=512.

Commit fb8f94fa2 narrowed the gate to UNSYNCD to stop mid-frame exits, but the per-byte poll itself is still what's new on that path.

Fix:

New mode constant in include/iclass_cmd.h:

#define ICLASS_SIM_MODE_FULL_LIVE  8  // FULL + allow USB interrupt for live emul updates
Treat it identically to ICLASS_SIM_MODE_FULL everywhere except for the poll gate.

Add a flag param to GetIso15693CommandFromReader — e.g. bool allow_usb_interrupt in iso15693.c:1495 and iso15693.h:42. Wrap the poll:

if (allow_usb_interrupt &&
    (dr->state == STATE_READER_UNSYNCD ||
     dr->state == STATE_READER_AWAIT_1ST_FALLING_EDGE_OF_SOF) &&
     data_available()) { ... }
Pass true only for live mode in do_iclass_simulation iclass.c:502:

bool live = (simulationMode == ICLASS_SIM_MODE_FULL_LIVE);
len = GetIso15693CommandFromReader(receivedCmd, MAX_FRAME_SIZE, &reader_eof_time, live);
The len == -2 drain block stays but becomes dead code for non-live modes (never returns -2).

Client side: cmdhficlass.c:1687 (CmdHFiClassTagSim) sends ICLASS_SIM_MODE_FULL_LIVE. CmdHFiClassSim -t 3/6/7 keeps sending ICLASS_SIM_MODE_FULL / _GLITCH / _GLITCH_KEY.

Other callers (iso15693.c:2270, iclass.c:1121 = reader-attack sim) pass false.

Result:

hf iclass sim -t 3/6/7 → byte-inner loop is back to its pre-tagsim shape → no blow-buffer abort.
hf iclass tagsim → keeps live update ability; still has the overhead, but that's the trade-off the feature needs.
2026-04-17 03:00:14 +08:00
kormax 4a2e161954 Move common functions related to Mifare GetVersion to a dedicated Mifare Prime module 2026-04-16 18:55:34 +03:00
kormax 6c26f11034 Parse I2C protocol support for Mifare Prime GetVersion 2026-04-16 18:34:58 +03:00
Iceman b7d41079d2 Merge pull request #3240 from kormax/felica-info-heuristics
Increase speed of 'hf felica info' through heuristics
2026-04-16 06:54:56 +07:00