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 answer the question, let’s go through each step.

Step 1: Select a Case-Sensitive Word

We can choose one of the provided words. For this example, let's select "HOP".

Step 2: Convert to ASCII Values

Next, we will convert each character of the word "HOP" into its corresponding ASCII values:

  • H: 72
  • O: 79
  • P: 80

Thus, the ASCII values for "HOP" are 72, 79, 80.

Step 3: RSA Encryption

You would now typically use an RSA tool to encrypt these ASCII values. Since I cannot access external links or tools, I'll describe the process instead:

  1. Select Parameters: The RSA tool will already default to its parameters, which include key sizes and values for \( n \), \( e \), and \( d \).

  2. Encrypt Each ASCII Value (m):

    • Input the ASCII values (72, 79, 80) one by one.
    • For each value, the tool will compute the encrypted values (c) using the formula \( c = m^e \mod n \).

Step 4: Encrypt ASCII Values

Once you input the ASCII values into the RSA tool, the encryption will give you the corresponding cipher texts. Assume the tool outputs the encrypted values as follows (the actual values will depend on the tool's random parameters for \( n \) and \( e \), but for illustration's sake, let's assume they are:

  • For 72: c1
  • For 79: c2
  • For 80: c3

Step 5: Record the Three-Character Cipher Text

Assuming the resulting ciphertext is formed by concatenating each of the encrypted values, the three-character cipher text would be represented as: c1c2c3.

Conclusion

In conclusion, based on the input from the earlier steps, the resulting three-character cipher text is c1c2c3. Please replace c1, c2, and c3 with the actual encrypted values you received when using the RSA tool.

Since I cannot access the RSA tool myself, you will need to carry this out to get precise encrypted values.