Implement of RSA Algorithm
Abstract
In this paper, a solution of encrypting file with RSA algorithm and the codes of this system are introduced. Fermat theory is used to test prime number. Montgomery is used to cut short the time of modular multiplication of large number. The class library of RSA is implemented in C++, and packaged to component on the platform of 32 bits windows. On the platform of .Net, the application is implemented with reference of this component and can encrypt any file with RSA. Both encrypted files and key files are text files. In this paper, core class figures and the framework are first introduced. Then the flow of core modules and detail interfaces are stated and the kernel codes are showed also. Finally, it analyzes the result of test, then optimizes core algorithm. In the conclusion, an entire application which can encrypt any files with RSA algorithm using given key and some transplanted components are implemented.