Expand description
Card (ISD) life-cycle transition state machine — PDD §5.11.
Verified against GPCS v2.3.1 §5.1.1.1–.5 and Figure 5-1 (PDF p. 54):
OP_READY → INITIALIZED → SECUREDirreversible (§5.1.1.2/.3).SECURED ↔ CARD_LOCKEDreversible (§5.1.1.4).- any →
TERMINATEDirreversible (§5.1.1.5) — refused as a set target (§2.2). - Skip-ahead to
SECUREDis spec-legal (§5.1.2) — gated behindforce. - Same-state = no-op (card rejects per §11.10.2.2); detected before any APDU.
P2 target bytes are the Card Life Cycle Coding of GPCS v2.3.1 Table 11-6
(INITIALIZED = 0x07, SECURED = 0x0F, CARD_LOCKED = 0x7F), as required
by SET STATUS §11.10.2.2.
Enums§
- Transition
Plan - Outcome of a legality check: either a no-op, or the P2 byte to send.
Functions§
- check_
transition - Validate a requested transition against the verified matrix.
forcepermits skip-ahead toSECURED; never bypasses theTERMINATEDrefusal or backward-transition refusal.