dp泄露问题

快速幂

\[\\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 \\e*d \equiv 1 \pmod {phi} \\dp = d \mod {p-1} \\e*d - 1 = k_1*(q-1)*(p-1) \\d = k_2*(p-1) + dp \\e*dp + 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 + k*p \\a^{e *dp} - a = a*k*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) \]

posted @ 2024-03-20 21:56  附体欢欢  阅读(33)  评论(0编辑  收藏  举报