Java Reference
In-Depth Information
Securing the transport layer
If you were to create a mission-critical application with just the bare concepts you learned
until now, you would be exposed to all sorts of security threats. For example, if you need to
design a payment gateway, where the credit card information is transmitted by means of an
EJB or servlet, using just the authorization and authentication stack is really not enough, as
the sensitive information is still sent across a network and it could be disclosed by a hacker.
In order to prevent disclosure of critical information to unauthorized individuals or sys-
tems, you have to use a protocol that provides encryption of the information. Encryption is
the conversion of data into a form that cannot be understood by unauthorized people. Con-
versely, decryption is the process of converting encrypted data back into its original form
so that it can be understood.
The protocols used to secure the communication are SSL and TLS, the latter being con-
sidered a replacement for the older SSL.
Tip
The differences between the two protocols are minor and very technical. In short, TLS uses
stronger encryption algorithms and has the ability to work on different ports. For the rest of
this chapter, we will refer to SSL for both protocols. Check out Wikipedia for more inform-
ation on it: http://en.wikipedia.org/wiki/Transport_Layer_Security .
There are two basic techniques to encrypt information: symmetric encryption (also called
secret-key encryption) and asymmetric encryption (also called public-key encryption).
Symmetric encryption is the oldest and best-known technique. It is based on a secret key,
which is applied to the text of a message to change the content in a particular way. As long
as both the sender and recipient know the secret key, they can encrypt and decrypt all mes-
sages that use this key. These encryption algorithms typically work fast and are well suited
to encrypt blocks of messages at once.
One significant issue with symmetric algorithms is the requirement of a safe administrative
organization to distribute keys to users. This generally results in increased overhead from
the administrative aspect while the keys remain vulnerable to unauthorized disclosure and
potential abuse.
Search WWH ::




Custom Search