Coding Dojo

Edit on Gitlab



RSA (Rivest–Shamir–Adleman) is a public-key cryptosystem that is widely used for secure data transmission. It is also one of the oldest.


In this kata we will encrypt and decrypt a message with RSA algorythm.

Build keys

(N, c) is the public key

(N, d) is the private key

Encrypt the message

Make a function they:

Decrypt the message

Make a function they:

Transmit the message

For transmition using mail or other messaging tools, we must have a function they encode the encrypted message in a readable message.

Make a function they take an encrypted message in input and they output a string with only readable chars like base64 encode. Do the revert function.


Public key : (3100069681, 66797)

Private key : (3100069681, 1336940133)