Haskell, Racket and OCaml codes for crypto challenge