A digital signature basically serves as proof of the identity of the electronic document signer and ensures data integrity and protection against modifying the content of an e-document. Digital signatures are based on asymmetric cryptography, which is why two keys are needed – a private one for signing and a public one for verifying signature validity.
A digital signature is actually an always unique data fingerprint – there is only one fingerprint for each document. When digitally signing a document, the input data is converted using a hash function, the result of which is a fingerprint of the document. The document is digitally signed once its fingerprint is encrypted with a private key.