@staticmethod
def _sanityCheckKeySizes(other):
    """Check if key size limits are sane"""
    if other.minKeySize < 512:
        raise ValueError('minKeySize too small')
    if other.minKeySize > 16384:
        raise ValueError('minKeySize too large')
    if other.maxKeySize < 512:
        raise ValueError('maxKeySize too small')
    if other.maxKeySize > 16384:
        raise ValueError('maxKeySize too large')
    if other.maxKeySize < other.minKeySize:
        raise ValueError('maxKeySize smaller than minKeySize')
