DRBG pre-announce and a discussion on RNG/Crypto infrastructure

Bas van Dijk v.dijk.bas at gmail.com
Mon May 31 09:26:25 EDT 2010


On Mon, May 31, 2010 at 1:06 AM, Thomas DuBuisson
<thomas.dubuisson at gmail.com> wrote:
> ...
>  outputLength  :: d -> BitLength  -- outputLength must ignore its argument
>  blockLength   :: d -> BitLength   -- blockLength must ignore its argument
>  strength      :: d -> Int  -- strength must ignore its argument
>  blockSize     :: k -> BitLength       -- ^ blockSize must ignore its argument
>  keyLength     :: k -> BitLength       -- ^ keyLength may inspect its
> ...

Why not use the Edward Kmett's 'tagged'[1] package for these methods? As in:

outputLength :: Tagged d BitLength

This way users don't have to write the dangerous 'undefined :: d'.

Regards,

Bas

[1] http://hackage.haskell.org/package/tagged


More information about the Libraries mailing list