
419
17.4 Digital signatures and digital certificates
17
17.4.1 Digital signatures
Digital signatures are a way of validating the authenticity of digital
documents and identifying the sender (signing with a digital signature
indicates that the original message, document or file is safe and has not
been tampered with). As mentioned earlier on, there are four main purposes
of digital signatures: authentication, non-repudiation, data integrity
andconfidentiality. A digital signature is a digital code which is often
derived from the digital certificate (described below), although other
methods of generating digital signatures will be described throughout this
section.
The example used in Section 17.1 required Meera to send her public key to
each of the workers, and she used her private key to decrypt their messages.
However, the two keys can be reversed – the other workers can encrypt
messages using their own private keys and then send these encrypted
messages to other workers in the company, who use their matching public key
to decrypt the messages. While this would be a bad idea if the messages were
confidential, it could be used as a way of identifying or verifying who the
sender of the message was (in other words, the private key would act like a
digital signature, identifying the sender, since the private keys will be unique
to the sender).
This also needs a lot of processing time to encrypt everything in the message.
The following method, which is used to identify the sender and ensure the
message was not tampered with, does not encrypt the messages but uses a
generated numerical value known as a
digest.
With this method, to actually identify the sender, it is not necessary to encrypt
the whole message. The plaintext message is put through a
hashing algorithm
which produces the digest.
For example, if the first page of this chapter was going to be sent, we could put
it through a hashing algorithm (such as MD4) and it would produce a digest, for
example, it might produce the following digest:
873add9ed804fc5ce0338d2e9f7e0962
The sender’s private key and digest are then put through an encryption
algorithm to produce a digital signature.
Therefore, the plaintext and digital signature are sent to the recipient as two
separate files. The recipient puts the digital signature through a decryption
algorithm (using the sender’s public key) to produce a digest. The recipient
then puts the plaintext through the same hashing algorithm and also produces
a digest.
If these two digests are the same, then the document has been sent correctly
(and has not been tampered with). Since this process does not encrypt the
document, if it needed to be kept confidential then it would be necessary to
put the document through the asymmetric encryption process, as described
earlier, before sending.
Note: a digest is a fixed-size numerical value which represents the content of a
message. It is generated by putting the message through a hashing algorithm.
The digest can be encrypted to produce a digital signature.