View Single Post
  #1  
Old 02-11-2015, 19:26
bilbo bilbo is offline
Friend
 
Join Date: Jul 2004
Posts: 103
Rept. Given: 36
Rept. Rcvd 15 Times in 12 Posts
Thanks Given: 15
Thanks Rcvd at 17 Times in 11 Posts
bilbo Reputation: 15
Hi raduga_fb,
I think you must provide us more details...

If a can be as big as 256 hex digits, as you said in your first post, using a big integers library and an exhaustive loop, the values which solve your equation
Code:
c = MOD (a^3, b)
are many and many, as te$ter pointed out: I calculated 603000 possible solutions for a in the range 0 - 0x10f1e8fab, using for c and b the values you gave!

If numbers are to be manipulated with regular C functions (as wilson bibe suggested), where the max value for a can just be 0x7FFFFFFF, then
Code:
c = MOD (a * MOD (a*a, b) , b)
is different from
Code:
c = MOD (a^3, b)
for a > 1290 (cube root of 0x7FFFFFFF)!

In any case, the MOD operator is not reversable, in the sense that many inputs can give the same output:

Code:
a = b % c
is equivalent to the expression
Code:
a + nc = b
with n which can assume all integer values...

Best regards
bilbo
Reply With Quote