SecretKeyFactory is broken in JDK 1.6 update 22
If you upgrade JDK to 1.6 update 22 (build 04), the SecretKeyFactory is broken. As a result you will not be able to load any PKCS12 key stores. You will get NoSuchAlgorithmException thrown. I have reported this issue in the bug database. You can view the bug here . I guess it will take upto a day for this bug to be externally visible, if you don't have a SDN account. Here is the sample program to reproduce the issue: public static void main(String[] args) { SecretKeyFactory instance = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); System.out.println("Returned instance: " + instance.getAlgorithm()); } You will get the exception below: Exception in thread "main" java.security.NoSuchAlgorithmException: PBEWithSHA1AndRC2_40 SecretKeyFactory not available at javax.crypto.SecretKeyFactory.<init>(DashoA13*..) at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..) at main.TestClient.main(TestClient.java:96) Work ...