Chapter 8. Network Security

In this chapter, we will explore the support that Java provides to secure communications between applications. We will examine several topics, including the following:

  • The basic encryption process
  • Using a keystore to store keys and certificates
  • Adding encryption to a simple server/client
  • Secure client/server communications using TLS\SSL
  • Secure hashing


There are many security related terms whose meaning and purpose can be daunting when they are first encountered. Most of these terms are applicable to network applications. We will start with a brief overview of many of these terms. In later sections of this chapter, we will go into more details about the ones that are relevant to our discussion.

Central to most security ...

Get Learning Network Programming with Java now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.