Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1982
DESFire EV2/EV3

Transaction MAC Field Visualizer

Visualise the DESFire EV2/EV3 Transaction MAC field: 4-byte counter (TMC) followed by 8-byte MAC value (TMV). Tamper-evident transaction logging in closed-loop ticketing systems.

How to use this tool

What it does

Illustrates the DESFire EV2/EV3 Transaction MAC that makes a session's writes tamper-evident.

When to use it

Use it to understand how Transaction MAC binds a set of operations so a backend can detect tampering.

Worked example

Walk a sample transaction to see how each command feeds the running Transaction MAC.

Input

Decoded

Paste TMAC field bytes.
All decoding runs locally.

About Transaction MAC

DESFire EV2 introduced Transaction MAC files: every successful CommitTransaction increments TMC and produces a fresh CMAC over the transaction state. The backend reconciles its own TMC counter against the card to detect replays, gaps, or tampering.

Spec

NXP DESFire EV2/EV3 datasheet.

Frequently asked questions

What is a Transaction MAC?

A DESFire EV2/EV3 feature producing a cryptographic proof that a specific transaction occurred on a specific card, verifiable by a back office independently of the validator.

What are TMC and TMV?

The 4-byte Transaction MAC Counter and the 8-byte Transaction MAC Value. The counter increments per committed transaction and the value is the MAC over it.

Why does transit care about this?

Because an offline validator's own record is otherwise the only evidence a trip happened. A transaction MAC lets the back office verify the card's account of events without trusting the terminal.

What happens if the counter jumps?

A gap indicates transactions the back office has not seen — either unreported terminal data or tampering. Reconciliation logic treats a gap as a signal to investigate rather than as an error.

Does anything I paste leave my browser?

Nothing. The tool is entirely client-side: the page ships a static script, does no network calls, and never transmits what you paste. You can confirm it by opening the network tab, or by loading the page and then going offline.