diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-09-26 16:24:57 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-09-27 13:51:24 +0100 |
commit | 3f4f843920afdc1d808a8b20354cf3eca481401a (patch) | |
tree | 278f1835a8dd7b60857f0833bfe4e0702beb1015 /src/include/ipxe/chap.h | |
parent | 8844a3d5464c4632a1374cbb9304aeea61d0166f (diff) | |
download | ipxe-master.zip ipxe-master.tar.gz ipxe-master.tar.bz2 |
An n-bit multiplication product may be added to up to two n-bit
integers without exceeding the range of a (2n)-bit integer:
(2^n - 1)*(2^n - 1) + (2^n - 1) + (2^n - 1) = 2^(2n) - 1
Exploit this to perform big integer multiplication in constant time
without requiring the caller to provide temporary carry space.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/chap.h')
0 files changed, 0 insertions, 0 deletions