Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.71k stars 276 forks source link

Yubikey does not work #1605

Closed vampyren closed 6 months ago

vampyren commented 1 year ago

Describe the bug

I started using Yubikey 5 NFC on both my pc and Android phone (S23 ultra). On PC i run KeePassXC and on my phone ofc KeePassDX. the first time i selected hardware key, the program asked me to go and install "Key Driver" which is did. When i tried to login it worked fine. Then today when i wanted to login in again when i use the Yubikey through NFC it blips but then it asks what program i want to use. "Key Driver" is not in the list here. I had also "yubico authenticator" installed and that was in the list but then again it did nothing. I uninstalled both "Key Driver" and "yubico authenticator" and then only installed "Key Driver" and still it wont get passed the

Loading database...
Retrieving database key ...

To Reproduce

  1. Open KeePassDX
  2. Use fingerprint and Yubikey using NFC

Expected behavior

Now the database should be open but instead its stuck on

Loading database...
Retrieving database key ...

KeePass Database

KeePassDX:

Android:

J-Jamet commented 1 year ago

This behavior seems to occur when the Yubikey is incorrectly recognized or set up. Improvements have already been made to the driver, but there may still be bugs.

Linked : https://gitlab.com/kunzisoft/android-hardware-key-driver/-/issues

vampyren commented 1 year ago

I don't think its incorrect setup. I use it on pc and it works plus it worked a day before. I have 2 key with slot 1 using touch and second slot as passive or what its called. When i start by touching, KeePassDX swaps to Key driver and it shows slot 2 is selected. It also detect the Yubikey by giving the sound but then when it swaps back to KeePassDX the "open with..."pop up shows so i would assume KeePassDX has to do something to prevent this behaviour. Any idea when the next version with the fix you mention comes out?

J-Jamet commented 1 year ago

At the moment, there's no big fix planned, because I've already got to reproduce the phenomenon.

When i start by touching, KeePassDX swaps to Key driver and it shows slot 2 is selected. It also detect the Yubikey by giving the sound but then when it swaps back to KeePassDX the "open with..."pop up shows so i would assume KeePassDX has to do something to prevent this behaviour.

It does seem to work, though, and if it didn't, it wouldn't come back to KeePassDX. But I don't know what you mean by the "open with..." popup, shouldn't it be "waiting for the challenge-response..."?

vampyren commented 1 year ago

This is the pop up i refer to... This shows in the step after i touch Yubikey on my phone, when "Key Driver" is open. Once "Key Driver" closes i go back to this screen basically unnamed

vampyren commented 1 year ago

Any thoughts? Sadly with this problem i don't know what to do. I don't want to disable Yubikey but with it activated on my pc i can't access the DB on my phone :( Is there any workaround ?

J-Jamet commented 1 year ago

You should look directly to the gitlab repo https://gitlab.com/kunzisoft/android-hardware-key-driver/-/issues

vampyren commented 1 year ago

I also just tried Strongbox on my iphone with the same Yubikey and no problem, i can get it.

vampyren commented 1 year ago

You should look directly to the gitlab repo https://gitlab.com/kunzisoft/android-hardware-key-driver/-/issues

Just checked and yes this is reported here, added a comment there too: https://gitlab.com/kunzisoft/android-hardware-key-driver/-/issues/5

So basically this is not fixed :(

J-Jamet commented 1 year ago

So basically this is not fixed :(

I can't reproduce the problem so maybe, but there's nothing to stop you debugging and suggesting a fix.

vampyren commented 1 year ago

Can you please share your setup, like phone model, Android version, version of key driver + KeePassDX. Do you have any other yubikey related software installed that could maybe mitigate the problem?

ps. As you see on gitlab i'm not alone either. And i honestly have a simple setup so it should be fairly easy to reproduce...

J-Jamet commented 1 year ago

Shouting about the problem is pointless. Now we need to fix it, but as I said, I don't yet have a real Android 13 device that reproduces the problem with an NFC reader. So what we need to do is debug the source code with a device that reproduces the problem and propose a fix but I can't now. We're continuing the discussion on gitlab.

vampyren commented 1 year ago

I am not shouting, just simply trying to understand how it can work for you so maybe i can find a workaround or something! I missed you did not have Android13. Any how i did some more finding i put in gitlab for you. Maybe it helps more. And thank you for continued support! If i can help any way just let me know!

vampyren commented 1 year ago

Waoo i found a way to bypass or workaround the issue.....Maybe this can help to figure things out?

Basically on my phone when KeepassDX asked me first to use touchID before showing the tap for YubiKeys. This time when i was asked for touchID i used my YubiKeys NFC first and basically ignoring the touchID all together!

When it shows the "complete action using" pop up i basically scroll down to make it go away and what do you know the database opens and it just works....

Hope this helps to solve the mystery :)

f45tb00t commented 1 year ago

Hi,

not sure if this is related. But I cannot use the Yubikey at all.

It does not matter which slot I try to use. I get all the time: "An error has occurred. Make sure your key is properly configured." or "An error has occurred. Unplug your Yubikey"

I found this: https://gitlab.com/kunzisoft/android-hardware-key-driver/-/issues/8

I would like to help to track down the issue. But registering at gitlab is not really an option for me. Email verification is fine, but not Phonenumber or CreditCard in addition to that.

Some help with the issue would be just aswesome.

my setup: Google Pixel 7 Pro GrapheneOS latest version Kee Driver v0.1.7 KeePassDX v3.5.1 Yubikey 5C NFC, USB C, FIPS version.

fb

J-Jamet commented 6 months ago

Fixed with Key Driver 0.1.8