Comparison with Previous Releases

Keys are present in Java 1.1 and the Java 2 platform, but much of the support for them that we’ve discussed here is only available in the Java 2 platform. Key factories and key specifications are only available in Java 2. In Java 1.1, you can get the encoded key data directly from a key, but that’s a one-way operation; there’s no practical way to import a key in Java 1.1.

In Java 1.1, the KeyPairGenerator class extends only the Object class; in Java 2, this class extends the KeyPairGeneratorSpi class. As is usual with this architecture, some of the methods we used are methods of the KeyPairGenerator class in Java 1.1 and methods of the KeyPairGeneratorSpi class in 1.2; for the developer, the end result is the same.

Java 1.1 only supports DSA keys. The RSA-based key interfaces were introduced in Java 2, version 1.2. However, there is no standard security provider in that release that implements RSA keys; only the security providers that come in Java 2, version 1.3 and with JSSE provide an RSA implementation.

Get Java Security, 2nd 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.