linux/arch/arm/lib
Linus Torvalds 13150742b0 Crypto library updates for 6.17
This is the main crypto library pull request for 6.17. The main focus
 this cycle is on reorganizing the SHA-1 and SHA-2 code, providing
 high-quality library APIs for SHA-1 and SHA-2 including HMAC support,
 and establishing conventions for lib/crypto/ going forward:
 
  - Migrate the SHA-1 and SHA-512 code (and also SHA-384 which shares
    most of the SHA-512 code) into lib/crypto/. This includes both the
    generic and architecture-optimized code. Greatly simplify how the
    architecture-optimized code is integrated. Add an easy-to-use
    library API for each SHA variant, including HMAC support. Finally,
    reimplement the crypto_shash support on top of the library API.
 
  - Apply the same reorganization to the SHA-256 code (and also SHA-224
    which shares most of the SHA-256 code). This is a somewhat smaller
    change, due to my earlier work on SHA-256. But this brings in all
    the same additional improvements that I made for SHA-1 and SHA-512.
 
 There are also some smaller changes:
 
  - Move the architecture-optimized ChaCha, Poly1305, and BLAKE2s code
    from arch/$(SRCARCH)/lib/crypto/ to lib/crypto/$(SRCARCH)/. For
    these algorithms it's just a move, not a full reorganization yet.
 
  - Fix the MIPS chacha-core.S to build with the clang assembler.
 
  - Fix the Poly1305 functions to work in all contexts.
 
  - Fix a performance regression in the x86_64 Poly1305 code.
 
  - Clean up the x86_64 SHA-NI optimized SHA-1 assembly code.
 
 Note that since the new organization of the SHA code is much simpler,
 the diffstat of this pull request is negative, despite the addition of
 new fully-documented library APIs for multiple SHA and HMAC-SHA
 variants. These APIs will allow further simplifications across the
 kernel as users start using them instead of the old-school crypto API.
 (I've already written a lot of such conversion patches, removing over
 1000 more lines of code. But most of those will target 6.18 or later.)
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCaIZ93BQcZWJpZ2dlcnNA
 a2VybmVsLm9yZwAKCRDzXCl4vpKOK8HCAQD3O9P0qd6wscne5XuRwaybzKHQ2AqU
 OlhlDZWQQEvYAgD/aa6KP/DS+8RKGj0TBn6bACAJyXyDygFXq5a5s9pGzAs=
 =UmMM
 -----END PGP SIGNATURE-----

Merge tag 'libcrypto-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library updates from Eric Biggers:
 "This is the main crypto library pull request for 6.17. The main focus
  this cycle is on reorganizing the SHA-1 and SHA-2 code, providing
  high-quality library APIs for SHA-1 and SHA-2 including HMAC support,
  and establishing conventions for lib/crypto/ going forward:

   - Migrate the SHA-1 and SHA-512 code (and also SHA-384 which shares
     most of the SHA-512 code) into lib/crypto/. This includes both the
     generic and architecture-optimized code. Greatly simplify how the
     architecture-optimized code is integrated. Add an easy-to-use
     library API for each SHA variant, including HMAC support. Finally,
     reimplement the crypto_shash support on top of the library API.

   - Apply the same reorganization to the SHA-256 code (and also SHA-224
     which shares most of the SHA-256 code). This is a somewhat smaller
     change, due to my earlier work on SHA-256. But this brings in all
     the same additional improvements that I made for SHA-1 and SHA-512.

  There are also some smaller changes:

   - Move the architecture-optimized ChaCha, Poly1305, and BLAKE2s code
     from arch/$(SRCARCH)/lib/crypto/ to lib/crypto/$(SRCARCH)/. For
     these algorithms it's just a move, not a full reorganization yet.

   - Fix the MIPS chacha-core.S to build with the clang assembler.

   - Fix the Poly1305 functions to work in all contexts.

   - Fix a performance regression in the x86_64 Poly1305 code.

   - Clean up the x86_64 SHA-NI optimized SHA-1 assembly code.

  Note that since the new organization of the SHA code is much simpler,
  the diffstat of this pull request is negative, despite the addition of
  new fully-documented library APIs for multiple SHA and HMAC-SHA
  variants.

  These APIs will allow further simplifications across the kernel as
  users start using them instead of the old-school crypto API. (I've
  already written a lot of such conversion patches, removing over 1000
  more lines of code. But most of those will target 6.18 or later)"

* tag 'libcrypto-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: (67 commits)
  lib/crypto: arm64/sha512-ce: Drop compatibility macros for older binutils
  lib/crypto: x86/sha1-ni: Convert to use rounds macros
  lib/crypto: x86/sha1-ni: Minor optimizations and cleanup
  crypto: sha1 - Remove sha1_base.h
  lib/crypto: x86/sha1: Migrate optimized code into library
  lib/crypto: sparc/sha1: Migrate optimized code into library
  lib/crypto: s390/sha1: Migrate optimized code into library
  lib/crypto: powerpc/sha1: Migrate optimized code into library
  lib/crypto: mips/sha1: Migrate optimized code into library
  lib/crypto: arm64/sha1: Migrate optimized code into library
  lib/crypto: arm/sha1: Migrate optimized code into library
  crypto: sha1 - Use same state format as legacy drivers
  crypto: sha1 - Wrap library and add HMAC support
  lib/crypto: sha1: Add HMAC support
  lib/crypto: sha1: Add SHA-1 library functions
  lib/crypto: sha1: Rename sha1_init() to sha1_init_raw()
  crypto: x86/sha1 - Rename conflicting symbol
  lib/crypto: sha2: Add hmac_sha*_init_usingrawkey()
  lib/crypto: arm/poly1305: Remove unneeded empty weak function
  lib/crypto: x86/poly1305: Fix performance regression on short messages
  ...
2025-07-28 17:58:52 -07:00
..
.gitignore lib/crypto: arm: Move arch/arm/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
ashldi3.S
ashrdi3.S
backtrace-clang.S ARM: implement IRQ stacks 2021-12-03 15:11:31 +01:00
backtrace.S ARM: implement IRQ stacks 2021-12-03 15:11:31 +01:00
bitops.h locking/atomic: arm: fix sync ops 2023-06-05 09:57:13 +02:00
bswapsdi2.S
call_with_stack.S ARM: 9233/1: stacktrace: Skip frame pointer boundary check for call_with_stack() 2022-10-04 11:09:47 +01:00
changebit.S
clear_user.S
clearbit.S
copy_from_user.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
copy_page.S
copy_template.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
copy_to_user.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
csumipv6.S
csumpartial.S
csumpartialcopy.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
csumpartialcopygeneric.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
csumpartialcopyuser.S ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement 2024-04-18 12:10:46 +01:00
delay-loop.S ARM: 9390/2: lib: Annotate loop delay instructions for CFI 2024-04-29 14:14:21 +01:00
delay.c
div64.S
error-inject.c ARM: 9279/1: support function error injection 2022-12-07 14:08:38 +00:00
findbit.S ARM: findbit: add unwinder information 2022-11-14 12:00:58 +00:00
getuser.S
io-readsb.S
io-readsl.S
io-readsw-armv3.S
io-readsw-armv4.S
io-writesb.S
io-writesl.S
io-writesw-armv3.S
io-writesw-armv4.S
lib1funcs.S
lshrdi3.S
Makefile Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
memchr.S
memcpy.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
memmove.S ARM: memmove: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
memset.S ARM: 9321/1: memset: cast the constant byte to unsigned char 2023-10-05 16:15:41 +01:00
muldi3.S
putuser.S
setbit.S
strchr.S
strrchr.S
testchangebit.S locking/atomic: arm: fix sync ops 2023-06-05 09:57:13 +02:00
testclearbit.S locking/atomic: arm: fix sync ops 2023-06-05 09:57:13 +02:00
testsetbit.S locking/atomic: arm: fix sync ops 2023-06-05 09:57:13 +02:00
uaccess_with_memcpy.c mm/arm: remove pmd_thp_or_huge() 2024-04-25 20:55:47 -07:00
ucmpdi2.S
xor-neon.c crypto: arm/xor - add missing MODULE_DESCRIPTION() macro 2024-09-01 20:43:31 -07:00