From 5202f83345e17c56da4935205f0a97bd4aa20714 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 28 Nov 2024 15:05:06 +0000 Subject: [crypto] Remove obsolete bigint_mod_multiply() There is no further need for a standalone modular multiplication primitive, since the only consumer is modular exponentiation (which now uses Montgomery multiplication instead). Remove the now obsolete bigint_mod_multiply(). Signed-off-by: Michael Brown --- src/include/ipxe/bigint.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'src/include') diff --git a/src/include/ipxe/bigint.h b/src/include/ipxe/bigint.h index 3ca871962..3058547a6 100644 --- a/src/include/ipxe/bigint.h +++ b/src/include/ipxe/bigint.h @@ -270,37 +270,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); size ); \ } while ( 0 ) -/** - * Perform modular multiplication of big integers - * - * @v multiplicand Big integer to be multiplied - * @v multiplier Big integer to be multiplied - * @v modulus Big integer modulus - * @v result Big integer to hold result - * @v tmp Temporary working space - */ -#define bigint_mod_multiply( multiplicand, multiplier, modulus, \ - result, tmp ) do { \ - unsigned int size = bigint_size (multiplicand); \ - bigint_mod_multiply_raw ( (multiplicand)->element, \ - (multiplier)->element, \ - (modulus)->element, \ - (result)->element, size, tmp ); \ - } while ( 0 ) - -/** - * Calculate temporary working space required for moduluar multiplication - * - * @v modulus Big integer modulus - * @ret len Length of temporary working space - */ -#define bigint_mod_multiply_tmp_len( modulus ) ( { \ - unsigned int size = bigint_size (modulus); \ - sizeof ( struct { \ - bigint_t ( size * 2 ) temp_result; \ - bigint_t ( size * 2 ) temp_modulus; \ - } ); } ) - /** * Perform modular exponentiation of big integers * @@ -411,11 +380,6 @@ void bigint_montgomery_raw ( const bigint_element_t *modulus0, const bigint_element_t *modinv0, bigint_element_t *mont0, bigint_element_t *result0, unsigned int size ); -void bigint_mod_multiply_raw ( const bigint_element_t *multiplicand0, - const bigint_element_t *multiplier0, - const bigint_element_t *modulus0, - bigint_element_t *result0, - unsigned int size, void *tmp ); void bigint_mod_exp_raw ( const bigint_element_t *base0, const bigint_element_t *modulus0, const bigint_element_t *exponent0, -- cgit v1.2.3-55-g7522