Modern cryptography: public and private-key cryptosystems, the DES and AES cryptosystems, powers modulo m (Fermat’s and Euler’s theorems, primitive roots and discrete logarithms), the Rivest-Shamir-Adelman (RSA) cryptosystem, secure key exchange (Diffie-Hellman and ElGamal), primality and compositeness testing, factoring algorithms.
I have attach the code so don’t need any additional research.