0
$\begingroup$

I would like to ask about vulnerabilities of the following algorithm for a password manager.

It is structured as follows:

There is a master password UTF-8 10 characters long, not to be stored anywhere.

For each password, the following information is saved into a database file:

  1. Account name.
  2. Randomly generated UTF-8 4 characters string.
  3. Rules for password: e.g. at least one digit, one special character within ..., etc.

Then the user has to think of an algorithm of its own choice to get by hand a 3-digit number from the account name, for example through a table that maps the characters of the account name to 0-9 digits. This number will be entered manually.

We then concatenate the characters of the master password at the positions defined by the digits of the above 3-digit number to make a 3-character string.

We concatenate the above 3-character string with the randomly generated 4 characters string in the database, and then hash it with SHA256.

Then there is an algorithm that given the hash value and the rules in the database, gets a unique valid password.

Let's say that we save the database in clear.

Is this algorithm safe enough? Would it be better to encrypt the database with the master password? Does the "by hand" algorithm, to be chosen by the user, add some security or not? Other hints or comments?

$\endgroup$
3
  • 1
    $\begingroup$ What's the goal here? Are you trying to do a deterministic password manager? This sounds very odd. A good metric for whether something is a good idea is comparison with existing protocols. A traditional password manager that encrypts a database file is better than a deterministic password manager, and deterministic password managers are normally all about not storing anything. $\endgroup$ Commented Nov 21 at 12:47
  • $\begingroup$ Well I was thinking whether the algorithm might be more secure than just encrypt the password database, you answered negatively. I will read your web page about "deterministic password managers" that I just found after your comment. $\endgroup$ Commented Nov 21 at 12:56
  • $\begingroup$ Yes, there's nothing wrong with the traditional approach. That's the point of encryption. However, a 10 character master password isn't very strong. You ideally want a password with 128+ bits of entropy, which is around 20 characters or 10 words for a passphrase. You shouldn't be storing any information in the clear besides what's needed to decrypt the database file (e.g., the salt). Surprised you found that post; thanks for reading. That does summarise the limitations of deterministic password managers. $\endgroup$ Commented Nov 21 at 17:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.