Note: Before using this information and the product it supports, read the general information under Notices.
This edition of the User Guide applies to:
and to all subsequent releases and modifications until otherwise indicated in new editions.
(c) Copyright Sun Microsystems, Inc. 1997, 2003, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
(c) Copyright International Business Machines Corporation, 1999, 2006. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
The security components described in this User Guide |are shipped with the SDK and are not extensions. They provide a wide range |of security services through standard Java(TM) APIs (except iKeyman). The |security components contain the IBM(R) implementation of various security |algorithms and mechanisms.
|If your JVM ships with a native jpkcs library, IBM's security components can take advantage of hardware cryptography |through the provider IBMPKCS11Impl. IBMPKCS11Impl is implemented as a provider |of JCE, so that existing applications that use JCE software (such as IBMJCE) |can take advantage of a hardware-capable PKCS#11 environment. IBMPKCS11Impl |interacts with different hardware devices to provide:
|IBMPKCS11Impl enables JSSE to take advantage of hardware cryptography |through the IBMJSSE2 provider (new in v1.4.2.).
|The SDK v.1.4.2 also provides two FIPS 140-2 certified cryptographic modules, |IBMJSSEFIPS and IBMJCEFIPS. They are implemented as JSSE and JCE providers |respectively. Because they support FIPS-approved cryptographic algorithms |and TLS cipher suites (in IBMJSSEFIPS) only, applications that are written |using these two modules must comply with the FIPS 140-2 requirements.
|The CertPath component provides PKIX-compliant certification path building |and validation.
|The JGSS component provides a generic API that can be plugged in by different |security mechanisms. IBM JGSS uses Kerberos V5 as the default mechanism for |authentication and secure communication.
|The JAAS component provides a means for principal-based |authentication and authorization
|The JCE framework has three providers: IBMJCE is the pre-registered default |provider; IBMPKCS11Impl and IBMJCEFIPS are optional.
|JSSE is the Java implementation of the SSL and TLS protocols. It has three |providers: IBMJSSE is the pre-registered default provider, IBMJSSE2 and IBMJSSEFIPS |are optional.
|The Java security configuration |file does not refer to the Sun provider. The IBM JCE provider has replaced |the Sun provider. The |JCE supplies all the signature handling message digest algorithms that were |previously supplied by the Sun provider. It also supplies IBM's secure random |number generator, IBMSecureRandom, which is a real Random Number Generator. |SHA1PRNG, also part of IBM JCE, is a Pseudo Random Number Generator and is |supplied for code compatibility. SHA1PRNG is not guaranteed to produce the |same output as the SUN SHA1PRNG.
In the SDK v1.4.1, the following options were added to the java.security.debug property to help you debug Java Cryptography Architecture (JCA)-related problems:
An example of a valid option string is "provider, algorithm:stack".
Technical changes made to this guide for Version 1.4.2, other than minor or obvious ones such as updating "1.4.1" to "1.4.2", are indicated in red when viewing in HTML or in a color-printed copy and by vertical bars to the left of the changes.
The IBM SDK v1.4.2 has been tested with the following |default security providers:
|You can add other IBM security providers either statically or from within |your Java application's code. To add a new provider statically, edit a java |security properties file (for example, java.security). To add a new provider |from your application's code, use the methods of the java.security.Security |class (for example, java.security.Security.addProvider()).
|You can also add the following IBM security providers:
|The iKeyman utility is a tool for managing your digital certificates. With iKeyman, you can:
|There are no changes in v1.4.2 over v1.4.1.
The following change was added in v1.4.1:
The iKeyman User Guide is at http://www.ibm.com/developerworks/java/jdk/security/index.html.
The Java 2 platform provides a means to enforce access controls based on where code came from and who signed it. These access controls are needed because of the distributed nature of the Java platform where, for example, a remote applet can be downloaded over a public network and then run locally.
However, before 1.4.0, the Java 2 platform did not provide a way to enforce similar access controls based on who runs the code. To provide this type of access control, the Java 2 security architecture requires the following:
The Java Authentication and Authorization Service (JAAS) framework provides these enhancements.
For a general overview of JAAS, see the Sun Web site: http://java.sun.com/products/jaas.
The IBM version of JAAS for Linux differs from the Sun version of JAAS in the following way:
The original release of JAAS for Linux and the Java 2 Platform included the following login module and principal classes:
These original platform-dependent principal classes will be replaced by a set of platform-independent principal classes in future releases of JAAS for Linux. To ease migration, this version of JAAS contains both the original set and the new set of principal classes. Also included is a new login module called com.ibm.security.auth.module.LinuxLoginModule2000. This new login module parallels LinuxLoginModule in functionality, but references the new set of principals. Additional principal classes have been included to facilitate the writing of new login modules.
You are encouraged to use the new set of principals when developing applications that use JAAS. Previously developed applications will be compatible with this version and future versions of JAAS released for the SDK version 1.4.0.
If you migrate applications to the new set of principals, most of the changes
you will encounter will be in JAAS policy and configuration files rather than
in the applications. Refer to the following table for more information.
Original Class | Replaced by |
---|---|
LinuxPrincipal | UsernamePrincipal |
LinuxNumericGroupPrincipal | GroupIDPrincipal
PrimaryGroupIDPrincipal |
LinuxNumericUserPrincipal | UserIDPrincipal |
n/a | DomainPrincipal |
n/a | DomainIDPrincipal |
n/a | ServerPrincipal |
n/a | WkstationPrincipal |
LinuxLoginModule | LinuxLoginModule2000 |
Principal classes are found in the com.ibm.security.auth package. The login module is found in the com.ibm.security.auth.module package. Check the JAAS API documentation (javadocs) for more information on the new principal classes.
For example, this JAAS policy grant block:
grant Principal com.ibm.security.auth.LinuxPrincipal "bob", Principal com.ibm.security.auth.LinuxNumericUserPrincipal "727", Principal com.ibm.security.auth.LinuxNumericGroupPrincipal "12" { permission java.util.PropertyPermission "java.home", "read"; };
would be replaced by:
grant Principal com.ibm.security.auth.UsernamePrincipal "bob", Principal com.ibm.security.auth.UserIDPrincipal "727", Principal com.ibm.security.auth.GroupIDPrincipal "12" { permission java.util.PropertyPermission "java.home", "read"; };
For detailed information, including API documentation and samples, see the developerWorks Web site at http://www.ibm.com/developerworks/java/jdk/security/index.html.
The Java Certification Path API provides interfaces and abstract classes for creating, building, and validating certification paths (also known as "certificate chains").
The IBM CertPath classes differ from the Sun version in the following ways:
|The following changes were added in v1.4.2, in SR1:
|The following change was added in v1.4.2:
The following change was added in v1.4.1, in SR1:
The following changes were added in v1.4.0:
For detailed information, including API documentation and samples, see the developerWorks Web site, at http://www.ibm.com/developerworks/java/jdk/security/index.html.
The Java Cryptography Extension (JCE) provides a framework and implementations for encryption, key generation and key agreement, and Message Authentication Code (MAC) algorithms. Support for encryption includes symmetric, asymmetric, block, and stream ciphers. The software also supports secure streams and sealed objects. JCE supplements the Java 2 platform, which already includes interfaces and implementations of message digests and digital signatures.
You can obtain unrestricted jurisdiction policy files from http://www.ibm.com/developerworks/java/jdk/security/index.html.
|Note that the v1.4.1 unrestricted (and restricted) jurisdiction |policy files are not suitable for use with v1.4.2 and will cause security |exceptions.
The IBM JCE implementation is in the com.ibm.* packages. Sun's implementation is in the com.sun.* packages.
The IBM version of JCE differs from the Sun version in the following ways:
|The following changes were made in v1.4.2:
There were no changes in v1.4.1 from v1.4.0.
The following changes were made in v1.4.0:
For detailed information, including API documentation and samples, see the developerWorks Web site at http://www.ibm.com/developerworks/java/jdk/security/index.html.
The Java Generic Security Service (JGSS) API provides secure exchange of messages between communicating applications.
The JGSS is an API framework that has Kerberos V5 as the underlying default security mechanism. The API is a standardized abstract interface under which you can plug different security mechanisms that are based on private-key, public-key, and other security technologies. JGSS shields secure applications from the complexities and peculiarities of the different underlying security mechanisms. JGSS provides identity and message origin authentication, message integrity, and message confidentiality. JGSS also features an optional Java Authentication and Authorization Service (JAAS) Kerberos login interface, and authorization checks. JAAS augments the access control features of Java 2, which is based on CodeSource with access controls based on authenticated principal identities.
The IBM version of JGSS differs from the Sun version in the following ways:
|The following changes are added in v1.4.2:
The following change was added in v1.4.1:
For detailed information about JGSS, including API documentation and samples, see the developerWorks Web site, at http://www.ibm.com/developerworks/java/jdk/security/index.html.
The Java Secure Socket Extension (JSSE) is a Java package that enables secure Internet communications. It implements a Java version of SSL (Secure Sockets Layer) and TLS (Transport Layer Security) protocols and includes functions for data encryption, server authentication, message integrity, and optional client authentication.
By abstracting the complex underlying security algorithms and "handshaking" mechanisms, JSSE minimizes the risk of creating subtle but dangerous security vulnerabilities. Also, it simplifies application development by serving as a building block that you can integrate directly into your applications. Using JSSE, you can provide for the secure passage of data between a client and a server running any application protocol (such as HTTP, Telnet, NNTP, and FTP) over TCP/IP.
The IBM JSSE Provider default implementation does not allow anonymous ciphers. However, you can override the default implementation by writing a TrustManager class that allows anonymous ciphers.
In a user application you can use a hardware token (that is, hardware cryptographic adapter), for Trusted Certs or Private Certs, in a user application by specifying the token type "PKCS#11" and token library name in a call to the com.ibm.jsse.SSLContext class init method:
public final void init(java.lang.String tokenType, java.lang.String token, java.lang.String password) throws java.security.KeyManagementException
For example:
SSLContext context = ...; context.init("PKCS#11", "/usr/lib/pkcs11/PKCS_11.so ", "password");
To specify a specific slot, the slot number should be specified at the end of the token. For example, using slot # 2:
SSLContext context = ...; context.init("PKCS#11", "/usr/lib/pkcs11/PKCS_11.so:2", "password");
The known differences between the IBM JSSE and Sun JSSE implementations are described below. These differences do not affect either the API specifications or the JSSE architecture.
|The following changes were added in v1.4.2:
There were no changes in v1.4.1 from v1.4.0.
The following changes were added in v1.4.0:
For detailed information, including API documentation and samples, see the developerWorks Web site, at http://www.ibm.com/developerworks/java/jdk/security/index.html.
| | |The IBMJSSE2 Provider is a new provider included with the SDK. It is not pre-registered in the java.security properties file |included with the SDK.
|The IBMJSSE2 Provider has improved serviceability because the tracing and |debugging information that is supplied has been improved to assist with problem |determination. Also, the tracing is now configurable.
|The IBMJSSE2 Provider uses IBM's JCE providers, IBMJCE, IBMJCEFIPS, IBMJCE4758, |and IBMPKCS11Impl only. The IBMJSSE2 Provider cannot be configured to use |another JCE provider because of US government export regulations.
|The IBMJSSE2 Provider does not contain cryptographic code because it uses |cryptographic support from the IBMJCEFIPS Provider. Therefore, IBMJSSE2 is |not required to be FIPS certified.
|The IBMJSSE2 Provider can be configured to use hardware cryptographic accelerators' |potential performance improvements and to use hardware cryptographic cards |as keystores for greater flexibility in key and trust management. The IBMJSSE2 |Provider uses the IBMPKCS11Impl Provider to provide hardware cryptographic support.
|The IBMJSSE2 Provider, in addition to the simple X.509 based trustmanager |also supported by the IBMJSSE Provider, supports a second, PKIX-compliant |trust manager.
| |The IBMJSSE Provider and the IBMJSSE2 Provider differ in the following |ways:
|The IBMJSSE2 Provider differs from the Sun JSSE in the following ways:
|The IBMJSSE2 Provider is new for v1.4.2.
| |For detailed information, including API documentation and samples, see |the developerWorks Web site, at http://www.ibm.com/developerworks/java/jdk/security/index.html.
| | |The IBMPKCS11Impl Provider uses the Java Cryptography Extension (JCE) and |Java Cryptography Architecture (JCA) frameworks to add the ability to use |hardware cryptography through the Public Key Cryptogaphic Standards #11 (PKCS |#11) standard. This new provider takes advantage of hardware cryptography |within the JCE architecture and improves security and performance with minimal |changes to existing Java applications.
|The IBMPKCS11Impl provides:
|PKCS#11 is a standard that provides a common application interface to cryptographic |services on various platforms through several hardware cryptographic devices. |The following devices are supported by this provider:
|Sun does not provide IBMPKCS11Impl.
| |The IBMPKCS11Impl Provider is new for v1.4.2.
| |For detailed information, including API documentation, see the developerWorks |Web site at http://www.ibm.com/developerworks/java/jdk/security/index.html.
| | |The IBM Java JCE (Java Cryptographic Extension) FIPS Provider (IBMJCEFIPS) |for multi-platforms is a scalable, multi-purpose cryptographic module that |supports FIPS-approved cryptographic operations through Java APIs. The IBMJCEFIPS |includes the following Federal Information Processing Standards (FIPS) 140-2 |[Level 1] compliant components:
|To meet the requirements specified in the FIPS publication 140-2, the encryption |algorithms used by the IBMJCEFIPS Provider are isolated into the IBMJCEFIPS |Provider cryptographic module, which you can access using the product code |from the Java JCE framework APIs. Because the IBMJCEFIPS Provider uses the |cryptographic module in an approved manner, the product complies with the |FIPS 140-2 requirements.
| |Type | |Algorithm | |Specification | |
---|---|---|
Symmetric Cipher | |AES (ECB, CBC, OFB, CFB and PCBC) | |FIPS 197 | |
Symmetric Cipher | |
| DES (ECB, CBC, OFB, CFB and PCBC) - for legacy systems only |Triple DES (ECB, CBC, OFB, CFB and PCBC) | |
|FIPS 46-3 | |
Message Digest | |
| SHA1 |HMAC-SHA1 | |
|
| FIPS 180-1 |FIPS 198 | |
|
Asymmetric Cipher | |RSA | |PKCS#1 | |
Key Agreement | |Diffie-Hellman | |PKCS #3 (Allowed in Approved mode) | |
Random Number Generator | |X 9.31 PRNG | |ANSI X 9.31 1998 | |
Random Number Generator | |FIPS 186-2 Appendix 3.1 | |FIPS 186-2 | |
Digital Signature | |DSA (512 - 1024) | |FIPS 186-2 | |
Digital Signature | |RSA (512 - 2048) | |FIPS 186-2 | |
In addition, the IBMJCEFIPS supports the following unapproved algorithms:
| |Type | |Algorithm | |Specification | |
---|---|---|
Random Number Generation | |Universal Software Based Random Number Generator | |Available upon request from IBM. Patented by |IBM, EC Pat. No. EP1081591A2, U.S. pat. Pend. | |
For more detailed information on the FIPS certified providers (IBMJCEFIPS |and IBMJSSEFIPS) see the IBM Java JCE FIPS 140-2 Cryptographic |Module Security Policy, and the IBM Java JSSE FIPS |140-2 Cryptographic Module Security Policy. For usage information and |details of the API, see the IBM Java JCE FIPS (IBMJCEFIPS) |Cryptographic Module API document. All these documents are available |at http://www.ibm.com/developerworks/java/jdk/security/index.html.
| |Sun does not provide IBMJCEFIPS.
| |The IBMJCEFIPS Provider is new for v1.4.2.
| |For detailed information, including API documentation and Security Policy, |see the developerWorks Web site, at http://www.ibm.com/developerworks/java/jdk/security/index.html.
| | |The IBM Java JSSE (Java Secure Sockets Extension) FIPS 140-2 Cryptographic |Module (IBMJSSEFIPS) for Multi-platforms is a scalable, multi-purpose Secure |Sockets provider that supports FIPS-approved TLS cipher suites through the |Java APIs. The IBMJSSEFIPS includes the following Federal Information Processing |Standards (FIPS) 140-2 [1] compliant components:
|To meet the requirements specified in the FIPS publication 140-2, the encryption |algorithms used by the IBMJSSEFIPS Provider are isolated into the IBMJSSEFIPS |Provider cryptographic module, which you can access using the product code |from the Java JSSE framework APIs. Because the IBMJSSEFIPS Provider uses |the cryptographic module in an approved manner, the product complies with |the FIPS 140-2 requirements.
|The IBMJSSEFIPS module supports the TLS protocol and the following cipher |suites:
|The IBMJSSEFIPS module has no direct user interfaces. This module is a |JSSE provider and the interface to it is from the JSSE framework APIs only. | Your Java code should use only those IBM JSSE interfaces that are documented |in the JSSE API User's Guide and associated IBMJSSEProvider Class Documentation. For more information, see the IBM Java JSSE FIPS 140-2 Cryptographic Module Security Policy. You can find these guides at http://www.ibm.com/developerworks/java/jdk/security/index.html
| |Sun does not provide IBMJSSEFIPS.
| |The IBMJSSEFIPS Provider is new for v1.4.2.
| |For detailed information, including API documentation and Security Policy, |see the developerWorks Web site, at http://www.ibm.com/developerworks/java/jdk/security/index.html.
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the information. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this information at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose of enabling (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact:
Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.
The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM and zSeries are trademarks or registered trademarks of International Business Machines Corporation in the United States, or other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.