快速幂
$$
\5 * e \equiv 1 \pmod 7
\e=5^{7-1-1}快速幂
\ a \equiv a^{p} \pmod {p} ,assert \ p \ is \ prime 费马小定理
\ a *a^{p-2} \equiv 1 \pmod {p}
$$
dp泄露
$$
已知e,dp,c,n
\ed \equiv 1 \pmod {phi}
\dp = d \mod {p-1}
\ed - 1 = k_1(q-1)(p-1)
\d = k_2(p-1) + dp
\edp + e k_2 (p-1) = k_1(q-1)(p-1) + 1
\e*dp \equiv 1 \mod {p-1}
\e *dp -1 = k *(p-1)
\a^{(e *dp -1)} = a^{k *(p-1)}
\a^{(e *dp -1)} \equiv a^{k *(p-1)} \pmod {p}
\a^{(e *dp -1)} \pmod {p}= {a{p-1}}k \pmod {p}=1^k =1
\a^{(e *dp -1)} \pmod {p} = 1
\a^{e dp -1} = 1 + kp
\a^{e dp} - a = ak*p
\ n = p * q
\gcd(n,(a^{e *dp}-a\mod n))=p
$$
爆破
$$
\e *dp -1 = k *(p-1)
\e dp \approx k (p-1)
\大小 =小 大
\k \subset (1,e)
$$
标签:pmod,ed,问题,equiv,泄露,dp,mod From: https://www.cnblogs.com/futihuanhuan/p/18086205