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 ...
Get Learning Network Programming with Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.