A digital signature is an electronic analog of a written signature that is generated from a message prior to its dispatch and can be used to verify to the recipient that the message was signed by the originator.
Digital signature systems require a two-step process:
A hash algorithm condenses data into a message digest. (Public key encryption is not used for encrypting large amounts of data.)
The message digest is encrypted with the originator's private key.
The recipient re-creates the message digest from the received message, uses the public key to decrypt the digital signature, and compares the results.
Digital signatures are a particular application of public key encryption.