[Haskell-cafe] Encrypting streamed data

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Jul 6 04:58:52 UTC 2017

I have a use case for needing to use public key cryptography to
encrypt a large amount of data in a streaming fashion (get it out of a
DB, encrypt, put into an AWS S3 bucket).

The command-line gpg tool seems to be able to encrypt/decrypt data
from stdin to stdout in a streaming fashion, but in my attempts to use
it it seems very file-based for things like the keys to use (whereas I
would prefer to be able to pass the public key as an actual value
rather than a file; if nothing else because this is for tools that
don't have email addresses to use and base their keys on for

Is there an existing library that can achieve this using
conduit/pipes/whatever? cryptonite-conduit only covers hashing,
hOpenPGP is poorly documented and I can't work out how to use it
("just follow the types" is difficult when Haddock docs don't link to
the required types (seems to be because it uses the "import Module as
X" trick for re-exporting everything but then everything from those
modules isn't available).

Can anyone recommend a solution?

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list