code: func parsePubKey(in []byte, algo string) (pubKey PublicKey, rest []byte, err error) {
  	switch algo {
  	case KeyAlgoRSA:
  		return parseRSA(in)
  	case KeyAlgoDSA:
  		return parseDSA(in)
  	case KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521:
  		return parseECDSA(in)
  	case CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01:
  		cert, err := parseCert(in, certToPrivAlgo(algo))
  		if err != nil {
  			return nil, nil, err
  		}
  		return cert, nil, nil
  	}
  	return nil, nil, fmt.Errorf("ssh: unknown key algorithm: %v", err)
  }
docs: // parsePubKey parses a public key of the given algorithm.
  // Use ParsePublicKey for keys with prepended algorithm.