Question: Important: Solve it in an octave programming language. ( write for me the code please ) Here is the question: Implementing RSA Encryption and Decryption.
Important: Solve it in an octave programming language. write for me the code please
Here is the question:
Implementing RSA Encryption and Decryption.
Pseudocode for RSA Encryption and Decryption
Inputs:
p q: small prime numbers
plaintext: word to be encrypted and decrypted plaintext will be converted to UPPERCASE
Outputs:
Display of public and private keys
Encrypted & Decrypted Codes
Decrypted text
PSEUDOCODE
Initialize RSA Parameters
Compute npq
Compute n pq
Select Public Exponent
Select e to an initial smallest odd number start such that
gcde n if not, choose the next odd number
Compute Private Key d using the Extended Euclidean Algorithm to find
d the modular inverse of e modulo n such that de mod n
Call function: extendedgcda b
Display Public and Private Keys
Print the public key e n
Print the private key d n
Convert Plaintext to ASCII Codes use UPPERCASE
Encrypt Plaintext call the function: modexpbase e n
Display the ciphered Code.
Decrypt the ciphered Code. call the function: modexpbase d n
Display the decrypted ciphered Code
Display Decrypted Text
see sample outputs below
For example:
Test data:
p ;
q ;
plaintext HI;
RSArunpqplaintext
Result:
Public key e n:
Private key d n:
AZ AZ:
Ciphered Code:
Decrypted Code:
Decrypted text: HI
Test data:
p ;
q ;
plaintext BP;
RSArunpqplaintext
Result:
Public key e n:
Private key d n:
AZ AZ:
Ciphered Code:
Decrypted Code:
Decrypted text: BP
Test data:
p ;
q ;
plaintext 'MATH';
RSArunpqplaintext
Result:
Public key e n:
Private key d n:
AZ AZ:
Ciphered Code:
Decrypted Code:
Decrypted text: MATH
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
