[Haskell-cafe] haskell cryptogaphic libraries

Vincent Hanquez tab at snarc.org
Fri Aug 24 15:31:45 CEST 2012

On 08/24/2012 01:47 PM, marcmo wrote:
> In my day job I currently need to deal with a lot of cryptographic processing. 
> For the tests I need to perform various cryptographic functions in haskell.
> these include:
> * AES Encryption/Decryption (CBC-Mode)
> * RSA Public Key Encryption/Decryption
> * Certificate Handling
> I'm having some difficulties finding the libraries to use and using them 
> correctly.
> Performance is /not/ my primary concern...rather *correctness* and*ease of use*.
> Haskell has some great cryptographic libs but for me it seems hard to judge 
> what to use. The ones that seem appropriate are:
> * The AES package (for symmetric encryption)
> * The RSA package (for public key cryptography)
> certificate handling is s.th. I haven't found out about
> * how to deal with Certificates (e.g. extract the public key from X.509 
> certificates)
> is there a recommended package (packages) that suite my purpose?

[this is going to a be shameless self advertising reply :) ...]

for AES, i'ld recommend you to read a recent post of mine "building a better 
haskell aes" [1].
for RSA, to have something compatible my next suggestion for x509, you got 
either RSA or cryptocipher [2].
for X509, everything you need is available in the certificate package [3]

While you mentioned performance is not your primary concern, I found that even 
with medium use of crypto it becomes a significant bottleneck when using some 
well established implementations.

[1] http://tab.snarc.org/posts/haskell/2012-07-07-building-a-better-haskell-aes.html
[2] http://hackage.haskell.org/package/cryptocipher
[3] http://hackage.haskell.org/package/certificate


More information about the Haskell-Cafe mailing list