WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

No SecretKeyFactory could be found for algorithm PBEWithMD5AndDES

  • 1.  No SecretKeyFactory could be found for algorithm PBEWithMD5AndDES

    Posted Thu August 13, 2020 06:39 AM
    Edited by Mallikarjuna Reddy K Thu August 13, 2020 06:40 AM
    Hi Team,

    We are getting the below error in Server systemErr.log. May i know if this is application code error or WebSphere JDK issue? Please provide the exact details if possible and workaround. 

    Iam using WAS ND 8.5.5.16 with IBM WebSphere SDK 7.0.10.45 & 8.0.5.37 Installed.

    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:309)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:266)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:235)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.mq.jms.MQSession$FacadeMessageListener.onMessage(MQSession.java:133)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:2913)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.msg.client.jms.internal.JmsXAQueueSessionImpl$1.run(JmsXAQueueSessionImpl.java:1007)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.mq.jms.MQSession.run(MQSession.java:958)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1056)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1110)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:780)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:746)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [8/13/20 15:20:06:728 SGT] 00000123 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at java.lang.reflect.Method.invoke(Method.java:620)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:47)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:100)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:132)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:601)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R Caused by: java.security.NoSuchAlgorithmException: No SecretKeyFactory could be found for algorithm PBEWithMD5AndDES
    [8/13/20 15:20:06:729 SGT] 00000123 SystemErr R at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:138)


    [8/13/20 15:20:06:737 SGT] 00000123 SystemErr R com.ibm.base.crypto.CryptoException: Password encryption error

    Thank you all help. Cheers.


    ------------------------------
    Mallikarjuna Reddy K Systems Consultant
    Websphere Middleware Administrator
    Encora Technologies Pte Ltd
    ------------------------------


  • 2.  RE: No SecretKeyFactory could be found for algorithm PBEWithMD5AndDES

    Posted Fri August 14, 2020 08:23 AM
    Hello Mallikarjuna
    PBEWithMD5AndDES is the name of a Cipher Algorithm and it looks like either your JDK or JRE does not find the java class that implemented this algorithm.
    It could be a classpath issue - or someone from your security team decided that this algorithm is deprecated or an IBM patch decided not to work with that anymore.

    I think the implementation is included in IBMJECCA
    com.ibm.crypto.hdwrCCA.provider.PBEWithMD5AndDESCipher

    See the following link for reasons why that algorithm should not be used
    https://www.javamex.com/tutorials/cryptography/pbe_key_derivation.shtml

    ------------------------------
    Matthias Jungbauer
    ------------------------------



  • 3.  RE: No SecretKeyFactory could be found for algorithm PBEWithMD5AndDES

    Posted Fri August 14, 2020 10:28 AM
    Hello Mallikarjuna,
    as @Matthias Jungbauer mentioned this could be a classpath issue. But could you please past the whole exception? Which JDK are you actually using when running WAS? You said you have 7.0.10.45 & 8.0.5.37 installed - but which is used by the running application server? Where do you have the PBEWithMD5AndDES cipher configured so that it is used?

    I've searched my installation and found the class com.ibm.crypto.provider.PBEWithMD5AndDESCipher in the ibmjceprovider.jar file in Java's lib/ext directory being used by WebSphere:
    ===============================================
    Found: PBEWithMD5AndDESCipher
    Class: com.ibm.crypto.provider.PBEWithMD5AndDESCipher
    Package: com.ibm.crypto.provider
    Library Name: ibmjceprovider.jar
    Library Path: /home/xxxxxx/IBM/WebSphere/AppServer/java/8.0/jre/lib/ext/ibmjceprovider.jar
    ===============================================

    Are you using custom encryption classes in your WebSphere Environment?



    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------