Peer-to-peer file sharing networks are a popular means of sharing a diverse range of resources and information. Many of today's most widely used file sharing networks are built on the Gnutella file sharing protocol. The open, insecure nature of such networks means that they are susceptible to the distribution of malicious, unauthentic or low quality resources. XRep is a reputation-based trust management system designed to reduce the number of malicious or low quality resources distributed in a Gnutella file sharing network. XRep is significant in that it can be integrated into a Gnutella environment with minimal disruption. This is achieved primarily through the use of the same message passing mechanism as in the standard Gnutella protocol. We demonstrate that the trust semantics algorithm employed by XRep has a number of weaknesses and does not produce correct trust values when used against a range of strategies that can be employed by malicious agents. We describe an enhanced trust semantics algorithm called X2Rep that can be seamlessly incorporated into the XRep protocol. We demonstrate that this algorithm is robust against such strategies, offers a high degree of expressiveness in voting and vote evaluation and significantly reduces the network communications required by the XRep protocol. © Springer-Verlag Berlin Heidelberg 2004.