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 following dialog box. Select the Allow access button to allow the applications to run:
We will also use the SymmetricKeyStoreCreation
class that was developed in symmetric encryption techniques.
Symmetric server application
The symmetric server is declared...