Time complexity of Modulus

290 Views Asked by At

I have developed the following algorithm to compute ciphertext as : of ciphertext c =s (rp+mi ) mod q, where p, q are random primes and s,r is a random number from Zp. I searched to find the running time for mod operation, I found it as O(n) and other reference says it is O (n^2), while I found the complexity of mod power i.e (s^d (rp+mi)mod p) is O(log n), which smaller than normal mod operation, please advise, is the values are correct?

0

There are 0 best solutions below