old_contents: from cryptography.hazmat.primitives import serialization as crypto_serialization
  from cryptography.hazmat.primitives.asymmetric import rsa
  from cryptography.hazmat.backends import default_backend as crypto_default_backend
  
  
  def public_private_key():
      # https://stackoverflow.com/a/39126754/43839
  
      key = rsa.generate_private_key(
          backend=crypto_default_backend(),
          public_exponent=65537,
          key_size=2048
      )
  
      public = key.public_key().public_bytes(
          crypto_serialization.Encoding.OpenSSH,
          crypto_serialization.PublicFormat.OpenSSH
      )
  
      private = key.private_bytes(
          crypto_serialization.Encoding.PEM,
          crypto_serialization.PrivateFormat.PKCS8,
          crypto_serialization.NoEncryption())
  
      return public.decode(), private.decode()
  
new_contents: from cryptography.hazmat.primitives import serialization
  from cryptography.hazmat.primitives.asymmetric import rsa
  from cryptography.hazmat.backends import default_backend
  
  # https://stackoverflow.com/a/39126754/43839
  # https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/
  
  
  def make_private_key():
      return rsa.generate_private_key(
          backend=default_backend(),
          public_exponent=65537,
          key_size=2048)
  
  
  def public_key_string(private_key):
      return private_key.public_key().public_bytes(
          serialization.Encoding.OpenSSH,
          serialization.PublicFormat.OpenSSH
      ).decode()
  
  
  def private_key_string(private_key):
      return private_key.private_bytes(
          serialization.Encoding.PEM,
          serialization.PrivateFormat.PKCS8,
          serialization.NoEncryption()).decode()
  
  
  def public_private_key():
      private_key = make_private_key()
      public = public_key_string(private_key)
      private = private_key_string(private_key)
      return public, private
  
subject: Refactor crypto.py slightly