Commit Graph
22844 Commits
Author SHA1 Message Date
Paul KilarandClaude Opus 5 f55a960c53 ePassport: keep the personal number caption on one line
"Personal number (from DG13)" renders 203px wide and the caption column is
dp(190), so it wrapped and left the source sitting on a line of its own.
Without the "from" it comes to 167px and fits, with room to spare over the
140px of the longest caption already in that tab.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 14:02:09 -04:00
Iceman 450e3dfaaa Merge pull request #3573 from pkilar/epassport-dg13-pesel
Decode ePassport EF_DG13, and read Poland's PESEL from it
2026-09-02 00:59:36 +07:00
Iceman 4d0280dbb3 Merge branch 'master' into epassport-dg13-pesel
Signed-off-by: Iceman <iceman@iuse.se>
2026-09-02 00:59:23 +07:00
Iceman e1a56dff85 Merge pull request #3574 from pkilar/epassport-disabled-button
Fix ePassport disabled buttons drawing as three bands
2026-09-02 00:58:00 +07:00
Philippe Teuwen 38e0c068d9 A few less hardcoded 40000 samples 2026-09-01 19:54:05 +02:00
Paul KilarandClaude Opus 5 ad016cf6fe ePassport: stop disabled buttons drawing as three bands
Kivy's stock disabled button texture is pale at the edges and dark in the
middle.  Stretched across a wide button the edges stay put and the middle
grows, so it reads as three vertical bands with the label sitting on the
dark one and disappearing - "Delete dump" is unreadable at startup, where
it is disabled because no dump is loaded yet.

Keep the normal background for the disabled state and let the dimmed label
carry it instead.  The text goes to 45% rather than Kivy's 30%, which is
faint on that grey.

Applied as a Button rule because nine buttons across the app bind
disabled: Export, Open folder, the camera button, Samples, the bin button
and the rest all band the same way.  The one button that sets its own
transparent background stays transparent, since background_color
multiplies the texture.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 13:52:24 -04:00
Paul KilarandClaude Opus 5 30b57591c7 ePassport: decode EF_DG13, and read Poland's PESEL from it
A Polish passport carries EF_DG13 and no EF_DG11, so the PERSONAL tab had
nothing to show and the data page fell back to "not on chip", even though
the document does carry a personal number.

DG13 is optional details and ICAO assigns it no meaning, so parse_dg13()
reads it as tagged values and names none of them.  The 5C tag list is
skipped: it enumerates what follows rather than being a field itself.

Poland is the one case worth naming.  It puts the PESEL, its national
identity number, in tag 5F70, and is_pesel() checks the length and the
check digit - DG13 being issuer-defined, the checksum is what separates a
PESEL from eleven digits that happen to share a tag.  That is applied only
when the MRZ nationality is POL, so the same tag on another state's
document is carried but not claimed as a personal number.

It slots in behind the two sources personal_number already had, which its
docstring anticipated: DG11, then the MRZ optional-data field, then this.
personal_number_source reports DG13 so the PERSONAL tab and the data page
can say where the value came from rather than implying DG11.

