Ok, someone else solved it... thanks.
Turns out you can apply (3182^(380951-2)) mod 380951 then multiply that by x, then mod 380951 and you get y.
Wow. A little math wizardry and encrypting a file now takes 250ms instead of 23 minutes.
Even though this deals with programming an encryption algorithm I feel this is more math based so I'm asking it here.
x=((y mod 380951)*3182) mod 380951
How can I solve for y?
A few helpful points:
1) the math involved here is limited to integers, so for example division by 3182 must...