Skip to content
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

Unlock DB by using Challenge-Response authentication #1434

Open
serrq opened this issue Oct 28, 2022 · 4 comments
Open

Unlock DB by using Challenge-Response authentication #1434

serrq opened this issue Oct 28, 2022 · 4 comments
Labels

Comments

@serrq
Copy link

serrq commented Oct 28, 2022

Initially I had proposed the one-time TOTP authentication system, but in both time-based and counter-based OTP (HOTP) there is a problem called synchronization, which, among other things, forces in case of problems to connect to the Internet to re-sync.

Wandering around the web I found this new authentication scheme called OCRA (One-time Challenge Response Authentication) which responds to RFC 6287.

What makes this new method particularly valuable?

Mainly it keeps security standards high and works without synchronization.

It will need to be equipped with some sort of external calculator (the token generator). If implemented in KeePass unlocking the database would work more or less like this:

  1. The app (KeePassDX) queries the database which responds by proposing a challenge (typically 6 numeric digits).

  2. From an already configured external generator I go to enter the challenge through the built-in button pad.

  3. The generator "chews" and "spits out" another 6 pseudo-random digits.

Those six digits unlock the database. As soon as the session ends you will need to pass a new challenge. And the database will come up with more numbers...

That is all.

c300-challenge

Here a conference about it:

https://www.youtube.com/watch?v=kBOhP7Hlvlg

@serrq serrq added the feature label Oct 28, 2022
@serrq serrq changed the title Unlock DB by using TOTP (RFC 6238) disposable key Unlock DB by using Challenge-Response authentication Oct 29, 2022
@cbiere
Copy link

cbiere commented Oct 30, 2022

How does TOTP force an internet connection? Precise clocks have been invented before the internet. GNSS builtin into every smartphone works without any mobile or wifi connection, although it can decrease time to get a fix significantly.

@serrq
Copy link
Author

serrq commented Oct 31, 2022

I want to make it clear that I am not an IT expert, I just reported news as I compresr read it on the web.

As for the TOTP, from what I have read, it seems that between server and client, while sharing the same Unix time, there may be a time lag of a few thousandths of a second every few days, enough for wrong numbers to be generated.

In this regard, the TOTP scheme defends itself by accepting so-called "time steps," that is, when both server and client agree to pass values to each other outside of synchronization time (-3,-2,-1, current time, +1,+2,+3) at the expense of security, however.

This problem is overcome by the challenge-response scheme because it does not need synchronization to work; it would be better to specify that it works with implicit synchronization that is provide within every challenge proposed.

@ZenMasta
Copy link

ZenMasta commented Nov 2, 2022

How does TOTP force an internet connection? Precise clocks have been invented before the internet. GNSS builtin into every smartphone works without any mobile or wifi connection, although it can decrease time to get a fix significantly.

https://keepassxc.org/docs/#faq-yubikey-why-hmac-sha1
"Both FIDO-U2F and TOTP require a dynamic component (i.e., a counter or timestamp) for successful authentication. This is perfect for authenticating at an online service, but doesn't work for an offline database which needs to be encrypted with a fixed key. HMAC-SHA1, on the other hand, can be computed ahead of time as it only needs a fixed secret and no dynamic component of any kind. "

I signed up for beta through the play store as supposedly the beta version supports this yubikey (challenge response). But so far I don't see the option, or maybe I haven't been able to download the beta version yet. I'll keep checking.

@J-Jamet
Copy link
Member

J-Jamet commented Nov 6, 2022

As @ZenMasta says, the challenge response can only be used under certain conditions : linked to #8
It is well available in beta 3.5.0 using a Yubikey, I think you just didn't join the beta program on the Play Store correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants