Pregunta

I have a chat program that uses sockets for sending and receiving data. Now, I want to encrypt the data transfers via sockets with Diffie-Hellman key exchange system. What is the easiest way to do that?

¿Fue útil?

Solución

What is the easiest way to do that?

Use JSSE and configure to use Diffie Hellman.
JSSE is Java's socket extension for SSL. Using the SecureSocket classes which provide the same interface as regular sockets (so your current code does not need to change) but operate over SSL you can achieve encryption in your network connectivity.
You should study the link provided to see how to configure to do what you need.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top