I was having this same issue, and the format of the key was NOT the actual problem.
All I had to do to get rid of that exception was to call
java.security.Security.addProvider(
new org.bouncycastle.jce.provider.BouncyCastleProvider()
);
and everything worked
More Related Contents:
- convert openSSH rsa key to javax.crypto.Cipher compatible format
- How can I construct a java.security.PublicKey object from a base64 encoded string?
- XSS prevention in JSP/Servlet web application
- Spring Security : Multiple HTTP Config not working
- Handling passwords used for auth in source code
- How to Load RSA Private Key From File
- Securing a password in a properties file [duplicate]
- Java Error: “Your security settings have blocked a local application from running”
- Handling Java crypto exceptions
- Read RSA private key of format PKCS1 in JAVA
- java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty on Linux, or why is the default truststore empty [duplicate]
- Using NTLM authentication in Java applications
- Using SHA1 and RSA with java.security.Signature vs. MessageDigest and Cipher
- How to force java server to accept only tls 1.2 and reject tls 1.0 and tls 1.1 connections
- How to implement a possibility for user to post some html-formatted data in a safe way?
- Create a mutable java.lang.String
- java.security.AccessControlException: Access denied (java.io.FilePermission
- How do I generate a SALT in Java for Salted-Hash?
- Android encryption
- Too much data for RSA block fail. What is PKCS#7?
- Get a PrivateKey from a RSA .pem file [duplicate]
- Spring Security, secured and none secured access
- JAAS for human beings
- java.security.NoSuchAlgorithmException:Cannot find any provider supporting AES/ECB/PKCS7PADDING
- When to move from Container managed security to alternatives like Apache Shiro, Spring Security?
- SSLContext initialization
- How to hash a password with SHA-512 in Java?
- Using Apache httpclient for https
- How to obtain the location of cacerts of the default java installation?
- What is the best practice for securely storing passwords in Java