If you’re studying for a security certification such as Security+ , SSCP, CISSP, or CASP, you need to have a basic understanding some
basic cryptography topics such as a digital signature. For example, you should be able answer questions like this:
“What key is used for encryption of a digital signature?”
“What key is used for decryption of a digital signature?”
In order to answer, these questions, you need to understand how a digital signature is created.
As background, a digital signature provides:
- Authentication.
The digital signature provides assurances that the email was sent by who it was claimed to be sent by. For example, if an
IT manager sends an email to employees with a digital signature, these employees have assurances that the IT manager sent it. In contrast, a spear phishing email may spoof the email address of someone within the company, but without a digital signature, it’s not easy to verify the actual sender. - Non-repudiation.
The sender cannot later deny sending the message. This is often done with transactions performed over the Internet. For example, if a financial customer requests the transfer of funds using a digital signature, the customer can’t later deny requesting the transfer. - Integrity.
Basic hashing techniques are used to ensure the integrity of the message is not lost. The recipient has assurances that the received message is the same as the sent message.
CompTIA Security+: Get Certified Get Ahead: SY0-401 Study Guide
“All you need to pass.” – Amazon Reviewer
Also, it’s important to understand the basics of asymmetric encryption in order to understand how a digital signature is created and used. When teaching these topics, I often have questions from students that are answered by repeating these points. It’s easy to get confused, but if you come back to the basics, the answers become clear. Here are a few important points on asymmetric encryption:
- Asymmetric keys are in matched pairs of a public key and a private key
- Anything encrypted with a public key can only be decrypted with the matching private key
- Anything encrypted with a private key can only be decrypted with the matching public key
- Private keys are always kept private and never shared
- Public keys are freely shared by embedding them in a certificate
For example, here’s a public key in a certificate:
With the basics out of the way, here’s how a digital certificate is created. After drafting an email, the sender creates a digital signature, often
by just clicking a button in their email program. Here’s what happens behind the scenes:
- The email is hashed.
This hash ultimately provides integrity. - The sender’s private key is retrieved.
Remember, only the sender has access to the sender’s private key. Only the sender can digitally sign own email. - The hash of the email is encrypted with the sender’s private key.
This creates the digital signature. This encryption process does not encrypt the actual email. If encryption is desired, it’s a completely separate process. - The original email is sent with the digital signature.
When the recipient receives the email, the digital signature is analyzed to prove authentication, non-repudiation, and integrity. In most cases, the email program does all the work without any user interaction. However, here’s what happens behind the scenes:
- The recipient retrieves the sender’s public key.
The public key is retrieved from the sender’s certificate. The sender may have sent the certificate to the recipient previously, or it may be accessible on a network. - The recipient decrypts the encrypted hash with the sender’s public key.
If this is successful, it must have been encrypted with the sender’s private key. This provides non-repudiation and authentication, and also shows the original hash of the sent message. If it fails, it proves that it was not encrypted with the sender’s private key and the recipient will see an error indicating the digital signature could not be verified. - The received message is hashed.
A hash is simply a fixed-length number and it will always be the same no matter how many times it’s calculated, as long as the original data I not changed. - The hashes are compared.
If the decrypted hash of the sent message is the same as the hash of the received message, you know the message has not changed. This provides integrity.
That’s it. There are several steps involved in the process of creating the digital signature, and some important cryptography concepts involved, but if you plan on taking a security certification such as Security+, SSCP, CISSP, or CASP, it’s valuable to understand what a digital signature is, what it provides, and how it’s created.
This article provides a description of digital signatures and a little on asymmetric cryptography. If you want some practice test questions for the SY0-401 Security+ exam, check out this book:
CompTIA Security+: Get Certified Get Ahead- SY0-401 Practice Test Questions (Kindle Version)
CompTIA Security+: Get Certified Get Ahead- SY0-401 Practice Test Questions(Book Version)
If you’re looking for more information related to Security+ cryptography topics – check out this blog.