'Create a new OpenSSL EC_KEY structure initialized to use this curve.
The structure is automatically garbage collected when the Python object
is garbage collected.'

def _to_EC_KEY(self):

    key = self._lib.EC_KEY_new_by_curve_name(self._nid)
    return _ffi.gc(key, _lib.EC_KEY_free)
