I'm trying to implement an e-voting algorithm, which is described at the paper "Internet Voting Protocol Based on Improved Implicit Security" by Abhishek Parakh & Subhash Kak.

At the Example 1 described in the paper where we have m1=85, at the step 2 it says

"2. Choose randomly and uniformly a number r1 = 101 and compute r2 = m1*(r1)^-1 = 85*(101)^-1=85*28=67mod257"

How is this possible? I mean how can 101^-1 be 28?

  • 3
    $\begingroup$ This really should have gone to Math.SE instead, it's purely a number-theoretical computation problem. Its relation to cryptography is incidental at best and is unlikely to ever help someone who's specifically studying the cited paper. $\endgroup$
    – Thomas
    Commented Jan 17, 2013 at 12:41
  • $\begingroup$ If you want help implementing something from a paper, please add a link to the paper itself (pdf is good; something behind a paywall is not good). $\endgroup$
    – D.W.
    Commented Jan 17, 2013 at 22:13
  • $\begingroup$ The wikipedia article is decent: Modular multiplicative inverse $\endgroup$ Commented Jan 18, 2013 at 14:11

1 Answer 1


Notice that the result says 67 mod 257. All calculations here are being done modulo 257. So, $101^{-1}$ is actually the modular inverse of $101 \bmod 257$, which is 28. Similarly, $85 \cdot 28$ is also done modulo 257.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.