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

Clipboard-free password generator, courtesy of JasonJShuler #218

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rodgolpe
Copy link
Contributor

Courtesy of @JasonJShuler

Added a cryptographically strong random password generator dialog to the slot editor, launched via a button next to the password field.

Rationale

The clipboard is a dangerous place for high-security passwords, especially when using remote desktops and virtual machines. Clipboard contents are readily available in cleartext to all local processes - even without admin rights. Furthermore, the clipboard is often synchronized with remote desktop clients and virtual machines - Linux, Windows and Android-based.

Windows 10 and 11 and some Android versions provide clipboard history and cross-device synchronizing... sometimes by default. The security around this clipboard history is dubious and ill-defined.

Considering the extreme convenience of clipboard synchronization, and the use of the clipboard by most password managers, it is unrealistic to expect such facilities to be universally disabled. The security provided by OnlyKey is potentially compromised the moment a password hits the clipboard.

Resolution

Embed a password generator into the OnlyKey App that doesn't transit the password outside of the OnlyKey-App process. No clipboard, no network - dramatically reduced attack surface.

The generator uses the node.js crypto module's random number generator - which is supposed to be cryptographically secure (unlike math.random). Specifically, it uses crypto.randomInt to avoid modulus biasing.

The user can select from various character classes, specify a length, character exclusions, and review / edit the password before applying it to the slot editor fields (or canceling).

Screenshots

Slot editor with the "Gen" button next to the password field.

Slot Editor New Button

Generator Dialog
Generator Dialog

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

Successfully merging this pull request may close these issues.

1 participant