static OpenSSLKey wrapPlatformKey(ECPrivateKey ecPrivateKey) throws InvalidKeyException {
        OpenSSLECGroupContext group;
        try {
            group = OpenSSLECGroupContext.getInstance(ecPrivateKey.getParams());
        } catch (InvalidAlgorithmParameterException e) {
            throw new InvalidKeyException("Unknown group parameters", e);
        }
        return wrapPlatformKey(ecPrivateKey, group);
    }
An implementation of a {@link PrivateKey} for EC keys based on BoringSSL.
common/src/main/java/org/conscrypt/OpenSSLECPrivateKey.java