The digital signature of a document comes from the result of applying a mathematical algorithm, called a HASH function, to its content and, subsequently, applying the signature algorithm (wherein a private code is employed) to the result of the previous operation, generating the digital signature. The digital signature software must also carry out various validations, amongst which the following are worth mentioning:
. Validity of the signatory's digital signature
. Revocation of the signatory's digital certificate (could be because of OCSP or CRL)
. Inclusion of a time stamp
The HASH function consists of a mathematical algorithm that allows a calculation of a summary value of the information that is going to be digitally signed. It works in one direction, that is, it is not possible to calculate the original information from the summary value. When the entry is a document, the result of the function consists of a number that unequivocally identifies the text. If this number is adjoined to the text, the receiver can reapply the function and check the result with that which has been received. However, the purpose of this type of operation is not designed to be carried out by the user, rather for software to be used that both automates the HASH value calculation function and its subsequent verification.