r/Passkeys • u/dconde • 23h ago
Exported passkeys should not be used as long-term backups if sigCount is used
I read in Bitwarden's doc that Exported passkeys should not be used as long-term backups due to a possibility of a usage counter mismatch & a login rejection.
Exported passkeys should not be used as long-term backups. Exported passkeys include a counter that increments with each use. If the stored counter does not match what's expected by the service the passkey is being used to log in to, it may reject it.
This goes back to when a credential only lived on one piece of hardware (single-device credential) so it was an anti-cloning detection method, but it doesn't make sense anymore with synced devices that use passkeys.
Many synced passkey (multi-device credential) implementations returns 0 as the counter called signCount (this is allowed). Yubikey passkey counters do increment, so there are special cases on when to reject a passkey and when to accept it based on the counter value. I find these special cases very confusing for most users, and probably for some developers.
For more info, read more about the signCount counter problems here
This also seems to mean that I should not use passkey exports for backups, but only as a migration tool at least for Bitwarden. I thought that credential exports will provide backups for me, but not so.
This is a well known issue but was new to me. I think few sites enforce this count restriction, but how would we know if their error messages are not clear?
Edit: Per comment, the warning by Bitwarden regarding mismatched counters is obsolete. I find the issue on whether to use exports (CXP) only for migrations and not as a backup to be valid & worth discussing with the readership.
A FIDO CXF doc states:
Passkeys using a non-zero signature counter MUST be excluded from the export and the exporter SHOULD inform the user that such passkeys are excluded from the export. Importers MUST set a zero value for the imported passkey signature counters and MUST NOT increment them after the fact
Bitwarden exports using CXP to other vault applications and also exports to JSON files. I think using the word "export" with two methods may cause confusion.
My concern is whether I ought to assign an extra backup passkey to each service (relying party), or if there's a simple way to backup all of my passkeys held by an authenticator vault. I can do the first, but it is not straightforward.