'Given an EC_KEY determine the group and what methods are required to
get/set point coordinates.'

def _ec_key_determine_group_get_set_funcs(self, ctx):

    self.openssl_assert((ctx != self._ffi.NULL))
    nid_two_field = self._lib.OBJ_sn2nid('characteristic-two-field')
    self.openssl_assert((nid_two_field != self._lib.NID_undef))
    group = self._lib.EC_KEY_get0_group(ctx)
    self.openssl_assert((group != self._ffi.NULL))
    method = self._lib.EC_GROUP_method_of(group)
    self.openssl_assert((method != self._ffi.NULL))
    nid = self._lib.EC_METHOD_get_field_type(method)
    self.openssl_assert((nid != self._lib.NID_undef))
    if ((nid == nid_two_field) and self._lib.Cryptography_HAS_EC2M):
        set_func = self._lib.EC_POINT_set_affine_coordinates_GF2m
        get_func = self._lib.EC_POINT_get_affine_coordinates_GF2m
    else:
        set_func = self._lib.EC_POINT_set_affine_coordinates_GFp
        get_func = self._lib.EC_POINT_get_affine_coordinates_GFp
    assert (set_func and get_func)
    return (set_func, get_func, group)
