Re: [PATCH] MPI helper of addition one limb, Least Leak Intended

Jacob Bachmeyer via Gcrypt-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.libgcrypt.devel
Message-ID <[email protected]>
On 2/13/25 23:41, Jussi Kivilinna wrote:
> On 14.2.2025 6.57, Jacob Bachmeyer via Gcrypt-devel wrote:
>> [...]
>>
>> If I read this correctly, the carry handling is depending on integer 
>> overflow wrapping around, which is not actually defined behavior in 
>> C, although most platforms do handle it that way. Do we have an 
>> MPI_LIMB_MAX constant analogous to INT_MAX but for mpi_limb_t instead 
>> of int?
>>
>
> Limbs are unsigned integers and unsigned integer overflow is defined 
> behavior.

Aha... I had forgotten that unsigned integers do wrap.  Thank you.


-- Jacob



_______________________________________________
Gcrypt-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.