PBKDF2WithSHA256 SecretKeyFactory not available

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PBKDF2WithSHA256 SecretKeyFactory not available

echo
Hello!

I am working with a legacy code and narrowed down a failing test to this single line of code:

javax.crypto.SecretKeyFactory.getInstance("PBKDF2WithSHA256");

It results in this exception:

java.security.NoSuchAlgorithmException: PBKDF2WithSHA256 SecretKeyFactory not available
        at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)
        at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)

I have tried different versions of org.bouncycastle but my current versions are:

            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>1.53</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>1.53</version>
            </dependency>

I think that the issue is related to using a version of org.bouncycastle which does not support PBKDF2WithSHA256 cryptography standard.

Any help you guys could provide would be greatly appreciated.

Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: PBKDF2WithSHA256 SecretKeyFactory not available

echo
I searched all the jars in the project for "PBKDF2WithSHA256" and found these matches:

lib_build % find . -name "*.jar" -exec zipgrep "PBKDF2WithSHA256" '{}' \;
com/rsa/cryptoj/o/lu.class:Binary file (standard input) matches
com/rsa/cryptoj/o/lq.class:Binary file (standard input) matches
com/rsa/cryptoj/o/ke.class:Binary file (standard input) matches

I think now that this issue is related to com/rsa/cryptoj.


----- Original message -----
From: [hidden email]
To: [hidden email]
Subject: [dev-crypto] PBKDF2WithSHA256 SecretKeyFactory not available
Date: Friday, June 05, 2020 11:10 AM

Hello!

I am working with a legacy code and narrowed down a failing test to this single line of code:

javax.crypto.SecretKeyFactory.getInstance("PBKDF2WithSHA256");

It results in this exception:

java.security.NoSuchAlgorithmException: PBKDF2WithSHA256 SecretKeyFactory not available
        at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)
        at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)

I have tried different versions of org.bouncycastle but my current versions are:

            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>1.53</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>1.53</version>
            </dependency>

I think that the issue is related to using a version of org.bouncycastle which does not support PBKDF2WithSHA256 cryptography standard.

Any help you guys could provide would be greatly appreciated.

Thank you!