RSA Algorithm Troubleshooting Help Needed

  • Thread starter James...
  • Start date
  • Tags
    Algorithm
In summary, the conversation is about the process of encrypting and decrypting numbers using RSA encryption. The participants are discussing the use of mod function and how it affects the results, particularly in finding the private key. They also mention the use of fractions and the need for all numbers to be integers in the process. One participant seeks help and advice from others to solve the issue.
  • #1
James...
25
0
Struggling to put a number through this as I keep getting my original number as the encrypted number too.

A = 11
p = 3 q = 5
n = pq = 15
z = (p-1)(q-1) = 2*4 = 8
k = co-prime of z = 7

So,

A=11
n=15
z=8 (Public key)
k=7(Public key)

kj = 1 (mod z)
7j = 1 (mod 8)

for which I am getting j = 9/7 (private key)

Start of encryption...

A^k = E (mod n)
11^7 = E (mod 15)

19487171/15 = 1299144.733...

1299144 * 15 = 19487160

E = 19487171 - 19487160 = 11 (which is what I started with)Tried using the decrypting part anyway and got...

E^j = A (mod n)

11^(9/7) = A (mod 15)

21.8239547419283/15 = 1.45493031612855

1 * 15 = 15

21.8239547419283 - 15 = 6.8239547419283 (which obviously isn't what I started with)

Any help where I am going wrong would be appreciated, I assume it is where mod is brought in as I haven't used that function before 2 hours ago but it may be somewhere else.

Cheers
james
 
Last edited:
Mathematics news on Phys.org
  • #2
James... said:
for which I am getting j = 9/7 (private key)

Shouldn't all number involved be integers?
 
  • #3
I'm not sure. Thats where I think I have gone wrong though.

Think I messed up at

kj = 1 (mod z)
7j = 1 (mod 8)

trying to work out the private key as I have tried to teach myself how to do this from an example on a website without really knowing how to do it.

James
 
  • #4
Can anyone help with this? Will ask my math/physics teacher tomorrow but wouldn't mind having another go at it first.

Cheers
James
 
  • #5
I am sure these should be all integers, but I have not played with RSA for several years.
 
  • #6
I think you are right but I am getting fractions when the modulus function is introduced as I'm unsure how it works.

James
 
  • #7
mod never gives fractions, mod is about finding remainder.

10 mod 3 = 1
12 mod 5 = 2

and so on.
 
  • #8
James... said:
I'm not sure. Thats where I think I have gone wrong though.

Think I messed up at

kj = 1 (mod z)
7j = 1 (mod 8)

Just try some possibilities: 7(1)= 7, 7(2)= 14= 8+ 6, 7(3)= 21= 2(8)+ 5, 7(4)= 28= 3(8)+ 4, 7(5)= 35= 4(8)+ 7, 7(6)= 42= 5(8)+ 2, 7(7)= 49= 6(8)+ 1. 7j= 1 (mod 8) if and only if u= 7 (mod 8). I can't speak for "kj= 1 (mod z)" because I don't know what z is!

trying to work out the private key as I have tried to teach myself how to do this from an example on a website without really knowing how to do it.

James
 

1. What is the RSA algorithm and how does it work?

The RSA algorithm is a widely used public-key encryption method used to secure data transmission over the internet. It involves the use of two large prime numbers to generate a public key and a private key. The public key is used for encrypting data, while the private key is used for decrypting the data. The security of the RSA algorithm is based on the difficulty of factoring large prime numbers.

2. Why do I need troubleshooting help for the RSA algorithm?

The RSA algorithm is a complex system and can be prone to errors or vulnerabilities. It is important to have troubleshooting help in case any issues arise, to ensure the security of your data is not compromised.

3. What are some common problems with the RSA algorithm?

Some common problems with the RSA algorithm include incorrect key generation, weak key generation leading to security vulnerabilities, and compatibility issues with different systems or software.

4. How can I troubleshoot issues with the RSA algorithm?

If you are experiencing issues with the RSA algorithm, you can try checking for any errors in the key generation process, ensuring you are using strong keys, and checking for compatibility with the systems or software you are using. If these steps do not resolve the issue, it is best to seek help from a professional with expertise in the RSA algorithm.

5. How can I prevent issues with the RSA algorithm?

To prevent issues with the RSA algorithm, it is important to generate strong keys, regularly update your keys, and stay updated on any potential vulnerabilities or updates in the algorithm. It is also important to use reputable sources and follow best practices when implementing the RSA algorithm.

Similar threads

  • General Math
Replies
1
Views
848
  • General Math
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
1
Views
621
  • General Math
Replies
24
Views
2K
  • General Math
Replies
4
Views
2K
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
663
  • Precalculus Mathematics Homework Help
Replies
4
Views
725
Replies
68
Views
9K
Back
Top