aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorEric Biggers <[email protected]>2025-07-18 19:19:00 +0000
committerEric Biggers <[email protected]>2025-07-21 04:42:42 +0000
commit42e3376e0954d7e589e5a53d6149835cad64e8e6 (patch)
treee19055e0addaf835543c0e4df000cc1d3c996e79 /lib/crypto/mpi/mpi-sub-ui.c
parentlib/crypto: x86/sha1-ni: Minor optimizations and cleanup (diff)
downloadkernel-42e3376e0954d7e589e5a53d6149835cad64e8e6.tar.gz
kernel-42e3376e0954d7e589e5a53d6149835cad64e8e6.zip
lib/crypto: x86/sha1-ni: Convert to use rounds macros
The assembly code that does all 80 rounds of SHA-1 is highly repetitive. Replace it with 20 expansions of a macro that does 4 rounds, using the macro arguments and .if directives to handle the slight variations between rounds. This reduces the length of sha1-ni-asm.S by 129 lines while still producing the exact same object file. This mirrors sha256-ni-asm.S which uses this same strategy. Reviewed-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions