You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by nitingautam <ga...@gmail.com> on 2009/07/09 17:01:49 UTC

java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

In my web application i am using ldap authentication. I am using tomcat 5.5
with jdk 1.4. From some days when I try to login it throw the following
error and rest of the time it works fine. What can be the issue...

 javax.net.ssl.SSLException: Algorithm missing:  
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.f(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
Source)
	at
com.xxx.cat.fndt.auth.impl.ssl.TrustingSSLSocketFactory.getSSLSocket(TrustingSSLSocketFactory.java:147)
	at
com.xxx.cat.fndt.auth.impl.ssl.TrustingSSLSocketFactory.makeSocket(TrustingSSLSocketFactory.java:209)
	at netscape.ldap.LDAPConnSetupMgr.connectServer(LDAPConnSetupMgr.java:411)
	at netscape.ldap.LDAPConnSetupMgr.openSerial(LDAPConnSetupMgr.java:343)
	at netscape.ldap.LDAPConnSetupMgr.connect(LDAPConnSetupMgr.java:237)
	at netscape.ldap.LDAPConnSetupMgr.openConnection(LDAPConnSetupMgr.java:163)
	at netscape.ldap.LDAPConnection.connect(LDAPConnection.java:1033)
	at netscape.ldap.LDAPConnection.connect(LDAPConnection.java:915)
	at netscape.ldap.LDAPConnection.connect(LDAPConnection.java:759)
	at
com.xxx.cat.fndt.auth.impl.ldap.LDAPAuthenticationInterface.getConnection(LDAPAuthenticationInterface.java:309)
	at
com.xxx.cat.fndt.auth.impl.ldap.LDAPAuthenticationInterface.getAuthenticatedConnection(LDAPAuthenticationInterface.java:248)
	at
com.xxx.cat.fndt.auth.impl.ldap.LDAPAuthenticationInterface.authenticate(LDAPAuthenticationInterface.java:69)
	at
com.xxx.xx.svc.qoms.model.service.AdminManagerImpl.authenticateUser(AdminManagerImpl.java:71)
	at
com.xxx.xx.svc.qoms.controller.QomsLogn010InptController.onSubmit(QomsLogn010InptController.java:207)
	at
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
	at
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:250)
	at
com.xxx.xx.svc.qoms.controller.QomsLogn010InptController.handleRequestInternal(QomsLogn010InptController.java:160)
	at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:857)
	at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
	at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:475)
	at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:440)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.xxx.xx.fndt.filter.BlackoutFilter.doFilter(BlackoutFilter.java:257)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
com.xxx.xx.fndt.filter.PropertiesFilter.doFilter(PropertiesFilter.java:178)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.xxx.xx.fndt.filter.LoggingFilter.doFilter(LoggingFilter.java:152)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
com.xxx.xx.fndt.filter.RequestHeadersFilter.doFilter(RequestHeadersFilter.java:104)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
com.xxx.xx.fndt.filter.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:105)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.security.NoSuchAlgorithmException: Could not create cipher
AES/128
	at com.sun.net.ssl.internal.ssl.CipherBox$JCECipherBox.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_h.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_ax.c(Unknown Source)
	... 64 more
Caused by: java.security.NoSuchAlgorithmException: No implementation for
AES/CBC/NoPadding found
	at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
	at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)
	at com.sun.net.ssl.internal.ssl.CipherBox$JCECipherBox.<init>(Unknown
Source)
	... 68 more

-- 
View this message in context: http://www.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p24410804.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Kuga <kv...@infoblox.com>.
Hi,
Thanks for the response,
I am trying to do that, however, am unable to install the JRE, getting the
following error:


I am having Linux FC(Fedora) 12 - 64 bit system. I am trying to install JRE
1.6.0_17, and get the following error when trying to install (
jre-6u17-linux-x64.bin).

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
Extracting...
./jre-6u17-linux-x64-rpm.bin: line 368: ./install.sfx.3884: cannot execute
binary file


I also did the chmod a+x jre....

Can anyone help to respond to this issue,
Thanks
Kuga 


n828cl wrote:
> 
>> From: Kuga [mailto:kvisagamani@infoblox.com]
>> Subject: RE: [OT] java.security.NoSuchAlgorithmException: No
>> implementation for AES/CBC/NoPad
>> 
>> Please see the attached jce.jar.
> 
> Jars are not allowed as attachments on this list - and sending jce.jar to
> an international list may be illegal.
> 
>> I am in the US. Wonder how to resolve such issues?
> 
> Along with jce.jar (88256 bytes for JRE/JDK 6u21b06), there are also
> policy files that control what algorithms the JVM can exercise, and
> certificates used to verify the signing on security-related jars.  If any
> of these are messed up, that might cause registration failure for the
> services.
> 
> You might try to download and install a clean JVM from Sun/Oracle, not
> using whichever package manager your Linux employs.  If that works, then
> whoever packaged your previous JVM installation broke it.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29349713.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kuga [mailto:kvisagamani@infoblox.com]
> Subject: RE: [OT] java.security.NoSuchAlgorithmException: No
> implementation for AES/CBC/NoPad
> 
> Please see the attached jce.jar.

Jars are not allowed as attachments on this list - and sending jce.jar to an international list may be illegal.

