Attack on DSA with signatures made with k, k+1, k+2
You got three equations with two unknowns ($k$ and $x$). You only need two signatures to solve the private key $x$:


$s_1k \equiv h_1 + xr_1 \pmod q$
$s_2k + s_2 \equiv h_2 + xr_2 \pmod q$


This might be solved using Gaussian elimination. Step 1:


$s_1k/r_1 \equiv h_1/r_1 + x \pmod q$  - Divide 0.1 by $r_1$
$s_2k + s_2 - s_1kr_2/r_1 \equiv h_2 - h_1r_2/r_1 \pmod q$ - Subtract 1.1 times $r_2$ from 0.2


Step 2:


$x \equiv s_1k/r_1 - h_1/r_1 \pmod q$ - Swap terms of 1.1
$k \equiv (h_2 - s_2 - h_1r_2/r_1)/(s_2 - s_1r_2/r_1) \pmod q$ - Divide 1.1 by $s_2 - s_1r_2/r_1$


Step 3: 

$x \equiv s_1((h_2 - s_2 - h_1r_2/r_1)/(s_2 - s_1r_2/r_1))/r_1 - h_1/r_1 \pmod q$ - substitute $k$ in 2.1 for right expression of 2.2