Code Monkey home page Code Monkey logo

nokey's Introduction

NoKey

NoKey is a distributed password manager that works without a master password.

Instead, you can unlock your passwords by confirming from another device. E.g. if you need a password on your PC, you only have to confirm this on your phone. No need to remember any passwords!

No active development!

NoKey is not actively developed anymore. I'm not adding any new features and won't be maintaining the apps on the different stores if Google ever decides to remove it for some reason.

I'll keep the server running and the web app alive for users that are still using it. (Including me ๐Ÿ˜„)
I have no idea how many users there are, the server doesn't store anything..

Screenshots

screenshot (click the image for more)

Install

Don't use multiple clients on the same device!

Android

Play Store

Chrome Extension

Chrome Web Store

Firefox Extension

AMO


If none of these options work for you, you can try the web app.
For Safari, there is currently no option that works (it seems to be missing a few things from the Web Crypto API).

How does it work?

Your passwords are encrypted using AES with a randomly generated key, here called group key. This group key is never stored anywhere directly. Instead, NoKey uses Shamir's Secret Sharing to split the group key into multiple key shares. When you confirm you want to unlock a group on another device, the device sends its key to the one that requested it. Then, if enough keys have been collected, the requester can recover the group key and with that decrypt your stored passwords.

For a more in depth explanation, you can check out the project report.

FAQ

Can your server read my passwords?

No, this is impossible. The server only forwards messages sent between devices. Passwords are never stored or transmitted in the clear, they always stay fully encrypted. The only way to decrypt them is by collecting enough keys for a password group. These keys never leave a device in the clear, they are always encrypted with the public key of the receiver, such that only that device is able to read them.

So all the server could do is observe how encrypted passwords and encrypted keys are exchanged, but there is no way to get to those passwords.

What about privacy, what information does your server collect?

Nothing. The server doesn't store any information, it doesn't even have a database. The source code of the server is here

Ok, but I don't trust you to actually run the same code as available here. What could a malicous server do?

A malicous server could record every exchanged message. But, it still woudn't be able to collect any passwords. It also couldn't alter any of the messages sent between devices, as each message is authenticated and integrity protected.

However, it could read saved usernames and corresponding sites and this way create some sort of user profile.

So, if you really don't trust my server, you're welcome to host it yourself.

What do the device icons mean? Can I change them?

See #27

How exactely are passwords propagated and stored?

See #28 (comment)

What data exactely flows through the server?

See #28 (comment)

What crypto keys does NoKey handle and how are they handled?

See #28 (comment)

Source code organization

This package is organized in these folders:

  • web/: Contains the shared elm code + the web app
  • web_extension/: Contains the extension code
  • android/: Contains the android version
  • server/: Contains the elixir code for the server

The server and webextension both require the web/ folder to be present, as they make use of the common code there.

Development requirements

To run everything, you need yarn and elm.

More specific instructions can be found in the corresponding folders.

Creating a release

  • Grep for TODO!s: rg TODO! and resolve them
  • Find stray log statements: rg "^([^/\n]*(console.log|Log\.[de])|[^-]*Debug.log)" and possibly remove them
  • Increment versions in build.gradle, web/src/Data/Settings.elm and web_extension/manifest.json
    • Only increment Android if the Android shell code changed, otherwise, don't do anything about Android.
  • Go through the readmes of web, android, web_extension
  • Push changes to github
  • Upload the generated builds on github releases
  • Update links on website
  • Update the server

nokey's People

Contributors

dependabot[bot] avatar zinggi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nokey's Issues

I love this app, could we get more updates?

Yeah, please close this issue ;) I just wanted to say that I love this app and seeing there are no updates for 10 months now is heartbreaking. The app works amazingly well.
So far the only issues are:

  • The only biggest issue is lack of vault support on android. It looks like you need to manually open app and manually copy password, this is so far the biggest issue. Would be great if I could use it as default vault app (like bitwarden) or another option is accessibility setting which also lets you fill in forms automatically.
  • Ok, firefox browser extension sometimes glitches, so you click on the icon, but only tiny square shows up. Usually the issue goes away after a moment or browser restart. And is really rare.
  • Ok, sometimes I click request and device I'm holding (android app) is not getting it... looks like some connection issue. The best way is to have app open already and refreshed before you make request. But works GREAT.
  • The app is not always intuitive, for example I don't think it's stressed well enough that app works best with at least 3 devices. But again, once you setup it, it works amazingly well.

I'm really sad to not see this app having greater attention. It's really amazing.
I was adding new passwords one by one over long period of time (few months now), currently having around 40 of them, always was working great.

.xyz domain - tracking

.xyz domain has trackers and is tracking everything that goes to and from your server as it seems.
This is a huge turn of if wanting to spread the app to users who don't have their own server.
screenshot from 2018-06-18 19-59-05
screenshot from 2018-06-18 19-58-22

Doesn't work on Safari

The web app crashes on Safari.
I don't know why and I don't have a mac to investigate.

Redirect not working if extension active

Some websites that redirect stop working if nokey is installed.

Maybe body.onload is no longer called if my plugin already listens to window.onload?

I should probably use window.addEventListener("load",yourFunction,false) instead.

