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

Peter Tanski p.tanski at gmail.com
Tue Sep 19 15:10:25 EDT 2006


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.

-Pete

On Sep 19, 2006, at 3:03 AM, Lennart Augustsson wrote:

> And what would rotating an Integer mean?  The only sensible  
> interpretation I can think of is to make it behave like shift.
>
> On Sep 18, 2006, at 23:46 , Peter Tanski wrote:
>
>> Welcome back!  Since Data.Bits is not defined in the Haskell 1998  
>> standard, are we free to change the implementation of Data.Bits?   
>> if we are free to change the implementation of Data.Bits, would it  
>> be all right to change the operation of rotate, rotateL and  
>> rotateR over unbounded types (to my knowledge, currently only  
>> Integer)?  I would like to change rotate, rotateL and rotateR to  
>> actually rotate (not shift) Integers.
>>
>> -Pete
>> _______________________________________________
>> Glasgow-haskell-users mailing list
>> Glasgow-haskell-users at haskell.org
>> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>



More information about the Glasgow-haskell-users mailing list