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

EdDSA compatibility Test fails with OpenSSL generated keys and certs.

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: