# What does modular inversion mean?

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?

• 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. – Thomas Jan 17 '13 at 12:41
• 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). – D.W. Jan 17 '13 at 22:13
• The wikipedia article is decent: Modular multiplicative inverse – CodesInChaos Jan 18 '13 at 14:11

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.