Your assumptions are incorrect.
The password is, optimally, in the creator's mind or stored somewhere else away from the data (less optimal).
When you encrypt a file you create the password for that encryption and keep it to yourself or divulge it only to the intended recipient of that encrypted file if it is not meant for self-storage.
When you are decrypting a file, the program asks you for the password and cannot decrypt the file until you give it that password.
Just give a few moments thought to this: If the password were locally stored, even as a hash, how secure would that encrypted file be? It would be silly to the point of stupidity to create a system like that, and it could not, in any way, be called secure.
UPDATE for comments 1
I'm guessing you're confusing authentication and encryption.
In authentication a hashed copy of the password is compared against a stored hash, and then the yes or no comes back to allow or disallow the login.
In encryption the password is more likely a key portion of a formula. We know WHERE in the formula that password goes, and we know the rest of the formula, but without the password the decryption process will not match the encrypted data and will fail.
In authentication, a strong password only lessens the chance that the password will be guessed or that the hash will be recognized and reversed through dictionary attacks.
In encryption, a strong password could actually improve the "quality" of the encryption upon the data.
Another thing: If encryption worked like authentication, then you wouldn't even need to find the password. The data would always be encrypted using the same formula, and your password would simply tell legitimate programs it was acceptable to decrypt or encrypt the data using a different piece of data, and THAT would be a key worth finding and therefore would very likely be found.
But in reality, because the password is actually PART of the encryption formula, knowing the password for one piece of encrypted information does not decrease the security of other information encrypted even using the same system.
Without brute forcing it? Either find a flaw in the encryption itself (and probably score big on the various $$$ challenges/bounties) or enter the correct password. There's really no other way about it. – Michael Frank – 2017-01-26T01:02:54.857
1Ahhh.....is this something you SHOULD be doing? What is your specific interest here? – mdpc – 2017-01-26T01:14:01.250
1@MichaelFrank I think his root issue is conflating how authentication and encryption work and the role passwords play in each. – music2myear – 2017-01-26T16:38:35.323