java.security.spec.InvalidKeySpecException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Your key is invalid or you're forgetting to decode it first

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Generating ECPublicKey in java
    via Stack Overflow by James Bond
    ,
  • Java, convert string to a RSA publicKey
    via Stack Overflow by jonney
    ,
  • java invalidKeyException
    via Stack Overflow by jonney
    ,
  • How can I read RSA keys in Java?
    via Stack Overflow by Gadoya
    ,
    • java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException: Only named ECParameters supported at sun.security.ec.ECKeyFactory.engineGeneratePublic(ECKeyFactory.java:157) at java.security.KeyFactory.generatePublic(Unknown Source) at Main.a(Main.java:53) at Main.main(Main.java:37) Caused by: java.security.InvalidKeyException: IOException: Only named ECParameters supported at sun.security.x509.X509Key.decode(Unknown Source) at sun.security.x509.X509Key.decode(Unknown Source) at sun.security.ec.ECPublicKeyImpl.<init>(ECPublicKeyImpl.java:69) at sun.security.ec.ECKeyFactory.implGeneratePublic(ECKeyFactory.java:219) at sun.security.ec.ECKeyFactory.engineGeneratePublic(ECKeyFactory.java:153) ... 3 more

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Andreas Häber
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    3 more bugmates