You put an input and the hash value comes as an output then when someone puts the input the hash function it is applied to see if it is the same hash original value is stored in some database , that is how it works if I remember it correctly.
However I am having some trouble understanding timestamps now, I have just used a timestamp service, univerisign.
I sent the file to timestamp it and I believe the input is the file and the date and by using sha512 it creates a document signature, this is exactly what has done: My document was example.pdf:
Title
testing the document.
and after using the service, it appears example.pdf:
Title
04_02-2012
testing the document.
It also comes a file called example.pdf.ers wich I believe It is the hash value but How can I prove the validity of a document timestamped by Universign?
This is how the web answers it:
Universign uses the timestamp protocol defined by the IETF RFC 3161 standard. You can use any software compliant with this standard to check your timestamp seal.
What does this mean?
How different is my example.pdf document from a fake one fake.pdf with the same date written on it?
Does my example.pdf have any security characteristic or is it just a normal pdf document and all the verification information it is stored in example.pdf.ers?
I think that if universign was able to gave me a proof of the document, a smart one could easily create a fake proof of the document by giving the fake input including the date, maybe It is got to do with the credentials of the organization in this case universign as not all timestamps are valid and probably example.pdf.ers is saved in universign.eu database and that is why it is valid.
Note that my question although long it is specific I just tried to answer it while formulating it, It is all about understanding the verification of timestamps.