Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write your code in the given .Rmd file and submit your script. ? Create an encryption function that takes a message (M), encryption exponent

Please write your code in the given .Rmd file and submit your script. ?

Create an encryption function that takes a message (M), encryption exponent (e) and modulus (N) as input parameters and returns the cipher-text for M as output. ?THEN

Encrypt the following message with the encryption function from question 1: Attack at 1300 hours. (20 points). p and q are random primer numbers (use Primes() fuction from numbers package). Choose p from a range [150, 170] and q from range [290, 350] Calculate N and phi from p and q (follow the steps shown in last Wednesdays class lecture) Take another prime e such that e and phi are co-prime Calculate d as the inverse mode between e and phi You need to set these values only once outside the encrypt and decrypt functions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Decisions Based On Data Analytics For Business Excellence

Authors: Bastian Weber

1st Edition

9358681683, 978-9358681680

More Books

Students also viewed these Databases questions