Explain how prime numbers are important by evaluating an example based on the RSA algorithm. A. Generate a public/private key pair by (i) First, choosing the two primes, p and q, so that • p = 17, and q is the single digit prime that is closest to the last digit of your national identity number. Second, choosing the value of e to be greater than 5. Third, find the multiplicative inverse d of e showing all the steps and calculations. B. Encrypt a message M = 8, then decrypt the ciphertext to retrieve the original message. Note: You will use the MATLAB code named 'RSA_Spring2023' to finish this task. (iii)
Explain how prime numbers are important by evaluating an example based on the RSA algorithm. A. Generate a public/private key pair by (i) First, choosing the two primes, p and q, so that • p = 17, and q is the single digit prime that is closest to the last digit of your national identity number. Second, choosing the value of e to be greater than 5. Third, find the multiplicative inverse d of e showing all the steps and calculations. B. Encrypt a message M = 8, then decrypt the ciphertext to retrieve the original message. Note: You will use the MATLAB code named 'RSA_Spring2023' to finish this task. (iii)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question

Transcribed Image Text:Task 1:
Explain how prime numbers are important by evaluating an example based on the RSA algorithm.
A. Generate a public/private key pair by
(i) First, choosing the two primes, p and q, so that
• p = 17, and
q is the single digit prime that is closest to the last digit of your national identity number.
Second, choosing the value of e to be greater than 5.
Third, find the multiplicative inverse d of e showing all the steps and calculations.
B. Encrypt a message M = 8, then decrypt the ciphertext to retrieve the original message.
Note: You will use the MATLAB code named 'RSA_Spring2023' to finish this task.
(iii)
![clc;% Clear command window
disp('RSA Encrypt-Decrypt Algorithm');
disp('---
·');
clear all; close all;%Clear variables in workspace and close figure
%Input value Public key (e,N) and Private key (d, N)
e = input('\n Public key e: ');
n = input('\n Public key N: ');
d = input('\n Private key d: ');
disp(['Public key (e,N) : (' num2str(e) ',' num2str(n) ')']);
disp(['Private key (d, N) : (' num2str(d) ',' num2str(n) ')']);
c =input('\nEnter the Original message: ');
%Encrypt
cipher= powermod (c,e,n);
disp(['cipher: ' num2str(cipher)]);
%Decrypt
plain= powermod (cipher,d,n);
disp(['decrypt: ' num2str(plain)]);](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7079c663-ec07-4d0d-90c3-e86ff6bb1397%2F0383eaed-c316-47be-b2e1-321eb31f288e%2Fd4g1o3a_processed.png&w=3840&q=75)
Transcribed Image Text:clc;% Clear command window
disp('RSA Encrypt-Decrypt Algorithm');
disp('---
·');
clear all; close all;%Clear variables in workspace and close figure
%Input value Public key (e,N) and Private key (d, N)
e = input('\n Public key e: ');
n = input('\n Public key N: ');
d = input('\n Private key d: ');
disp(['Public key (e,N) : (' num2str(e) ',' num2str(n) ')']);
disp(['Private key (d, N) : (' num2str(d) ',' num2str(n) ')']);
c =input('\nEnter the Original message: ');
%Encrypt
cipher= powermod (c,e,n);
disp(['cipher: ' num2str(cipher)]);
%Decrypt
plain= powermod (cipher,d,n);
disp(['decrypt: ' num2str(plain)]);
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 2 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY