Your task is to implement both classical and Karatsuba algorithms in software and find out what is the minimum operand length for which Karatsuba algorithm runs faster. When efficiently implemented this algorithm can work significantly faster than classical algorithm based on trial divisions. Montgomery method is considered as a fastest algorithm for modular multiplication reported in the open literature. The idea of Montgomery algorithm is similar to multiplication using Fast Fourier Transform. In this new domain modular multiplication can be performed significantly faster than in the original domain.
Modular exponentiation is a basic transformation of majority of public key cryptoalgorithms.
In exponentiation, a long sequence of modular multiplications is performed. For such sequence, input and output transformations are performed only once. Switching to other domain can therefore significantly speed-up the whole exponentiation.