Expand description
Counter command.
Reads or increments one of the chip’s two 21-bit monotonic counters (Counter0 and Counter1). Counters never decrease and cannot be reset once the data zone is locked.
In this project’s slot model:
- Counter0 backs Slot 5 (PIN hash). It is bumped by 1 on every
CheckMacagainst slot 5, with the convention that the driver rounds the counter up to the next multiple of 5 on successful verification so the user always gets a fresh batch of 5 attempts. - Counter1 backs Slot 6 (PUK hash). Same mechanism with batches of 10.
Reference: CryptoAuthLib lib/calib/calib_counter.c, constants
COUNTER_MODE_READ (0x00), COUNTER_MODE_INCREMENT (0x01).
Enums§
- Counter
Id - One of the chip’s two monotonic counters.
Constants§
- COUNTER_
MODE_ 🔒INCREMENT param1mode bits: increment the counter by 1, then return the new value.- COUNTER_
MODE_ 🔒READ param1mode bits: read the counter without modifying it.