Might be nicer to write this as `if not (3 <= public_exponent < modulus)`