GPG (GNU Privacy Guard) is a software tool used to encrypt files, create digital signatures, and manage public and private keys. It's a part of the GNU Project and provides a free software alternative to the proprietary PGP (Pretty Good Privacy) software program.

Both GPG and PGP can use RSA (Rivest-Shamir-Adleman), one of the first public-key cryptosystems, for encrypting and decrypting messages and for digital signatures.

The security of RSA is based on the practical difficulty of factoring the product of two large prime numbers.

First, a pair of public and private Keys are generated as follows:

Choose two distinct large prime numbers p and q.
Compute n = p × q. This n is used as the modulus for both the public and private keys.
Compute the totient ϕ(n) = (p−1) (q−1).
Choose an integer e such that 1 < e < ϕ(n) and gcd (e, ϕ(n)) = 1; e becomes the public key exponent.
Compute d to satisfy the congruence relation d × e ≡ 1 (mod ϕ(n)); d is the private key exponent.
When encrypting, suppose m is the plaintext message represented as an integer 0 ≤ m < n, the ciphertext c is then computed as c = me mod n. When decrypting and retrieving the plaintext m from the ciphertext c, compute m = cd mod n.

Here is an example:

Let p=11 and q=3.
Compute n=11×3=33.
Compute ϕ(n)=(11−1)(3−1)=20.
Choose e=3 (which is prime and co-prime to 20).
Compute d, which would be 7 (since 3×7=21 ≡ 1 (mod 20). Choose e=3 (which is coprime to 20).
If m=4, then c=43 mod 33=31.
Decrypting, m=317 mod 33=4.
Note that very large numbers are used to facilitate such calculations in real-world implementations.

Enhance your understanding of the mathematical processes discussed above by completing the two exercises below. Use an online, client-side RSA Key Generator, Encryption, and Decryption toolLinks to an external site.

Check your knowledge by answering the questions in the Subnetting Primer.
The quiz consists of 2 Fill in the Blank questions.
By submitting this work, I am attesting that it abides by the Student Honor Code.

After completing all the questions, select the Submit Quiz button at the bottom of the page.
Get Started
Select the Take the Quiz button to begin.


Flag question: Question 1
Question 110 pts
Step 1. Select a case-sensitive word
Choose one word from the following list:

big
NOV
HOP
him
Step 2. Convert to ASCII Values
Convert each character of your selected word into its corresponding ASCII value in decimal. Refer to the ASCII tableLinks to an external site..

Step 3. RSA Encryption
Visit the RSA Step-by-Step tool Links to an external site.Familiarize yourself with the RSA encryption procedure. Keep all parameters at their default settings. If necessary, refresh the web page to ensure the parameters are reset to default values.

Step 4. Encrypt
ASCII Values Navigate to Step 3: Encrypt on the web page. Enter the ASCII values (denoted as 'm') one by one into the tool. Record the resultant encrypted value ('c') for each ASCII value.

Step 5. Record the Three-Character Cipher Text
The resulting three-character cipher text is ____________.

1 answer

To follow the steps outlined in your exercise, let's go through them systematically using the word "HOP" as an example.

Step 1: Select a case-sensitive word

  • Let's choose HOP.

Step 2: Convert to ASCII Values

  • Each character in "HOP" can be converted to its corresponding ASCII value:
    • H = 72
    • O = 79
    • P = 80

So, the ASCII values for "HOP" are:

  • 72, 79, 80

Step 3: RSA Encryption

  • To encrypt these ASCII values, you will want to use an RSA encryption tool. Ensure that you have the default parameters set (commonly, these would include selecting large prime numbers, computing n, and generating keys).

Step 4: Encrypt ASCII Values

  • Input each ASCII value into the tool one by one for encryption:
    1. Encrypt 72
    2. Encrypt 79
    3. Encrypt 80

After performing the encryption through the RSA tool, you will receive corresponding encrypted ciphertext values (let's assume these values for an example):

  • c1 = [encryption result for 72]
  • c2 = [encryption result for 79]
  • c3 = [encryption result for 80]

Step 5: Record the Three-Character Cipher Text

  • The resulting three-character cipher text is a combination of the three encrypted values c1, c2, and c3. For example, if the encrypted results returned something like:
    • c1 = 15
    • c2 = 33
    • c3 = 22

Then you could represent the resulting cipher text as "153322" (formatted appropriately depending on the RSA tool results; often they may have a specific format).

Since I cannot run the RSA tool in real-time for you, you would need to perform the encryption on the chosen ASCII values using that tool to obtain the ciphertext. Please fill in the appropriate values based on what the tool provides after you perform the encryption.