I know there are 4 known weak keys, their value and that double encryption using one of the weak keys should give back the plain text.
I implemented this in OpenSSL. I have a plain text $m$ in a file
plain.txt and compute $y = DES_k(m)$ where $k$ is a weak key. Then I compute $y' = DES_k(y)$. Instead of getting $m$ I get only a portion of it and the rest is part of $y$.
Why is this happening?