commit | 3f4f843920afdc1d808a8b20354cf3eca481401a | [log] [tgz] |
---|---|---|
author | Michael Brown <mcb30@ipxe.org> | Thu Sep 26 16:24:57 2024 +0100 |
committer | Michael Brown <mcb30@ipxe.org> | Fri Sep 27 13:51:24 2024 +0100 |
tree | 278f1835a8dd7b60857f0833bfe4e0702beb1015 | |
parent | 8844a3d5464c4632a1374cbb9304aeea61d0166f [diff] |
[crypto] Eliminate temporary carry space for big integer multiplication 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>