Along with a bag of goodies, the Internet brings with it a box full of viruses, spyware, and other malevolent programs. You’ve been warned too many times to always watch what you run on your PC. A malicious program, once run, can do anything, including send your confidential files over the Internet and mercilessly wipe your hard disk. If only all applications were written in Java, then you wouldn’t need to worry so much.
Java was designed with security in mind and Java security was designed for:
There are two main topics of Java security in this chapter:
This chapter starts with an overview of the security feature in Java. This section explains how you can secure a Java application and how it works in general. Then, it will discuss cryptography with emphasis on asymmetric cryptography, the type of cryptography used extensively over the Internet. The immediate and practical use of cryptography is to digitally sign your code, an example of which is also given in at the end of this chapter.