Let's say you have two user defined strings, X, Y and you want to hash them into the hash Z. That is what most websites would do, X is the user's password and Y is the salt. It takes a lot of time to turn Z back to X + Y.
What I am looking for, is this plus having the ability to get back X if given Y , Z. So if F was a function where F(X , Y) = Z (acting like SHA1, SHA2, etc), I want a function F' where F'(Z , Y) = X. Is there any kind of hashing algorithm that resembles this?
It looks like public-private key encryption where Y is your public key and X is your message, producing Z, then using a alternate Y private key you can combine it with the Z to recover your message X, but what I want is the ability for X, Y to be arbitrarily user defined. Is this theoretically possible? If so does there exist this kind of "Triangular" encryption algorithm?
I read about https://mysocialcloud.com/ today which is a service that holds ALL your internet passwords in one account. I am almost certain they are storing the passwords in plain text, or even if they encrypted, their server has both the key and the encrypted data, and if it is accessed by an attacker, they would be able to recover all of the users' passwords.
Then I thought about the kind of hashing I mentioned above, how it would work is:
A user sets a "security token" like a password, that is different to their account password. When the user enters their passwords on the services' form, the password is hashed, client side using the function F(X, Y) = Z where Y is their security token and Z is the "hash". Only the "hash" gets stored at the server. When the user wants to recover all of their stored passwords, the server sends the client the "hash"es, which can be decoded using the user's security token, in the client itself.
With this method the service won't be storing any password data in plain text.