Java Reference
In-Depth Information
table 8.3
encryption Algorithms Available as Part of the JSSe
Cryptographic Algorithm
Cryptographic Process
Key Lengths (Bits)
RSA
Authentication and key
exchange
512 and larger
RC4
Bulk encryption
128
128 (40 effective)
DES
Bulk encryption
64 (56 effective)
64 (40 effective)
Triple DES
Bulk encryption
192 (112 effective)
AES
Bulk encryption
256
128
Difie-Hellman
Key agreement
1024
512
DSA
Authentication
1024
8.5.2 Cryptography and JSSE
As already stated, the secure transport of the data also includes encrypting the data before transfer
from the client side and decrypting at the server side and vice versa. JSSE, therefore, needs to be
in perfect synchronization with the other aspects of Java security, namely JCA and JCE. Table 8.3
illustrates the cryptographic capabilities of JSSE.
8.5.3 Core Classes and Interfaces of JSSE
8. 5. 3.1
SocketFactory
and
ServerSocketFactory
Classes
he core JSSE classes are part of two packages—the
javax.net
and the
javax.net.ssl
. he
two most important classes are
SocketFactory
and
ServerSocketFactory
classes.
he
javax.net.SocketFactory
class is an abstract class and is used to create “client
sockets.” It must be subclassed by other factories for creating particular subclasses of client
sockets and thus provide a general framework for the addition of public socket-level function-
ality. here are a number of
createSocket()
methods that help in creating appropriate
sockets on the client system.
he
javax.net.ServerSocketFactory
class is pretty much analogous to the
SocketFactory
class; however, it is used speciically for creating “server sockets.” Again, there
are a number of
createSocket()
methods that help in creating appropriate sockets on the
server system.
8.5.3.2
SSLSocketFactory
and
SSLServerSocketFactory
Classes
hese classes represent secure socket factories. hey are a part of the
javax.net.ssl
pack-
age and help in the creation of an appropriate factory object. he
SSLSocketFactory
class is
an abstract subclass of
javax.net.SocketFactory
and extends the
java.net.Socket
Search WWH ::
Custom Search