X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Finner.h;h=fd764bcbe2b4254099b7676d95d9fcd5497b4ce8;hp=8417b2439206547bdb1f47e596745c5389d453d2;hb=7fc1ef315f807170f63b0ad8255cf77314b50ca5;hpb=28e4e120b84dacdf53963639f1a8a6fec2793662 diff --git a/src/inner.h b/src/inner.h index 8417b24..fd764bc 100644 --- a/src/inner.h +++ b/src/inner.h @@ -571,16 +571,17 @@ MUL31_lo(uint32_t x, uint32_t y) #endif /* - * Multiply two words together; each word may contain up to 15 bits of - * data. If BR_CT_MUL15 is non-zero, then the macro will contain some - * extra operations that help in making the operation constant-time on - * some platforms, where the basic 32-bit multiplication is not - * constant-time. + * Multiply two words together; the sum of the lengths of the two + * operands must not exceed 31 (for instance, one operand may use 16 + * bits if the other fits on 15). If BR_CT_MUL15 is non-zero, then the + * macro will contain some extra operations that help in making the + * operation constant-time on some platforms, where the basic 32-bit + * multiplication is not constant-time. */ #if BR_CT_MUL15 #define MUL15(x, y) (((uint32_t)(x) | (uint32_t)0x80000000) \ * ((uint32_t)(y) | (uint32_t)0x80000000) \ - & (uint32_t)0x3FFFFFFF) + & (uint32_t)0x7FFFFFFF) #else #define MUL15(x, y) ((uint32_t)(x) * (uint32_t)(y)) #endif