diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-10-07 12:13:42 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-10-07 13:13:43 +0100 |
commit | 7e0bf4ec5cb3dd608d97735575e3f62252455878 (patch) | |
tree | 0bb9aa58c73136dc4fa86c3f85d9d90bcafb6bb6 /src/include | |
parent | 3f4f843920afdc1d808a8b20354cf3eca481401a (diff) | |
download | ipxe-7e0bf4ec5cb3dd608d97735575e3f62252455878.tar.gz |
[crypto] Rename bigint_rol()/bigint_ror() to bigint_shl()/bigint_shr()
The big integer shift operations are misleadingly described as
rotations since the original x86 implementations are essentially
trivial loops around the relevant rotate-through-carry instruction.
The overall operation performed is a shift rather than a rotation.
Update the function names and descriptions to reflect this.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ipxe/bigint.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/include/ipxe/bigint.h b/src/include/ipxe/bigint.h index bcb7af5ec..19cd4e3dd 100644 --- a/src/include/ipxe/bigint.h +++ b/src/include/ipxe/bigint.h @@ -89,23 +89,23 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); } while ( 0 ) /** - * Rotate big integer left + * Shift big integer left * * @v value Big integer */ -#define bigint_rol( value ) do { \ +#define bigint_shl( value ) do { \ unsigned int size = bigint_size (value); \ - bigint_rol_raw ( (value)->element, size ); \ + bigint_shl_raw ( (value)->element, size ); \ } while ( 0 ) /** - * Rotate big integer right + * Shift big integer right * * @v value Big integer */ -#define bigint_ror( value ) do { \ +#define bigint_shr( value ) do { \ unsigned int size = bigint_size (value); \ - bigint_ror_raw ( (value)->element, size ); \ + bigint_shr_raw ( (value)->element, size ); \ } while ( 0 ) /** @@ -293,8 +293,8 @@ void bigint_add_raw ( const bigint_element_t *addend0, bigint_element_t *value0, unsigned int size ); void bigint_subtract_raw ( const bigint_element_t *subtrahend0, bigint_element_t *value0, unsigned int size ); -void bigint_rol_raw ( bigint_element_t *value0, unsigned int size ); -void bigint_ror_raw ( bigint_element_t *value0, unsigned int size ); +void bigint_shl_raw ( bigint_element_t *value0, unsigned int size ); +void bigint_shr_raw ( bigint_element_t *value0, unsigned int size ); int bigint_is_zero_raw ( const bigint_element_t *value0, unsigned int size ); int bigint_is_geq_raw ( const bigint_element_t *value0, const bigint_element_t *reference0, |