You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
another one, why conscrypt not using the correct XEC class?
java.security.spec.InvalidKeySpecException: Must use ECPublicKeySpec or X509EncodedKeySpec; was java.security.spec.XECPublicKeySpec
at com.android.org.conscrypt.OpenSSLXDHKeyFactory.engineGeneratePublic(OpenSSLXDHKeyFactory.java:53)
at java.security.KeyFactory.generatePublic(KeyFactory.java:361)
at tech.kwik.agent15.extension.KeyShareExtension.rawToEncodedXDHPublicKey(KeyShareExtension.java:332)
Yeah, it's very much on our roadmap but not trivial as the XEC classes are not available until Java 15 and Android API level 33, but we still support Java 8 and API level 20.
The (ugly) workaround if you have XEC KeySpecs would be to create SunJCE XECKeys from them and then extract the X509EncodedKeySpec.
Or, as it looks like you're using raw X25519 key bytes, you can create an instance of Conscrypt's XdhKeySpec with the raw data and pass that into tech.kwik.agent15.extension.KeyShareExtension.rawToEncodedXDHPublicKey.
Yeah, I modified agent15 library and successfully made x25519 work, but this workaround could not be submitted upstream, and finally I can only disable x25519 support for all Android version.
I have a problem using a library in Android, I think x25519 public key should implement XECPublicKey.
Also initialize support is not complete, can I assume x25519 is not generally available in conscrypt?
The text was updated successfully, but these errors were encountered: