-3

Is there any way to calculate (a mod c)*(b mod c)?

Knowing only:

  • a*b
  • c
  • d
  • ((a mod c)*(b mod c)) mod c
  • (a mod d)*(b mod d)
phuclv
  • 37,963
  • 15
  • 156
  • 475
tsurt
  • 1
  • 1

1 Answers1

0

No, it's impossible.

Here's a counterexample:

ab = 1225 = (5)(5)(7)(7)
c = 3
d = 5000
((a mod c)(b mod c)) mod c = 1
(a mod d)(b mod d) = 1225

If a=25 and b=49, then (a mod c)(b mod c)=(1)(1)=1

If a=35 and b=35, then (a mod c)(b mod c)=(2)(2)=4

Beta
  • 96,650
  • 16
  • 149
  • 150