I'm trying to understand the Paillier Scheme but there's something I can't understand in the keyGen algorithm:
Ensure $n$ divides the order of $g$ by checking the existence of the following modular multiplicative inverse: $$\mu = (L(g^\lambda \bmod n^2))^{-1} \bmod n.$$
I'm trying hard to find the relation between $n$ divides the order of $g$ and $\gcd(n, L(g^\lambda \bmod n^2))=1$ but I can't find it. I hope that somebody can help me understand it.