# Encryption algorithm encryptable by md5 of key and decryptable by key [closed]

Is it possible to make an encryption algorithm that can be encrypted by the md5(or any other one way encryption algorithm) of the key and decrypted by the key?

The purpose of this would be for the user to receive the md5 of a randomly generated key, encrypt something with it and send it back to the server. Even if both the key and the encrypted data would be intercepted, it would be undecryptable since only the server knows the decryption key.

## closed as unclear what you're asking by tylerl, NULLZ, user10211, Lucas Kauffman, XanderJul 28 '13 at 15:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I've read your question, no need to presume anything about me either - my reading or my voting habits. Explaining what part of your question you believe I've misunderstood is quite sufficient, thank you very much! – TildalWave Jul 27 '13 at 18:25
• What you're saying doesn't really make a whole heap of sense. I would suggest reading up a bit on how encryption works. – tylerl Jul 27 '13 at 22:53

This is exactly how asymmetric cryptographic systems work normally. In an asymmetric public-key encryption system, an entity holds two keys in a "keypair": a public key `P` and a private key `R`. The system defines two operations, `Enc(message, P)` (encryption with the public key) and `Dec(ciphertext, R)` (decryption with the private key) such that `Dec(Enc(msg, P), R) == msg`. The public key is available to all, in order to encrypt messages, but only the entity that owns the keypair knows the private key, so it is the only one who can decrypt messages.