A watermark stored in a data file refers to a method for ensuring data integrity which combines aspects of data hashing and digital watermarking. Both are useful for tamper detection, however each has advantages and disadvantages.
If the hash results are the same, the systems involved can have an appropriate degree of confidence to the integrity of the received data. On the other hand, if the hash results are different, they can conclude that the received data file has been altered.
A disadvantage of this hash process is that no indications exist as to the extent or location of changes within the received data file. Only two results can be given - the received data file is trustworthy or it isn't. Therefore, if there is a single change in the file, a hash check will fail and the data discarded.
This process is common in P2P networks, for example the BitTorrent protocol. Once a part of the file is downloaded, the data is then checked against the hash key (known as a hash check). Upon this result, the data is kept or discarded.
A subscriber, with knowledge of the watermark and how it is recovered, can determine (to a certain extent) whether significant changes have occurred within the data file. Depending on the specific method used, recovery of the embedded auxiliary data can be robust to post-processing (such as lossy compression).
If the data file to be retrieved is an image, the provider can embed a watermark for protection purposes. The process allows tolerance to some change, while still maintaining an association with the original image file. Researchers have also developed techniques that embed components of the image within the image. This can help identify portions of the image that may contain unauthorized changes and even help in recovering some of the lost data.
A disadvantage of digital watermarking is that a subscriber cannot significantly alter some files without sacrificing the quality or utility of the data. This can be true of various files including image data, audio data, and computer code.