[Haskell-cafe] Re: Crypto-API is stabilizing

Marcel Fourné marcel at bitrot.dyndns.org
Sun Sep 5 04:30:34 EDT 2010

Thomas DuBuisson wrote:

>There is a blog on this [1], but the main points about the new class
>1) Generates bytestrings, not Ints

I like this one because it's semantically truer (tm). ;-)

>2) Generalized PRNG construction and reseeding

...which takes the great burden off it's users shoulders, nice!

>3) 'split' is in a different class.

Is it necessary for crypto-use? I have never used it for that and I
don't know if somebody other did, but I just ask myself the question.

>4) Clean failure via Either (RandomGen forced you to use exceptions)

This is much better and fits nicely into the generateKeyPair of
AsymCipher with a minimum of effort.

>What can you do?  Accept this API, help improve the API, or argue that
>we should stick with RandomGen (despite short-comings noted on the
>blog).  Please pick one and get to it!

I plan to use this (genInteger looks just too convenient), but
RandomGenerator looks nice enough to use it in other
crypto-projects (just my RNG-output consumers view)!


Marcel Fourné
OpenPGP-Key-ID: 0x74545C72
A good library is preferable to a tool, except when you just need that
one tool.

More information about the Haskell-Cafe mailing list