
On Tue, May 10, 2011 at 11:14, Jesper Louis Andersen
On Tue, May 10, 2011 at 09:47, Johan Brinch
wrote: Stuff like xor'ing two bytestrings or generating a block of incremental IV's (for CTR mode)?
I don't particularly like the notion of XOR on a bytestring. The bytestring is not a number and it does not make much sense to bitwise xor such a string. I'd rather have a type specifically tailored for doing crypto-style computations and then use it. Such that the underlying implementation can be repa, bytestring, supermegavectorizationistic, or something completely different.
Well, the need for extracting the underlying char pointer to call the c function does limit possible abstraction of the data structure somewhat. Of course, one could make a type class providing unpack/pack functions for extracting the pointer and rebuilting the Haskell value. Of course, this was never meant as part as anything, but a low level crypto lib for high level crypto libs to use. It's not meant for regular usage. -- Johan Brinch