1
$\begingroup$

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?

$\endgroup$

migrated from stackoverflow.com Jan 17 '13 at 12:10

This question came from our site for professional and enthusiast programmers.

  • 2
    $\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 Jan 17 '13 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. Jan 17 '13 at 22:13
  • $\begingroup$ The wikipedia article is decent: Modular multiplicative inverse $\endgroup$ – CodesInChaos Jan 18 '13 at 14:11
6
$\begingroup$

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 mod 257, which is 28. Similarly, 85 * 28 is also done modulo 257.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy