diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-11-26 14:45:51 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-11-26 14:45:51 +0000 |
commit | 9cbf5c4f86b45773badec2498fac22e8bc6d7dd1 (patch) | |
tree | 47973e724494dab3cf4569570bc723ebee3e4a72 /src/tests/des_test.c | |
parent | 167a08f08928c7e469f50d5d364287abb784e99c (diff) | |
download | ipxe-9cbf5c4f86b45773badec2498fac22e8bc6d7dd1.tar.gz |
[crypto] Eliminate temporary working space for bigint_reduce()
Direct modular reduction is expected to be used in situations where
there is no requirement to retain the original (unreduced) value.
Modify the API for bigint_reduce() to reduce the value in place,
(removing the separate result buffer), impose a constraint that the
modulus and value have the same size, and require the modulus to be
passed in writable memory (to allow for scaling in place). This
removes the requirement for additional temporary working space.
Reverse the order of arguments so that the constant input is first,
to match the usage pattern for bigint_add() et al.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests/des_test.c')
0 files changed, 0 insertions, 0 deletions