Digital signing software uses mathematical algorithms to generate a public key and a private key. For each digitally signed document, a cryptographic hash is generated. This cryptographic hash is encrypted with the help of sender's private key and gets stored in highly secure HSM box. This encryption is attached to the document and only then sent to the recipients for digital signing along with this sender's public key.