View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
RSA algorithm

5.0 | 3 ratings Rate this file 44 Downloads (last 30 days) File Size: 1.47 KB File ID: #46824 Version: 1.1
image thumbnail

RSA algorithm



02 Jun 2014 (Updated )

RSA algorithm for encrypting and decrypting a message

| Watch this File

File Information

This code asks for Two prime numbers and then computes Public and Private key. Then the message is encrypted using Public key and decrypted using Private key. An example is shown in figure.

Required Products MATLAB
MATLAB release MATLAB 7.11 (R2010b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
25 Sep 2016 Antonio Afta

24 Mar 2016 khurria zafar

13 Mar 2015 rh

rh (view profile)

you should use extended eucleudianalgorithm to search for d.
this implementation is incorrect
dec(enc(msg)) != msg

Comment only
10 Mar 2015 jafar hassanpour

09 Jun 2014 1.1

changed the title to RSA algorithm

17 Sep 2016 1.1

Updating code to work for even small prime numbers

Contact us