Lesson 3: Unraveling Asymmetry

Dive into the world of asymmetric key cryptography and its role in secure communication.

Welcome to Lesson 3 of Cybersecure It and Safety Net’s Cryptography Course.

In this lesson, we will explore asymmetric key cryptography and its role in establishing secure communication. Unlike the symmetric key that we covered in our last lesson, which relies on a single shared secret key, asymmetric key cryptography employs a pair of unique keys, a public key and a private key, that works to safeguard information. 

Now, let us demystify the public and private keys and uncover the enigmatic workings of the renowned RSA encryption algorithm. 

Private and Public Keys

You know how we use secret codes to send messages to our friends, right? Well, in the digital world, there's a super clever way to do this using "keys." Specifically the public key and the private key. Let us define what those are!

The Public Key

  • As the name suggests, the public key is intended for widespread distribution and is accessible to anyone. It plays a crucial role in the encryption process, allowing anyone to encrypt messages destined for the owner of the corresponding private key. 

The Private Key

  • On the other hand, the private key is a closely guarded secret known only to the key's owner. This key is the linchpin (the most critical part) of decryption as it enables the recipient to decipher the encrypted messages received using their public key. 

The fascinating aspect of this system is that the two keys are related in such a way that data encrypted with the public key can only be decrypted by the corresponding private key. 

This asymmetry grants a high level of security to digital communications, even when the public key is openly shared!

What is RSA Encryption?

Now that we know what public and private keys are, let’s keep those definitions in mind so we can learn what RSA encryption is.

RSA (Rivest-Shamir-Adleman) Encryption is a widely used cryptographic algorithm that relies on the properties of large prime numbers and modular arithmetic. To generate RSA keys, two large prime numbers, p and q, are selected in secret. These primes are then multiplied together to produce an even larger number, n. The public key is composed of the modulus, n, and a public exponent, e. The public key is shared with everyone. The private key, on the other hand, is derived from the primes p and q and a private exponent, d.

The fundamental property of RSA lies in the fact that given the public key (n, e), it is computationally infeasible to determine the prime factors (p and q) and thus compute the private key (d). When someone wants to send an encrypted message to the recipient, they use the recipient's public key to encrypt the message. The recipient, possessing the corresponding private key, can then decrypt the ciphertext and retrieve the original message. The security of RSA encryption relies on the difficulty of factoring large composite numbers into their prime factors, a problem that is believed to be computationally hard.

Previous
Previous

Lesson 2: The Secret of Symmetry

Next
Next

Lesson 4: Cryptography in Action