f



Encrypt using PrivateKey? NoSuchAlgorithmException: Cannot find any provider supporting RSA (JDK 1.4.2)

I am attempting to write an encryption program using a PrivateKey from a 
KeyStore. Apparently, I can't because I am getting an exception.

According to JavaTM Cryptography Extension (JCE) Reference Guide
for the JavaTM 2 SDK, Standard Edition, v 1.4. Supposedly, RSA is 
supported for Cipher (but DSA is not).

Is there a way to encrypt using a PrivateKey of a KeyStore, or am I
on the wrong path?

The keystore was created as follows:

keytool -genkey -validity 365 -alias RobinHood -keyalg RSA -keysize 1024 
-keypass RobinHood -dname "CN=Robin Hood, O=Robin Hood and his Merry 
Men, L=Sherwood Forest, C=GB" -keystore ./RobinHoodKeystore -storepass 
RobinHood

Is there a need to specify a provider when getting an instance?
java PrintProviders | grep name:
name: SUN
name: SunJSSE
name: SunRsaSign
name: SunJCE
name: SunJGSS


[david@localhost ch07]$ java EncryptUsingPrivateKey ./RobinHoodKeystore 
RobinHood RobinHood input.txt output.txt
Private key: algorithm: RSA format: PKCS8
Exception in thread "main" java.security.NoSuchAlgorithmException: 
Cannot find any provider supporting RSA
         at javax.crypto.Cipher.getInstance(DashoA6275)
         at EncryptUsingPrivateKey.main(EncryptUsingPrivateKey.java:37)


import java.io.BufferedInputStream ;
import java.io.BufferedOutputStream ;
import java.io.FileInputStream ;
import java.io.FileOutputStream ;

import java.security.KeyStore ;
import java.security.PrivateKey ;

import javax.crypto.Cipher ;

public class EncryptUsingPrivateKey
{
	public static void main ( String[] args )
		throws Exception
	{
		if ( args.length != 5 )
		{
			System.out.println (
				"usage: EncryptUsingPrivateKey keystore storepass alias " +
				"inputFile outputFile" ) ;
			return ;
		}

		String keystorefile		= args[0] ;
		String storepass		= args[1] ;
		String alias			= args[2] ;
		String inputFile		= args[3] ;
		String outputFile		= args[4] ;

		KeyStore keystore = KeyStore.getInstance ( "JKS" ) ;
		keystore.load ( new FileInputStream ( keystorefile ), 
storepass.toCharArray() ) ;

		PrivateKey privateKey = (PrivateKey) keystore.getKey ( alias, 
storepass.toCharArray() ) ;
		System.out.println ( "Private key: algorithm: " + 
privateKey.getAlgorithm () +
			" format: " + privateKey.getFormat () ) ;

		Cipher cipher = Cipher.getInstance ( privateKey.getAlgorithm () ) ;
		cipher.init ( Cipher.ENCRYPT_MODE, privateKey ) ;
		BufferedInputStream in = new BufferedInputStream ( new FileInputStream 
( inputFile ) ) ;
		BufferedOutputStream out = new BufferedOutputStream ( new 
FileOutputStream ( outputFile ) ) ;
		byte[] buffer = new byte [ 8192 ] ;
		int bytesRead ;
		while ( ( bytesRead = in.read ( buffer, 0, buffer.length ) ) != -1 )
		{
			byte [] encryptedBytes = cipher.update ( buffer, 0, bytesRead ) ;
			out.write ( encryptedBytes, 0, encryptedBytes.length ) ;
		}
		in.close () ;
		out.close () ;
	}
}

0
David
10/28/2003 2:48:34 AM
comp.lang.java.security 1502 articles. 0 followers. Post Follow

14 Replies
6328 Views

Similar Articles

[PageSpeed] 45

David Stevenson wrote:

> I am attempting to write an encryption program using a PrivateKey from a 
> KeyStore. Apparently, I can't because I am getting an exception.


> Private key: algorithm: RSA format: PKCS8
> Exception in thread "main" java.security.NoSuchAlgorithmException: 
> Cannot find any provider supporting RSA

Apperently you don't have a provider installed that supports RSA 
encryption :-)

HTH

Wolfgang
-- 
IAIK-Graz University of Technology
Inffeldgasse 16a, 8010 Graz, Austria
http://jce.iaik.tugraz.at

0
Wolfgang
10/28/2003 1:00:11 PM
On Tue, 28 Oct 2003 14:00:11 +0100, Wolfgang Bauer
<wolfgang.bauer@iaik.at> wrote or quoted :

>Apperently you don't have a provider installed that supports RSA 
>encryption 

For the java glossary, how do you get a list of JCE does support?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Roedy
10/28/2003 8:35:58 PM
On Tue, 28 Oct 2003 02:48:34 GMT, David Stevenson
<dsteven8@rochester.rr.com> wrote or quoted :

> -keyalg RSA -keysize 1024

what happens when you shrink the keysize?  Do you need to download
some special version of the library to get the high number of  bits?
Do your clients?


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Roedy
10/28/2003 11:40:41 PM
Roedy Green wrote:
> On Tue, 28 Oct 2003 02:48:34 GMT, David Stevenson
> <dsteven8@rochester.rr.com> wrote or quoted :
> 
> 
>>-keyalg RSA -keysize 1024
> 
> 
> what happens when you shrink the keysize?  Do you need to download
> some special version of the library to get the high number of  bits?
> Do your clients?
> 
> 
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming. 
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

I tried setting the key size to 512, which is the lowest available 
keysize for RSA.