> I am in the US. Wonder how to resolve such issues?

Along with jce.jar (88256 bytes for JRE/JDK 6u21b06), there are also policy files that control what algorithms the JVM can exercise, and certificates used to verify the signing on security-related jars.  If any of these are messed up, that might cause registration failure for the services.

You might try to download and install a clean JVM from Sun/Oracle, not using whichever package manager your Linux employs.  If that works, then whoever packaged your previous JVM installation broke it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Kuga <kv...@infoblox.com>.
Hi,
Thanks for the quick response.

Please see the attached jce.jar. I am in the US. Wonder how to resolve such
issues?
thanks
Kuga



n828cl wrote:
> 
>> From: Kuga [mailto:kvisagamani@infoblox.com]
>> Subject: Re: [OT] java.security.NoSuchAlgorithmException: No
>> implementation for AES/CBC/NoPad
>> 
>> Please let me know if you have any idea on this?
> 
> The one you're missing is this:
> 
> SunJCE, version 1.6: SunJCE Provider (implements RSA, DES, Triple DES,
> AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
> 
> Do you have jce.jar in your jre/lib directory?  If so, how large is it?
> 
> Where are you located?  If it's outside North America, it may not be part
> of the JRE/JDK that's available to you (silly US export restrictions). 
> Not sure what hoops you have to jump through to get the full crypto suite.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
http://old.nabble.com/file/p29341324/jce.jar jce.jar 
-- 
View this message in context: http://old.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29341324.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kuga [mailto:kvisagamani@infoblox.com]
> Subject: Re: [OT] java.security.NoSuchAlgorithmException: No
> implementation for AES/CBC/NoPad
> 
> Please let me know if you have any idea on this?

The one you're missing is this:

SunJCE, version 1.6: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)

Do you have jce.jar in your jre/lib directory?  If so, how large is it?

Where are you located?  If it's outside North America, it may not be part of the JRE/JDK that's available to you (silly US export restrictions).  Not sure what hoops you have to jump through to get the full crypto suite.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Kuga <kv...@infoblox.com>.
Hi Chris,
Please let me know if you have any idea on this?
thanks
Kuga



Kuga wrote:
> 
> Hi,
> I have uploaded the list. As I mentioned earlier it is evident that I dont
> see the Cipher.PBEWithMD5AndDES in that.
> 
> NOTE: I am using a Linux Fedora FC12, 64 bit system. I havent installed
> the 64bit JRE, could this be any reason for not generating the correct
> provider list?
> 
> Thanks
> Kuga
> 
> 
> 
> Christopher Schultz-2 wrote:
>> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> Kuga,
>> 
>> On 7/28/2010 6:59 PM, Kuga wrote:
>>> Thanks for the quick response, much appreciated:
>>> -bash-4.0# /usr/local/jre/bin/java -version
>>> java version "1.6.0_17"
>>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
>>> Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)
>> 
>> (Note that you might not want to run everything as root, as the # above
>> implies)
>> 
>>> Please let me know if you would like to see the Providers list. I have
>>> executed the program, and dont see any of the Cipher.
>> 
>> Certainly including the output of the provider listing program I gave
>> you would help.
>> 
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>> 
>> iEYEARECAAYFAkxS62wACgkQ9CaO5/Lv0PBT9ACgioRV+yocYMpAN/JCh5k8bURb
>> XRsAmwdi9LF+DyQlLuRXWFac02JLrOMA
>> =loAg
>> -----END PGP SIGNATURE-----
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
>  http://old.nabble.com/file/p29308408/GetProviderInfoList.txt
> GetProviderInfoList.txt 
> 

-- 
View this message in context: http://old.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29340517.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Kuga <kv...@infoblox.com>.
Hi,
I have uploaded the list. As I mentioned earlier it is evident that I dont
see the Cipher.PBEWithMD5AndDES in that.

NOTE: I am using a Linux Fedora FC12, 64 bit system. I havent installed the
64bit JRE, could this be any reason for not generating the correct provider
list?

Thanks
Kuga



Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kuga,
> 
> On 7/28/2010 6:59 PM, Kuga wrote:
>> Thanks for the quick response, much appreciated:
>> -bash-4.0# /usr/local/jre/bin/java -version
>> java version "1.6.0_17"
>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
>> Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)
> 
> (Note that you might not want to run everything as root, as the # above
> implies)
> 
>> Please let me know if you would like to see the Providers list. I have
>> executed the program, and dont see any of the Cipher.
> 
> Certainly including the output of the provider listing program I gave
> you would help.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkxS62wACgkQ9CaO5/Lv0PBT9ACgioRV+yocYMpAN/JCh5k8bURb
> XRsAmwdi9LF+DyQlLuRXWFac02JLrOMA
> =loAg
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
http://old.nabble.com/file/p29308408/GetProviderInfoList.txt
GetProviderInfoList.txt 
-- 
View this message in context: http://old.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29308408.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kuga,

On 7/28/2010 6:59 PM, Kuga wrote:
> Thanks for the quick response, much appreciated:
> -bash-4.0# /usr/local/jre/bin/java -version
> java version "1.6.0_17"
> Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
> Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)

(Note that you might not want to run everything as root, as the # above
implies)

> Please let me know if you would like to see the Providers list. I have
> executed the program, and dont see any of the Cipher.

