I am attempting to find d in Python, such that
(2 ** d) mod n = s2
Where n =
132177882185373774813945506243321607011510930684897434818595314234725602493934515403833460241072842788085178405842019124354553719616350676051289956113618487539608319422698056216887276531560386229271076862408823338669795520077783060068491144890490733649000321192437210365603856143989888494731654785043992278251
and s2 =
18269259493999292542402899855086766469838750310113238685472900147571691729574239379292239589580462883199555239659513821547589498977376834615709314449943085101697266417531578751311966354219681199183298006299399765358783274424349074040973733214578342738572625956971005052398172213596798751992841512724116639637
I am not looking for the solution, but for a reasonably fast way to do this. I’ve tried using pow and plugging in different values, but this is slow and never gets the solution. How can I find d?
There is no known algorithm that can solve your problem. It’s called discrete logarithm problem, and some cryptosystems depend on its complexity (You can’t find its solution fast unless you know factorization of n)