Change Data.Bits.rotate to rotate Integer (unbounded) types

Lemmih lemmih at gmail.com
Tue Sep 19 15:38:56 EDT 2006


On 9/19/06, Peter Tanski <p.tanski at gmail.com> wrote:
> I don't have a particular implementation in mind but as a general
> idea it would make the treatment of Integers the same as the
> treatment of the standard-size bounded ints.  A possible
> implementation might be a stream cipher that uses 128-bit Integers
> instead of 32-bit ints (bitwise rotations have been used in more than
> a few stream ciphers).  For arithmetic purposes, rotation is also
> useful for implementing multiplication of finite fields.

Ah, so you want to rotate various bounded integers larger than 64bits?
You can do that without changing Data.Bits at all (crypto defines
Word128, Word192 and Word256 which are instances of Bits).

-- 
Cheers,
  Lemmih

crypto: http://www.haskell.org/crypto/


More information about the Glasgow-haskell-users mailing list