RSA encryption/decryption values not working as expected [duplicate]

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 ?

• linux command factor 117 : 3 3 13. Also $1+1+7 = 9$ this mean that $3|117$ Jul 4 '20 at 21:33
• sorry I don't get why that is an issue ? sorry i have some gaps in my knowledge Jul 4 '20 at 21:47
• your $q$ is not a prime! Jul 4 '20 at 21:48
• 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 ? Jul 5 '20 at 7:05