Unlock sequence
- User enters a PIN using the capacitive touch pads.
- Firmware normalizes the digits (ensuring only
0–9
and optionalENTER
). - The PIN is hashed with SHA-256 and truncated to 16 bytes.
- Using this key, the firmware decrypts the signature block stored at EEPROM address
0x0003
. - If the decrypted bytes match the known pattern
"ZKUSB\0\0\0\0"
, access is granted.
Adaptive delays
Failed attempts | Lockout time |
---|---|
1 | 5 seconds |
2 | 10 seconds |
3 | 20 seconds |
4 | 40 seconds |
5+ | Doubles each time up to 2560 seconds |
- The counter is stored in EEPROM at
0x0002
so power cycling does not reset it. - Successful unlock resets the counter to zero.
- During the delay the OLED shows a countdown and the keyboard interface remains idle.
Secure input handling
- Digits are buffered in a 16-byte array within SRAM and cleared after verification.
- Touch events are ignored during lockout to prevent queue overflow.
- The serial interface cannot send PIN digits; only physical touch input is accepted.
Changing the PIN
- Unlock the device and open Menu → Security → Change PIN.
- Enter the current PIN for confirmation.
- Enter and confirm the new PIN.
- The firmware re-encrypts all credential pages with the new key and updates the signature block.