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

Add support for OnlyKey #41

Open
onlykey opened this issue Oct 25, 2019 · 3 comments
Open

Add support for OnlyKey #41

onlykey opened this issue Oct 25, 2019 · 3 comments

Comments

@onlykey
Copy link

onlykey commented Oct 25, 2019

Hi,

We recently implemented HMAC SHA1 in OnlyKey, it is fully compatible with Yubikey's HMAC SHA1 challenge and response. We have integrated support with KeePassXC keepassxreboot/keepassxc#3352 and are looking to integrate with other projects as well. The only change required is to allow OnlyKey's USB VID/PID to be used in addition to the already allowed Yubikey USB VID/PIDs. Would you be willing to add support for OnlyKey?

Thanks!

@whinis
Copy link

whinis commented Oct 28, 2020

I might be willing to attempt but to but do not own a OnlyKey. Do I just need to call the new functions in the yubikey library?

@onlykey
Copy link
Author

onlykey commented Oct 28, 2020

@whinis Yes, we can also send you an OnlyKey to test if you email support at crp.to

OnlyKey supports the same HMAC Sha1 used by the yubikey library. The only change is to call yk_open_key_vid_pid. The way you can do it is first check if a Yubikey is connected yk_open_first_key() then if not check for OnlyKey like this:

m_yk_void = static_cast<void*>(yk_open_first_key());

// New fuction available in yubikey-personalization version >= 1.20.0 that allows
// selecting device VID/PID (yk_open_key_vid_pid) if Yubikey was not found
if (m_yk == nullptr) {
    static const int device_pids[] = {0x60fc}; // OnlyKey PID
    m_yk_void = static_cast<void*>(yk_open_key_vid_pid(0x1d50, device_pids, 1, 0));
    m_onlyKey = true;
}

@whinis
Copy link

whinis commented Oct 28, 2020

Ill make an issue on my fork and will likely take you up on that.
whinis#2

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

No branches or pull requests

2 participants