A Quick and Dirty Public Key Implementation

The JCE is frustrating in that it omits two very useful types of encryption: stream ciphers and public key ciphers. Although the JDK includes some support for public key encryption, it is only enough to support digital signatures and not full public key encryption. What is interesting about the JDK is that it has just enough support for public keys that you can create your own public key encryption and decryption routines with very little effort.

The RSA encryption algorithm, named for its inventors—Rivest, Shamir, and Adleman—is one of the oldest and best-known forms of public key encryption. Although the mathematics behind the algorithm might be a little complex, the algorithm itself is not. An RSA ...

Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.