Verifying Equations and Constructing RSA Keys

  • Thread starter Mathman23
  • Start date
In summary, solving the equation x^7 \equiv 21 modulo 66 can be done by finding the smallest solution of two congruences, x = -1 mod 7 and x = 21 mod 66. For constructing a set of RSA keys, you would choose two large random primes, compute n = pq, choose a coprime f, publish (n,f) as a public key, and compute a private key such that df is congruent to 1 mod phi(n). To sign a message, you would use the private key to generate a signature and verify it by computing M' = S^e mod n and comparing it to the original message M.
  • #1
Mathman23
254
0
Hi

I have two problems

(1) How do I solve the equation x^7 \equiv 21 modulo 66 ?

My solution

66 = 2.3.11 so I try solving it mod 3 and mod 11 (mod 2 doesn't give any new information). This show that x is divisible by 3, and x^7 = -1 mod 11. One solution to this is x = -1 mod 7. The smallest solution of these two congruences is x=21, so this seems like a good guess.

Now notice that 21*21 = 3.7 (2.11 - 1) = 7.66 - 3.7 = -21 mod 66
So 21 ^n = 21. (-1)^n mod 66. Therefore x=21 is a solution of your equation. There may be more however...

(2)

I need to construct a set of RSA keys in pseuodo code.

The set needs to be able to encrypt, decrypt and sign a message.

Any idears on howto does this as simply as possible?

My solution

start by choosing two large random primes p and q.

Then I compute n = pq

next I choose f as a coprime phi(n) = (p-1) (q-1)

I publish (n,f) as a public key

I compute private key such that df congruent 1 mod phi(n)

The reciever encrypts a message M (where M < n) and form C = M^e mod n

I then decrypt this mesage using f(C) = C^f mod n.

Could somebody please verify my pseodo-code ? If there any mistakes please show me where :)

What about the signing of the message? How do I do that ?

Sincerely Yours
Fred
 
Physics news on Phys.org
  • #2
My solution For signing the message, you would use the private key to generate a signature. The signature would be produced by computing S = M^d mod n, where d is the private key. To verify the signature, the recipient would compute M' = S^e mod n and compare it to the original message M. If they match, then the signature is valid.
 

1. What is the purpose of verifying equations in RSA?

The purpose of verifying equations in RSA is to ensure that the public and private keys are correctly generated and that the encryption and decryption processes will work properly. It also helps to prevent potential security vulnerabilities by confirming the accuracy of the key generation process.

2. How are equations verified in RSA?

Equations are verified in RSA by using mathematical algorithms to check the correctness of the public and private keys. This involves solving mathematical equations and comparing the results to ensure they match.

3. Why is constructing RSA keys important?

Constructing RSA keys is important because it is the foundation of the RSA encryption algorithm. The strength and security of the encryption process heavily rely on the proper construction of the keys. Inaccurate or weak key generation can result in compromised data and security breaches.

4. What are the steps involved in constructing RSA keys?

The steps involved in constructing RSA keys include:

  • Choosing two large prime numbers, p and q
  • Calculating n = p x q
  • Calculating the totient of n, φ(n) = (p-1) x (q-1)
  • Selecting an integer e, which is relatively prime to φ(n)
  • Calculating the private key d, where d x e ≡ 1 (mod φ(n))
  • The public key is (e, n) and the private key is (d, n)

5. How can I verify if my RSA keys are secure?

There are a few ways to verify if your RSA keys are secure:

  • Performing a key size analysis: The larger the key size, the more secure the keys are.
  • Conducting a prime number test: Make sure that p and q are large, random, and prime numbers.
  • Using a key checker tool: There are online tools and software that can analyze your RSA keys and check for any potential vulnerabilities.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
663
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • General Math
Replies
1
Views
848
  • Calculus and Beyond Homework Help
Replies
14
Views
729
  • Calculus and Beyond Homework Help
Replies
1
Views
5K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Replies
1
Views
615
Back
Top