def size(self):
        """
        Return the size of the object we wrap.

        @return: The size of the key.
        @rtype: L{int}
        """
        if self._keyObject is None:
            return 0
        elif self.type() == 'EC':
            return self._keyObject.curve.key_size
        return self._keyObject.key_size

        Return the size of the object we wrap.

        @return: The size of the key.
        @rtype: L{int}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/keys.py