Currently working with a NitroKey HSM 2 and using the key counter feature - i.e. a cap on how often a specific key can be used / how many signatures can be generated.
I cannot find a way to read back the remaining uses for a key. Is there no way to get this information? I don’t mind interacting with the device on a low level (APDU).
The File Identifier (FID) must be CC || keyid. The current key use counter is reported in the ‘90’ tag as unsigned long value. Above ‘FF FF FF FF’ means “No key use counter”. The Tag ‘91’ reports the supported algorithms and ‘92’ the key domain.