O'Reilly logo

Learning Network Programming with Java by Richard M Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Symmetric encryption client/server

This section demonstrates how to use symmetric encryption/decryption in a client/server application. The following example implements a simple echo client/server allowing us to focus on the basic process without digressing into specific client/server issues. The server is implemented with the SymmetricEchoServer class and client using the SymmetricEchoClient class.

The client will encrypt a message and send it to the server. The server will then decrypt the message and send it back in plain text. The response can easily be encrypted if needed. This one-way encryption is sufficient to illustrate the basic process.

When running the applications that are discussed in this chapter in Windows, you may encounter the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required