arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Boneh-Durfee Attack

hashtag
What is Boneh-Durfee Attack

Boneh-Durfee attack is an extension of Wiener's attack. That is, it also attacks on low private component dddwith a further relaxed condition. If dddsatisfies:

d<N0.292d < N^{0.292} d<N0.292

Then we can use Boneh-Durfee attack to retrive ddd

this, using a graphical directed point of view, can be seen as:

{E,n}→d<N0.292P{d}\{E, n\} \xrightarrow[d < N^{0.292}]{P} \{d\} {E,n}Pd<N0.292​{d}

Consider for first, see that

As stated above, the RSA's totient function can be espressed as:

continuing with the equation, we see that

and if we decide to consider and , we will have:

At this point, finding is equivalent to find the 2 small solutions and to the congruence

now let and this will preserve the scomposed subtraction

consider (with any ), we deduct that must be really closed to because is in the same order of the length of (so ), we will get

hashtag
Sage Implementation

d<Nid < N^{i}d<Ni
1=ed+kϕ(N)21=ed + \frac{k \phi(N)}{2}\\ 1=ed+2kϕ(N)​
ϕ(N)=(p−1)(q−1)=N−q−p+1 \phi(N) = (p-1)(q-1) = N-q-p+1ϕ(N)=(p−1)(q−1)=N−q−p+1
1=ed+k(N+12−p+q2)1 = ed + k(\frac{N+1}{2}-\frac{p+q}{2} )1=ed+k(2N+1​−2p+q​)
x=N+12x = \frac{N+1}{2} x=2N+1​
y=p+q2y = \frac{p+q}{2} y=2p+q​
1=ed+k(x+y)1 = ed + k(x+y)1=ed+k(x+y)
ddd
xxx
yyy
f(x,y)≡k(x+y)≡1 (mod e)k(x+y)≡1( mod e)f(x,y) \equiv k(x+y) \equiv 1 \space (mod \space e) \\ k(x + y) \equiv 1 (\space mod \space e)f(x,y)≡k(x+y)≡1 (mod e)k(x+y)≡1( mod e)
s=−p+q2s = -\frac{p+q}{2}s=−2p+q​
A=N+12A = \frac{N+1}{2}A=2N+1​
Ï•(N)\phi(N) Ï•(N)
k(A+s)≡1( mod e)k(A+s) \equiv 1 (\space mod \space e)k(A+s)≡1( mod e)
e=Nαe=N^{\alpha}e=Nα
α\alphaα
α\alphaα
111
eee
NNN
e=N∼1−e=N^{\sim 1^{-}}e=N∼1−
∣s∣<2N=p+q2<2N=2e12α∼e∣k∣<2edϕ(N)≤3edN<3e1+α+1α<ei| s | < 2\sqrt{N} = \\ \frac{p+q}{2} < 2\sqrt{N} =2e^{\frac{1}{2\alpha}} \sim \sqrt{e} \\ |k| < \frac{2ed}{\phi{(N)}} \leq\frac{3ed}{N}< 3e^{1+\frac{\alpha+1}{\alpha}} < e^{i}∣s∣<2N​=2p+q​<2N​=2e2α1​∼e​∣k∣<ϕ(N)2ed​≤N3ed​<3e1+αα+1​<ei
RSA-and-LLL-attacks/boneh_durfee.sage at master · mimoo/RSA-and-LLL-attacksGitHubchevron-right
Boneh-Durfee attack Sage implementation
Logo