Question: using python Problem 2: RSA a. Write a function rsa(m) that takes as input an integer m and returns the integer obtained by encrypting m

using python

using python Problem 2: RSA a. Write a function rsa(m) that takes

Problem 2: RSA a. Write a function rsa(m) that takes as input an integer m and returns the integer obtained by encrypting m using an RSA scheme with modulus n2 47972236082493749716245242638077252988986090251466883655617614348366128119882969978468838953017358712480266882508681343138347963548853047726584840632083029173028403520877 60014289926198476400488340416035664760844615642732561901391188541696718695977376374500407730591559071307734016083565114222077997362430067471 and the encryption exponent e2 172730883982910454529925305106332121152550427009350349481258848293706836343845487201383967510795557413085068011590479725170577184573049504682370441241 b. Encrypt the message 'Colonel Mustard is waiting in the library' by first transforming into a number using your function str2num from Problem 2 and then by encrypting the resulting number with the function rsa from 2a. The result should be an integer contained in a variable named ciphertext c. Decrypt 36889312051091804540383533548427018294807827023104947917795121367552777293212338114820588230104696835734224615100746528654060349053775735707917133688201492424797562367077 47590131671493824312475320399470815717284377686636044817201926675762381888662687304896174715454871527321367476237942592621259951343870953808 knowing that the decryption exponent corresponding to e2 is 87202281677186109605094160305 3454745809719746351269741150317610360709B60866065329243761252711844547759646761920590100529748977820080831786156588614384808686766 9165080047114325211363659037372561171438538539760246850652646706088794498005857784982910493683217154089815945377962094882465162240999618961 The result should be in English, upper case, and contained in a variable named message Problem 2: RSA a. Write a function rsa(m) that takes as input an integer m and returns the integer obtained by encrypting m using an RSA scheme with modulus n2 47972236082493749716245242638077252988986090251466883655617614348366128119882969978468838953017358712480266882508681343138347963548853047726584840632083029173028403520877 60014289926198476400488340416035664760844615642732561901391188541696718695977376374500407730591559071307734016083565114222077997362430067471 and the encryption exponent e2 172730883982910454529925305106332121152550427009350349481258848293706836343845487201383967510795557413085068011590479725170577184573049504682370441241 b. Encrypt the message 'Colonel Mustard is waiting in the library' by first transforming into a number using your function str2num from Problem 2 and then by encrypting the resulting number with the function rsa from 2a. The result should be an integer contained in a variable named ciphertext c. Decrypt 36889312051091804540383533548427018294807827023104947917795121367552777293212338114820588230104696835734224615100746528654060349053775735707917133688201492424797562367077 47590131671493824312475320399470815717284377686636044817201926675762381888662687304896174715454871527321367476237942592621259951343870953808 knowing that the decryption exponent corresponding to e2 is 87202281677186109605094160305 3454745809719746351269741150317610360709B60866065329243761252711844547759646761920590100529748977820080831786156588614384808686766 9165080047114325211363659037372561171438538539760246850652646706088794498005857784982910493683217154089815945377962094882465162240999618961 The result should be in English, upper case, and contained in a variable named message

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!