I am writing a collaborative password management system and have questions pertaining to the storage of encrypted passwords. Essentially, I would like several users to be able to access and change a database.
High level:
- User runs the client which asks for username/password authentication (backended with AD/Samba/Radius/local).
- Upon success, the user is required to enter a shared keyring password. This should be known to all users who have access.
- The encrypted database is sent to the client which decrypts it and displays it to the authenticated user.
Slightly more detailed:
- Upon database initialization, a random key is generated and encrytped with the human-readable keyring password. This encrypted key is stored on disk.
- Each entry in the database that contains passwords is stored encrypted with the original key.
- The keyring password is therefore required to decrypt the rest of the passwords.
- The keyring password can also be updated without re-encrypting the entire database. All that happens is you decrypt the key with the previous password and re-encrypt the key with the new one.
Is this all for naught? Is this considered bad design? My goal is to prevent someone from simply downloading the database if given access to the server. I relayed this off of a friend of mine who half-jokingly said "Yes, because this prevents people from stealing Chrome's database." How seriously should I take that?
Any recommendations for proper design, algorithms to use, etc.?