mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[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>
This commit is contained in:
@@ -112,13 +112,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 );
|
||||
uint32_t *discard_value;
|
||||
@@ -141,13 +141,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 );
|
||||
uint32_t *discard_value;
|
||||
|
||||
Reference in New Issue
Block a user