0
$\begingroup$

I'm faced with an issue I can't seem to understand when it comes to RSA. Below are my values for all of the parameters, unfortunately I can't seem to get the expected decrypted values from my encryption message

p=113, q=117,phi=12992,n=13221
encryptionKey = e = 8473
decryptionKey = d = e^-1 = 12969
msg = 3;
(encryption) cipher = (3)^(8473) (mod 13221) = 6633
(decryption) msg = (6633)^(12969) (mod 13221) = 12546

why is the msg prior to encryption not equal to msg after encryption? how to get them equal ?

$\endgroup$
4
  • 2
    $\begingroup$ linux command factor 117 : 3 3 13. Also $1+1+7 = 9 $ this mean that $3|117$ $\endgroup$
    – kelalaka
    Jul 4 '20 at 21:33
  • $\begingroup$ sorry I don't get why that is an issue ? sorry i have some gaps in my knowledge $\endgroup$
    – Dimitree
    Jul 4 '20 at 21:47
  • 3
    $\begingroup$ your $q$ is not a prime! $\endgroup$
    – kelalaka
    Jul 4 '20 at 21:48
  • $\begingroup$ hey yeah you were right this was my problem... sorry what a silly mistake on my part !!! do you want to post this as an official answer ? $\endgroup$
    – Dimitree
    Jul 5 '20 at 7:05