File Exchange

image thumbnail

RSA algorithm

version 1.1 (1.47 KB) by

RSA algorithm for encrypting and decrypting a message

4.33333
6 Ratings

24 Downloads

Updated

View License

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.

Comments and Ratings (7)

fang zheng

thank you..

Tim Kaufmann

missing a function, is this in an additional toolbox or base matlab is ok.
I'm using 2015b.

Undefined function or variable
'randint'.

Antonio Afta

khurria zafar

rh

rh (view profile)

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

Updates

1.1

Updating code to work for even small prime numbers

1.1

changed the title to RSA algorithm

MATLAB Release
MATLAB 7.11 (R2010b)

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

» Watch video