= openpgp.PublicKeyType { return nil, errors.New("Invalid public key data") } packetReader := packet.NewReader(block.Body) pkt, err := packetReader.Next() if err != nil { return nil, err } key, ok := pkt.(*packet.PublicKey) if !ok { return nil, err } return key, nil}fun...