Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8241038

EdDSA compatibility Test fails with OpenSSL generated keys and certs.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P3
    • None
    • None
    • security-libs
    • None

    Description

      Complete Test attached for reference. There are 3 cases with different algorithm names. Please try for each case as the exception message differs.

                  KeyFactory kf = KeyFactory.getInstance(algorithm, provider);
                  PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(
                          Base64.getMimeDecoder().decode(<Openssl generated keys string>));
                  EdECPrivateKey privKey
                          = (EdECPrivateKey) kf.generatePrivate(privSpec);
                  checkPrivKeyFormat(privKey.getEncoded());

                  NamedParameterSpec namedSpec = new NamedParameterSpec(<algorithm name as applicable>);
                  EdECPrivateKeySpec edprivSpec
                          = new EdECPrivateKeySpec(namedSpec, privKey.getEncoded());
                  privKey = (EdECPrivateKey) kf.generatePrivate(edprivSpec); // FAILS here while generating the keys.

      Attachments

        Issue Links

          Activity

            People

              ascarpino Anthony Scarpino
              ssahoo Sibabrata Sahoo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: