Safe 7 and FIDO2

I recently bought a Safe 7 and am now playing around with the settings, trying to figure out how seed phrases work, how backups work with SLIP-39, connecting it to various existing wallets, generating wallets with different backup methods - basically, I’m exploring the new device’s capabilities and working through all the edge cases I might encounter during use.

And now I’ve gotten to FIDO2, meaning, using the Trezor Safe 7 as a security key. I started testing how it all works again and decided to create a separate Bitwarden account where I could connect the FIDO2 device as a means of two-factor authentication.

For the most part, there were no issues connecting the Trezor as a security key, Windows recognized it without a hitch. I connected the device, linked it to my Bitwarden account, and everything seemed fine. I log out of the account and test it using the “Log In with passkey” feature. It doesn’t work. The system doesn’t recognize the device. I check the official Trezor article on how to connect and verify that credentials are stored on the Trezor device itself using the command trezorctl fido credentials list. Here’s what it returned:

there are no resident credentials stored on the device.

I started Googling and found a thread on the Trezor forum about a similar issue, but with Safe 3. Developer @matejcik told the user that there are two situations:

  • non-discoverable credentials, which are pretty much a tweak of the older “FIDO1” U2F standard. These are mostly second-factor: you first need to log in with you username and password, and then you tap your Trezor to confirm the login. This kind of credential is part of the recovery seed, and this is (as far as I can tell) what Bitwarden uses for authentication. You only need the seed in order to regain access.

  • discoverable credentials, or passkeys. These are a more advanced thing, enabling transparent logins. In this case, the key needs to be stored on Trezor. It is not part of the recovery seed. If you lose or destroy your Trezor, you also lose the key. You need to back it up manually via trezorctl fido credentials list, and restore it by trezorctl fido credentials add

I fiddled around, re-linked my Trezor to Bitwarden, and realized I was selecting the wrong option. During the initial authorization step in Bitwarden, you can immediately choose “Log In with passkey,” or log in via email and a master password. That’s what I did, and then a window popped up asking me to verify via security key. And that’s when the system recognized my Trezor device and let me log in after I confirmed the action on the Trezor device. So this is the “non-discoverable credentials” method, and authentication happens directly using the seed phrase of an already activated Trezor.

Cool, time to test it out. I decided to reset my Trezor and created a wallet using a 12-character seed phrase. I activated it and went to log in to Bitwarden again. It wouldn’t let me, and the Trezor device itself displayed a message saying there were no credentials for this site. Great. I reset it again and went back to the wallet where I had linked the Trezor to Bitwarden. I made a backup and went through the Bitwarden authorization process again. I did everything the same way, and it asked me to enter the secret key. At this point, the Trezor device found the credentials with my email and asked me to confirm the action. I confirmed. But now, on the Bitwarden side, it says:

An error has occurred.
Invalid verification code

I tried it in a different browser, same result. I wonder if I’m somehow using the wrong wallet? I reset it, restored it, and tried again. Same thing. I started Googling, but didn’t find anything useful.

One thing is clear: the problem is on someone’s end. Either on the Trezor device’s end or on the service’s end that uses FIDO2 (in this case, Bitwarden). I’ll try to find other services that work similarly, but this is might be a warning not to use a Trezor device as a security key in Bitwarden, because if you reset the device, it will stop working.

I’m posting this as a note of my observations so that anyone who finds themselves in this situation knows they’re not alone. Or maybe there’s a solution out there and I’m just doing something wrong.

Keep testing the Trezor.:victory_hand:

1 Like

Somehow I can’t include the links, but
This topic is based on:

  • ”Safe 3 and FIDO2” topic on trezor forum under “Security” Category
  • And Trezor guide “What is FIDO2?”
1 Like

Also I can’t run trezorctl fido credentials list while Trezor Suite is launched.

Failed to enumerate WebUsbTransport. USBErrorAccess: LIBUSB_ERROR_ACCESS [-3]
Failed to connect: BridgeException (trezord: read/5 failed with code 400: Malformed protocol format)

They you’ll have to restart your trezor, otherwise you’ll catch some weird errors like this:

PS C:\Users\liber> trezorctl fido credentials list
Failed to connect: ProtocolError (Missing chunk magic: 146f1f017f51c79f4f8442c3084b6073d39bc2e44921d43d66683c221014294830c4732de6a2fc4afe884e1e9d81258a6af0fd74c121be4a081aa7a90378e368)
PS C:\Users\liber> trezorctl fido credentials list
Failed to connect: ProtocolError (Payload too short)
PS C:\Users\liber> trezorctl fido credentials list
Failed to connect: TransportException (USB read failed: Unexpected chunk size: 0)

Long story short, it’s working kind of weirdly?

1 Like

Getting back to the original issue in this topic, I managed to get Bitwarden and Trezor to work together.

I browsed the forum a bit and found that some users are having trouble using Trezor (passphrases) while on a VPN. I decided to test this out for myself, since I actually use a VPN on daily basis. At first, nothing worked, but after completely closing all browser processes and disabling the VPN, Bitwarden let me through without any errors!

But the most surprising thing is that I then turned on the VPN, refreshed the browser, and tried to log into Bitwarden again. And… it worked.

At this point, I don’t even know whose fault it is. If the problem were with the VPN, it wouldn’t have let me in the second time with the VPN turned on.
(All testing was done using incognito mode and periodic restarts of Trezor, the browser, and the PC.)

I’ll need to find another service that doesn’t store credentials in Trezor and test it, but for now, my advice is this: it’s better not to use Trezor as a security key device for services where credentials cannot be exported via trezorctl fido credentials list.

Kudos to @arq from here:

https://forum.trezor.io/t/passphrase-is-no-longer-working-empty-wallet/11336/69