How secure is a password generator that runs SHA256 on a passphrase I was looking into how password managers work and it seems to me that they all store the passwords (albeit encrypted).
How secure would a scheme be where the password manager always generates the password when you ask for it based on your master password and some salt that can be generated from the website name. For example something like
password=sha256(&quot;mymasterpassword&quot;+md5(&quot;facebook&quot;))
Trivially it seems no more vulnerable than the normal scheme, the attacker still needs to guess my master password, so what security flaw am I missing?
Password managers with similar schemes do exist, and are called &quot;deterministic password managers&quot;. While the idea does generally does work, this blog post names some rather big practical disadvantages, two of which I'll summarize:

Possibility of master passphrase compromise: If your master secret is ever compromised, all your passwords are now immediately compromised. Compare a classical, disk-based password manager: Here, an attacker would need access to the file as well as to the master passphrase.
Also, with just access to a single password (as well its seed, i.e. which site is was used for), an attacker can start trying to crack the master passphrase by brute-force. Especially a fast hash function like SHA256 instead of a purposefully slow key derivation function like Argon2 or PBKDF means that your master passphrase better be really good - so it would be advisable to use a randomly generated cryptographic key instead of a human-generated password*. This key would need to be stored somewhere, defeating the whole point of the scheme.

Without stored state, you loose some very important functionality: Once generated, it's now impossible to change a password, without memorizing a changed seed. For example, if your facebook password got compromised, you'd now have to remember typing in &quot;facebook1&quot; instead of &quot;facebook&quot;. This is bad, because it discourages users from changing passwords they suspect might have been compromised.
Additionally, password requirements differ from site to site. Some might require special characters, some might forbid them altogether. To accommodate this, you'll also have to remember the exact password generator settings for each website.


In conclusion, your idea is probably sound from a cryptographic standpoint, but only as long as the master passphrase contains enough entropy (that amount being substantially higher than for online-brute-force-only attack scenarios). But in the real world, there are a lot of security and usability considerations making it generally not very practical, compared to a normal password manager.
* Of course, one could generate a rather long random passphrase that is both high-entropy and human-readable. But it might very well exceed your expectations for what is a reasonable length for a password.