-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support hmac-secret FIDO2 extension for calculating hash #1681
Comments
Regarding the current campaign for SoloKey v2 there has been some comment by the creators that supports this implementation, too:
|
Very cool. Once it got implemented, is keeweb going to deprecate the existing 'Challenge-Response'? |
Depends on its compatibility and ecosystem progress. My gut feeling says it may be not interchangeable with the existing mechanism, as in, it will generate different codes, and most apps will probably support both methods. But nobody knows now... |
@antelle is this on keeweb's roadmap? Is there appetite for someone from the community to give it a go at implementing this solution? |
First step is to understand how it actually works. Help here would be very welcome and if the understanding is present, we can progress from here. |
Do you envision it being implemented as a native module in the molds of node-yubikey-chalresp? |
Indeed, using libfido2 |
I did some investigation, and the script linked in the issue (hmac-secret.sh) works well with a YubiKey with a small correction for a combination of macOS and YubiKey. It generates equal results for the same input, so it's technically usable as a HMAC implementation and it can be relatively easily coded. Now, some thoughts:
So, now the biggest question is, how to provide support for multiple keys? Without backup, using a YubiKey with kdbx doesn't make a lot of sense. I see two options here:
|
Thank you for looking into this, it certainly sounds promising! |
I spent some time thinking about it today. It's going to be a long read, sorry, I tried to put as much detail as I could. It's a bit hard to write all of this here, so I extracted this draft to a wiki page: https://github.com/keeweb/keeweb/wiki/%5BWIP%5D-FIDO2-hmac-otp How to proceed from here? For now I need some feedback and critique, maybe the whole idea of having publicly available I also haven't checked if the scheme is cryptographically safe ❗ 💣, it's just a quick idea so it may be wrong. Actually, I've already found some issues with it, but I'll try to come up with something usable. |
In any case, it should be compatible with KeePassXC etc. |
@rugk it won't be compatible with the current implementation. I assume KeePassXC, as well as the 2FA KeePass plugin, will come up with a new variant. I hope it will be accepted in the kdbx format (then it would be easier), but I don't know, I can ask Dominik. |
I've moved it to Future not because I find it unnecessary, but it's not very much actionable in the current state. Now we need to come up with a solution that would work and agree on this, it won't happen fast. |
This makes me feel sad about the standard |
Well, it is good! The standard is here to protect us and make our world better. If secrets can leak, they will leak. If secrets can’t leak, developers will adapt and eventually make the software accept several authenticators, it will be better for users, right? |
Yeah, it's more secure, but to be honest, I like how the current Yubikey challenge-response or GPG works: I can generate or backup my secret or key in two USB drives using my secure laptop, and lock up them in a safe box, and it is more flexible, but sometimes I am cynical, and I can see the business reasons might behind "standard makers" :P Anyway, it seems like if keeweb applies the FIDO2 standard, users have to purchase at least two physical authenticators in order to prevent lost/theft scenarios, I think FIDO2 standard might be good for online services because usually, they have other alternative ways to finish authentication or reset the key if a user lost his hardware token, but for offline auth or decryption, like Keepass, to have a backup physical authenticator might be the only way to recover a database, otherwise, the user is screwed |
Yes, that's the point, that you have a backup authenticator. It makes sense to have it anyway if you use WebAuthn. But this can be made a soft requirement. If multiple challenge-response codes are supported in KDBX, one of them may be generation based on a backup code, or stored on a server and given via WebAuthn, and so on. |
KeeWeb connects to YubiKeys using their proprietary HMAC-SHA1 Challenge-Response API, which is less than ideal. FIDO2 standard now includes
hmac-secret
extension, which provides similar functionality, but implemented in a standard way.This should give us support for other tokens, for example, Trezor One, without using their API.
Additionally, if
hmac-secret
is ever supported in browsers (for example, this PR adds support for it, but it's limited to Windows Hello), we'll be able to use it on web as well.libfido2
: https://github.com/Yubico/libfido2hmac-secret
usage test in Trezor: https://github.com/trezor/trezor-firmware/blob/master/tests/fido_tests/libfido2/hmac-secret.shThe text was updated successfully, but these errors were encountered: