Haskell implementation of a DES-type cipher