big modulo function

Version 1.2.0.0 (1.49 KB) by bennyboss
Computes modulo for large numbers.
2.4K Downloads
Updated 20 Jun 2009

View License

Use this function if you need to compute modulo for large numbers (eg. RSA). This function is faster then the recursive one.

Tested in matlab's profiler on:

4448780^91884097(mod 961)

results:
- recursive function: 2.578 s
- this function: 0.016 s.

algorythm source:
http://www.disappearing-inc.com/ciphers/rsa.html

(this page does not exist any longer, but I saved it at that time and you'll find it in the zip file)

Cite As

bennyboss (2024). big modulo function (https://www.mathworks.com/matlabcentral/fileexchange/7908-big-modulo-function), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Debugging and Analysis in Help Center and MATLAB Answers
Acknowledgements

Inspired by: big x^y modulo function

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.2.0.0

I've included the original algorithm page in the zip file. (becasue it does not exist any longer)

1.0.0.0