This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Security and the fly likes problem with RSA..... folks please help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "problem with RSA..... folks please help!" Watch "problem with RSA..... folks please help!" New topic
Author

problem with RSA..... folks please help!

Alex Fox
Greenhorn

Joined: Nov 01, 2009
Posts: 1
Hi Friends ,

I am trying to generate RSA keys from the txt files.


But NetBeans wrote:


Exception in thread "main" java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException: null
at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:188)
at java.security.KeyFactory.generatePublic(KeyFactory.java:304)
at JcaKeyPair.encrypt(JcaKeyPair.java:80)
at JcaKeyPair.main(JcaKeyPair.java:130)
Caused by: java.security.InvalidKeyException: IOException: null
at sun.security.x509.X509Key.decode(X509Key.java:380)
at sun.security.x509.X509Key.decode(X509Key.java:386)
at sun.security.rsa.RSAPublicKeyImpl.<init>(RSAPublicKeyImpl.java:66)
at sun.security.rsa.RSAKeyFactory.generatePublic(RSAKeyFactory.java:281)
at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:184)
... 3 more
Java Result: 1



Please help me, I do not know what to do ;(
 
jQuery in Action, 2nd edition
 
subject: problem with RSA..... folks please help!