-
简单的
Factoring with High Bits Known
, sage 构造对应 polynomial 使用自带的small_roots
可以解出hint = '3-540-46701-7_14 or 2009/037'
-
记 Wiener equations 和 Guo equations 为
则
B = \begin{bmatrix} 1 & −N & 0 & N^2 \ & e_1 & −e_1 & −e_1 N \ & & e_2 & −e_2 N \ & & & e_1 e_2 \end{bmatrix} \
v = ( k_1 k_2, k_2 (g − k_1 s), g(k_1 − k_2 ), (g − k_1 s)(g − k_2 s) )
$$
令 Minkowski’s bound
, 有
-
利用
LLL
求出最短向量$vD$ , 进而求出$x$ , 根据Wiener’s attack
,$\phi(N) = g(ed-1)/k = floor(edg/k)$ -
有了
$\phi(N)$ 即可构造一元二次方程分解$N$ .
The first part is a typical Factoring with High Bits Known problem, we can solve it with small_roots in sage.
hint = '3-540-46701-7_14 or 2009/037'
The two related paper [1] [2] were given in the hint, each enough to get the flag.
Denote Wiener equations and Guo equations by
Then we have
B = \begin{bmatrix} 1 & −N & 0 & N^2 \ & e_1 & −e_1 & −e_1 N \ & & e_2 & −e_2 N \ & & & e_1 e_2 \end{bmatrix} \
v = ( k_1 k_2, k_2 (g − k_1 s), g(k_1 − k_2 ), (g − k_1 s)(g − k_2 s) )
$$
Multiply the equation by the diagonal matrix
Then we can get the