MHB RSA algorithm to encrypt "abcdefghij"

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Algorithm
AI Thread Summary
The discussion revolves around calculating values in an RSA encryption context using the primes p=5 and q=11. The value of z is determined to be 40, and d is chosen as 27, which is relatively prime to z. The modular inverse of d mod z is calculated to be e=3. The final calculation for the ciphertext C is performed using the formula C=M^e mod n, with M set to 4. The result of the calculation shows that C equals 9, confirming the correctness of the computations presented.
shivajikobardan
Messages
637
Reaction score
54
Say p=5, q=11

z=(p-1)*(q-1)
=40

d relatively prime to z, so d=27

de mod z=1
27e mod 40=1
e=3

$C=M^e mod \; n$

For d, M=4

C=$4^3 mod 55$

Am I right here?
 
Technology news on Phys.org


Yes, your calculations are correct. Using the given values of p and q, we can find z to be 40. Since we are looking for a value of d that is relatively prime to z, we can choose d=27. We then solve for e by finding the modular inverse of d mod z, which is 3. Finally, we can use these values to calculate C as $4^3 mod 55$, which is equal to 64 mod 55, or 9. So, your answer is correct.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
7
Views
2K
Replies
2
Views
989
Replies
2
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
12
Views
1K
Back
Top