code: def serialize_verifying_key(vk):
      
      if isinstance(vk, ed25519.keys.VerifyingKey):
          pubkey = vk.to_bytes()
          key_type = SSH_ED25519_KEY_TYPE
          blob = util.frame(SSH_ED25519_KEY_TYPE) + util.frame(pubkey)
          return key_type, blob
  
      if isinstance(vk, ecdsa.keys.VerifyingKey):
          curve_name = SSH_NIST256_CURVE_NAME
          key_blob = SSH_NIST256_DER_OCTET + vk.to_string()
          parts = [SSH_NIST256_KEY_TYPE, curve_name, key_blob]
          key_type = SSH_NIST256_KEY_TYPE
          blob = b''.join([util.frame(p) for p in parts])
          return key_type, blob
  
      raise TypeError('unsupported {!r}'.format(vk))
docs: Serialize a public key into SSH format (for exporting to text format).
  
      Currently, NIST256P1 and ED25519 elliptic curves are supported.
      Raise TypeError on unsupported key format.