0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RSA暗号の数理 簡単まとめ

Posted at

オイラー関数

$1$ から $n$ までの自然数の中で、$n$ と互いに素なものの個数。

\phi(n) = n \prod_{i=1}^k \left( 1 - \frac{1}{p_i} \right)

オイラーの定理

$a$ と $n$ が互いに素であるとき

a^{\phi(n)} \equiv 1 \pmod n

が成り立つ。

RSA暗号

秘密鍵 $d$ は次の条件を満たすように選ばれる。

ed \equiv 1 \pmod{\phi(n)}

これとオイラーの定理より

\begin{align}
m^{ed} &= m^{1 + k\phi(n)} \\
   &= m \cdot (m^{\phi(n)})^k \\
   &\equiv m \cdot (1)^k \\
   &\equiv m \pmod n
\end{align}

🍀

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?