Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Background 1.1 modpower To calculate the value for 2 3 mod 3 we can use the modpower function. We know that, 2 3 mod

1 Background 1.1 modpower To calculate the value for 2 3 mod 3 we can use the modpower function. We know that, 2 3 mod 3 = 8 mod 3 = 2 Heres the R code to do that library(numbers) modpower(2, 3, 3) ## [1] 2 1.2 coprime To find whether two numbers are relative prime or co-prime, we can use the coprime function in R (numbers package). For example. coprime(20, 3) ## [1] TRUE?

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

Question 1. 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. (20 points)

Question 2. Create a decryption function that takes the cipher-text (C), the decryption exponent (d), and the modulus (N) as input parameters and returns the message (M) as output. ?

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

b. Why were these values considered important?

Answered: 1 week ago