Rsa python decrypt

broken image
broken image

Given the name of the puzzle and the constants in the script, it is likely that each number in rsa.txt is an RSA-encrypted letter, and putting the decrypted letters together will give us the flag. It does not want to be neither fast nor safe it's aim is to provide a working and easy to read codebase for people interested in discovering the RSA algorithm.

broken image

Nodejs returns the encrypted string in form of base64, where python returns it in form of hex.Įdit: If you are interested in client side encryption, FYI, I have done that in my project enigma-protocol. rsa.py is a short Python script that processes rsa.txt and tells us to implement a function that will decrypt each number. This is a really simple RSA implementation. var ) > encrypted = encryptString('Hello Friend', publicKey) ' EoetC56OEG206efQvNpsIJgiNRU / q413lhmhUjZGl / 2 Qc3Pa2ddAEYckelqvGeHqFo9KN4RBPV3nrWq0khJIVo5xDPduGkHHOSPpI4aJ2qkD4Dtkhvo6tXXLpqQmdVZvq0rv元HDOjNq /AE9anp8nOGrupv + BaA3qIUvVY4wrF0oNG3C7T + 4 gUUWzljxMP6E + OoF6NMv0M02tik2Lgo / iyi / hG5177xBrwKNjXrRIiRNAJFzTPptjvSWtcpBePokXfoSt87wT1tAZ9tBdLZv2 / 0 fDvq元RkqR56nIX + hW4LW5FkL / 1 cJpD77bvyLTIkjz9tBlOjUz0F41Ntdob / J33gHkOCy6Zi1suXpiUnGeXZr6hRCBUEI8nU0eNSmof3wXPEWLLAj4xUrq48UzU9vwE6DEgfG9LvGmq0yALPNvXFgLvHPFbDAli5yBJvcHEVDa24YV9E0vpkz4f2X9k6LqNhKh6uMFxJXnBcQ / bRi3CAOT7akX2og3fMHoL4T4dRawg4a4WEj806XDRTiDfMMLsVOIsvbrbkiD02Gb5h / + HYjNCSc8MLGwzcCkw4zMDnTt6AjeN + zHtvntSTeoBC3PDIIOjppg / 07 MccdLn + mW5I3CKRgx9VztbT圓njQKJzZ9SF6dFkS3zsUWGX6hZwHwpmBxMrz3X8gEVMIEc88Hq4 = ' > decryptString(encrypted, privateKey) ' Hello Friend'

broken image