nucypher / DarkIntegers.jl

A modulo arithmetic toolbox for integers and polynomials
https://nucypher.github.io/DarkIntegers.jl
GNU General Public License v3.0
7 stars 2 forks source link

Switch the order of limbs in `MLUInt`/`MLInt` to correspond to little-endian? #2

Open fjarri opened 4 years ago

fjarri commented 4 years ago

Currently limbs in MLUInt/MLInt are stored as big-endian, because that's how multi-limb algorithms are generally described in the literature (e.g. in TAOCP or Handbook of Applied Cryptography). Perhaps, little-endian would be a more convenient format - limbs are already little-endian (on most systems where this library actually works), and it will help visually compare MLUInt/MLInt numbers with builtin types, or initialize them with predefined constants.