def generate_key_pair():
    key = rsa.generate_private_key(public_exponent=65537, key_size=2048, backend=default_backend())
    return (key, key.public_key())
def generate_key_pair():
    key = rsa.generate_private_key(public_exponent=65537, key_size=2048, backend=default_backend())
    return (key, key.public_key())