How to properly sign and verify using DSA? Can anyone spot my mistake?
Keeping your notation, signature generation in DSA is the following:


$r = (\alpha^{kE} \bmod p) \bmod q$
$s = kEinv \times (h(x) + d\times r) \bmod q$


where $kEinv$ is the modular inverse of $kE$ modulo $q$.

But you actually did was using the formula $s= (h(x)+d\times r) \times \alpha \bmod q$, and you forgot to reduce $r$ modulo $q$. You can take a look at the wikipedia page.