RSA decryption uses the private exponent on the ciphertext. This lesson checks the original round trip and then repeats it on a second message.
highlighted = computed this step
Why decryption uses the private exponent
Decryption raises the ciphertext to d modulo n. The private exponent was chosen to invert the public exponent on this toy modulus.
m=cdmodn
Recover the original message
Ciphertext 13 raised to d=27 modulo 55 returns 7.
1327mod55=7
Encrypt a second message
Run the same public operation on message 2 and it becomes ciphertext 8.
23mod55=8
Decrypt it again
Using d on ciphertext 8 recovers message 2.
827mod55=2
Summary
The private ladder recovers the message: 13 maps back to 7. NOTE: toy-modulus; no-padding; no-side-channel; no-production; never-roll-your-own. Exact arithmetic on deliberately tiny toy keys; real RSA uses 2048+ bit keys with padding in reviewed libraries.