0

I have been searching the web and here on how to create an encrypted chat server/client. And I think I got pretty confused now.

Firstly, I created a chat server/client from the free example Knock Knock Server from the Java Examples. So far, everything is working nicely, until I want to encrypt both server and clients.

Secondly, where do I start the encryption first? From the server then to the client? Am I suppose to use that Java Tool to create an encryption file for the server and share it with the clients?

Lastly, I am so confused after looking at so many tutorials on encryption, I don't know what is best for my situation. Can anyone help direct me to the correct tutorial website? Thanks a lot.

P.S. I do not know what kind of encryption tag I am suppose to use. Please edit that for me. Thank you.

Melvin Lai
  • 861
  • 3
  • 17
  • 35

2 Answers2

1

I suggest you read about Transport Layer Security (TLS); It is probably the simplest reasonable approach to security and has been widely adopted (e.g. https and ftps).

In a sentence, it works by establishing a "secure channel" for your existing protocol to communicate over.

TLS/SSL Handshake Protocol

Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249
1

i don't think you need encryption and another tools. just use jsr-356 for websocket based chatting and ssl for securing your content.

Pankaj Sharma
  • 1,833
  • 1
  • 17
  • 22