> For the complete documentation index, see [llms.txt](https://sansong.gitbook.io/cyber/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sansong.gitbook.io/cyber/crypto/asymetrique/rsa/attaques-sur-n-p-et-q/n-premier.md).

# N premier

Si le module $$n$$ est **premier**, pas de factorisation car $$\phi(n)=n-1$$.

1. Calculer $$d=e^{-1}   \bmod(n-1)$$
2. Déchiffrer avec $$n, c, e$$ et $$d$$
