Posted By:
Kenji_Hollis
Posted On:
Sunday, August 25, 2002 10:59 PM
How do I encrypt/decrypt a message using Diffie-Hellman Public Keys that have already been created? I have looked through several examples, and have not found results that will work for me. My guess is that one side has to generate a key on the fly for the other side to use, but if this is the case, this will just simply not work at all. I need an example that will do the following: Load in a public/private key from file system Accept the other side's PUBLIC key as a parameter in Base64 format. Encrypt a message with the public key and send it back. The other side then checks the encrypted message, and decrypts it. Both
More>>
How do I encrypt/decrypt a message using Diffie-Hellman Public Keys that have already been created? I have looked through several examples, and have not found results that will work for me.
My
guess
is that one side has to generate a key on the fly for the other side to use, but if this is the case, this will just simply not work at all.
I need an example that will do the following:
Load in a public/private key from file system
Accept the other side's PUBLIC key as a parameter in Base64 format.
Encrypt a message with the public key and send it back.
The other side then checks the encrypted message, and decrypts it.
Both keys are already generated, and stored on either side. Server has its own public/private key, and the other side has its own public/private key. The server loads in the public and private key, but the server only receives the public key of the other side, and encrypts using that.
I'm stuck. I'm hopelessly stuck. I've sat at this problem for two days straight (16 hours of coding) and I still cannot figure this out. I even have the Java Cryptography book. I STILL can't figure this out.
SOMEBODY, PLEASE HELP ME!
If I can find an example that shows how to encrypt and decrypt data from public keys that are static files on the filesystem, that is what I'm looking for.
Thank you in advance.
<<Less