Patent ID: 8316443

Claim:
A method for protecting a message from an XML rewriting attack when being exchanged in a distributed and decentralized network system between an initial sender and an ultimate receiver, the method comprising: generating a message, wherein the message comprises message elements, a number of which are signed, the message elements forming a tree structure, the tree structure comprising a root called envelope and at least two children, the message having a body and a header, the header having at least a first attack preventing header block; representing the message elements by a unique ID attribute, respectively; sending the message from the initial sender to the ultimate receiver; and including structure specific information in the message being sent to the ultimate receiver, wherein the structure specific information is included in the first attack preventing header block and comprises: at least a digest value of a pre-order traversal list of the tree structure, the pre-order traversal list being representative of a concatenation of the unique ID attributes of the message elements forming the tree structure; and for each signed message element targeted to the ultimate receiver the unique ID attribute, a depth, a parent's name and a parent's ID attribute, so that the ultimate receiver when receiving the message can identify any XML rewriting attack against any one of the signed message elements by comparing the structure specific information which can be derived from the received message with the structure specific information carried by the first attack preventing header block.