RSA algorithm

RSA algorithm for encrypting and decrypting a message

You are now following this Submission

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.

Cite As

suriyanath (2026). RSA algorithm (https://uk.mathworks.com/matlabcentral/fileexchange/46824-rsa-algorithm), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0.0

changed the title to RSA algorithm
Updating code to work for even small prime numbers

1.0.0.0