Link to home
Start Free TrialLog in
Avatar of 4eyesgirl
4eyesgirl

asked on

Is the Diffie-Hellman Key exchange algorithm available in java?

Hi expert,

Is the Diffie-Hellman Key exchange algorithm available in java?  If so, can someone show me some example codes?

Thanks,
4eyes
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

What would you use it for?
Avatar of 4eyesgirl
4eyesgirl

ASKER

to exchange symmetric key for two party to communicate securely
Why not just use secure sockets - it'd be much easier?
I already write the code to use 3DES to encrypt and decrypt the code, so I think I only need to use Diffie-Hellman to generate a key set and will integrate it with the 3DES codes.  

I checked out the link below and it looks to me this is not so hard to do, am I wrong?
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/distrib/dsch_key_xihm.mspx?mfr=true

Just wondering if Java.secure support this algorithm and if so, how does it work.

Key exchange algos are already an internal part of SSL so whatever way you look at it, it's going to be easier for you just to use secure sockets
Okay, I see.  

As you probably aware, I am trying to learn the security concept here.

Does the SSL implements by using the crytography algorithm such as AES, RSA, etc...And it also uses the key exchange algorithm intenrally.  

So who should use java.security.*?  I am a bit confused.  In this case, everyone should use SSL but not the java.security.* classes?
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
CEJH -

I guess I have to reward objects the point this time as he provides the answer that I am looking for.

But I do like the fact that you try to find me a better solution.  So I will open a new question related to SSL.

Thanks
>>So I will open a new question related to SSL.

Well we're back to the issue we had before. It's better to reopen this question and sometimes the only way that accords with site rules. We can discuss the purposes of these libraries further
This is kind of different because it is not really the same question.  My original question is to get an example of Diffi-Hallman codes and you provide other suggestion which is unrelated to this topic.

I think it is a different scenario.
Yes, it depends on what your objective is. If you want to transmit data to someone without a third party being able to read it then all you need is SSL