[PATCH 0/3] Remove old AES-GCM library

Eric Biggers posted 3 patches 2 days, 20 hours ago
arch/x86/Kconfig                        |   2 +-
arch/x86/coco/sev/core.c                |  53 +-
arch/x86/include/asm/sev.h              |   2 +-
drivers/virt/coco/sev-guest/sev-guest.c |   7 +-
include/crypto/gcm.h                    |  21 -
lib/crypto/Kconfig                      |   6 -
lib/crypto/Makefile                     |   3 -
lib/crypto/aesgcm.c                     | 721 ------------------------
8 files changed, 26 insertions(+), 789 deletions(-)
delete mode 100644 lib/crypto/aesgcm.c
[PATCH 0/3] Remove old AES-GCM library
Posted by Eric Biggers 2 days, 20 hours ago
The old AES-GCM library code is being replaced as part of an overhaul
that is adding support for all the common AES encryption modes with
consistent conventions
(https://lore.kernel.org/linux-crypto/20260715221153.246410-1-ebiggers@kernel.org/).

The SEV code is the only user of the old API.  Update it to use the new
API instead.  Then remove the old API.

This applies to libcrypto-next.  If possible I'd like to take this
through libcrypto-next for 7.3.  Acks are appreciated.

Eric Biggers (3):
  x86/sev: Use new AES-GCM library
  x86/sev: Remove obsolete virtual address check
  lib/crypto: aesgcm: Remove old AES-GCM library

 arch/x86/Kconfig                        |   2 +-
 arch/x86/coco/sev/core.c                |  53 +-
 arch/x86/include/asm/sev.h              |   2 +-
 drivers/virt/coco/sev-guest/sev-guest.c |   7 +-
 include/crypto/gcm.h                    |  21 -
 lib/crypto/Kconfig                      |   6 -
 lib/crypto/Makefile                     |   3 -
 lib/crypto/aesgcm.c                     | 721 ------------------------
 8 files changed, 26 insertions(+), 789 deletions(-)
 delete mode 100644 lib/crypto/aesgcm.c


base-commit: e4f23159c8d09b6b15d47f2c95e0a3e7c62f52a2
-- 
2.55.0
Re: [PATCH 0/3] Remove old AES-GCM library
Posted by Borislav Petkov 2 days, 7 hours ago
On Tue, Jul 21, 2026 at 07:53:35PM -0700, Eric Biggers wrote:
> The old AES-GCM library code is being replaced as part of an overhaul
> that is adding support for all the common AES encryption modes with
> consistent conventions
> (https://lore.kernel.org/linux-crypto/20260715221153.246410-1-ebiggers@kernel.org/).
> 
> The SEV code is the only user of the old API.  Update it to use the new
> API instead.  Then remove the old API.
> 
> This applies to libcrypto-next.  If possible I'd like to take this
> through libcrypto-next for 7.3.  Acks are appreciated.

Fine with me as long as the additionally added AMD folks can verify everything
still works with their SNP guest setups.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Re: [PATCH 0/3] Remove old AES-GCM library
Posted by Nikunj A. Dadhania 1 day, 17 hours ago

On 7/22/2026 9:33 PM, Borislav Petkov wrote:
> On Tue, Jul 21, 2026 at 07:53:35PM -0700, Eric Biggers wrote:
>> The old AES-GCM library code is being replaced as part of an overhaul
>> that is adding support for all the common AES encryption modes with
>> consistent conventions
>> (https://lore.kernel.org/linux-crypto/20260715221153.246410-1-ebiggers@kernel.org/).
>>
>> The SEV code is the only user of the old API.  Update it to use the new
>> API instead.  Then remove the old API.
>>
>> This applies to libcrypto-next.  If possible I'd like to take this
>> through libcrypto-next for 7.3.  Acks are appreciated.
> 
> Fine with me as long as the additionally added AMD folks can verify everything
> still works with their SNP guest setups.

Tested with a SecureTSC-enabled SNP guest. SecureTSC guests rely on the SNP
guest messaging API which uses AES-GCM library, so this exercises the new
library code through that path. No issues found.

Tested-by: Nikunj A Dadhania <nikunj@amd.com>
Re: [PATCH 0/3] Remove old AES-GCM library
Posted by Ard Biesheuvel 2 days, 13 hours ago

On Wed, 22 Jul 2026, at 04:53, Eric Biggers wrote:
> The old AES-GCM library code is being replaced as part of an overhaul
> that is adding support for all the common AES encryption modes with
> consistent conventions
> (https://lore.kernel.org/linux-crypto/20260715221153.246410-1-ebiggers@kernel.org/).
>
> The SEV code is the only user of the old API.  Update it to use the new
> API instead.  Then remove the old API.
>
> This applies to libcrypto-next.  If possible I'd like to take this
> through libcrypto-next for 7.3.  Acks are appreciated.
>
> Eric Biggers (3):
>   x86/sev: Use new AES-GCM library
>   x86/sev: Remove obsolete virtual address check
>   lib/crypto: aesgcm: Remove old AES-GCM library
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

>  arch/x86/Kconfig                        |   2 +-
>  arch/x86/coco/sev/core.c                |  53 +-
>  arch/x86/include/asm/sev.h              |   2 +-
>  drivers/virt/coco/sev-guest/sev-guest.c |   7 +-
>  include/crypto/gcm.h                    |  21 -
>  lib/crypto/Kconfig                      |   6 -
>  lib/crypto/Makefile                     |   3 -
>  lib/crypto/aesgcm.c                     | 721 ------------------------
>  8 files changed, 26 insertions(+), 789 deletions(-)
>  delete mode 100644 lib/crypto/aesgcm.c
>
>
> base-commit: e4f23159c8d09b6b15d47f2c95e0a3e7c62f52a2
> -- 
> 2.55.0