A user reports an issue with 2FA login using a hardware security key on Windows 10, where the system displays an error: “The algorithm used for the security key is not recognized.” Server logs show “Unknown COSE algorithm encountered. alg: -257.” SystemZ suspects the issue stems from a missing algorithm implementation in the cose-ruby library, which only supports a limited set of algorithms. dan confirms that algorithm -257 corresponds to RS256, which is not implemented and not recommended. The team discusses potential causes, including the security key model and browser version, and references related issues and documentation, such as cose-ruby’s algorithm list and cose-ruby issue #48.
One of my users can’t login with 2FA using hardware key.
After pressing button on key during login, Windows 10 is asking for a PIN.
After entering PIN he is receiving error “The algorithm used for the security key is not recognized.”. I checked, it’s i18n key webauthn.validation.unknown_cose_algorithm_error.
So probably it need to be implemented but strangely somehow user managed to set it on account?
Not sure if I can fix it from forum’s admin side without code change.
I’m using recommended, standalone Docker install with version 2.7.0.beta3. I rebuilt forum and updated it less than 1h before creating this thread.
This is a limitation of cose-ruby library we use as @sam pointed out. It supports only these algorithms:
According to the error message, that security key is using algorithm “-257” which stands for RS256 and is not recommended. That is probably the reason why the library does not implement it.
What device are you trying to use for authentication?