From 7e0bf4ec5cb3dd608d97735575e3f62252455878 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 7 Oct 2024 12:13:42 +0100 Subject: [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 --- src/arch/x86/include/bits/bigint.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch/x86/include/bits/bigint.h') diff --git a/src/arch/x86/include/bits/bigint.h b/src/arch/x86/include/bits/bigint.h index 320d49498..512b2724d 100644 --- a/src/arch/x86/include/bits/bigint.h +++ b/src/arch/x86/include/bits/bigint.h @@ -104,13 +104,13 @@ bigint_subtract_raw ( const uint32_t *subtrahend0, uint32_t *value0, } /** - * Rotate big integer left + * Shift big integer left * * @v value0 Element 0 of big integer * @v size Number of elements */ static inline __attribute__ (( always_inline )) void -bigint_rol_raw ( uint32_t *value0, unsigned int size ) { +bigint_shl_raw ( uint32_t *value0, unsigned int size ) { bigint_t ( size ) __attribute__ (( may_alias )) *value = ( ( void * ) value0 ); long index; @@ -127,13 +127,13 @@ bigint_rol_raw ( uint32_t *value0, unsigned int size ) { } /** - * Rotate big integer right + * Shift big integer right * * @v value0 Element 0 of big integer * @v size Number of elements */ static inline __attribute__ (( always_inline )) void -bigint_ror_raw ( uint32_t *value0, unsigned int size ) { +bigint_shr_raw ( uint32_t *value0, unsigned int size ) { bigint_t ( size ) __attribute__ (( may_alias )) *value = ( ( void * ) value0 ); long discard_c; -- cgit