feat(emv): add EMV terminal emulator (lab research tool)#3385
feat(emv): add EMV terminal emulator (lab research tool)#3385andrew867 wants to merge 36 commits into
Conversation
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
##⚠️ FOR RESEARCH AND LAB USE ONLY — NO WARRANTY — PROVIDED AS-IS This PR adds a complete **EMV payment terminal emulator** (`emv terminal`) to the Proxmark3 Iceman client. It is **not** a certified payment terminal and must only be used with **authorized EMV test cards** in a lab environment. **Required reading before use:** - [docs/emv-terminal-emulator/README.md](docs/emv-terminal-emulator/README.md) — legal disclaimer and overview - [docs/emv-terminal-emulator/OPERATOR-GUIDE.md](docs/emv-terminal-emulator/OPERATOR-GUIDE.md) — day-to-day commands and workflows - [docs/emv-terminal-emulator/SPEC-security-privacy.md](docs/emv-terminal-emulator/SPEC-security-privacy.md) — PIN handling, redaction, threat model --- ## Summary Client-side terminal phase engine under `client/src/emv/terminal/` implementing EMV Book 3 phases: init → ODA → restrictions → CVM → TRM → TAA → CAA → online → complete. Includes host simulator (ARQC/ARPC), multi-scheme profiles, golden CI (no USB), session export/redaction, mock APDU replay, TCP mock acquirer, Lua bindings, PCAP trace export, and legal-use banner. **Code location:** `client/src/emv/terminal/` (~40 modules) **Docs:** `docs/emv-terminal-emulator/` (specs, operator guide, test plans) **Fixtures:** `client/src/emv/test/fixtures/` (6 golden fixtures) --- ## MVP (M1–M6) — Terminal phase pipeline | Feature | Command / module | |---------|------------------| | Full phase loop | `emv terminal run` | | Single phase debug | `emv terminal step <phase>` | | ODA (SDA/DDA/fDDA/CDA paths) | `phase_oda.c` | | CVM — offline plain + enciphered PIN | `phase_cvm.c`, `emv terminal pin` | | Restrictions + TRM + TAA | `phase_restrict.c`, `phase_trm.c`, `phase_taa.c` | | Generate AC (CAA) | `phase_caa.c` | | Online lab stub (EXTERNAL AUTH + AC2) | `emv terminal online`, `phase_online.c` | | Issuer script tag 71 (pre-AC2) | `phase_scripts.c` | | Session JSON export | `emv_term_session.c` | | Load card TLV from scan JSON | `emv terminal load` | | Terminal profile validate | `emv terminal profile validate` | | Contactless + contact (`-w`) | `iso7816core.c` | --- ## Wave A (M7–M9) — Host-sim, schemes, golden CI | Feature | Details | |---------|---------| | **F-001 Host simulator** | `emv terminal host-sim`, `--host-sim`, `--host-keys` | | **F-011 ARQC verify** | 3DES CVN18 retail MAC, pass/fail logging (`emv_term_arqc.c`) | | **F-038 CDOL2 injection** | CDOL1 stashed before GEN AC1 for host verification | | **F-002 Scheme profiles** | `--profile auto\|interac\|visa\|mc` (`emv_term_scheme.c`) | | **F-036 Auto-detect AID** | AID prefix → profile mapping | | **F-015 Kernel hints** | TTQ, TAC overrides, Interac contactless policy | | **F-024 Kernel dispatcher** | Visa vs MC path before TAA | | **F-016 Mock APDU** | `--mock-apdu-file` JSON replay in `Iso7816ExchangeEx` | | **F-017 Golden fixtures** | `emv terminal test --golden` / `--fixture <name>` | | **F-032 Batch regression** | 6/6 fixtures, no USB required | Resources: `client/resources/scheme_profiles/`, `host_sim_interac.json` --- ## Wave B (M10–M12) — CVM, session UX, ODA/risk | Feature | Details | |---------|---------| | **F-003 Online PIN CVM** | Online PIN block stash for host/CDOL; `--cvm-skip-online` | | **F-006 Interactive PIN** | `emv terminal pin --prompt` (TTY) | | **F-029 PIN zeroization** | Secure zeroize after VERIFY; `emv test --pin-audit` | | **F-040 Interac flash PIN skip** | Contactless flash CVM skip matrix | | **F-004 Issuer script 72** | Post-AC2 script processing (`phase_scripts.c`) | | **F-037 Multi-record script 86** | Chained issuer script templates | | **F-010 Session pretty-print** | `emv terminal session print` (TVR bit decode) | | **F-005 Session merge** | `emv terminal session merge scan + session` | | **F-028 Session redaction** | Default crypto/PAN masking; `--no-redact` (lab only) | | **F-005 Full TLV export** | `--full-tlv` embeds Card.TLV snapshot | | **F-012 Extra CAPKs** | `--capk-extra` merged at ODA init | | **F-026 Terminal CDA verify** | CDA verification tracking in session JSON | | **F-014 Exception file** | `--exception-file` PAN blocklist → TAA denial | CLI: `--exception-file`, `--capk-extra`, `--no-redact`, `--full-tlv` --- ## Wave C (M13) — Integration layer | Feature | Details | |---------|---------| | **F-019 emv sim bridge** | `emv terminal export-sim`, `run --export-sim` | | **F-023 TCP mock acquirer** | `emv terminal host listen`, `run --host-tcp` | | **F-020 Lua API** | `emv_terminal_run/step/session_load/save/export_sim` globals | | **F-021 Reader alignment** | `emv reader --terminal-session`, `--terminal-compare` | | **F-022 Contact path** | ATR capture → `Terminal.ATR`; smartcard contact | | **F-025 MSD branch** | Explicit MSD path in CAA phase | Demo: `client/luascripts/emv_terminal_demo.lua` --- ## Wave D (M14) — Trace, replay, polish | Feature | Details | |---------|---------| | **F-030 Legal banner** | First-run warning; `~/.proxmark3/emv_terminal_ack`; `EMV_TERMINAL_I_ACK=1` for CI | | **F-031 PCAP export** | `--pcap-out trace.pcap` (Wireshark linktype 265); PIN redaction | | **F-033 Transaction replay** | `emv terminal replay mock.json --from-phase cvm [--to-phase]` | | **F-035 Phase timing** | `--timing-report` → `Phases[].duration_ms` + summary line | | **F-039 Capabilities** | `emv terminal capabilities` (works offline) | Format doc: [doc/emv_pcap_format.md](doc/emv_pcap_format.md) --- ## Command tree (v2) ```text emv terminal ├── run / step / online / pin ├── profile (print | validate) ├── load ├── session (print | merge | export) ├── host (listen | sim) / host-sim ├── export-sim ├── test (--golden | --fixture) ├── replay ├── capabilities └── help ``` --- ## Documentation bundle | Document | Purpose | |----------|---------| | [README.md](docs/emv-terminal-emulator/README.md) | Overview + legal disclaimer | | [OPERATOR-GUIDE.md](docs/emv-terminal-emulator/OPERATOR-GUIDE.md) | Lab workflows | | [UPSTREAM-MERGE.md](docs/emv-terminal-emulator/UPSTREAM-MERGE.md) | Merge / upstream notes | | [FEATURE-CATALOG-v2.md](docs/emv-terminal-emulator/FEATURE-CATALOG-v2.md) | F-001–F-040 index | | [SPEC-v2-*.md](docs/emv-terminal-emulator/) | 10 technical specs | | [TEST-PLAN-v2-*.md](docs/emv-terminal-emulator/) | Manual + automated test IDs | | [doc/emv_notes.md](doc/emv_notes.md) | EMV command inventory (updated) | --- ## Testing (no hardware required) ```bash CC=gcc make -C client ./pm3 --offline -c 'emv test' ./pm3 --offline -c 'emv terminal test --golden' ./pm3 --offline -c 'emv terminal capabilities' ``` **Golden fixtures (6/6):** `taa_denial_expired`, `host_arqc_cvn18`, `scheme_auto_interac`, `scheme_profile_interac`, `restrict_exception_denial`, `cvm_online_pin` **Unit tests added:** `terminal_host_test`, `terminal_cvm_test`, `terminal_exception_test`, `terminal_sim_export_test`, `terminal_pcap_test`, `terminal_replay_test`, `terminal_taa_test` --- ## Known gaps / deferred - **F-027** Firmware WTX timing assist — deferred until hardware timing failure measured - **F-018** PM3Easy 256 KB firmware CI job — not validated in this PR - **F-009** Full APDU parity diff (`emv terminal compare`) — partial via reader compare - No EMVCo kernel certification path (lab/research tool only) - Contact chip requires smartcard hardware mod
|
Would love some input, if anyone is able to test this, and if there is anything missing or think should be changed I'm all ears! :) |
* fix(emv): auto-activate HF field for contactless terminal transactions emv terminal run previously required -s to activate the RF field before sending APDUs. Without it, PPSE/AID search failed with PM3_EIO (-8) and spammed 'Field currently inactive' across the entire AID list. - Prepare contactless reader session at transaction init (like emv scan) - Fail fast in EMVSearch when the field is inactive - Improve inactive-field error hint for operators Co-authored-by: andrew867 <andrew867@users.noreply.github.com> * fix(emv): auto-activate HF field across all contactless EMV commands Add shared EMVPrepareContactless() and use it in search/select/pse, gpo/readrec/genac/challenge/intauth, roca, and terminal pin/online/step phases. Skips when offline (no PM3) or ISO-DEP session is already active. - Refactor terminal transaction init to use shared helper - Fail fast in EMVSearch on PM3_EIO (inactive field) - Update search help text for auto field activation Co-authored-by: andrew867 <andrew867@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- Poll for card presence by default (like hf 14a reader -w); --nowait for instant fail - Always force fresh HF reconnect on search so re-presenting a card works - Remove kbd_enter_pressed abort inside AID loop (spurious Enter broke search) - Try PPSE first, fall back to AID brute-force; report when nothing found - Show UID on connect and applet count on success Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
CmdEMVTerminalStep passed wrong argtable indices to parse_common_exec_args and subsequent arg_get_* calls. wired_idx pointed at --session (arg_str0), so arg_get_lit dereferenced the wrong structure and segfaulted on `emv terminal step init`. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- Read Terminal Capabilities (9F33) from ctx->terminal with card fallback - Init transaction params on terminal tree; sync to card for PDOL/DOL - Scheme profiles load to terminal tree and copy to card - Decode and dump CVM List (8E); warn on contactless offline PIN - Improve emv terminal pin: diagnostics, AID re-select, session TLV restore - Add emv terminal probe for GET DATA enumeration (--sweep for extended tags) - Session load restores Card.TLV snapshots when exported with --full-tlv Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- emv terminal cvm: decode 9F33/8E/AIP without VERIFY by default - Optional --run (full CVM phase) or --verify (standalone VERIFY) - emv terminal probe --records: READ RECORD sweep from AFL with tag summary - probe -t TLV-decodes records; highlights key tags after init - Shared emv_term_prepare_card helper for session or live init Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- emv terminal crypto: run, genac, genac2, vary, challenge, intauth, checksum - Field overrides: --amount, --un, --decision aac|tc|arqc, --cda - JSON export with Runs[] for vary sweeps; summary from session or live init - SPEC-crypto-playground.md and TEST-PLAN-crypto-playground.md - Offline tests in terminal_crypto_test.c; fix terminal→card TLV sync Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- Fix 9F1A/5F2A defaults (was ASCII ru and mangled 0x9078 from bad hex escape) - Add CDOL1 fields 9F03, 9F21, 9F34, 9F45, 9F7C; set 9A/9F21 from clock - Auto-load bundled emv_terminal_profile.json on every transaction init - Crypto: qVSDC path when AC is in GPO (no CDOL1); refresh terminal tags before DOL - Crypto: auto CDA P1 for Mastercard when AIP supports CDA; SW hints for 6700/6985 - EMVAC: retry without Le on 6700/6F00 (like GET CHALLENGE) - Improve AFL read-record error logging Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- Parse GPO format 2 (77) and hoist 9F26/9F27/9F36 to card context - Visa qVSDC: re-GPO with TTQ 26800000 to request AC when no CDOL1 - Crypto run: always force fresh contactless reconnect and wait for card - Treat qVSDC without GEN AC as success (not init failure) - Randomize 9F37 UN after profile load Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Add human-readable crypto run digest (--summary), standalone digest and compare subcommands, quick AFL mode to avoid deep record timeouts, forced --aid selection, and automatic PPSE AID fallback when priority-01 app lacks CDOL1. Multi-AID PPSE selection is sorted by priority. Includes Visa MSD track summary, enhanced export JSON fields, and offline tests for digest/compare. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
…s-4eaf feat(emv): crypto digest, compare, quick AFL, and AID fallback
… E–F Update UPSTREAM-MERGE.md with crypto playground and contactless reliability milestones, checklist status, and hardware smoke commands. Extend CHANGELOG entries for digest/compare/quick AFL/AID fallback. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
-o/--session/--aid strings were used after CLIParserFree, so export could write to a dangling pointer (often showing profile JSON in the error). Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
emv terminal crypto rng mixes live AC/ATC/UN/IAD (and MC challenge) across multiple GEN AC samples, sha256-stirred. Supports --dice, --coin, and --max for playful lab use on cards with CDOL1 or qVSDC GPO AC. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- Only mix fresh cryptograms when SW=9000 and AC/ATC changed - Reject duplicate/stale AC after 6985/6A86 instead of reusing TLV - Parse GEN AC format-2 (0x77) responses like GPO does - Fix sprint_hex double-call showing ATC as AC in sample lines - Default --samples to 1 (most cards allow one GEN AC per tap) - Clear prior cryptogram tags before each sample attempt Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Add --stream flag that waits for repeated card taps and writes raw SHA-256 entropy bytes to stdout (status on stderr). Suppresses PM3 console output during each tap so pipes stay binary-clean. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
- --stream writes continuous lowercase hex to stdout (no status lines) - --stream-raw for binary pipe; Enter stops the loop - After first tap: skip PPSE, cached AID + GPO + quick AFL only - Field off/on via 25ms poll instead of full transaction init each block - Skip profile reload, PAN extract, and ODA list on fast re-tap path Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Auto-enable stdout_pipe when -c command contains --stream (or --stdio-pipe flag): route all client logs to stderr, suppress prompt echo and session log on stdout, silent device open, unbuffered hex. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Cache CDOL1 after first tap and skip AFL reads on re-cycle; stop quick AFL at CDOL1; burst field re-poll (4ms); skip MC GET CHALLENGE; default 1 hex byte per block for display use. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
…wdowns Turbo was slower in practice: forced 1-byte output (8x less throughput), disabled MC GET CHALLENGE (more failed GEN ACs), burst field polling, and gated fast-init on cache validity. Stream now always uses fast re-init + CDOL cache when possible, 0ms poll backoff with card present, and keeps default 8 bytes. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Add --bench with configurable --seconds (default 30) to measure field-cycle throughput on a held card: blocks/s, bytes/s, and min/avg/p50/p95/max latency per successful cycle. Optional -o JSON export captures card fingerprint (AID, vendor, path, AIP, label, PAN last 4) for comparing issuers and chip families. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Lazy PIN resolution in phase_cvm_run: only prompt on contact offline VERIFY when --pin/EMV_TEST_PIN absent. Skip prompt when AIP lacks CVM support, contactless offline PIN rules, or enciphered offline without 9F2D. Add SPEC/TEST-PLAN for card timing benchmarks (RNG --bench + terminal --timing-report) and offline CVM regression tests. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Set stdout _IONBF at RNG stream start (plus fflush per block) so piped hex arrives immediately. Add --stream-out to write raw RNG bytes with per-block fflush for live entropy analysis; works alongside hex/raw stdout. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
|
Added a bunch of extra features including timing benchmarks, support to use an EMV card as a PRNG source among other fixes and additions. Though completely unproven, initial testing looks promising from an old Mastercard prepaid card, so it's either actually random or a crypto algorithm output that seems very random. I personally do not have a hardware modded PM3Easy for contact cards so if anyone is able to test those functions including offline PIN verification that would be amazing! I do not have any cards that support this over contactless, and have never seen it in use. Usually the terminals here in Canada will display "please insert card" after card present if PIN verification is required, at least for Interac when PIN verification is successful the card will reset the transaction amount/counter for contactless. Also an interesting note, when cards in Canada are mailed out they either have a pre-assigned PIN mailed separately, or will support using your previous PIN automatically. Upon first use the card will block contactless, and on first approved/successful transaction the merchant/bank side sends an update command to the card and it will update its internal PIN. Usually credit cards have a separate mailed PIN while Interac/debit will support bank side verification/card updating through the terminal. Happy Hacking and do no harm! |
|
Wow. It is very impressive gigantic pull request. I am surprised you got it all done. This one will take time to analyse though. And by the looks of it its a massive improvement for EMV support. wow! |
| if (have_session && *have_session) { | ||
| res = emv_transaction_crypto_fast_init(ctx); | ||
| if (res) { | ||
| if (have_session) { |
|
First the GH actions shows build failure on multiple platforms. This must be addressed first |
Thanks for the review so far! Haven't been able to test the contact card implementation or Amex/JCB/Discover, only contactless with MC/Visa and Interac cards. If you have access to other cards to verify the old EMV commands are working as expected, a bunch of them didn't seem to properly select the card before attempting communication. This may work for a contact card after INIT and power left on, but obv would not work for contactless. Just finishing off work on another project and will poke at this tonight to get green for actions and fix the security issues that had been found. |
|
The rdv4 sim module has a limitation on voltage supplied for card. the 5v cards will not work with 3v3 But if its possible to break down this PR to smaller pull requests then it would be so much easier. like make one with documentation. one with all the extra / new resources files. and we get to smaller and smaller PR. |
Sync client/CMakeLists.txt and client/experimental_lib/CMakeLists.txt with the Makefile EMV terminal source list so cmake-linked binaries resolve CmdEMVTerminal and related symbols. Guard pm3_enable_stdout_pipe() with LIBPM3 so experimental shared-library builds compile with -Werror. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Windows ProxSpace builds use -fexec-charset=cp850. Em dashes, arrows, and box-drawing characters in string literals fail compilation. Use ASCII hyphens and arrows in user-facing log/help strings. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
CMake builds run proxmark3 from client/build/. Symlink resources/ and dictionaries/ alongside existing script symlinks so offline tests find profiles, host keys, and dictionary files. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Relocate docs/emv-terminal-emulator/ to doc/planning/emv-terminal-emulator/. Ship runtime example JSON in client/resources/ and resolve paths via RESOURCES_SUBDIR instead of docs/examples fallbacks. Ignore top-level docs/. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Parse optional profile file path from nested emv terminal profile commands. Fix inverted host-keys load test guard. Update offline test commands. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Add UPSTREAM-PR-SPLIT-PLAN.md aligned with maintainer feedback (docs, resources, then smaller code PRs). Configure CodeQL paths-ignore and query-filters for EMV lab interop crypto. Note RDV4 3.3V limitation in operator guide. Allow .github/codeql in gitignore. Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Do you recall if there's extra pins on the pm3/pm3easy to do a mod with level shifters? On the RDV4 is it a populated header on the board or more difficult mod? If it's as simple as connecting to unused pins I'll have a look at doing it on my pm3easy. Working on the split PRs, it will be five as it was quite large and should be easier to review with two PRs for the UI code |
Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
Co-authored-by: andrew867 <andrew867@users.noreply.github.com>
This PR adds a complete EMV payment terminal emulator (
emv terminal) to the Proxmark3 Iceman client. It is not a certified payment terminal and must only be used with authorized EMV test cards in a lab environment.Required reading before use:
Summary
Client-side terminal phase engine under
client/src/emv/terminal/implementing EMV Book 3 phases: init → ODA → restrictions → CVM → TRM → TAA → CAA → online → complete. Includes host simulator (ARQC/ARPC), multi-scheme profiles, golden CI (no USB), session export/redaction, mock APDU replay, TCP mock acquirer, Lua bindings, PCAP trace export, and legal-use banner.Code location:
client/src/emv/terminal/(~40 modules)Docs:
docs/emv-terminal-emulator/(specs, operator guide, test plans)Fixtures:
client/src/emv/test/fixtures/(6 golden fixtures)MVP (M1–M6) — Terminal phase pipeline
emv terminal runemv terminal step <phase>phase_oda.cphase_cvm.c,emv terminal pinphase_restrict.c,phase_trm.c,phase_taa.cphase_caa.cemv terminal online,phase_online.cphase_scripts.cemv_term_session.cemv terminal loademv terminal profile validate-w)iso7816core.cWave A (M7–M9) — Host-sim, schemes, golden CI
emv terminal host-sim,--host-sim,--host-keysemv_term_arqc.c)--profile auto|interac|visa|mc(emv_term_scheme.c)--mock-apdu-fileJSON replay inIso7816ExchangeExemv terminal test --golden/--fixture <name>Resources:
client/resources/scheme_profiles/,host_sim_interac.jsonWave B (M10–M12) — CVM, session UX, ODA/risk
--cvm-skip-onlineemv terminal pin --prompt(TTY)emv test --pin-auditphase_scripts.c)emv terminal session print(TVR bit decode)emv terminal session merge scan + session--no-redact(lab only)--full-tlvembeds Card.TLV snapshot--capk-extramerged at ODA init--exception-filePAN blocklist → TAA denialCLI:
--exception-file,--capk-extra,--no-redact,--full-tlvWave C (M13) — Integration layer
emv terminal export-sim,run --export-simemv terminal host listen,run --host-tcpemv_terminal_run/step/session_load/save/export_simglobalsemv reader --terminal-session,--terminal-compareTerminal.ATR; smartcard contactDemo:
client/luascripts/emv_terminal_demo.luaWave D (M14) — Trace, replay, polish
~/.proxmark3/emv_terminal_ack;EMV_TERMINAL_I_ACK=1for CI--pcap-out trace.pcap(Wireshark linktype 265); PIN redactionemv terminal replay mock.json --from-phase cvm [--to-phase]--timing-report→Phases[].duration_ms+ summary lineemv terminal capabilities(works offline)Format doc: doc/emv_pcap_format.md
Command tree (v2)
Documentation bundle
Testing (no hardware required)
Golden fixtures (6/6):
taa_denial_expired,host_arqc_cvn18,scheme_auto_interac,scheme_profile_interac,restrict_exception_denial,cvm_online_pinUnit tests added:
terminal_host_test,terminal_cvm_test,terminal_exception_test,terminal_sim_export_test,terminal_pcap_test,terminal_replay_test,terminal_taa_testKnown gaps / deferred
emv terminal compare) — partial via reader compare