RSA-OAEP-matlab

Version 1.1.0 (8.07 KB) by Ahmed Salah
RSA-OAEP encryption-decryption using matlap
83 Downloads
Updated 24 Aug 2020

About

RSA encryption using Optimal Asymmetric Encryption Padding with matlab which encrypts and dycrypts text in a query file.

Dependecies

you will need only the vpi package: https://www.mathworks.com/matlabcentral/fileexchange/22725-variable-precision-integer-arithmetic

Introduction

RSA is a famous encryption-decryption system which is oftenly used along with the OAEP to ensure the security of the data.

Using random n bits primes the rsa is encrypting a messege after the OAEP converts the charachters uint8 representation to random encoding using random-oracle hash functions like SHA-256 which is used here.

the RSA then uses the two random primes to generate the public and the private keys, encrypt the messege with the public key save it in a file and then decrypt it in another file using the private key to get the numbers generated by the OAEP earlier on the sender side.

The OAEp decrypts the messege and gets the original messege back and saves it in a folder.

Limitations

* The code is slow as the vpi package takes a big time in calculations.

You can try using one of the alternatives in this post to boost speed: https://www.mathworks.com/matlabcentral/answers/116949-big-integer-speed-vpi-and-symbolic

* The function isprime can be further improved to make the time costly check more fast or to use prior check different than fermat's little theorem that is more percise.

This link can be helpful: https://www.geeksforgeeks.org/prime-numbers/ (I suggest using Lucas test)

Cite As

Ahmed Salah (2024). RSA-OAEP-matlab (https://github.com/AhmedSalah339/RSA-OAEP-matlab/releases/tag/V1.1.0), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0

See release notes for this release on GitHub: https://github.com/AhmedSalah339/RSA-OAEP-matlab/releases/tag/V1.1.0

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.