2

I want to create a secure online team based password manager?

The idea is that I want to be able to share passwords with other people on the team, in a secure way, such that if the entire database is compromised, the hacker will still not be able to access the data. Remember this process needs to be reversible, so hashing is obviously not a solution.

In a single-user system, the solution is obviously encryption with a master password, that is memorised by the user (i.e. not stored in the database)

In a team situation we could have a master password that all users in a team know. This is used to encrypt/ decrypt the stored passwords.

The problem is that it requires all teams to remember the same password. This is a problem if a user is a member of 5 different teams, he/she will need to remember 5 master passwords!

Are there any better alternatives?

2

An easy apporach would be that you could store the Passwords as PGP Encrypted messages where every member of the defined group is considered a recipient (for example GPG Keychain on Mac adds your on key as recipient per default so you can decrypt already encrypted messages to others).

So one user wants to add a password he encrypts it with pub-keys of his teammates and all can decrypt it with their private keys. still if the DB gets hacked nobody can decrypt it without the private keys of the team members.

If you store your Private Keys properly this could be a relatively safe alternative

  • I see what your saying is we encrypt the password using a public key for each one of his/her teammates. So if we have 10 teammates, we encrypt the same password 10 times. And they can still decrypt it using the private key. That's a great idea! – Yahya Uddin Aug 21 '16 at 13:18
  • Just add all team members to your keychain and in the prompt for encrpyting just select all of them, now every one of your teammates can decrypt the message and still its properly secured stored on the server – architekt Aug 21 '16 at 13:25
  • What do mean by adding team members to your keychain. Remember this is an online service so I'm not using a GUI, but running code on a server. – Yahya Uddin Aug 21 '16 at 13:28
  • 1
    F.E you can store you can make 3 Databases, one that stores the private key of all users, one that stores the public keys and one with the encrypted password. The user logs in and the script loads his priv key. if he wants to add a new password the pgp script simply uses all addresses from the pub key db as recipients for encryption. The now stored password could be decrypted by all group members. And due to loading your own priv key at the beginning of the session you can decrypt all passwords. – architekt Aug 21 '16 at 14:01
  • 1
    As said the database (and the server ) which holds the priv keys has to be as secure as possible. you could do some blowfish or another encryption on the private keys and not store them in plaintext of course – architekt Aug 21 '16 at 14:10
2

Well, take a look at the 1Password for Teams white paper. It describes exactly how we do this. [Disclosure: I work for AgileBits, the makers of 1Password.]

In some ways it is similar to Martin Fischer's answer but instead of using PGP/GPG it builds in the use of public keys into a password manager. And instead of each password being encrypted with with the share-ee's public key, it works through a series of what we call "vaults". The items in each vault are encrypted with a symmetric vault key (AES-GCM), but the vault keys are encrypted with the public keys of the members of the vault. Thus sharing a vault means encrypting the vault key with the public key of the person you are sharing with.

To get it to all work smoothly for people (as well as ensuring that all keys are generated client side and never, ever, sent unencrypted) we need a somewhat more complicated chain of keys encrypting keys encrypting keys than what Martin's answer suggests, but this complexity is largely invisible to the user.

1

A common sentence in security is if a secret is shared by more than 2 persons, then it is no longer a secret. In IT, the second person is often the computer itself, so only one single human being should know it.

IMHO, you should mimic encrypted mails send to different recipients:

  • the message is encrypted with a symetric algorithm and a random key
  • the key is encrypted with an asymetric algorithm and the public key of any of the recipients, those encrypted keys are added to the message

When a recipient receives the message, he uses his private key to recover the symetric key and from that the original message.

You could do the same with your password safes: - each team safe is encrypted with a symetric key - a copy of that key encrypted with the public key of each team member is kept in the database

That way:

  • all passwords necessary for a team are kept together
  • they can only be read by the team members
  • each member has only to know its own private key - or more exactly the password that unlocks the file containing the key...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.