[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
>>I grant that it is more efficient to have the least significant byte in the
>>least address. I suspect that these libraries actually swap bytes
>>internally. However, we are presented with a programmer's interface, at
>>least for BSAFE, in which the most significant byte is first. If we encode
>>bignums as least significant byte first, then we are forced to byte-swap
>>whenever we use them.
> It's my understanding/recollection that SSLeay does it the
>other way around. Personally preferring SSLeay over BSAFE, I would be
>inclined to prefer the SSLeay API over BSAFE. In general, I think
>people should consider which crypto libraries are the most used and
>set things accordingly.
Some libraries don't care - cryptlib (which uses Colin Plumb's bnlib) can grab
the data either way, because it ends up being converted to the internal
array-of-word16/32/64 representation before being used anyway. Does it really
matter though? Spending huge amounts of time debating a potential
few-hundred-cycle transformation to precede a multi-thousand-cycle modmult (or
whatever) reminds me of the Golgafrinchans who never got around to inventing
the wheel because they couldn't decide what colour to make it. Pick the
format which all other numbers are stored in (network byte order, presumably)
and go with that.