Create a message digest; encrypt the digest with the private key of the sender; and bundle the message, encrypted digest, and public key together in order to sign the document.
In order to create a digital signature, the following steps must be taken:
1. The message and message digest are created.
2. The digest and private key are encrypted.
The message, encrypted message digest, and public key are bundled to create the signed document.