I have a 3rd party app that is going to encrypt a username/password and
send it to me over the URL string. I've found examples of how to
decrypt it but that means I have to have the key file that was used to
encrypt it.
How do I get this key?
Where do I store it?
How do I use it for my decryption?
Using JSP.
Thanks!
Daniel Schneller - 27 Jan 2005 17:47 GMT
Hello!
I think you misunderstand something.
DES is an encryption algorithm, while MD5 is a hashing algorithm.
DES means you take a plaintext (password), apply a function to it using
the key as a parameter and get a ciphertext. Only using the exact same
key you can get the plaintext back.
MD5 takes the plaintext and calculates a hash-value of fixed size. There
is no way to recompute the original plaintext from the hashcode. It is a
one-way function.
Daniel
keshian - 27 Jan 2005 19:36 GMT
OK then let's talk DES since that's what we'd use since I need to
reverse it. Questions still apply.
Thanks for the response.
Mr. Skeptic - 27 Jan 2005 22:24 GMT
The answer depends entirely on how the 3rd party app is encrypting the
information, and what information you have at your end prior to
receiving the data from the 3rd party app.
--greg
keshian - 28 Jan 2005 00:29 GMT
OK let me expound a little bit on the scenario. A 3rd party
application has a varierty of means of encrypting a string value they
want to send to me. 3DES, MD4, MD5 and about 20 other options. They
are going to take this string and encrypt it with one of these methods.
I should receive the key that they used to encrypt the string so that
I can read the encrypted string over the URL, then apply the string to
the encryption key to translate it back to a normal readable string.
keshian - 28 Jan 2005 00:32 GMT
Currently we built our own hash table and are translating characters
to 3 digit numbers, adding the time as an int and then multiplying by
an 18 digit prime.
Thanks for the responses.