Edit
I'm bumping this one since I still haven't got a conclusive answer (one or two are close though). What I'm looking for is basically a yes or no answer with some info to back it up.
We've got a system storing user passwords encrypted by a generic system key in the database. That could be catastrophic (obviously) if someone with DB access got a hold of that system key.
The correct way we now know (according to most(?)) is to store the salted hash of of the PW in the DB, but being relatively close to a release we'd like to minimize the code change and therefore thought a very simple way to prevent someone reading out PW's from the DB would be to simply reverse the process and switch the parameters.
That is, we'll encrypt a per system (hundreds of them) unique salted string (with a per encryption added random tail) using the users password as a key, storing the result in the DB. At PW verification we'll de-crypt the string stored in the DB with the entered PW and match with the system key for verification.
System key+randomencrypt withpasswordstore in DBencrypted key.
I.e. the users passwords are never stored, and in our simple minds are irretrievable.
But being noobs in the encryption sector we wonder if someone with more experience in the area could answer the simple question -
Is it possible to figure out the key from the original and the encrypted string?
We think this a brilliant ;) way to ensure user passwords from being compromised, but can't find anything on the method online. This makes us unsure about it, hence asking this great community.
(And brute force is not a adequate answer, since that (under the circumstances) is impossible to protect from.)
Edit:
I'll paste one of my comments here to (hopefully) make some things clearer:
@zaph Thanks for your input, but I think most are missing the point here. We have a code-freeze in a few days for an upcoming release, and I've already implemented the method I've mentioned in the question. Until next release, I'll read up on the subject and implement a third party library like scrypt or similar. I really just need to know if there are existing viable algorithms for reverse the process and thus making my new implementation worse than the old encrypted password approach.