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...
icon
Related questions
Question
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)
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)]);
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
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY