This section describes steps involved in the data signing process and the signature verification process.
Of course, the most important part of the digital signature technology is the
signing process and the verification process.
The goal of the signing process is to produce a signature based on
the original data, and the sender's private key. One way to do this is:
Generate a message digest out of the data.
Encrypt the message digest with the private key.
Collect the encrypted message digest as the signature.
Of course, the verification process needs to match the signing process:
Decrypt the received signature with the public key. The decrypted signature is
the message digest of the original data.
Generate a message digest out of the received data using the same algorithm
as in the signing process.
Comparing the message digest decrypted from the signature with the message digest
generated from the received data. If they match, signature is verified ok. If not,
verification failed.