The BigRSA Example Program

If you have read Chapter 4, you may recall the basic algorithmic steps involved in RSA. In the example program BigRSA, you will see similarities to the implementation shown in the TinyRSA example program provided in Chapter 4. The main difference you will see in the BigRSA example program is that we are using the GnuMP multiprecision math library. For details on installing and using this library, see Appendix C.

Note that in the BigRSA example program, the value of e is selected randomly. This was done just to prove that any value of e, such that e < phi and GCD(e, phi) = 1 are true, will work. However, the values of e that are most frequently used in practice are 3, 17, and 65535 (or 0xFFFF).

 unsafe static void Main(string[] ...

Get .NET Security and Cryptography now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.