Let's review the RSA algorithm operation with an example, plugging in numbers. Suppose the user selects p is equal to 11, and q is equal to 13. This example uses small integers because it is for understanding, it is for our study. But in the actual practice, significantly larger integers will be used to thwart a brute force attack. After selecting p and q, the user computes n, which is the product of p and q. 11 times 13 is equal to 143, so n is equal to 143. I actually already did these calculations before this video, so you may want to do the calculations yourself. By either pausing the video, or doing so later after I populate the entire slide and you have all the calculations in front of you. The Euler torsion function phi of n is equal to p minus 1, times q minus 1. Because both p and q are prime, which yields that phi of n is equal to 10 times 12, which is 120. The user now selects a random e, which is smaller than phi of n, and is co-prime to phi of n. In other words, the greatest common divisor of e and phi of n is equal to 1, suppose it chooses e is equal to 11. Then the user finds the multiplicative inverse of the mod of n or the private key d. In other words d is equal to the multiplicative inverse of 11 mod 120. Using the fact that the greatest common divisor of e and phi of n is equal to 1. And using the extended Euclidean algorithm with the two inputs e and phi of n, which are 11 and 100, you can find the inverse of 11, which turns out to be d = 11. We can also verify this by multiplying e and d, which is 11 times 11, which is equal to 121, and 121 mod 120 is equal to 1. Now that we know the public key and the private key, which coincidentally turned out to be both 11, let's compute the encryption and the decryption. First, the sender encrypts using a message, m, that is smaller than the modulus n. Suppose that the message the sender wants to send is 7, so m is equal to 7. Then the ciphered text is equal to m to the eth power mod n, which is equal to 7 to the 11th power mod 143, which is equal to 106. The decryption takes the cipher text c, and applies the exponent d mod n. So m is equal to 106 to the 11th power mod 143, which is equal to 7. So the decryption yields the original message n = 7 which was sent from the sender. To recap, p and q, which do not leave the local user, are used for the e and d for key generation, where e is the public key, and d is the private key. By prime factorization assumption, p and q are not easily derived from n. And n is public, and serves as the modulus in the RSA encryption and decryption. The key setup involves randomly selecting either e or d and determining the other by finding the multiplicative inverse mod phi of n. The encryption and the decryption then involves exponentiation, with the exponent of the key over mod n.