code: func NewPublicKey(k interface{}) (PublicKey, error) {
  	var sshKey PublicKey
  	switch t := k.(type) {
  	case *rsa.PublicKey:
  		sshKey = (*rsaPublicKey)(t)
  	case *ecdsa.PublicKey:
  		if !supportedEllipticCurve(t.Curve) {
  			return nil, errors.New("ssh: only P256, P384 and P521 EC keys are supported.")
  		}
  		sshKey = (*ecdsaPublicKey)(t)
  	case *dsa.PublicKey:
  		sshKey = (*dsaPublicKey)(t)
  	default:
  		return nil, fmt.Errorf("ssh: unsupported key type %T", k)
  	}
  	return sshKey, nil
  }
docs: // NewPublicKey takes a pointer to rsa, dsa or ecdsa PublicKey
  // and returns a corresponding ssh PublicKey instance. EC keys should use P256, P384 or P521.