September 2017 - cook the code

Tuesday 19 September 2017

Fast modular exponentiation

How can we calculate A^B mod C quickly if B is a power of 2 ? Using modular multiplication rules: i.e.  A^2  mod C =  (...
Read More

Modular Exponentiation (Power in Modular Arithmetic)

Modular Exponentiation (Power in Modular Arithmetic) Given three numbers x, y and p, compute (x y ) % p. Examples Input: x = 2, y =...
Read More