|
Frequently Asked Questions
This FAQ answers the most common technical questions regarding the
JavaTM Cryptography Extension (JCE) 1.2.1:
- Is there an archive of JCE mailing lists?
There is no JCE-specific mailing list. However, the java-security@sun.com alias
provides a feedback mechanism for security-related aspects of the
Standard Edition of the Java Platform, including JCE.
All emails sent to that alias are archived at:
http://archives.java.sun.com/archives/java-security.html.
- What are the licensing terms for JCE 1.2.1?
The JCE 1.2.1 software is free.
Note that at this point, we are not planning to
make the JCE 1.2.1 source code available, unless there is a huge demand
for it. Please send email to Barbara Kroczak (barbara.kroczak@eng.sun.com)
if you would like to have access to the JCE source. Depending on the
number of requests we receive, we may decide to make the source available under
a yet-to-be-determined licensing agreement.
- Can I access the JCE 1.2.1 software from outside the U.S. or Canada?
Yes. The JCE 1.2.1 is exportable, meaning that it can be downloaded
from anyway. The exportability is the major new feature in JCE 1.2.1.
- Does JCE 1.2.1 work with JDK 1.1.x?
JCE 1.2.1 is a standard extension of JDK 1.2. It does not work with
any previous JDK releases.
Also, Java Software does not provide a version of JCE that would
work with an earlier version of JDK.
- My cipher implementation is not found. I wrote my own
provider that subclasses
javax.crypto.CipherSpi and
supplies its own cipher implementation. However, I canot get an
instance of my cipher using Cipher.getInstance() .
In order to achieve exportability, only providers signed by a trusted
entity can be plugged into the JCE 1.2.1 framework. The JCE provider
signing policies have yet to be finalized.
- The following line of code executes just fine:
MessageDigest dig = MessageDigest.getInstance("MD5");
However, this line:
KeyGenerator kgen = KeyGenerator.getInstance("DES");
causes the following exception to be raised:
java.security.NoSuchAlgorithmException: Algorithm DES not available
Can I assume that JCE 1.2.1 and JDK 1.2 have been configured properly if
MD5 works?
JDK 1.2 comes standard with a cryptographic service provider named
"SUN" (which supplies an implementation of the MD5 message digest
algorithm), and JCE 1.2 comes standard with a different provider named
"SunJCE" (which implements a session key generator
for DES). While the "SUN" provider is registered automatically, the
"SunJCE" provider needs to be registered explicitly.
Please refer to the install guide
for directions on how to register the "SunJCE" provider. Once you have
registered the "SunJCE" provider, the above exception will disappear.
- When I use
javax.crypto.CipherOutputStream to encrypt data and write them to the underlying output stream, and javax.crypto.CipherInputStream to read the encrypted data from the underlying input stream and decrypt them, there seems to be a problem if the encapsulated Cipher object implements a block cipher w/ padding. CipherInputStream fails to recover the original data written using CipherOutputStream.
Make sure that you call the CipherOutputStream 's
close method when you are done writing data to the
underlying output stream. This will cause any bytes buffered by the
encapsulated Cipher object to be padded and written out.
Only when you call CipherOutputStream.close() will the encryption
operation be finalized, i.e., will Cipher.doFinal() be
called (on the encapsulated cipher).
CHANGES |
README |
LICENSE |
INSTALL |
FAQ |
KNOWN BUGS |
SUBMIT BUGS
|