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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...

Similar threads

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