Scan once. Provision new tags or verify existing ones.
The operator follows the same scan procedure in both cases. The app inspects the secure Type 4 tag and decides whether to provision its factory key or authenticate its existing diversified key.
Scan a tag
- Sign in as the intended operator.The app compares the operator ID on an existing tag with the subject of this account's authentication token.
- Open Device Control.Select NFC Tag Scan. The scan screen enables reader mode while it remains in the foreground.
- Position the phone.Hold the NFC antenna close to the tag. Keep the phone steady and do not remove it after the first sound or vibration.
- Wait for the result screen.APDU exchanges and a possible backend key lookup must finish while the tag remains in the RF field.
- Read the outcome.Only Authentication successful means the tag was provisioned or verified for the signed-in operator.
What happens during the scan
- Discover and authorize
- Identify tag processor
- Provision or authenticate
- Display verified result
Factory-fresh tag
- The app connects over ISO-DEP, selects the secure application, and reads chip information.
- An EV2 First exchange tests the factory-default AES key.
- The backend derives a tag-specific 128-bit master key using the tag and mobile-device data.
- The app writes the signed-in operator ID to tag file 2 and changes that file to Full secure messaging.
- The app caches the diversified key in encrypted Android preferences and replaces tag key slot 0.
Previously provisioned tag
- The app starts EV2 First authentication and loads the diversified key from encrypted preferences or the backend.
- The phone and tag prove knowledge of the key and derive per-session encryption and MAC keys.
- The app securely reads the operator ID from file 2. A legacy clear-mode file is migrated after reauthentication.
- The scan succeeds only when cryptographic authentication succeeds and the stored operator ID matches the signed-in operator.
Understand the result
| Field | Meaning |
|---|---|
| Authentication status | The authoritative success or failure result. It includes operator ownership for an existing tag. |
| Operator | The signed-in operator name and the operator ID read from or written to the tag. |
| Response status | The final two-byte card status and its protocol meaning, when the tag returned one. |
| Secure session | Whether transaction and session-key data were established for secure messaging. |
| Read counter and transaction ID | Protocol diagnostics captured during introspection and authentication. |
| Tag details | UID, manufacturer, hardware/software versions, storage, protocol, technologies, batch, and production date when available. |
A result can contain useful tag details and still be unverified. Do not use the presence of a UID, transaction ID, or successful low-level status as a substitute for the authentication status.
Technology routing and compatibility
The scan screen enables reader mode for NFC-A, NFC-B, NFC-F, NFC-V, and barcode technologies, but secure device authentication requires an ISO-DEP tag that resolves to a registered processor. The implementation currently provides processor classes for NTAG 424 DNA and MIFARE DESFire EV3 workflows.
Reader mode skips Android's normal NDEF check to prioritize direct ISO-DEP communication. A separate legacy branch can write, lock, and ship NDEF data when Android has already exposed an NDEF or NDEF-formatable tag; that branch does not produce a verified secure-tag result.
NfcTagType4ChipModel, so enum mappings and registered processors must remain
aligned.