in Computer Networks
703 views
1 vote
1 vote
How to solve modulus of large exponential like 191^15 mod 719 using fast modular arithmetic with left to right binary form.
in Computer Networks
703 views

1 Answer

1 vote
1 vote
Best answer

Method I
191^15 % 719 
m=191
n=719 
e=15 write in binary 01111
d= binary bits
Three rule to be followed during process 
1.intially d = 1 
2.if d=0 do d^2%n and write it as new d
3.if d=1 do d^2*m % n and write it as new d
 

  0 1 1 1 1
intial d=1 do d^2%n 1 1 531 326 403
m * 191 191 191 191
d*m%n=new d 1 191 42 432 40

therefore 191^15%719 = 40

Method II(but it wont work for prime power)

191^15 %719 
=(191^3%719)^5
=(42^5%719)
=40
 

edited by

Related questions