Certainly including the output of the provider listing program I gave
you would help.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxS62wACgkQ9CaO5/Lv0PBT9ACgioRV+yocYMpAN/JCh5k8bURb
XRsAmwdi9LF+DyQlLuRXWFac02JLrOMA
=loAg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Kuga <kv...@infoblox.com>.
Hi,
Thanks for the quick response, much appreciated:
-bash-4.0# /usr/local/jre/bin/java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)

Please let me know if you would like to see the Providers list. I have
executed the program, and dont see any of the Cipher.

Thanks
Kuga


n828cl wrote:
> 
>> From: Kuga [mailto:kvisagamani@infoblox.com]
>> Subject: Re: [OT] java.security.NoSuchAlgorithmException: No
>> implementation for AES/CBC/NoPad
>> 
>> We are using Java 1.6.0_17.
> 
> Are you absolutely certain?
> 
>> I dont see the "Cipher.PBEWithMD5AndDES" in the providers list
> 
> It's there in the standard 1.6 JRE download from Sun (Oracle), so I'm
> suspicious that you're not really running the JVM you think you are.  What
> does "java -version" show?
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29291649.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kuga [mailto:kvisagamani@infoblox.com]
> Subject: Re: [OT] java.security.NoSuchAlgorithmException: No
> implementation for AES/CBC/NoPad
> 
> We are using Java 1.6.0_17.

Are you absolutely certain?

> I dont see the "Cipher.PBEWithMD5AndDES" in the providers list

It's there in the standard 1.6 JRE download from Sun (Oracle), so I'm suspicious that you're not really running the JVM you think you are.  What does "java -version" show?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Kuga <kv...@infoblox.com>.
Hi,
We are using Java 1.6.0_17.
I dont see the "Cipher.PBEWithMD5AndDES" in the providers list, as a result
the Security.getProvider("Cipher.PBEWithMD5AndDES") is returning NULL.

Is there a way to generate these providers? or am I missing something in
that environment. I am using Linux Fedora 12.

Thanks for any response
Best Regards,
Kuga



Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> To whom it may concern,
> 
> (Marked as OT since this is a JVM issue, not a Tomcat issue).
> 
> On 7/9/2009 11:01 AM, nitingautam wrote:
>> In my web application i am using ldap authentication. I am using tomcat
>> 5.5
>> with jdk 1.4. From some days when I try to login it throw the following
>> error and rest of the time it works fine. What can be the issue...
> 
> [snip]
> 
>> Caused by: java.security.NoSuchAlgorithmException: No implementation for
>> AES/CBC/NoPadding found
>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)
> 
> Looks like your JVM doesn't have this cipher, which is weird if it only
> happens some times. What is your exact JVM version? You might want to
> upgrade, as things like this tend to get fixed. 1.4 is nearly dead.
> 
> Try running this code:
> 
>         String providerName = null;
>         Provider providers[];
>         if(null != args && 0 < args.length)
>         {
>             providers = new Provider[args.length];
>             for(int i = 0; i < args.length; i++)
>                 providers[i] = Security.getProvider(args[i]);
> 
>         } else
>         {
>             providers = Security.getProviders();
>         }
>         for(int i = 0; i < providers.length; i++)
>         {
>             Provider p = providers[i];
>             System.out.println("Provider: " + p);
>             System.out.println("===============================");
>             System.out.println("provider properties:");
>             ArrayList keys = new ArrayList(p.keySet());
>             Collections.sort(keys);
>             String key;
>             for(Iterator j = keys.iterator(); j.hasNext();
> System.out.println(key + "=" + p.get(key)))
>                 key = (String)j.next();
> 
>             System.out.println("-------------------------------");
>         }
> 
> This will tell you all the crypto providers, ciphers, etc. that are
> supported by your JVM. I ran this against my own JVM:
> 
> $ java -version
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
> $ java GetProviderInfo | grep AES
> Alg.Alias.AlgorithmParameters.Rijndael=AES
> Alg.Alias.Cipher.Rijndael=AES
> Alg.Alias.KeyGenerator.Rijndael=AES
> AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
> Cipher.AES=com.sun.crypto.provider.AESCipher
> Cipher.AES SupportedKeyFormats=RAW
> Cipher.AES
> SupportedModes=ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
> Cipher.AES SupportedPaddings=NOPADDING|PKCS5PADDING|ISO10126PADDING
> Cipher.AESWrap=com.sun.crypto.provider.AESWrapCipher
> Cipher.AESWrap SupportedKeyFormats=RAW
> Cipher.AESWrap SupportedModes=ECB
> Cipher.AESWrap SupportedPaddings=NOPADDING
> KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
> Provider.id info=SunJCE Provider (implements RSA, DES, Triple DES, AES,
> Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
> 
> You can see in there that AES supports the CBC mode as well as the
> NOPADDING padding (though I didn't actually try to create an
> AES/CBC/NOPADDING cipher just to make sure).
> 
> I wonder if your JVM is broken?
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkpbREMACgkQ9CaO5/Lv0PAGbwCcDDILqRAT8aIFNl06Lbj7ZmjF
> Ur8AnjLGY9QtHl1v7MgdcASjcxduAKGw
> =7ff9
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p29291288.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by nitingautam <ga...@gmail.com>.
It is still working sometime and sometime not.
Today itself out of 10 instance it worked in 7 instances when I run
application on Tomcat.
This is not possible currently to upgrade to 1.5


Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> To whom it may concern,
> 
> On 7/14/2009 3:15 AM, nitingautam wrote:
>> I ran the program that Chris shown above following is the output:
>> Provider: SUN version 1.42
> 
> I don't see anything about supported modes or padding. I have a 1.4.2
> JVM lying around and I also don't see those options shown by the
> existing providers.
> 
> Is it possible for you to upgrade to a newer JVM? By using my 1.5 or 1.6
> JVMs, I see all the options I showed in my previous message.
> 
> My question now would be: how does this ever work for you>?
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkpcnWoACgkQ9CaO5/Lv0PBw3gCgjPAm2IU7wrR0KSKxcG02lKaS
> 0XcAn1/g5+iQjJF3ZzXbZl2odes+y3zr
> =LTGb
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p24481744.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom it may concern,

On 7/14/2009 3:15 AM, nitingautam wrote:
> I ran the program that Chris shown above following is the output:
> Provider: SUN version 1.42

I don't see anything about supported modes or padding. I have a 1.4.2
JVM lying around and I also don't see those options shown by the
existing providers.

Is it possible for you to upgrade to a newer JVM? By using my 1.5 or 1.6
JVMs, I see all the options I showed in my previous message.

My question now would be: how does this ever work for you>?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpcnWoACgkQ9CaO5/Lv0PBw3gCgjPAm2IU7wrR0KSKxcG02lKaS
0XcAn1/g5+iQjJF3ZzXbZl2odes+y3zr
=LTGb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by nitingautam <ga...@gmail.com>.
I ran the program that Chris shown above following is the output:
Provider: SUN version 1.42
===============================
provider properties:
Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1=DSA
Alg.Alias.AlgorithmParameters.1.3.14.3.2.12=DSA
Alg.Alias.CertificateFactory.X509=X.509
Alg.Alias.KeyFactory.1.2.840.10040.4.1=DSA
Alg.Alias.KeyFactory.1.3.14.3.2.12=DSA
Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1=DSA
Alg.Alias.KeyPairGenerator.1.3.14.3.2.12=DSA
Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1=DSA
Alg.Alias.MessageDigest.SHA-1=SHA
Alg.Alias.MessageDigest.SHA1=SHA
Alg.Alias.Signature.1.2.840.10040.4.3=SHA1withDSA
Alg.Alias.Signature.1.3.14.3.2.13=SHA1withDSA
Alg.Alias.Signature.1.3.14.3.2.27=SHA1withDSA
Alg.Alias.Signature.DSA=SHA1withDSA
Alg.Alias.Signature.DSAWithSHA1=SHA1withDSA
Alg.Alias.Signature.DSS=SHA1withDSA
Alg.Alias.Signature.OID.1.2.840.10040.4.3=SHA1withDSA
Alg.Alias.Signature.SHA-1/DSA=SHA1withDSA
Alg.Alias.Signature.SHA/DSA=SHA1withDSA
Alg.Alias.Signature.SHA1/DSA=SHA1withDSA
Alg.Alias.Signature.SHAwithDSA=SHA1withDSA
AlgorithmParameterGenerator.DSA=sun.security.provider.DSAParameterGenerator
AlgorithmParameterGenerator.DSA ImplementedIn=Software
AlgorithmParameterGenerator.DSA KeySize=1024
AlgorithmParameters.DSA=sun.security.provider.DSAParameters
AlgorithmParameters.DSA ImplementedIn=Software
CertPathBuilder.PKIX=sun.security.provider.certpath.SunCertPathBuilder
CertPathBuilder.PKIX ImplementedIn=Software
CertPathBuilder.PKIX ValidationAlgorithm=RFC3280
CertPathValidator.PKIX=sun.security.provider.certpath.PKIXCertPathValidator
CertPathValidator.PKIX ImplementedIn=Software
CertPathValidator.PKIX ValidationAlgorithm=RFC3280
CertStore.Collection=sun.security.provider.certpath.CollectionCertStore
CertStore.Collection ImplementedIn=Software
CertStore.LDAP=sun.security.provider.certpath.LDAPCertStore
CertStore.LDAP ImplementedIn=Software
CertStore.LDAP LDAPSchema=RFC2587
CertStore.com.sun.security.IndexedCollection=sun.security.provider.certpath.IndexedCollectionCertStore
CertStore.com.sun.security.IndexedCollection ImplementedIn=Software
CertificateFactory.X.509=sun.security.provider.X509Factory
CertificateFactory.X.509 ImplementedIn=Software
KeyFactory.DSA=sun.security.provider.DSAKeyFactory
KeyFactory.DSA ImplementedIn=Software
KeyPairGenerator.DSA=sun.security.provider.DSAKeyPairGenerator
KeyPairGenerator.DSA ImplementedIn=Software
KeyPairGenerator.DSA KeySize=1024
KeyStore.CaseExactJKS=sun.security.provider.JavaKeyStore$CaseExactJKS
KeyStore.JKS=sun.security.provider.JavaKeyStore$JKS
KeyStore.JKS ImplementedIn=Software
MessageDigest.MD5=sun.security.provider.MD5
MessageDigest.MD5 ImplementedIn=Software
MessageDigest.SHA=sun.security.provider.SHA
MessageDigest.SHA ImplementedIn=Software
MessageDigest.SHA-256=sun.security.provider.SHA2
MessageDigest.SHA-384=sun.security.provider.SHA3
MessageDigest.SHA-512=sun.security.provider.SHA5
SecureRandom.SHA1PRNG=sun.security.provider.SecureRandom
SecureRandom.SHA1PRNG ImplementedIn=Software
Signature.SHA1withDSA=sun.security.provider.DSA
Signature.SHA1withDSA ImplementedIn=Software
Signature.SHA1withDSA KeySize=1024
-------------------------------
Provider: SunJSSE version 1.42
===============================
provider properties:
Alg.Alias.KeyFactory.1.2.840.113549.1.1=RSA
Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1=RSA
Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1=RSA
Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1=RSA
Alg.Alias.Signature.1.2.840.113549.1.1.2=MD2withRSA
Alg.Alias.Signature.1.2.840.113549.1.1.4=MD5withRSA
Alg.Alias.Signature.1.2.840.113549.1.1.5=SHA1withRSA
Alg.Alias.Signature.1.3.14.3.2.29=SHA1withRSA
Alg.Alias.Signature.OID.1.2.840.113549.1.1.2=MD2withRSA
Alg.Alias.Signature.OID.1.2.840.113549.1.1.4=MD5withRSA
Alg.Alias.Signature.OID.1.2.840.113549.1.1.5=SHA1withRSA
Alg.Alias.Signature.OID.1.3.14.3.2.29=SHA1withRSA
KeyFactory.RSA=com.sun.net.ssl.internal.ssl.JSA_RSAKeyFactory
KeyManagerFactory.SunX509=com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl
KeyPairGenerator.RSA=com.sun.net.ssl.internal.ssl.JSA_RSAKeyPairGenerator
KeyStore.PKCS12=com.sun.net.ssl.internal.ssl.PKCS12KeyStore
SSLContext.SSL=com.sun.net.ssl.internal.ssl.SSLContextImpl
SSLContext.SSLv3=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
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
TrustManagerFactory.SunPKIX=com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$PKIXFactory
TrustManagerFactory.SunX509=com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$SimpleFactory
-------------------------------
Provider: SunRsaSign version 1.42
===============================
provider properties:
Alg.Alias.KeyFactory.1.2.840.113549.1.1=RSA
Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1=RSA
Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1=RSA
Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1=RSA
Alg.Alias.Signature.1.2.840.113549.1.1.2=MD2withRSA
Alg.Alias.Signature.1.2.840.113549.1.1.4=MD5withRSA
Alg.Alias.Signature.1.2.840.113549.1.1.5=SHA1withRSA
Alg.Alias.Signature.1.3.14.3.2.29=SHA1withRSA
Alg.Alias.Signature.OID.1.2.840.113549.1.1.2=MD2withRSA
Alg.Alias.Signature.OID.1.2.840.113549.1.1.4=MD5withRSA
Alg.Alias.Signature.OID.1.2.840.113549.1.1.5=SHA1withRSA
Alg.Alias.Signature.OID.1.3.14.3.2.29=SHA1withRSA
KeyFactory.RSA=com.sun.rsajca.JSA_RSAKeyFactory
KeyPairGenerator.RSA=com.sun.rsajca.JSA_RSAKeyPairGenerator
Signature.MD2withRSA=com.sun.rsajca.JSA_MD2RSASignature
Signature.MD5withRSA=com.sun.rsajca.JSA_MD5RSASignature
Signature.SHA1withRSA=com.sun.rsajca.JSA_SHA1RSASignature
-------------------------------
Provider: SunJCE version 1.42
===============================
provider properties:
Alg.Alias.AlgorithmParameterGenerator.DH=DiffieHellman
Alg.Alias.AlgorithmParameters.DH=DiffieHellman
Alg.Alias.AlgorithmParameters.PBEWithMD5AndDES=PBE
Alg.Alias.AlgorithmParameters.PBEWithMD5AndTripleDES=PBE
Alg.Alias.AlgorithmParameters.Rijndael=AES
Alg.Alias.AlgorithmParameters.TripleDES=DESede
Alg.Alias.Cipher.Rijndael=AES
Alg.Alias.Cipher.TripleDES=DESede
Alg.Alias.KeyAgreement.DH=DiffieHellman
Alg.Alias.KeyFactory.DH=DiffieHellman
Alg.Alias.KeyGenerator.Rijndael=AES
Alg.Alias.KeyGenerator.TripleDES=DESede
Alg.Alias.KeyPairGenerator.DH=DiffieHellman
Alg.Alias.SecretKeyFactory.PBEWithMD5AndTripleDES=PBEWithMD5AndDES
Alg.Alias.SecretKeyFactory.TripleDES=DESede
AlgorithmParameterGenerator.DiffieHellman=com.sun.crypto.provider.DHParameterGenerator
AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
AlgorithmParameters.Blowfish=com.sun.crypto.provider.BlowfishParameters
AlgorithmParameters.DES=com.sun.crypto.provider.DESParameters
AlgorithmParameters.DESede=com.sun.crypto.provider.DESedeParameters
AlgorithmParameters.DiffieHellman=com.sun.crypto.provider.DHParameters
AlgorithmParameters.PBE=com.sun.crypto.provider.PBEParameters
Cipher.AES=com.sun.crypto.provider.AESCipher
Cipher.Blowfish=com.sun.crypto.provider.BlowfishCipher
Cipher.DES=com.sun.crypto.provider.DESCipher
Cipher.DESede=com.sun.crypto.provider.DESedeCipher
Cipher.PBEWithMD5AndDES=com.sun.crypto.provider.PBEWithMD5AndDESCipher
Cipher.PBEWithMD5AndTripleDES=com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
KeyAgreement.DiffieHellman=com.sun.crypto.provider.DHKeyAgreement
KeyFactory.DiffieHellman=com.sun.crypto.provider.DHKeyFactory
KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
KeyGenerator.Blowfish=com.sun.crypto.provider.BlowfishKeyGenerator
KeyGenerator.DES=com.sun.crypto.provider.DESKeyGenerator
KeyGenerator.DESede=com.sun.crypto.provider.DESedeKeyGenerator
KeyGenerator.HmacMD5=com.sun.crypto.provider.HmacMD5KeyGenerator
KeyGenerator.HmacSHA1=com.sun.crypto.provider.HmacSHA1KeyGenerator
KeyPairGenerator.DiffieHellman=com.sun.crypto.provider.DHKeyPairGenerator
KeyStore.JCEKS=com.sun.crypto.provider.JceKeyStore
Mac.HmacMD5=com.sun.crypto.provider.HmacMD5
Mac.HmacSHA1=com.sun.crypto.provider.HmacSHA1
SecretKeyFactory.DES=com.sun.crypto.provider.DESKeyFactory
SecretKeyFactory.DESede=com.sun.crypto.provider.DESedeKeyFactory
SecretKeyFactory.PBEWithMD5AndDES=com.sun.crypto.provider.PBEKeyFactory
-------------------------------
Provider: SunJGSS version 1.0
===============================
provider properties:
GssApiMechanism.1.2.840.113554.1.2.2=sun.security.jgss.krb5.Krb5MechFactory
-------------------------------



markt-2 wrote:
> 
> nitingautam wrote:
>> I am using JAVA  1.4.2_17-b06
>> I face this issue sometimes only. Now days coming regularly :(
>> how to fix then
> 
> How about
> a) reading what Chris wrote when you asked this question
> b) doing what he suggests
> c) posting the results you get
> 
> Mark
> 
>> Christopher Schultz-2 wrote:
>> To whom it may concern,
>> 
>> (Marked as OT since this is a JVM issue, not a Tomcat issue).
>> 
>> On 7/9/2009 11:01 AM, nitingautam wrote:
>>>>> In my web application i am using ldap authentication. I am using
>>>>> tomcat
>>>>> 5.5
>>>>> with jdk 1.4. From some days when I try to login it throw the
>>>>> following
>>>>> error and rest of the time it works fine. What can be the issue...
>> [snip]
>> 
>>>>> Caused by: java.security.NoSuchAlgorithmException: No implementation
>>>>> for
>>>>> AES/CBC/NoPadding found
>>>>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
>>>>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)
>> Looks like your JVM doesn't have this cipher, which is weird if it only
>> happens some times. What is your exact JVM version? You might want to
>> upgrade, as things like this tend to get fixed. 1.4 is nearly dead.
>> 
>> Try running this code:
>> 
>>         String providerName = null;
>>         Provider providers[];
>>         if(null != args && 0 < args.length)
>>         {
>>             providers = new Provider[args.length];
>>             for(int i = 0; i < args.length; i++)
>>                 providers[i] = Security.getProvider(args[i]);
>> 
>>         } else
>>         {
>>             providers = Security.getProviders();
>>         }
>>         for(int i = 0; i < providers.length; i++)
>>         {
>>             Provider p = providers[i];
>>             System.out.println("Provider: " + p);
>>             System.out.println("===============================");
>>             System.out.println("provider properties:");
>>             ArrayList keys = new ArrayList(p.keySet());
>>             Collections.sort(keys);
>>             String key;
>>             for(Iterator j = keys.iterator(); j.hasNext();
>> System.out.println(key + "=" + p.get(key)))
>>                 key = (String)j.next();
>> 
>>             System.out.println("-------------------------------");
>>         }
>> 
>> This will tell you all the crypto providers, ciphers, etc. that are
>> supported by your JVM. I ran this against my own JVM:
>> 
>> $ java -version
>> java version "1.6.0_13"
>> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
>> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>> $ java GetProviderInfo | grep AES
>> Alg.Alias.AlgorithmParameters.Rijndael=AES
>> Alg.Alias.Cipher.Rijndael=AES
>> Alg.Alias.KeyGenerator.Rijndael=AES
>> AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
>> Cipher.AES=com.sun.crypto.provider.AESCipher
>> Cipher.AES SupportedKeyFormats=RAW
>> Cipher.AES
>> SupportedModes=ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
>> Cipher.AES SupportedPaddings=NOPADDING|PKCS5PADDING|ISO10126PADDING
>> Cipher.AESWrap=com.sun.crypto.provider.AESWrapCipher
>> Cipher.AESWrap SupportedKeyFormats=RAW
>> Cipher.AESWrap SupportedModes=ECB
>> Cipher.AESWrap SupportedPaddings=NOPADDING
>> KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
>> Provider.id info=SunJCE Provider (implements RSA, DES, Triple DES, AES,
>> Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
>> 
>> You can see in there that AES supports the CBC mode as well as the
>> NOPADDING padding (though I didn't actually try to create an
>> AES/CBC/NOPADDING cipher just to make sure).
>> 
>> I wonder if your JVM is broken?
>> 
>> -chris
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p24474777.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Mark Thomas <ma...@apache.org>.
nitingautam wrote:
> I am using JAVA  1.4.2_17-b06
> I face this issue sometimes only. Now days coming regularly :(
> how to fix then

How about
a) reading what Chris wrote when you asked this question
b) doing what he suggests
c) posting the results you get

