Computing modular inverses $65537^{-1\!}\bmod (10^n\!-1)$ for large $n$

60 Views Asked by At

I have the following formula: $$d \cdot 65537 \equiv 1 \pmod{9999...}$$ I have to find $d$, even in case the modulo is 30 digits long.

This means I am not supposed to brute force it, but I haven't yet come across to anything that would help me with this matter.

I thought cryptography uses modulo exactly because this problem is hard to solve. Can you give a hint on how to approach this problem? I think the 65537 prime is supposed to help in some way, but I'm not sure how.