java.security.spec.InvalidKeySpecException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • How to use OpenSSL generated keys in Java?
    via Information Security by BRabbit27
    ,
  • Read private key in DER format java
    via Stack Overflow by BRabbit27
    ,
  • GitHub comment 13#171743630
    via GitHub by cjr8020
    ,
  • RSA Decryption error
    via Stack Overflow by Amol Parsewar
    ,
    • java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DER input, Integer tag error at sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:217) at java.security.KeyFactory.generatePrivate(KeyFactory.java:372) at firmaelectronica.DataEncryptor.encryptHash(DataEncryptor.java:40) at firmaelectronica.FirmaElectronica.main(FirmaElectronica.java:39) Caused by: java.security.InvalidKeyException: IOException : DER input, Integer tag error at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:361) at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:367) at sun.security.rsa.RSAPrivateCrtKeyImpl.<init>(RSAPrivateCrtKeyImpl.java:91) at sun.security.rsa.RSAPrivateCrtKeyImpl.newKey(RSAPrivateCrtKeyImpl.java:75) at sun.security.rsa.RSAKeyFactory.generatePrivate(RSAKeyFactory.java:316) at sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:213) ... 3 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    7 more bugmates