Confirmed against a Polish passport: the 11 digits validate as a PESEL,
their first six match the MRZ date of birth under PESEL's century-offset
month encoding, and the gender digit agrees with the MRZ sex field.  The
two US documents to hand are unaffected - they keep taking the number from
the MRZ - and a document with none of the three shows no row, as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 13:51:44 -04:00
Iceman 0d8b99b2a1 Merge pull request #3571 from DidierA/aarch64
fixes compile fail on aarch64 (issue #3394)
2026-09-01 23:30:40 +07:00
Iceman 083cd7ac15 Merge pull request #3572 from xianglin1998/improve-sp-send-speed
Improve serialport send speed
2026-09-01 23:30:04 +07:00
Iceman 2da2fda378 Merge pull request #3570 from pkilar/hf14b-wtx-timeout
hf 14b: scale the WTX timeout, not the shift
2026-09-01 23:27:02 +07:00
dxl 02587820fb Optimize serial port transmission speed on Windows. 2026-09-02 00:04:12 +08:00
dxl 3ea93dfc85 Add the xyield macro function to yield the CPU. 2026-09-02 00:02:14 +08:00
Philippe Teuwen 0cde2124c8 Replace pm3_max_cmd_data_size() by g_conn.max_cmd_data_size 2026-09-01 17:58:14 +02:00
Philippe Teuwen b69fa20233 Precompute max_cmd_data_size in TestProxmark 2026-09-01 17:58:07 +02:00
Niel Nielsen c22d2a7894 make style
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 37479f04b1 make style
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen ee22d0712e make style
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 9e1b63edce make style
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen ef0b357c7a Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen f8a0ed0096 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 769dc479c2 Conditionalize PM3_CMD_DATA_SIZE based on device
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen d0261484af Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen db35ed4854 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen e25bae7032 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen a410d2c252 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 8a68a1cc88 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 23175240e8 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 9df1c62ec5 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 3628681a50 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 8de138380b Delete client/src/mifarehost.c
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 6b2b6f2bb1 Fix remaining PM3_CMD_DATA_SIZE
100 array declarations uint8_t x[PM3_CMD_DATA_SIZE]
21 receive sites — GetFromDevice, APDU/smartcard response buffers

All in a days work

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen fa8a7da45d Fixed missing arrays
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 9f0171a706 Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 8ad242ad74 Add stack size definition to ldscript for AT32
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen d99fc10609 Limit KEYS_IN_BLOCK to a maximum of 255
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen c521e9f641 Remove KEYS_IN_BLOCK definition
Removed the definition of KEYS_IN_BLOCK from mifaredefault.h.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen dbadc2b8e0 Update MFC_CHKKEYS_FAST_MAX_KEYS definition
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen 2059eba7fa Add KEYS_IN_BLOCK definition to mifaredefault.h
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Niel Nielsen d8537a1a6c Conditionalize PM3_CMD_DATA_SIZE based on device
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-01 17:57:31 +02:00
Paul KilarandClaude Opus 5 1a6255ad84 hf 14b: scale the WTX timeout, do not scale the shift
A card that needs longer than FWT to answer replies with S(WTX) carrying a
multiplier, and ISO 14443-4 has the timeout become FWT * WTXM for that
exchange. iso14443b_apdu() multiplied the shift instead:

    uint32_t fwt_temp = (s_iso14b_fwt * wtxm);
    iso14b_set_timeout((32 << fwt_temp));

(32 << fwi) is the FWT in ETUs - the form iso14b_set_fwt() uses, and the
one the client prints in hf 14b info - so this computed 32 << (fwi * wtxm).
With the fwi of 8 that a passport reports, wtxm 1 happens to come out
right, wtxm 2 is 256 times too long, and wtxm 4 shifts a uint32_t by 32.
That is undefined, and on ARM it leaves 0, so the read that follows gives
up before the card has answered and the client reports

    APDU: no APDU response

Found on a Polish ePassport that would not read. Every short command
answered - SELECT, an unsupported instruction, a malformed MSE - and only
MSE:Set AT with P1P2 C1A4 was silent, which is the one command in the
exchange that starts the PACE ECDH setup and so the only one that ever
asks for more time. Older passports read because they ask for a smaller
multiplier, where the wrong formula still produces a usable number.

Tested on RDV4 against that document: the MSE:Set AT that returned nothing
now answers 9000, and hf emrtd dump completes in 3 seconds with PACE
(ECDH, Generic Mapping, 3DES-CBC-CBC, NIST P-256), every data group read
and every EF_SOD hash matching.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 11:34:40 -04:00
didierA d987c3aab8 fixes compile fail on aarch64 (issue #3394) 2026-09-01 17:27:42 +02:00
iceman1001 12a890f444 text 2026-09-01 16:24:46 +02:00
iceman1001 89b1de6526 user supplied keys was not taken in consideration and also it left the field on 2026-09-01 16:17:35 +02:00
YoungJules 6bc39ff78c Fix pm3line fallback for ProxSpace/MinGW builds 2026-09-01 14:20:12 +02:00
Philippe Teuwen 18aed4eaa4 spurious hidden char 2026-09-01 14:09:49 +02:00
Philippe Teuwen 3ed5792b23 fix doc link 2026-09-01 14:07:12 +02:00
iceman1001 81a6f3bf3d style 2026-09-01 13:34:23 +02:00
iceman1001 be88db1b54 move clock 2026-09-01 13:34:02 +02:00
iceman1001 b65017ceaf move clocks 2026-09-01 13:32:49 +02:00
iceman1001 2fc7f81a4a fix PM3_GENERIC builds. dont compile SAM-sim module things 2026-09-01 13:30:04 +02:00