I also tried downloading the Unlimited Strength Jurisdiction Policy 
Files and installing them (there were 2 .jar files:

[david@localhost cryptography]$ ll $JAVA_HOME/jre/lib/security/*.jar
-r--r--r--    1 root     bin          4368 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/local_policy.jar
-r--r--r--    1 root     bin          4355 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/US_export_policy.jar

David Stevenson
[

0
David
10/29/2003 1:40:31 AM
Roedy Green wrote:
> On Tue, 28 Oct 2003 02:48:34 GMT, David Stevenson
> <dsteven8@rochester.rr.com> wrote or quoted :
> 
> 
>>-keyalg RSA -keysize 1024
> 
> 
> what happens when you shrink the keysize?  Do you need to download
> some special version of the library to get the high number of  bits?
> Do your clients?
> 
> 
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming. 
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

I tried setting the key size to 512, which is the lowest available 
keysize for RSA.

I also tried downloading the Unlimited Strength Jurisdiction Policy 
Files and installing them (there were 2 .jar files:

[david@localhost cryptography]$ ll $JAVA_HOME/jre/lib/security/*.jar
-r--r--r--    1 root     bin          4368 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/local_policy.jar
-r--r--r--    1 root     bin          4355 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/US_export_policy.jar

David Stevenson
[

0
David
10/29/2003 1:43:40 AM
Roedy Green wrote:
> On Tue, 28 Oct 2003 02:48:34 GMT, David Stevenson
> <dsteven8@rochester.rr.com> wrote or quoted :
> 
> 
>>-keyalg RSA -keysize 1024
> 
> 
> what happens when you shrink the keysize?  Do you need to download
> some special version of the library to get the high number of  bits?
> Do your clients?
> 
> 
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming. 
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

I tried setting the key size to 512, which is the lowest available 
keysize for RSA. Still the same exception, except that I switched
from using PrivateKey to PublicKey.

I also tried downloading the Unlimited Strength Jurisdiction Policy 
Files and installing them (there were 2 .jar files:

[david@localhost cryptography]$ ll $JAVA_HOME/jre/lib/security/*.jar
-r--r--r--    1 root     bin          4368 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/local_policy.jar
-r--r--r--    1 root     bin          4355 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/US_export_policy.jar

David Stevenson
[

0
David
10/29/2003 1:44:51 AM
Roedy Green wrote:
> On Tue, 28 Oct 2003 02:48:34 GMT, David Stevenson
> <dsteven8@rochester.rr.com> wrote or quoted :
> 
> 
>>-keyalg RSA -keysize 1024
> 
> 
> what happens when you shrink the keysize?  Do you need to download
> some special version of the library to get the high number of  bits?
> Do your clients?
> 
> 
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming. 
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

I tried setting the key size to 512, which is the lowest available 
keysize for RSA.

I also tried downloading the Unlimited Strength Jurisdiction Policy 
Files and installing them (there were 2 .jar files:

[david@localhost cryptography]$ ll $JAVA_HOME/jre/lib/security/*.jar
-r--r--r--    1 root     bin          4368 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/local_policy.jar
-r--r--r--    1 root     bin          4355 Oct 27 22:54 
/usr/java/j2sdk1.4.2/jre/lib/security/US_export_policy.jar

David Stevenson
[

0
David
10/29/2003 1:45:21 AM
This is a multi-part message in MIME format.
--------------080903050708000009060001
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Wolfgang Bauer wrote:
> David Stevenson wrote:
> 
>> I am attempting to write an encryption program using a PrivateKey from 
>> a KeyStore. Apparently, I can't because I am getting an exception.
> 
> 
> 
>> Private key: algorithm: RSA format: PKCS8
>> Exception in thread "main" java.security.NoSuchAlgorithmException: 
>> Cannot find any provider supporting RSA
> 
> 
> Apperently you don't have a provider installed that supports RSA 
> encryption :-)
> 
> HTH
> 
> Wolfgang

JavaTM Cryptography Extension (JCE) Reference Guide
http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppA
Says that RSA is supported as part of JDK 1.4.2.

  From Cryptix README.TXT file (I downloaded Unlimited Strength
Jurisdiction Policy Files" - there were .jar files).

Is the capability of Digital Signatures using RSA a different capability
than encryption? Perhaps only the digital signature capability is provided.

JDK 1.4 (Java 2 version 1.4)

    Cryptix JCE works out-of-the-box on JDK 1.4 but its functionality is
    restricted to what Sun allows trough their Jurisdiction Policy Files.
    In practice this means that you are limited to what the French 
government
    allows in terms of key sizes. Why Sun forces the French policy on the
    rest of the world, and especially the USA, is an open question.

    If you require using Cryptix without any restrictions whatsoever,
    you must have the "Java Cryptography Extension (JCE) Unlimited Strength
    Jurisdiction Policy Files" installed. At the time of writing they can be
    found at: http://java.sun.com/j2se/1.4/ . Installing these is 
non-trivial
    for casual users.




OVERVIEW
--------

The Cryptix JCE includes:


FEATURES
--------

Digital Signatures:

    RSASSA-PSS (with choice of MD2, MD4, MD5, RIPEMD-128, RIPEMD-160, SHA-1,
                SHA-256, SHA-384, SHA-512 or Tiger hash algorithms)

    NOTE: The hash function you choose when you instantiate RSASSA-PSS is
used
          for both message hashing and for the Mask Generation Function
(MGF1).
          It is presently not possible to use one hash function for message
          hashing and another for MGF1.

    RSASSA-PKCS1 (with MD4, MD5, RIPEMD-128, RIPEMD-160 or SHA-1)



import java.util.Iterator ;
import java.security.Security ;
import java.security.Provider ;

public class PrintProviders
{
          public static void main ( String [] args )
          {
                  Provider [ ] providers = Security.getProviders () ;
                  for ( int i = 0 ; i < providers.length ; i++ )
                  {
                          String name = providers[i].getName () ;
                          String info = providers[i].getInfo () ;
                          double version = providers[i].getVersion () ;
                          System.out.println (
"-------------------------------------" ) ;
                          System.out.println ( "name: " + name ) ;
                          System.out.println ( "info: " + info ) ;
                          System.out.println ( "version: " + version ) ;

                          for ( Iterator iter = providers[i].keySet
().iterator () ; iter.hasNext () ; )
                          {
                                  String key = (String) iter.next () ;
                                  System.out.println ( "\t" + key +
                                                  "\t" +
providers[i].getProperty ( key ) ) ;
                          }

                          System.out.println (
"-------------------------------------" ) ;

                  }
          }
}

Attached is output:



--------------080903050708000009060001
Content-Type: text/plain;
 name="providers.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="providers.txt"

-------------------------------------
name: SUN
info: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
version: 1.42
	Alg.Alias.KeyFactory.1.2.840.10040.4.1	DSA
	Alg.Alias.Signature.1.2.840.10040.4.3	SHA1withDSA
	Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1	DSA
	CertStore.LDAP LDAPSchema	RFC2587
	Signature.SHA1withDSA KeySize	1024
	Signature.SHA1withDSA ImplementedIn	Software
	CertPathValidator.PKIX ValidationAlgorithm	RFC3280
	MessageDigest.SHA-384	sun.security.provider.SHA3
	CertPathBuilder.PKIX	sun.security.provider.certpath.SunCertPathBuilder
	Alg.Alias.KeyFactory.1.3.14.3.2.12	DSA
	CertStore.LDAP	sun.security.provider.certpath.LDAPCertStore
	AlgorithmParameterGenerator.DSA	sun.security.provider.DSAParameterGenerator
	MessageDigest.SHA-256	sun.security.provider.SHA2
	MessageDigest.SHA-512	sun.security.provider.SHA5
	Alg.Alias.KeyPairGenerator.1.3.14.3.2.12	DSA
	Alg.Alias.Signature.SHA/DSA	SHA1withDSA
	Alg.Alias.Signature.1.3.14.3.2.13	SHA1withDSA
	SecureRandom.SHA1PRNG	sun.security.provider.SecureRandom
	Alg.Alias.Signature.DSS	SHA1withDSA
	CertStore.Collection	sun.security.provider.certpath.CollectionCertStore
	KeyFactory.DSA ImplementedIn	Software
	KeyStore.JKS ImplementedIn	Software
	Signature.SHA1withDSA	sun.security.provider.DSA
	MessageDigest.SHA ImplementedIn	Software
	AlgorithmParameters.DSA	sun.security.provider.DSAParameters
	CertPathBuilder.PKIX ValidationAlgorithm	RFC3280
	MessageDigest.SHA	sun.security.provider.SHA
	Alg.Alias.AlgorithmParameters.1.3.14.3.2.12	DSA
	MessageDigest.MD5 ImplementedIn	Software
	AlgorithmParameterGenerator.DSA ImplementedIn	Software
	Alg.Alias.Signature.DSA	SHA1withDSA
	Alg.Alias.CertificateFactory.X509	X.509
	CertificateFactory.X.509	sun.security.provider.X509Factory
	KeyStore.JKS	sun.security.provider.JavaKeyStore
	Alg.Alias.Signature.DSAWithSHA1	SHA1withDSA
	MessageDigest.MD5	sun.security.provider.MD5
	KeyPairGenerator.DSA	sun.security.provider.DSAKeyPairGenerator
	Alg.Alias.Signature.SHAwithDSA	SHA1withDSA
	Alg.Alias.Signature.OID.1.2.840.10040.4.3	SHA1withDSA
	CertStore.com.sun.security.IndexedCollection ImplementedIn	Software
	CertificateFactory.X.509 ImplementedIn	Software
	KeyPairGenerator.DSA ImplementedIn	Software
	Alg.Alias.Signature.SHA1/DSA	SHA1withDSA
	CertPathValidator.PKIX ImplementedIn	Software
	CertPathValidator.PKIX	sun.security.provider.certpath.PKIXCertPathValidator
	Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1	DSA
	Alg.Alias.MessageDigest.SHA-1	SHA
	CertStore.Collection ImplementedIn	Software
	AlgorithmParameters.DSA ImplementedIn	Software
	Alg.Alias.MessageDigest.SHA1	SHA
	CertStore.com.sun.security.IndexedCollection	sun.security.provider.certpath.IndexedCollectionCertStore
	Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1	DSA
	CertPathBuilder.PKIX ImplementedIn	Software
	KeyPairGenerator.DSA KeySize	1024
	KeyFactory.DSA	sun.security.provider.DSAKeyFactory
	Alg.Alias.Signature.1.3.14.3.2.27	SHA1withDSA
	CertStore.LDAP ImplementedIn	Software
	SecureRandom.SHA1PRNG ImplementedIn	Software
	Alg.Alias.Signature.SHA-1/DSA	SHA1withDSA
	AlgorithmParameterGenerator.DSA KeySize	1024
-------------------------------------
-------------------------------------
name: SunJSSE
info: Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
version: 1.42
	Alg.Alias.Signature.OID.1.2.840.113549.1.1.4	MD5withRSA
	Alg.Alias.KeyFactory.1.2.840.113549.1.1	RSA
	Alg.Alias.Signature.OID.1.2.840.113549.1.1.2	MD2withRSA
	TrustManagerFactory.SunX509	com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$SimpleFactory
	KeyPairGenerator.RSA	com.sun.net.ssl.internal.ssl.JSA_RSAKeyPairGenerator
	KeyStore.PKCS12	com.sun.net.ssl.internal.ssl.PKCS12KeyStore
	SSLContext.SSLv3	com.sun.net.ssl.internal.ssl.SSLContextImpl
	KeyFactory.RSA	com.sun.net.ssl.internal.ssl.JSA_RSAKeyFactory
	Alg.Alias.Signature.1.3.14.3.2.29	SHA1withRSA
	Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1	RSA
	Signature.MD2withRSA	com.sun.net.ssl.internal.ssl.JSA_MD2RSASignature
	Signature.MD5withRSA	com.sun.net.ssl.internal.ssl.JSA_MD5RSASignature
	Signature.SHA1withRSA	com.sun.net.ssl.internal.ssl.JSA_SHA1RSASignature
	Alg.Alias.Signature.1.2.840.113549.1.1.5	SHA1withRSA
	Alg.Alias.Signature.1.2.840.113549.1.1.4	MD5withRSA
	Alg.Alias.Signature.OID.1.3.14.3.2.29	SHA1withRSA
	Alg.Alias.Signature.1.2.840.113549.1.1.2	MD2withRSA
	SSLContext.SSL	com.sun.net.ssl.internal.ssl.SSLContextImpl
	SSLContext.TLS	com.sun.net.ssl.internal.ssl.SSLContextImpl
	SSLContext.TLSv1	com.sun.net.ssl.internal.ssl.SSLContextImpl
	Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1	RSA
	KeyManagerFactory.SunX509	com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl
	TrustManagerFactory.SunPKIX	com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$PKIXFactory
	Alg.Alias.Signature.OID.1.2.840.113549.1.1.5	SHA1withRSA
	Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1	RSA
-------------------------------------
-------------------------------------
name: SunRsaSign
info: SUN's provider for RSA signatures
version: 1.42
	Signature.MD5withRSA	com.sun.rsajca.JSA_MD5RSASignature
	KeyFactory.RSA	com.sun.rsajca.JSA_RSAKeyFactory
	Signature.SHA1withRSA	com.sun.rsajca.JSA_SHA1RSASignature
	Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1	RSA
	Alg.Alias.Signature.1.2.840.113549.1.1.5	SHA1withRSA
	Alg.Alias.Signature.1.2.840.113549.1.1.4	MD5withRSA
	Alg.Alias.Signature.1.2.840.113549.1.1.2	MD2withRSA
	Alg.Alias.Signature.1.3.14.3.2.29	SHA1withRSA
	Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1	RSA
	Alg.Alias.Signature.OID.1.3.14.3.2.29	SHA1withRSA
	Alg.Alias.Signature.OID.1.2.840.113549.1.1.5	SHA1withRSA
	KeyPairGenerator.RSA	com.sun.rsajca.JSA_RSAKeyPairGenerator
	Alg.Alias.Signature.OID.1.2.840.113549.1.1.4	MD5withRSA
	Alg.Alias.Signature.OID.1.2.840.113549.1.1.2	MD2withRSA
	Signature.MD2withRSA	com.sun.rsajca.JSA_MD2RSASignature
	Alg.Alias.KeyFactory.1.2.840.113549.1.1	RSA
	Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1	RSA
-------------------------------------
-------------------------------------
name: SunJCE
info: SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
version: 1.42
	KeyGenerator.DESede	com.sun.crypto.provider.DESedeKeyGenerator
	Alg.Alias.KeyGenerator.Rijndael	AES
	Alg.Alias.AlgorithmParameters.TripleDES	DESede
	Alg.Alias.AlgorithmParameters.PBEWithMD5AndTripleDES	PBE
	Alg.Alias.SecretKeyFactory.PBEWithMD5AndTripleDES	PBEWithMD5AndDES
	AlgorithmParameters.AES	com.sun.crypto.provider.AESParameters
	KeyStore.JCEKS	com.sun.crypto.provider.JceKeyStore
	Cipher.DES	com.sun.crypto.provider.DESCipher
	KeyFactory.DiffieHellman	com.sun.crypto.provider.DHKeyFactory
	Alg.Alias.AlgorithmParameters.Rijndael	AES
	AlgorithmParameters.DiffieHellman	com.sun.crypto.provider.DHParameters
	AlgorithmParameters.DESede	com.sun.crypto.provider.DESedeParameters
	KeyGenerator.HmacSHA1	com.sun.crypto.provider.HmacSHA1KeyGenerator
	SecretKeyFactory.PBEWithMD5AndDES	com.sun.crypto.provider.PBEKeyFactory
	Alg.Alias.AlgorithmParameters.PBEWithMD5AndDES	PBE
	Alg.Alias.AlgorithmParameterGenerator.DH	DiffieHellman
	Mac.HmacMD5	com.sun.crypto.provider.HmacMD5
	SecretKeyFactory.DESede	com.sun.crypto.provider.DESedeKeyFactory
	KeyGenerator.DES	com.sun.crypto.provider.DESKeyGenerator
	Alg.Alias.SecretKeyFactory.TripleDES	DESede
	Cipher.PBEWithMD5AndTripleDES	com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
	AlgorithmParameters.PBE	com.sun.crypto.provider.PBEParameters
	SecretKeyFactory.DES	com.sun.crypto.provider.DESKeyFactory
	Cipher.AES	com.sun.crypto.provider.AESCipher
	Alg.Alias.KeyPairGenerator.DH	DiffieHellman
	Alg.Alias.AlgorithmParameters.DH	DiffieHellman
	Alg.Alias.KeyGenerator.TripleDES	DESede
	KeyAgreement.DiffieHellman	com.sun.crypto.provider.DHKeyAgreement
	KeyGenerator.Blowfish	com.sun.crypto.provider.BlowfishKeyGenerator
	KeyPairGenerator.DiffieHellman	com.sun.crypto.provider.DHKeyPairGenerator
	Cipher.PBEWithMD5AndDES	com.sun.crypto.provider.PBEWithMD5AndDESCipher
	Cipher.Blowfish	com.sun.crypto.provider.BlowfishCipher
	AlgorithmParameters.DES	com.sun.crypto.provider.DESParameters
	KeyGenerator.AES	com.sun.crypto.provider.AESKeyGenerator
	KeyGenerator.HmacMD5	com.sun.crypto.provider.HmacMD5KeyGenerator
	AlgorithmParameterGenerator.DiffieHellman	com.sun.crypto.provider.DHParameterGenerator
	Alg.Alias.Cipher.Rijndael	AES
	Mac.HmacSHA1	com.sun.crypto.provider.HmacSHA1
	Alg.Alias.Cipher.TripleDES	DESede
	AlgorithmParameters.Blowfish	com.sun.crypto.provider.BlowfishParameters
	Alg.Alias.KeyAgreement.DH	DiffieHellman
	Alg.Alias.KeyFactory.DH	DiffieHellman
	Cipher.DESede	com.sun.crypto.provider.DESedeCipher
-------------------------------------
-------------------------------------
name: SunJGSS
info: Sun (Kerberos v5)
version: 1.0
	GssApiMechanism.1.2.840.113554.1.2.2	sun.security.jgss.krb5.Krb5MechFactory
-------------------------------------


--------------080903050708000009060001--

0
David
10/29/2003 1:45:53 AM
On Wed, 29 Oct 2003 01:40:31 GMT, David Stevenson
<dsteven8@rochester.rr.com> wrote or quoted :

>I tried setting the key size to 512, which is the lowest available 
>keysize for RSA.

try the examples mentioned at 
http://mindprod.com/jgloss/keytool.html

They do work.  Then gradually modify them to what you want to do to
find out which parameter is giving the grief.



--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
0
Roedy
10/29/2003 1:50:16 AM
David Stevenson wrote:
> 
> JavaTM Cryptography Extension (JCE) Reference Guide
> http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppA 
> 
> Says that RSA is supported as part of JDK 1.4.2.
>

This is just a pointer to the standard names. What algorithms are 
actually supported depends on the installed providers. You'll have to 
download and install a provider that implements a RSA cipher. (Rememeber 
in 1.4 this provider has to be signed).



> Is the capability of Digital Signatures using RSA a different capability
> than encryption? Perhaps only the digital signature capability is provided.

There is definitely a difference between signing and encrypting and 
thats probably the reason why they call their provider SunRsaSign ;-)

Wolfgang
-- 
IAIK-Graz University of Technology
Inffeldgasse 16a, 8010 Graz, Austria
http://jce.iaik.tugraz.at



0
Wolfgang
10/29/2003 8:49:00 AM
David Stevenson wrote:
> I am attempting to write an encryption program using a PrivateKey from a 
> KeyStore. Apparently, I can't because I am getting an exception.

   What is it that you mean by encryption using a private key? Something 
"encrypted" with a private key could be decrypted with the corresponding 
public key, so you won't get any confidentiality from "encrypting" with 
a private key.
   Normally you encrypt a (short) message with an RSA public key. The 
message remains confidential from an eavesdropper who gets the 
ciphertext. The holder of the corresponding private key can decrypt that 
ciphertext to recover the message.
   Perhaps you could explain what you're trying to accomplish.

--Mike Amling

0
Michael
10/29/2003 2:11:04 PM
Michael Amling wrote:
> David Stevenson wrote:
> 
>> I am attempting to write an encryption program using a PrivateKey from 
>> a KeyStore. Apparently, I can't because I am getting an exception.
> 
> 
>   What is it that you mean by encryption using a private key? Something 
> "encrypted" with a private key could be decrypted with the corresponding 
> public key, so you won't get any confidentiality from "encrypting" with 
> a private key.
>   Normally you encrypt a (short) message with an RSA public key. The 
> message remains confidential from an eavesdropper who gets the 
> ciphertext. The holder of the corresponding private key can decrypt that 
> ciphertext to recover the message.
>   Perhaps you could explain what you're trying to accomplish.
> 
> --Mike Amling
> 

This is not a business project. It is just my attempts to learn the Java 
cryptography package. I am interested for work applications in 
determining if I can encrypt data with a Public Key and then decrypt 
with a Private Key. Essentially I was considering encrypting a password 
and/or user name across an HTTP/web page. Also, I just wanted to get 
some practice with Public Key/Private Keys in preparation for dealing 
with SSL/TLS.

In Chapter 2, page 15, of the book Java Cryptography, under the heading 
of Asymmetric Ciphers, I saw Figure 2-4: Operation of an asymmetric cipher.
This shows Maid Marian encrypting plaintext using Robin Hood's public 
key, and Robin Hood decrypting the encrypted text using Robin Hood's 
private key, producing the original plaintext from Maid Marian.

I did get the Private Key/Public Key mixed up in my first program.
The second version of my program attempted to use a Public Key instead.
(However, the section on signatures shows Maid Marian encrypting a 
Message Digest with her Private Key, producing a signature. Yes, I know 
that a signature can be produced with the Signature.sign method).

The following is my revised program using a Public Key.

import java.io.BufferedInputStream ;
import java.io.BufferedOutputStream ;
import java.io.FileInputStream ;
import java.io.FileOutputStream ;

import java.security.KeyStore ;
import java.security.PublicKey ;

import java.security.cert.Certificate ;

import javax.crypto.Cipher ;

public class EncryptUsingPublicKey
{
	public static void main ( String[] args )
		throws Exception
	{
		if ( args.length != 5 )
		{
			System.out.println (
				"usage: EncryptUsingPrivateKey keystore storepass alias " +
				"inputFile outputFile" ) ;
			return ;
		}

		String keystorefile		= args[0] ;
		String storepass		= args[1] ;
		String alias			= args[2] ;
		String inputFile		= args[3] ;
		String outputFile		= args[4] ;

		KeyStore keystore = KeyStore.getInstance ( "JKS" ) ;
		keystore.load ( new FileInputStream ( keystorefile ), 
storepass.toCharArray() ) ;

		Certificate certificate = keystore.getCertificate ( alias ) ;
		PublicKey publicKey = (PublicKey) certificate.getPublicKey () ;
		System.out.println ( "Public key: algorithm: " + 
publicKey.getAlgorithm () +
			" format: " + publicKey.getFormat () ) ;

		// Cipher cipher = Cipher.getInstance ( publicKey.getAlgorithm () ) ;
		Cipher cipher = Cipher.getInstance ( "RSA/ECB/PKCS1Padding" ) ;
		cipher.init ( Cipher.ENCRYPT_MODE, publicKey ) ;
		BufferedInputStream in = new BufferedInputStream ( new FileInputStream 
( inputFile ) ) ;
		BufferedOutputStream out = new BufferedOutputStream ( new 
FileOutputStream ( outputFile ) ) ;
		byte[] buffer = new byte [ 8192 ] ;
		int bytesRead ;
		while ( ( bytesRead = in.read ( buffer, 0, buffer.length ) ) != -1 )
		{
			byte [] encryptedBytes = cipher.update ( buffer, 0, bytesRead ) ;
			out.write ( encryptedBytes, 0, encryptedBytes.length ) ;
		}
		in.close () ;
		out.close () ;
	}
}

I am still getting the Exception:

java EncryptUsingPublicKey ./MaidMarionKeystore MaidMarion RobinHood 
input.txt output.txt
Public key: algorithm: RSA format: X509
Exception in thread "main" java.security.NoSuchAlgorithmException: 
Cannot find any provider supporting RSA/ECB/PKCS1Padding        at 
javax.crypto.Cipher.getInstance(DashoA6275)
         at EncryptUsingPublicKey.main(EncryptUsingPublicKey.java:41)

Like someone later said, there is probably a major difference between 
the  Sun 1.4.2 JDK providing DSA and RSA signatures, and providing the 
ability for DSA and RSA encryption. Given that, I suspect that one needs 
to buy the SDK package from www.rsasecurity.com if one wants to use the 
RSA encryption, instead of just signatures.

David Stevenson

P.S. I apologize for the duplicate postings. I am new to Linux and was 
having trouble with Mozilla posting to the newsgroup.
[

0
David
10/30/2003 12:43:24 AM
Roedy Green wrote:
> On Wed, 29 Oct 2003 01:40:31 GMT, David Stevenson
> <dsteven8@rochester.rr.com> wrote or quoted :
> 
> 
>>I tried setting the key size to 512, which is the lowest available 
>>keysize for RSA.
> 
> 
> try the examples mentioned at 
> http://mindprod.com/jgloss/keytool.html
> 
> They do work.  Then gradually modify them to what you want to do to
> find out which parameter is giving the grief.
> 
> 
> 
> --
> Canadian Mind Products, Roedy Green.
> Coaching, problem solving, economical contract programming. 
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

I am getting "keytool" to work fine, even with a key size of 512.
I have been able to get the Signature.sign and Signature.verify to work 
with DSA (haven't tried RSA, but I suspect it would work).

The No Such Algorithm Exception for RSA encryption (Cipher.getInstance ( 
"RSA" ) suggests that while Signature support for DSA and RSA is 
provided with Sun JDK 1.4.2, encryption with DSA and RSA is not 
supported. I guess the provider can determine which encryptions to 
provide, and which ones not to provide.

David Stevenson

0
David
10/30/2003 12:46:57 AM
I've been working towards solving the same problem (it would appear the 
the Sun JDK documentation is basically very vague and unhelpful).

I have eventually settled on the Cryptix provider, which does provide RSA 
encryption. However, I'm unable to get decryption to work.

Having generated a key pair for RSA, I've created a sealed object with a 
Cipher using RSASSA-PKCS1. The sealing occurs just fine. However, when I 
try to decrypt the sealed object using the private key, I get the 
following exception:

java.lang.IllegalArgumentException: Null input buffer
	at javax.crypto.Cipher.doFinal(DashoA6275)
	at javax.crypto.SealedObject.unseal(DashoA6275)
	at javax.crypto.SealedObject.getObject(DashoA6275)

Is this a bug in the Cryptix library?

Cas :)



On Thu, 30 Oct 2003 00:46:57 GMT, David Stevenson 
<dsteven8@rochester.rr.com> wrote:

> Roedy Green wrote:
>> On Wed, 29 Oct 2003 01:40:31 GMT, David Stevenson
>> <dsteven8@rochester.rr.com> wrote or quoted :
>>
>>
>>> I tried setting the key size to 512, which is the lowest available 
>>> keysize for RSA.
>>
>>
>> try the examples mentioned at http://mindprod.com/jgloss/keytool.html
>>
>> They do work.  Then gradually modify them to what you want to do to
>> find out which parameter is giving the grief.
>>
>>
>>
>> --
>> Canadian Mind Products, Roedy Green.
>> Coaching, problem solving, economical contract programming. See 
>> http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
>
> I am getting "keytool" to work fine, even with a key size of 512.
> I have been able to get the Signature.sign and Signature.verify to work 
> with DSA (haven't tried RSA, but I suspect it would work).
>
> The No Such Algorithm Exception for RSA encryption (Cipher.getInstance ( 
> "RSA" ) suggests that while Signature support for DSA and RSA is 
> provided with Sun JDK 1.4.2, encryption with DSA and RSA is not 
> supported. I guess the provider can determine which encryptions to 
> provide, and which ones not to provide.
>
> David Stevenson
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
0
Caspian
11/27/2003 12:28:50 PM
Reply:

Similar Artilces:

Java interpreter not starting after update to FP10 (testet with JDK 1.4.1. / 1.4.2)
After updating to FP10, everytime i want to execute a stored procedure it gives me an error "Java or .NET interpreter startup or communication failed". In the db2diag.log there is an info just bevore the error saing that it attempts loading "libjvm.so" and also there is something about an SQL08023 which I could not find any information about. Anyone had similar problems? Would appreciate any help/tips which could lead to a solution. Regards, Janick I just found out that SQL08023, which seems to be SQL8023N, is a licencing issue (to many connections for th...

Does 4/2/2= (4/2)/2 =1 OR = 4/(2/2)=4
I don't have matlab and I am trying to translate some simple matlab code. Does 4/2/2 = (4/2)/2 = 1 or 4/2/2 = 4/(2/2) = 4 On 9/11/2012 9:43 AM, sarah.englander@gmail.com wrote: > I don't have matlab and I am trying to translate some simple matlab code. > > Does 4/2/2 = (4/2)/2 = 1 yes. At a given precedence level (and obviously two of the same operators are the same level) evaluation proceeds from LtoR. ....snip... <http://www.mathworks.com/help/techdoc/matlab_prog/f0-40063.html#f0-38155> -- dpb <none@non.net> wrote in message <...

SN#21034 Java News Bites: J2SE 1.4.2 EOL, Jersey 1.0.1, JavaFX and Java's Future, Multilingual GlassFish Updates, Sun Supports Alice, JavaFX Samples, JBoss 5
SYSTEM NEWS FOR SUN USERS Vol 130 Issue 3 2008-12-19 Article 21034 from section "Java Technology" Short Items of Interest to the Java Community - J2SE 1.4.2 End Of Life - Jersey 1.0.1 Implements JAX-RS 1.0 - Sun's Director of Technology Outreach on JavaFX, future of Java - Recent Updates to Multilingual GlassFish - Sun Teams with Carnegie Mellon in Support of Alice - Get More Samples of JavaFX - Redhat's JBoss AS 5.0 Complies with JSR 244 [url "http://blogs.systemnews....

ACE 5.4.2 + TAO 1.4.2 client, ORBacus 4.1.2 NameService, and JACOrb 1.4.1 servants
Hi everyone, Background: ----------- I'm very new to CORBA, ACE & TAO. I'm trying to integrate with a 3rd party system which exposes a CORBA object model to clients. This system is composed of JACOrb 1.4.1 servers registering with an ORBacus 4.1.2 NameService. We've got existing software that uses ACE 5.4.2, and the 3rd party documentation mentions that people have used TAO (no version specified) previously to integrate with their system, so I'm trying out TAO 1.4.2 as a natural solution to the problem. Environment Specifics: ---------------------- - AC...

tomcat 4.1.27 won't start, (using jdk 1.2.1 on Win2k)
Hi, I'm not even getting a trace when I try to start tomcat from a cmd session. Clicking on startup.bat from windows yields a new cmd window that lasts less than a second before it disappears. Whatever momentary pid that was created also vanished. My google searches indicate that most people at least have an exception to point out issues. Output below, Thanks. C:\unzipped\jakarta-tomcat-4.1.27\jakarta-tomcat-4.1.27\bin>startup.bat Using CATALINA_BASE: C:\unzipped\jakarta-tomcat-4.1.27\jakarta-tomcat-4.1.27 Using CATALINA_HOME: C:\unzipped\jakarta-tomcat-4.1.27\jakarta-tomcat-4.1.27...

JDK 1.4.1 and 1.4.2 differ in compiling
public class Test { static int returnValue() throws Exception { while (true) { try { break; } finally { return 1; } } } public static void main(String args[]) throws Exception { System.out.println(returnValue()); } } When I compile this in JDK 1.4.1_03, I get this error:- Test.java:xx: missing return statement protected static int returnValue() throws Exception { ^ 1 error When I compile this in JDK 1.4.2, I get a warning:- Test.java:xx: warning: finally clause cannot complete normally } ^...

Serialization between Java 1.1.4 and Java 1.4.1
Hello, It seems to me to be in some kinda trouble. I wanted to implement communication between Java applet and Server through sockets and Serialization. So, I serialize Object, send it to server which deserialize it with no problems. In other direction problems came out since Object serialized under Java 1.4.1 seems to be not deserializable under Java 1.1.4. (MS VM). If applet si run under J2, there are no problems, but I cannot push people to download some 15MB of new JRE just to accomplish my requirements, especially if applet needs not implementation of features of new JRE... ...

[tao-users] Use of TAO_OutputCDR and ACE_Message_Block in CORBA::Any from TAO 1.4.1|ACE 5.4.1 to TAO2.2.0|ACE 6.2.0
This is a multipart message in MIME format. ------=_NextPart_000_00BF_01CEA8D4.9E005C80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable TAO VERSION: 2.2.0 ACE VERSION: 6.2.0 =20 HOST MACHINE and OPERATING SYSTEM: x86_64 and Red Hat - Linux 2.6.18-194.26.1.el5 =20 TARGET MACHINE and OPERATING SYSTEM, if different from HOST: =20 COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc (GCC) 4.8.1 =20 THE $ACE_ROOT/ace/config.h FILE: config-linux.h =20 THE $ACE...

Changing (1,2,3,4,5...) to (1,1,2,2,3,3,4,4,5,5...)
Hi All, I have a column vector of numbers that I would like to extrapolate by "doubling up": e.g. turn 2 4 6 8 into: 2 2 4 4 6 6 8 8 any ideas on an easy vectorised way to do this? TIA, Rob v=repmat([2; 4; 6; 8].',2,1); v=v(:) "Robert Barrie" <askme@ifuwant.com> wrote in message <hlt7kp$rut$1@fred.mathworks.com>... > Hi All, > > I have a column vector of numbers that I would like to extrapolate by "doubling up": > > e.g. turn > 2 > 4 > 6 > 8 > > into: > 2 > 2 > 4 > 4 > 6 > 6 > 8 >...

Crash when using wxTextCtrl with xwGTK-2.4.1 and wxGTK-2.4.2 Suse Linux 8.2
I am using trying to add some wxTextCtrl to a frame with the result that the program crashes when starting it. On console the errormessage is (in german) Speicherzugriffsfehler (Don't know what an english Linux would give out-> It means imho that an address is accessed that does not depend to the applications memory space.) It compiles without errors, I tried GTK-2.4.1 & 2.4.2 with the same result. (wxWindows is compiled without GTK2 support !) The code that doesn't work with Linux works on Windows. (9x) I found out that for any strange reason when I add the li...

Problem printing on solaris 2.8 using jdk 1.4.1
Hi I am trying to print from a swing gui running on solaris 2.8, with jdk1.4.1. I use PrinterJob pj2 = PrinterJob.getPrinterJob(); pj2.printDialog(); Once the code gets to printDialog, it hangs. I have used prnSvcs = PrinterJob.lookupPrintServices(); and printed out the names of the print services and all printers on the network show up. Any idea why printDialog hangs? My path includes /usr/bin and lpstat can be seen. Thanks Bruce ...

C++ Java interoperability while migrating from from JDK 1.2 to JDK 1.3.1
Hi All, I have a serious issue migrating from JDK 1.2.2 to JDK 1.3.1 . We have a Forte 7.0 C++ client talking to JDK 1.2.2 server sitting on Orbix 3.3.7. When I use JDK 1.3.1 the C++ client dies saying 12003 12000 Unknown Error. The call that fails take two parameters string and long. I tried debugging the Server side code , but what i found is the control does not enter the skeleton, even the "invoke" method was not called. I tried moving to iiop version 1.1 , but even that didn't work :-( Currently I am compiling the sever side code with jdk1.3.1 , but JRE i...

Java 1.4.2 Vs 1.5 Vs 1.6 #2
I'm sure this question has been posted but I've not found any definitive answer. I maintain a product line that consists of a dedicated Linux system running Java to provide a GUI interface as a control system for underlying hardware. I've been working to move to jdk 1.5 (not hard but I'm busy) and now this new DST thing which is not covered by the version I've been porting to (1.5.0-b64) makes me want to rething about going to the latest 1.6. It seems every version change had problems in the beginning and I didn't even try 1.6 because of that. Now I'm thinking abou...

Newbie question; why (cons (list 1 2) (list 3 4)) is ((1 2) 3 4) and not ((1 2) (3 4))
Hi, I just started to learn LISP, and stumbled in SICP upon (cons (list 1 2) (list 3 4)) is evaluated to ((1 2) 3 4) I do not understand why this is not: ((1 2) (3 4)) because (cdr (cons (list 1 2) (list 3 4))) is (3 4) and (car (cons (list 1 2) (list 3 4))) is (1 2) Is there a logical explanation? Thank you for your patience. -- Greg Out of order, gregor <gregor@ediwo.com> writes: > Is there a logical explanation? Yes. > I just started to learn LISP, and stumbled in SICP...

java 1.4 fail with java.lang.UnsatisfiedLinkError but 1.5, 1.6 ok
My JNI program is working with java 1.5 & 1.6 but fail with java 1.4 on a HP-UX B.11.23 U ia64 computer. Please help even though java 1.4 is old. $ /opt/java1.4/bin/java -d32 -jar jHw.jar Failed to load MycompAPI and MycompAPI_64 libraries. java.lang.UnsatisfiedLinkError: no MycompAPI_64 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1542) at java.lang.Runtime.loadLibrary0(Runtime.java:795) at java.lang.System.loadLibrary(System.java:834) at com.chrysalisits.crypto.MycompAPI.<clinit>(MycompAPI.java: 47) at com.chrys...

Please use version 4.2.2 (serious bug in version 4.2.1)
Gnuplot version 4.2.1, released a few days ago, turns out to have had a serious bug in the source code. This bug caused axis labels to be ignored when the plot mode was set to "set view map". The version 4.2.2 release fixes this bug and another, trivial one. The binary 4.2.1 executables for Windows did not contain this bug. -- Ethan A Merritt ...

Re: Crash when using wxTextCtrl with xwGTK-2.4.1 and wxGTK-2.4.2
> Hi again. > > > Hmm... how reliable is a compiler built with a broken compiler...? :) > I had the same thought in my mind, but didn't dared to ask (or say).... > > P. It's a good question - It's actually okay because of how gcc builds. Say you are going to build 3.3.2 with 3.3.1 What happens is that stage 1 builds 3.3.2 with 3.3.1 Stage 2 then builds 3.3.2 with the 3.3.2 you just built in stage 1. Stage 3 (optional) then builds 3.3.2 with the 3.3.2 built in stage 2. The binary output of stage 2 and stage 3 are then compared to make sure they ar...

Can I use weblogic 8.1 with 64bit jdk 1.4.2 under product entironment?
My webapp consume very much memory, about 2~3 g, reach to the 32bit limit. My OS is AIX 5.3, can I use weblogic 8.1 with 64bit jdk 1.4.2 under product entironment? Thanks Unfortunately, 64bit JVM is not supported by BEA in this environment: http://edocs.bea.com/platform/suppconfigs/configs81/aix53_powerpc/81sp6.html#100180 Of course, I tried it. :-) However, I don't recommend using 64bit JVM. It seems that 32bit is more efficient. If I were you, I'd optimize the application to use less memory - maybe changing from in-memory to file or DB session persistence. I don't know, I&...

Apple issues security fixes and Java 1.4.1 for 10.2.8
http://docs.info.apple.com/article.html?artnum=120277 http://www.apple.com/downloads/macosx/apple/java141update1formacosx.html as you can see, Apple has once again issued repairs for security in OS X in a timely manner. Meanwhile, XP continues to leak like a sieve while Micro$quish blames others for their woes. And Whineboy should now be able to relax from his constant monkeylike yammering, sit down and have a nice steaming cup of SHUT THE F&*K UP! In article <moestavern-9E7D89.11510620112003@nr-tor02.bellnexxia.net>, Joey JoJo Junior Shabadoo <moestavern@spr...

Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2
I've been tasked with upgrading the JVM from 1.3 to 1.4, and the third party libraries used by my company on our existing Java framework. I'm most worried about any problems that may occur due to upgrading Xalan and Xerces as our framework performs much XML transformation and processing. Does anyone have a link to known issues with such an upgrade (besides the Xalan / Xerces sites) ? Or has anyone done such an upgrade and can share their pearls of wisdom? Thanks Chris ...

Java 1.4.2 on Free BSD 5.2.1
Dear Sir/Madam, I want to install Java 1.4.2 on my FreeBSD 5.2.1 machine. I started by giving make command in /usr/ports/java/jdk14 directory. Each time it asks for a new file having .tar or .gz extension. Noting these files, I have downloaded about 7 to 8 big files from the internet. Each time 'making' it, it asks for a new file. Can we get the list of all files for installing a particular port at one location? Do I have to download all such files from the internet for installing each port? I want to install Gnome also. How many files do I need to download? I have download...

Using JMX with JDK 1.4.2
Hi, Can anyone help me get JMX working with JDK 1.4.2? I'm trying to follow the tutorial at http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/intro.html. I've downloaded the Sun JMX Reference Implementation from http://java.sun.com/products/JavaManagement/download.html but none of the jars contain the java.lang.management namespace which should contain the ManagementFactory class. I can't use JMX without this class can I? If not, where can I find this class? Thanks in anticipation, Paul ok, I found the answer from this URL http://java.sun.com/developer/technicalArticles/...

jdk 1.4 and java.lang.UnsupportedClassVersionError
Got some code that work with the compiler set to jdk 1.3, but when i set the compiler to jdk 1.4 i get this error: [java] java.lang.UnsupportedClassVersionError: no/ds/ejbgen/EjbGenerator (Unsupported major.minor version 48.0) [java] at java.lang.ClassLoader.defineClass0(Native Method) [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:703) [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:133) [java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:320) [java] at java.net.URLClassLoader.access$400(URLClassLoader.java:93) [java] at java.net...

Film scanner for 2 1/4 inch by 2 1/4 inch #2
Hi, I have hundreds of APS, 35mm, and 2 1/4 by 2 1/4 inch negatives that I would like to scan. I posted an item on this newsgroup in October, 2003. So far, I have not yet bought a new scanner. My main requirement is that it handles 21/4 inch separate negatives. PC Pro magazine reviewed the Canon Canoscan 8800F recently. See http://www.pcpro.co.uk/reviews/128849/canon-canoscan-8800f.html It gave a good review. I phoned Canon to see if it could handle separate 2 1/4 inch negatives. They said it could. Has anyone used this scanner? If so, that do you think about it. Whi...

Web resources about - Encrypt using PrivateKey? NoSuchAlgorithmException: Cannot find any provider supporting RSA (JDK 1.4.2) - comp.lang.java.security

Resources last updated: 2/17/2016 3:08:05 PM