mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-20 21:39:54 +00:00
bignum_core.py: Simplified result calculation for BignumCoreShiftL
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
013167ed7f
commit
99453ad9f0
@ -122,7 +122,7 @@ class BignumCoreShiftL(BignumCoreTarget, bignum_common.ModOperationCommon):
|
||||
# Calculate if there is space for shifting to the left(leading zero limbs)
|
||||
mx = bignum_common.hex_digits_max_int(self.val_n, self.bits_in_limb)
|
||||
# If there are empty limbs ahead, adjust the bitmask accordingly
|
||||
result = result & (self.r - 1) if mx == self.r else result & (mx - 1)
|
||||
result = result & (mx - 1)
|
||||
return [self.format_result(result)]
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user