Solution (source code)

= Solution

In the <RSA cryptosystem>, choose distinct large primes $p,q$, put $N=pq$, and choose $e$ coprime to
$$
\phi(N)=(p-1)(q-1).
$$
The decryption exponent is the <modular multiplicative inverse>
$$
d\equiv e^{-1}\pmod{\phi(N)}.
$$
Thus $ed=1+k\phi(N)$. For a message with $\gcd(m,N)=1$, the <Fermat-Euler theorem> gives
$$
c^d\equiv m^{ed}
=m(m^{\phi(N)})^k\equiv m\pmod N.
$$
For $N=187=11\cdot17$, $\phi(N)=160$. The <extended Euclidean algorithm> gives
$$
1=37\cdot13-3\cdot160,
$$
so
$$
\boxed{d=37}.
$$