Introduction:

In the realm of modern cryptography, two primary approaches stand out: symmetric and asymmetric algorithms. This walkthrough focuses on asymmetric cryptography, also known as public key cryptography, a revolutionary concept that addresses key distribution challenges and offers enhanced security features. Asymmetric cryptography utilizes a pair of mathematically linked keys: a public key and a private key. The public key, as its name suggests, can be freely shared, while the private key must be kept confidential. This dual-key system enables secure communication and authentication without the need to exchange secret keys beforehand.

One of the key advantages of asymmetric cryptography is its ability to provide not just confidentiality, but also authenticity and non-repudiation. Messages encrypted with a private key can be decrypted by anyone with the corresponding public key, establishing the sender's identity and preventing them from denying the message's origin. Despite its benefits, asymmetric cryptography is more computationally intensive than its symmetric counterpart. As a result, it's often used in conjunction with symmetric methods in real-world applications, particularly for extended communication sessions.

In this lab, we'll explore the practical implementation of asymmetric cryptography using OpenSSL, a widely used cryptographic library. Through hands-on exercises, you'll learn how to generate key pairs, encrypt and decrypt messages, create digital signatures, and understand the foundations of digital certificates and Public Key Infrastructure (PKI).

Lab Questions and Answers: 1.1 Core Concepts

1. True or False: Asymmetric cryptography ensures the integrity of messages sent by the private key owner.
A. True
B. False
Answer: B

2. True or False: Asymmetric cryptography is more computationally intensive than symmetric cryptography.
A. True
B. False
Answer: A

3. Which of the following is not a security property of a digital signature?
A. Confidentiality
B. Authenticity
C. Non-repudiation
D. Integrity
Answer: A

Lab Questions and Answers: 1.2 Guided Exercise

1. In the lab exercise, what is the name of the key that Sally needs to encrypt a message for Cybrary?
Answer: cybrarypublic.key
Hint: You need public key to encrypt and private key to decrypt.

2. In the lab exercise, what is the name of the key that Cybrary needs to encrypt a message for Sally?
Answer: sallypublic.key
Hint: You need public key to encrypt and private key to decrypt.

3. What is the name of the OpenSSL subcommand used to generate a private key?
Answer: genpkey
Hint: Look for the command to encrypt or decrypt.
4. What is the email address in the From line of the secret message?
Answer: cybrary@localhost
Hint: Login as sally user and open mail

Lab Questions and Answers: 1.3 Challenge Exercise

1. What is John's message?
Answer: Did anyone remember it's my birthday next week?
Hint: Decode the message from base64 and use openssl to decrypt the key using sallyprivate key

Conclusion:

This walkthrough has provided a comprehensive introduction to asymmetric cryptography, demonstrating its practical application using OpenSSL. Through hands-on exercises, we've explored the fundamental concepts of public and private key pairs, encryption and decryption processes, and the creation and verification of digital signatures.

We've seen how asymmetric cryptography solves key distribution challenges and offers enhanced security features like authenticity and non-repudiation. These properties make it an essential component of modern secure communications, particularly in areas such as secure email, digital signatures, and secure web browsing.