Doesn't work on Android 6.0.1

Hello,

I'm using Android 6.0.1 without Play services.

I tried to use NoKey 0.4 but it is stuck in the loader and I see this error in logcat:

06-16 14:21:20.413 26329 26329 I chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Unexpected token =>", source: https://nokey.xyz/bundle.js (1)

This might happen because my webview is too old (Chromium 44).

[Question] How does NoKey handle device loss?

I assume if I lost a device, I would have to re-encrypt the whole key vault with a new key? Because if an adversary was to collect enough of my lost devices, they would be able to derive the key.

I don't see re-encryption mentioned in the README, does NoKey provide an easy way to re-encrypt the vault?

copy to clipboard doesn't work

The problem seems to be the content security policy, which doesn't allow inline scripts.

Solutions:

  • Lower the CSP, as there shouldn't be any XSS vulnerabilities anyway.
  • Wait until elm 0.19 is released, as that will probably allow synchronous ports (it has to be synchronous, as the copy to clipboard command can only be executed if directly caused by user interaction)
  • Give the button an id and check for dom modifications with js to listen for it to appear and attach an onclick handler then?
  • custom elements?

https://discourse.elm-lang.org/t/how-to-use-the-synchronous-clipboard-api-without-native-code/878/11

"Chose login" sometimes overlaps with login button

The "Chose login" popup can overlap with other important UI elements, like the suggestions from chromes internal password manager.

Maybe the popup should only open every second click? Or have a close icon that closes the popup and makes it stay closed for a few seconds?
Or move it to some other place?

Confusing device icon

Hi!
Thanks for sharing this great tool!
I just tried it out. That's what my device list looks like:
untitled

As you can see the device "Fairphone" has a "no entry" icon. Does this mean anything? Or is it just randomly chosen? Either way I think it needs clarification.

Remove impossible tasks

Tasks (such as unlock 2 to move .. into ..) can become impossible, e.g. if we want to save something in a group of 3, but before it gets saved, we remove one device.
Now we have a task that can't be completed.

Possible solution: When removing, clear impossible tasks + impossible groups!

Websites that don't work

Websites where the web extension doesn't work properly will be listed here...

  • https://www.reddit.com/
    • The elements are properly detected, but reddit only accepts the username + password if it was entered manually. Related to #2

Firefox extension (and webapp opened in Firefox) not working

Hello,
Both the Firefox extension and webapp (when opened with Firefox) is not working.

For the extension it just shows a blank popup.

For the webapp it shows the following json:
{
"message": "",
"url": "",
"line": "",
"column": "",
"error": {},
"log": [],
"errors": [],
"nav": "Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0"
}

This both happened in Firefox in Linux (Fedora) and Freebsd. I haven't tested with Firefox in Windows.

pairing can fail

Pairing a device can fail if for some reason, the websocket is blocked on one device, but not the other.
In that case we can easily get into an inconsistent state.

Solving this problem completely is impossible, but we can do better than now.

All it would take is another round of acknowledgements, as this way the second one can't make it if the websocket of one device doesn't work

popup window sometimes changes size

To reproduce:

  • press unlock on some other device
  • a popup opens on the extension
  • ignore it and click on the icon
  • wait

The popup now sometimes resizes...

Add online services

Such as Dropbox, Google Drive, etc..
These can work like an additional device and also store a share. This way you can still use this password manager, even if you don't have any of your devices on you.

Problems:

  • Dropbox access tokens don't expire. This means that if a device that is logged into Dropbox gets stolen, the thief gets 2 tokens.
  • Google drive might be possible: They seem to have a somewhat not documented method that forces users to re enter their password. They also make sure a user can't access the application storage.
  • Facebook seems to do it right, but it's not clear if the Facebook Api could be used for this application..
  • OneDrive might work, as they provide a logout api. They also have a prompt=login option. However, since the app folder isn't hidden from the user, a clever thief can still get to the secret token if the user is logged in.
  • Github secret gist Api might work, as they also allow http basic auth. However, this doesn't completely solve the problem, as a user might still be logged into Github, so a thief could go to gist.github.com and get an additional token. This would only work if the user creates a different account than their normal account and makes sure they are never logged into this account...

Conclusion

The Google Drive Api seems to be the only one that fulfills all requirements:

  • Prompt for password even if the user is already logged into Google.
  • Revoke access by user request.
  • Prevent access to application files outside of the app.

The last requirement isn't necessary, if we can forcefully log out a user.
For this reason both OneDrive and Github might work too.

Alternative

Instead of relying on the security of Dropbox and similar, we could instead handle it ourself.
This way all the above options become reasonable, but they would only be used as an additional storage to sync our data, not to actually store any additional shares.

For this to work, we would have to allow the user to create new shares and encrypt them using a password that has to be remembered.
This of course requires some competence of users, as they have to choose a strong password for these additional shares!

Add doc details on security

Since this tool is dealing with very sensitive data, I'd like to see more documentation details on the other security measures apart from the group password.

Eg.

  • Where does my private/public key pair come from?
  • How do you verify a public key? Is there anything like certificates in action?
  • How are passwords propagated and stored?
  • What data exactly flows through the server?
  • How could I setup and use my own server?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.