Mark

> Christopher Schultz-2 wrote:
> To whom it may concern,
> 
> (Marked as OT since this is a JVM issue, not a Tomcat issue).
> 
> On 7/9/2009 11:01 AM, nitingautam wrote:
>>>> In my web application i am using ldap authentication. I am using tomcat
>>>> 5.5
>>>> with jdk 1.4. From some days when I try to login it throw the following
>>>> error and rest of the time it works fine. What can be the issue...
> [snip]
> 
>>>> Caused by: java.security.NoSuchAlgorithmException: No implementation for
>>>> AES/CBC/NoPadding found
>>>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
>>>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)
> Looks like your JVM doesn't have this cipher, which is weird if it only
> happens some times. What is your exact JVM version? You might want to
> upgrade, as things like this tend to get fixed. 1.4 is nearly dead.
> 
> Try running this code:
> 
>         String providerName = null;
>         Provider providers[];
>         if(null != args && 0 < args.length)
>         {
>             providers = new Provider[args.length];
>             for(int i = 0; i < args.length; i++)
>                 providers[i] = Security.getProvider(args[i]);
> 
>         } else
>         {
>             providers = Security.getProviders();
>         }
>         for(int i = 0; i < providers.length; i++)
>         {
>             Provider p = providers[i];
>             System.out.println("Provider: " + p);
>             System.out.println("===============================");
>             System.out.println("provider properties:");
>             ArrayList keys = new ArrayList(p.keySet());
>             Collections.sort(keys);
>             String key;
>             for(Iterator j = keys.iterator(); j.hasNext();
> System.out.println(key + "=" + p.get(key)))
>                 key = (String)j.next();
> 
>             System.out.println("-------------------------------");
>         }
> 
> This will tell you all the crypto providers, ciphers, etc. that are
> supported by your JVM. I ran this against my own JVM:
> 
> $ java -version
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
> $ java GetProviderInfo | grep AES
> Alg.Alias.AlgorithmParameters.Rijndael=AES
> Alg.Alias.Cipher.Rijndael=AES
> Alg.Alias.KeyGenerator.Rijndael=AES
> AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
> Cipher.AES=com.sun.crypto.provider.AESCipher
> Cipher.AES SupportedKeyFormats=RAW
> Cipher.AES
> SupportedModes=ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
> Cipher.AES SupportedPaddings=NOPADDING|PKCS5PADDING|ISO10126PADDING
> Cipher.AESWrap=com.sun.crypto.provider.AESWrapCipher
> Cipher.AESWrap SupportedKeyFormats=RAW
> Cipher.AESWrap SupportedModes=ECB
> Cipher.AESWrap SupportedPaddings=NOPADDING
> KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
> Provider.id info=SunJCE Provider (implements RSA, DES, Triple DES, AES,
> Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
> 
> You can see in there that AES supports the CBC mode as well as the
> NOPADDING padding (though I didn't actually try to create an
> AES/CBC/NOPADDING cipher just to make sure).
> 
> I wonder if your JVM is broken?
> 
> -chris
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by nitingautam <ga...@gmail.com>.
I am using JAVA  1.4.2_17-b06
I face this issue sometimes only. Now days coming regularly :(
how to fix then



Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> To whom it may concern,
> 
> (Marked as OT since this is a JVM issue, not a Tomcat issue).
> 
> On 7/9/2009 11:01 AM, nitingautam wrote:
>> In my web application i am using ldap authentication. I am using tomcat
>> 5.5
>> with jdk 1.4. From some days when I try to login it throw the following
>> error and rest of the time it works fine. What can be the issue...
> 
> [snip]
> 
>> Caused by: java.security.NoSuchAlgorithmException: No implementation for
>> AES/CBC/NoPadding found
>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
>> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)
> 
> Looks like your JVM doesn't have this cipher, which is weird if it only
> happens some times. What is your exact JVM version? You might want to
> upgrade, as things like this tend to get fixed. 1.4 is nearly dead.
> 
> Try running this code:
> 
>         String providerName = null;
>         Provider providers[];
>         if(null != args && 0 < args.length)
>         {
>             providers = new Provider[args.length];
>             for(int i = 0; i < args.length; i++)
>                 providers[i] = Security.getProvider(args[i]);
> 
>         } else
>         {
>             providers = Security.getProviders();
>         }
>         for(int i = 0; i < providers.length; i++)
>         {
>             Provider p = providers[i];
>             System.out.println("Provider: " + p);
>             System.out.println("===============================");
>             System.out.println("provider properties:");
>             ArrayList keys = new ArrayList(p.keySet());
>             Collections.sort(keys);
>             String key;
>             for(Iterator j = keys.iterator(); j.hasNext();
> System.out.println(key + "=" + p.get(key)))
>                 key = (String)j.next();
> 
>             System.out.println("-------------------------------");
>         }
> 
> This will tell you all the crypto providers, ciphers, etc. that are
> supported by your JVM. I ran this against my own JVM:
> 
> $ java -version
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
> $ java GetProviderInfo | grep AES
> Alg.Alias.AlgorithmParameters.Rijndael=AES
> Alg.Alias.Cipher.Rijndael=AES
> Alg.Alias.KeyGenerator.Rijndael=AES
> AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
> Cipher.AES=com.sun.crypto.provider.AESCipher
> Cipher.AES SupportedKeyFormats=RAW
> Cipher.AES
> SupportedModes=ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
> Cipher.AES SupportedPaddings=NOPADDING|PKCS5PADDING|ISO10126PADDING
> Cipher.AESWrap=com.sun.crypto.provider.AESWrapCipher
> Cipher.AESWrap SupportedKeyFormats=RAW
> Cipher.AESWrap SupportedModes=ECB
> Cipher.AESWrap SupportedPaddings=NOPADDING
> KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
> Provider.id info=SunJCE Provider (implements RSA, DES, Triple DES, AES,
> Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)
> 
> You can see in there that AES supports the CBC mode as well as the
> NOPADDING padding (though I didn't actually try to create an
> AES/CBC/NOPADDING cipher just to make sure).
> 
> I wonder if your JVM is broken?
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkpbREMACgkQ9CaO5/Lv0PAGbwCcDDILqRAT8aIFNl06Lbj7ZmjF
> Ur8AnjLGY9QtHl1v7MgdcASjcxduAKGw
> =7ff9
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java.security.NoSuchAlgorithmException%3A-No-implementation-for-AES-CBC-NoPad-tp24410804p24463796.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [OT] java.security.NoSuchAlgorithmException: No implementation for AES/CBC/NoPad

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom it may concern,

(Marked as OT since this is a JVM issue, not a Tomcat issue).

On 7/9/2009 11:01 AM, nitingautam wrote:
> In my web application i am using ldap authentication. I am using tomcat 5.5
> with jdk 1.4. From some days when I try to login it throw the following
> error and rest of the time it works fine. What can be the issue...

[snip]

> Caused by: java.security.NoSuchAlgorithmException: No implementation for
> AES/CBC/NoPadding found
> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.d(Unknown Source)
> 	at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(Unknown Source)

Looks like your JVM doesn't have this cipher, which is weird if it only
happens some times. What is your exact JVM version? You might want to
upgrade, as things like this tend to get fixed. 1.4 is nearly dead.

Try running this code:

        String providerName = null;
        Provider providers[];
        if(null != args && 0 < args.length)
        {
            providers = new Provider[args.length];
            for(int i = 0; i < args.length; i++)
                providers[i] = Security.getProvider(args[i]);

        } else
        {
            providers = Security.getProviders();
        }
        for(int i = 0; i < providers.length; i++)
        {
            Provider p = providers[i];
            System.out.println("Provider: " + p);
            System.out.println("===============================");
            System.out.println("provider properties:");
            ArrayList keys = new ArrayList(p.keySet());
            Collections.sort(keys);
            String key;
            for(Iterator j = keys.iterator(); j.hasNext();
System.out.println(key + "=" + p.get(key)))
                key = (String)j.next();

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

This will tell you all the crypto providers, ciphers, etc. that are
supported by your JVM. I ran this against my own JVM:

$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
$ java GetProviderInfo | grep AES
Alg.Alias.AlgorithmParameters.Rijndael=AES
Alg.Alias.Cipher.Rijndael=AES
Alg.Alias.KeyGenerator.Rijndael=AES
AlgorithmParameters.AES=com.sun.crypto.provider.AESParameters
Cipher.AES=com.sun.crypto.provider.AESCipher
Cipher.AES SupportedKeyFormats=RAW
Cipher.AES
SupportedModes=ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
Cipher.AES SupportedPaddings=NOPADDING|PKCS5PADDING|ISO10126PADDING
Cipher.AESWrap=com.sun.crypto.provider.AESWrapCipher
Cipher.AESWrap SupportedKeyFormats=RAW
Cipher.AESWrap SupportedModes=ECB
Cipher.AESWrap SupportedPaddings=NOPADDING
KeyGenerator.AES=com.sun.crypto.provider.AESKeyGenerator
Provider.id info=SunJCE Provider (implements RSA, DES, Triple DES, AES,
Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC)

You can see in there that AES supports the CBC mode as well as the
NOPADDING padding (though I didn't actually try to create an
AES/CBC/NOPADDING cipher just to make sure).

I wonder if your JVM is broken?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpbREMACgkQ9CaO5/Lv0PAGbwCcDDILqRAT8aIFNl06Lbj7ZmjF
Ur8AnjLGY9QtHl1v7MgdcASjcxduAKGw
=7ff9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org