lowlevel haskell for a set of cryptographic primitives