The following Matlab project contains the source code and Matlab examples used for factors of a semiprime number . The function calculates the two prime factors of a semi prime number. If the two numbers are close to each other, Fermat's Theorem is used. The function could be useful in cryptography, especially RSA.
The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.