[PATCH v10 04/22] grub-install: Support embedding x509 certificates

2025-09-09 Thread Sudhakar Kuppusamy
D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- include/grub/kernel.h | 1 + include/grub/util/install.h | 3 +++ util/grub-install-common.c | 19 +- util

[PATCH v10 07/22] appended signatures: Parse PKCS#7 signed data

2025-09-09 Thread Sudhakar Kuppusamy
ignored. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/commands/appendedsig/appendedsig.h | 38 ++ grub-core/commands/appendedsig/pkcs7.c | 452 +++ 2 files changed

[PATCH v10 05/22] appended signatures: Import GNUTLS's ASN.1 description files

2025-09-09 Thread Sudhakar Kuppusamy
/blob/master/lib/gnutls.asn - https://github.com/gnutls/gnutls/blob/master/lib/pkix.asn The GNUTLS license is LGPLv2.1+, which is GPLv3 compatible, allowing us to import it without issue. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v10 12/22] appended signatures: Introducing key management environment variable

2025-09-09 Thread Sudhakar Kuppusamy
by setting the appendedsig_key_mgmt variable back to "static". Signed-off-by: Sudhakar Kuppusamy --- grub-core/commands/appendedsig/appendedsig.c | 75 1 file changed, 75 insertions(+) diff --git a/grub-core/commands/appendedsig/appendedsig.c b/grub-core/commands

[PATCH v10 21/22] docs/grub: Document signing GRUB with an appended signature

2025-09-09 Thread Sudhakar Kuppusamy
Signing GRUB for firmware that verifies an appended signature is a bit fiddly. I don't want people to have to figure it out from scratch so document it here. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan ---

[PATCH v10 01/22] powerpc-ieee1275: Add support for signing GRUB with an appended signature

2025-09-09 Thread Sudhakar Kuppusamy
ture structure (not at the end) so that the final bytes of a signed ELF file are the appended signature magic. A subsequent patch documents how to create a GRUB core.img validly signed under this scheme. Signed-off-by: Rashmica Gupta Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusa

[PATCH v10 08/22] appended signatures: Parse X.509 certificates

2025-09-09 Thread Sudhakar Kuppusamy
Usage extension and handle it by verifying that the certificate has a Code Signing usage. Signed-off-by: Javier Martinez Canillas # EKU support Reported-by: Michal Suchanek # key usage issue Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v10 10/22] appended signatures: Support verifying appended signatures

2025-09-09 Thread Sudhakar Kuppusamy
automatically. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Daniel Kiper --- grub-core/Makefile.core.def | 15 + grub-core/commands/appendedsig/appendedsig.c | 587 +++ include/grub/err.h | 3 +- include/grub

[PATCH v10 18/22] appended signatures: GRUB commands to manage the hashes

2025-09-09 Thread Sudhakar Kuppusamy
-by: Sudhakar Kuppusamy --- grub-core/commands/appendedsig/appendedsig.c | 276 +++ include/grub/file.h | 2 + 2 files changed, 278 insertions(+) diff --git a/grub-core/commands/appendedsig/appendedsig.c b/grub-core/commands/appendedsig/appendedsig.c

[PATCH v10 20/22] docs/grub: Document signing GRUB under UEFI

2025-09-09 Thread Sudhakar Kuppusamy
From: Daniel Axtens Before adding information about how GRUB is signed with an appended signature scheme, it's worth adding some information about how it can currently be signed for UEFI. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Review

[PATCH v10 11/22] powerpc_ieee1275: Read the db and dbx secure boot variables

2025-09-09 Thread Sudhakar Kuppusamy
c key management mode. Read keys from the GRUB ELF Note and use it for signature verification. Signed-off-by: Sudhakar Kuppusamy --- grub-core/Makefile.am | 2 + grub-core/Makefile.core.def | 2 + grub-core/kern/ieee1275/ieee1275.c

[PATCH v10 09/22] powerpc_ieee1275: Enter lockdown based on /ibm, secure-boot

2025-09-09 Thread Sudhakar Kuppusamy
nd enforce. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- docs/grub.texi | 2 +- grub-core/Makefile.core.def| 1 + grub-core/kern/ieee1275/i

[PATCH v10 02/22] crypto: Move storage for grub_crypto_pk_* to crypto.c

2025-09-09 Thread Sudhakar Kuppusamy
etc) use grub_crypto_lookup_cipher_by_name() to get a cipher handle. That depends on grub_ciphers being populated by people calling grub_cipher_register. import_gcry.py ensures that the symmetric ciphers call it.] Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by:

[PATCH v10 06/22] appended signatures: Parse ASN1 node

2025-09-09 Thread Sudhakar Kuppusamy
require an extra NULL byte at the end - Bit strings because libtasn1 returns the length in bits, not bytes. If the function returns a non-NULL value, the caller must free it. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v10 00/22] Appended Signature Secure Boot Support for PowerPC

2025-09-09 Thread Sudhakar Kuppusamy
l Axtens (2): crypto: Move storage for grub_crypto_pk_* to crypto.c docs/grub: Document signing GRUB under UEFI Sudhakar Kuppusamy (20): powerpc-ieee1275: Add support for signing GRUB with an appended signature pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY grub-install: Suppo

Re: [PATCH v2] kern: perform NULL check in unregister paths (command/extcmd)

2025-09-09 Thread Sudhakar Kuppusamy
it NULL check in both the unregister helpers. > > Signed-off-by: Srish Srinivasan Reviewed-by: Sudhakar Kuppusamy > --- > grub-core/commands/extcmd.c | 3 +++ > grub-core/kern/command.c| 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/grub-core/commands/e

Re: [PATCH] kern: perform NULL check in unregister paths (command/extcmd)

2025-09-08 Thread Sudhakar Kuppusamy
0 100644 > --- a/grub-core/kern/command.c > +++ b/grub-core/kern/command.c > @@ -104,6 +104,8 @@ grub_register_command_lockdown (const char *name, > void > grub_unregister_command (grub_command_t cmd) > { > + if (!cmd) For pointer, use cmd == NULL > +return; It would be nice if add e

Re: [PATCH v9 11/21] appended signatures: Introducting GRUB commands to manage the db list

2025-08-27 Thread Sudhakar Kuppusamy
Thank you Daniel for the review. > On 27 Aug 2025, at 9:11 PM, Daniel Kiper wrote: > > On Mon, Aug 25, 2025 at 04:38:33PM +0530, Sudhakar Kuppusamy wrote: >> Introducing the following GRUB commands to manage the db list. >> >> 1. append_list_db: >> Show

Re: [PATCH v9 10/21] appended signatures: Support verifying appended signatures

2025-08-27 Thread Sudhakar Kuppusamy
Thank you Daniel for the review. > On 27 Aug 2025, at 8:43 PM, Daniel Kiper wrote: > > On Mon, Aug 25, 2025 at 04:38:32PM +0530, Sudhakar Kuppusamy wrote: >> Building on the parsers and the ability to embed X.509 certificates, as >> well as the existing gcrypt functional

[PATCH v9 19/21] docs/grub: Document signing GRUB under UEFI

2025-08-25 Thread Sudhakar Kuppusamy
From: Daniel Axtens Before adding information about how GRUB is signed with an appended signature scheme, it's worth adding some information about how it can currently be signed for UEFI. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Review

[PATCH v9 20/21] docs/grub: Document signing GRUB with an appended signature

2025-08-25 Thread Sudhakar Kuppusamy
Signing GRUB for firmware that verifies an appended signature is a bit fiddly. I don't want people to have to figure it out from scratch so document it here. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan ---

[PATCH v9 07/21] appended signatures: Parse PKCS#7 signedData

2025-08-25 Thread Sudhakar Kuppusamy
. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/commands/appendedsig/appendedsig.h | 36 ++ grub-core/commands/appendedsig/pkcs7.c | 454 +++ 2 files changed

[PATCH v9 17/21] appended signatures: Introduce GRUB commands to access db and dbx

2025-08-25 Thread Sudhakar Kuppusamy
with an appended signature. 3. When append_add_dbx_hash executes, then the certificate/binary hash file must be signed with an appended signature. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 319 ++- include

[PATCH v9 21/21] docs/grub: Document appended signature

2025-08-25 Thread Sudhakar Kuppusamy
This explains how appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- docs/grub.texi | 405

[PATCH v9 16/21] appended signatures: Read default db keys from the ELF Note

2025-08-25 Thread Sudhakar Kuppusamy
: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/grub-core/commands/appendedsig/appendedsig.c b/grub-core/commands/appendedsig/appendedsig.c

[PATCH v9 08/21] appended signatures: Parse X.509 certificates

2025-08-25 Thread Sudhakar Kuppusamy
Usage extension and handle it by verifying that the certificate has a Code Signing usage. Signed-off-by: Javier Martinez Canillas # EKU support Reported-by: Michal Suchanek # key usage issue Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v9 15/21] powerpc_ieee1275: Introduce use_static_keys flag

2025-08-25 Thread Sudhakar Kuppusamy
tract the static keys from the GRUB ELF Note and stored in the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- .../kern/powerpc/ieee1275/platform_keystore.c | 21 ++- .../grub/powerpc/iee

[PATCH v9 18/21] appended signatures: Verification tests

2025-08-25 Thread Sudhakar Kuppusamy
These tests are run through all_functional_test and test a range of commands and behaviours. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/Makefile.core.def | 8

[PATCH v9 14/21] appended signatures: Using db and dbx lists for signature verification

2025-08-25 Thread Sudhakar Kuppusamy
Signature verification: verify the kernel against lists of hashes that are either in dbx or db list. If it is not in the dbx list then the trusted keys from the db list are used to verify the signature. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v9 02/21] crypto: Move storage for grub_crypto_pk_* to crypto.c

2025-08-25 Thread Sudhakar Kuppusamy
etc) use grub_crypto_lookup_cipher_by_name() to get a cipher handle. That depends on grub_ciphers being populated by people calling grub_cipher_register. import_gcry.py ensures that the symmetric ciphers call it.] Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by:

[PATCH v9 13/21] appended signatures: Create db and dbx lists

2025-08-25 Thread Sudhakar Kuppusamy
to the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 517 ++- include/grub/crypto.h| 1 + include/grub/efi/pks.h | 112

[PATCH v9 11/21] appended signatures: Introducting GRUB commands to manage the db list

2025-08-25 Thread Sudhakar Kuppusamy
4. append_verify: Verify the signed file using db list Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy --- grub-core/commands/appendedsig/appendedsig.c | 310 +++ 1 file changed, 310 insertions(+) diff --git a/grub-core/commands/appendedsig/appendedsig.c

[PATCH v9 12/21] powerpc_ieee1275: Read the db and dbx secure boot variables

2025-08-25 Thread Sudhakar Kuppusamy
c key management mode. Read keys from the GRUB ELF Note and use it for signature verification. Signed-off-by: Sudhakar Kuppusamy --- grub-core/Makefile.am | 2 + grub-core/Makefile.core.def | 2 + grub-core/kern/ieee1275/ieee1275.c

[PATCH v9 09/21] powerpc_ieee1275: Enter lockdown based on /ibm, secure-boot

2025-08-25 Thread Sudhakar Kuppusamy
sabled and enforced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- docs/grub.texi | 2 +- grub-core/Makefile.core.def| 1 + grub-core/kern/ieee1275/i

[PATCH v9 03/21] pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY

2025-08-25 Thread Sudhakar Kuppusamy
ertificate based PGP signature. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Daniel Kiper --- docs/grub.texi | 34 +- grub-core/commands/pgp.c | 2 +- include/grub/kernel.h|

[PATCH v9 06/21] appended signatures: Parse ASN1 node

2025-08-25 Thread Sudhakar Kuppusamy
require an extra NULL byte at the end - Bit strings because libtasn1 returns the length in bits, not bytes. If the function returns a non-NULL value, the caller must free it. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v9 00/21] Appended Signature Secure Boot Support for PowerPC

2025-08-25 Thread Sudhakar Kuppusamy
-engel1/2020/11/20/powervm-introduces-the-platform-keystore Daniel Axtens (2): crypto: Move storage for grub_crypto_pk_* to crypto.c docs/grub: Document signing GRUB under UEFI Sudhakar Kuppusamy (19): powerpc-ieee1275: Add support for signing GRUB with an appended signature pgp: Rename OBJ

[PATCH v9 05/21] appended signatures: Import GNUTLS's ASN.1 description files

2025-08-25 Thread Sudhakar Kuppusamy
/blob/master/lib/gnutls.asn - https://github.com/gnutls/gnutls/blob/master/lib/pkix.asn The GNUTLS license is LGPLv2.1+, which is GPLv3 compatible, allowing us to import it without issue. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v9 04/21] grub-install: Support embedding x509 certificates

2025-08-25 Thread Sudhakar Kuppusamy
D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- include/grub/kernel.h | 1 + include/grub/util/install.h | 3 +++ util/grub-install-common.c | 19 +- util

[PATCH v9 01/21] powerpc-ieee1275: Add support for signing GRUB with an appended signature

2025-08-25 Thread Sudhakar Kuppusamy
ture structure (not at the end) so that the final bytes of a signed ELF file are the appended signature magic. A subsequent patch documents how to create a GRUB core.img validly signed under this scheme. Signed-off-by: Rashmica Gupta Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusa

[PATCH v9 10/21] appended signatures: Support verifying appended signatures

2025-08-25 Thread Sudhakar Kuppusamy
automatically. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy --- grub-core/Makefile.core.def | 15 + grub-core/commands/appendedsig/appendedsig.c | 597 +++ include/grub/err.h | 3 +- include/grub/file.h

Re: [PATCH v8 11/20] powerpc_ieee1275: Read the db and dbx secure boot variables

2025-08-22 Thread Sudhakar Kuppusamy
Thank you Daniel for the review. > On 23 Aug 2025, at 12:23 AM, Daniel Kiper wrote: > > On Thu, Aug 21, 2025 at 01:25:04PM +0530, Sudhakar Kuppusamy wrote: >> Enhancing the infrastructure to enable the Platform Keystore (PKS) feature, >> which provides access to the SB

Re: [PATCH v8 10/20] appended signatures: Support verifying appended signatures

2025-08-22 Thread Sudhakar Kuppusamy
Thank you Daniel for the review. > On 21 Aug 2025, at 8:53 PM, Daniel Kiper wrote: > > On Thu, Aug 21, 2025 at 01:25:03PM +0530, Sudhakar Kuppusamy wrote: >> Building on the parsers and the ability to embed X.509 certificates, as >> well as the existing gcrypt functional

[PATCH v8 05/20] appended signatures: Import GNUTLS's ASN.1 description files

2025-08-21 Thread Sudhakar Kuppusamy
/blob/master/lib/gnutls.asn - https://github.com/gnutls/gnutls/blob/master/lib/pkix.asn The GNUTLS license is LGPLv2.1+, which is GPLv3 compatible, allowing us to import it without issue. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v8 02/20] crypto: Move storage for grub_crypto_pk_* to crypto.c

2025-08-21 Thread Sudhakar Kuppusamy
etc) use grub_crypto_lookup_cipher_by_name() to get a cipher handle. That depends on grub_ciphers being populated by people calling grub_cipher_register. import_gcry.py ensures that the symmetric ciphers call it.] Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by:

[PATCH v8 03/20] pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY

2025-08-21 Thread Sudhakar Kuppusamy
ertificate based PGP signature. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Daniel Kiper --- docs/grub.texi | 34 +- grub-core/commands/pgp.c | 2 +- include/grub/kernel.h|

Re: [PATCH v7 20/20] docs/grub: Document appended signature

2025-08-21 Thread Sudhakar Kuppusamy
> On 21 Aug 2025, at 12:14 PM, Gary Lin wrote: > > On Tue, Aug 19, 2025 at 06:43:23PM +0530, Sudhakar Kuppusamy wrote: >> This explains how appended signatures can be used to form part of >> a secure boot chain, and documents the commands and variables >> intro

[PATCH v8 06/20] appended signatures: Parse ASN1 node

2025-08-21 Thread Sudhakar Kuppusamy
require an extra NULL byte at the end - Bit strings because libtasn1 returns the length in bits, not bytes. If the function returns a non-NULL value, the caller must free it. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v8 15/20] appended signatures: Read default db keys from the ELF Note

2025-08-21 Thread Sudhakar Kuppusamy
If Secure Boot is enabled with dynamic key management mode and the use_static_keys flag is set, then read the static keys as a db default keys from the ELF Note and add them into the db. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core

[PATCH v8 01/20] powerpc-ieee1275: Add support for signing GRUB with an appended signature

2025-08-21 Thread Sudhakar Kuppusamy
ture structure (not at the end) so that the final bytes of a signed ELF file are the appended signature magic. A subsequent patch documents how to create a GRUB core.img validly signed under this scheme. Signed-off-by: Rashmica Gupta Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusa

[PATCH v8 13/20] appended signatures: Using db and dbx lists for signature verification

2025-08-21 Thread Sudhakar Kuppusamy
Signature verification: verify the kernel against lists of hashes that are either in dbx or db list. If it is not in the dbx list then the trusted keys from the db list are used to verify the signature. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v8 20/20] docs/grub: Document appended signature

2025-08-21 Thread Sudhakar Kuppusamy
This explains how appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- docs/grub.texi | 403

[PATCH v8 19/20] docs/grub: Document signing GRUB with an appended signature

2025-08-21 Thread Sudhakar Kuppusamy
Signing GRUB for firmware that verifies an appended signature is a bit fiddly. I don't want people to have to figure it out from scratch so document it here. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan ---

[PATCH v8 07/20] appended signatures: Parse PKCS#7 signedData

2025-08-21 Thread Sudhakar Kuppusamy
. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/commands/appendedsig/appendedsig.h | 36 ++ grub-core/commands/appendedsig/pkcs7.c | 454 +++ 2 files changed

[PATCH v8 04/20] grub-install: Support embedding x509 certificates

2025-08-21 Thread Sudhakar Kuppusamy
D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- include/grub/kernel.h | 1 + include/grub/util/install.h | 3 +++ util/grub-install-common.c | 19 +- util

[PATCH v8 17/20] appended signatures: Verification tests

2025-08-21 Thread Sudhakar Kuppusamy
These tests are run through all_functional_test and test a range of commands and behaviours. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/Makefile.core.def | 8

[PATCH v8 16/20] appended signatures: Introduce GRUB commands to access db and dbx

2025-08-21 Thread Sudhakar Kuppusamy
with an appended signature. 3. When append_add_dbx_hash executes, then the certificate/binary hash file must be signed with an appended signature. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 427 ++- include

[PATCH v8 08/20] appended signatures: Parse X.509 certificates

2025-08-21 Thread Sudhakar Kuppusamy
Usage extension and handle it by verifying that the certificate has a Code Signing usage. Signed-off-by: Javier Martinez Canillas # EKU support Reported-by: Michal Suchanek # key usage issue Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v8 11/20] powerpc_ieee1275: Read the db and dbx secure boot variables

2025-08-21 Thread Sudhakar Kuppusamy
c key management mode. Read keys from the GRUB ELF Note and use it for signature verification. Signed-off-by: Sudhakar Kuppusamy --- grub-core/Makefile.am | 2 + grub-core/Makefile.core.def | 2 + grub-core/kern/ieee1275/ieee1275.c

[PATCH v8 10/20] appended signatures: Support verifying appended signatures

2025-08-21 Thread Sudhakar Kuppusamy
Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core/Makefile.core.def | 15 + grub-core/commands/appendedsig/appendedsig.c | 793 +++ include/grub/err.h

[PATCH v8 12/20] appended signatures: Create db and dbx lists

2025-08-21 Thread Sudhakar Kuppusamy
not add that certificate/certificate hash to the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 497 ++- include/grub/crypto.h| 1 + include/grub/efi

[PATCH v8 09/20] powerpc_ieee1275: Enter lockdown based on /ibm, secure-boot

2025-08-21 Thread Sudhakar Kuppusamy
sabled and enforced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- docs/grub.texi | 2 +- grub-core/Makefile.core.def| 1 + grub-core/kern/ieee1275/i

[PATCH v8 14/20] powerpc_ieee1275: Introduce use_static_keys flag

2025-08-21 Thread Sudhakar Kuppusamy
tract the static keys from the GRUB ELF Note and stored in the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/kern/powerpc/ieee1275/platform_keystore.c | 13 - include/grub/powerpc/iee

[PATCH v8 18/20] docs/grub: Document signing GRUB under UEFI

2025-08-21 Thread Sudhakar Kuppusamy
From: Daniel Axtens Before adding information about how GRUB is signed with an appended signature scheme, it's worth adding some information about how it can currently be signed for UEFI. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Review

[PATCH v8 00/20] Appended Signature Secure Boot Support for PowerPC

2025-08-21 Thread Sudhakar Kuppusamy
o: Move storage for grub_crypto_pk_* to crypto.c docs/grub: Document signing GRUB under UEFI Sudhakar Kuppusamy (18): powerpc-ieee1275: Add support for signing GRUB with an appended signature pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY grub-install: Support embedding x509 certi

Re: [PATCH v7 12/20] appended signatures: Create db and dbx lists

2025-08-20 Thread Sudhakar Kuppusamy
> On 21 Aug 2025, at 8:38 AM, Gary Lin wrote: > > On Thu, Aug 21, 2025 at 10:34:18AM +0800, Gary Lin wrote: >> On Tue, Aug 19, 2025 at 06:43:15PM +0530, Sudhakar Kuppusamy wrote: >>> If secure boot is enabled with static key management mode, the trusted >>> ce

[PATCH v7 01/20] powerpc-ieee1275: Add support for signing GRUB with an appended signature

2025-08-19 Thread Sudhakar Kuppusamy
ture structure (not at the end) so that the final bytes of a signed ELF file are the appended signature magic. A subsequent patch documents how to create a GRUB core.img validly signed under this scheme. Signed-off-by: Rashmica Gupta Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusa

[PATCH v7 15/20] appended signatures: Read default db keys from the ELF Note

2025-08-19 Thread Sudhakar Kuppusamy
If Secure Boot is enabled with dynamic key management mode and the use_static_keys flag is set, then read the static keys as a db default keys from the ELF Note and add them into the db. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core

[PATCH v7 02/20] crypto: Move storage for grub_crypto_pk_* to crypto.c

2025-08-19 Thread Sudhakar Kuppusamy
etc) use grub_crypto_lookup_cipher_by_name() to get a cipher handle. That depends on grub_ciphers being populated by people calling grub_cipher_register. import_gcry.py ensures that the symmetric ciphers call it.] Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by:

[PATCH v7 18/20] docs/grub: Document signing GRUB under UEFI

2025-08-19 Thread Sudhakar Kuppusamy
From: Daniel Axtens Before adding information about how GRUB is signed with an appended signature scheme, it's worth adding some information about how it can currently be signed for UEFI. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Review

[PATCH v7 16/20] appended signatures: Introduce GRUB commands to access db and dbx

2025-08-19 Thread Sudhakar Kuppusamy
with an appended signature. 3. When append_add_dbx_hash executes, then the certificate/binary hash file must be signed with an appended signature. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 426 ++- include

[PATCH v7 10/20] appended signatures: Support verifying appended signatures

2025-08-19 Thread Sudhakar Kuppusamy
: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core/Makefile.core.def | 15 + grub-core/commands/appendedsig/appendedsig.c | 783 +++ include/grub/err.h | 3

[PATCH v7 19/20] docs/grub: Document signing GRUB with an appended signature

2025-08-19 Thread Sudhakar Kuppusamy
Signing GRUB for firmware that verifies an appended signature is a bit fiddly. I don't want people to have to figure it out from scratch so document it here. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan ---

[PATCH v7 20/20] docs/grub: Document appended signature

2025-08-19 Thread Sudhakar Kuppusamy
This explains how appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- docs/grub.texi | 401

[PATCH v7 11/20] powerpc_ieee1275: Read the db and dbx secure boot variables

2025-08-19 Thread Sudhakar Kuppusamy
m for signature verification. 0 - Enable static key management mode. Read keys from the GRUB ELF Note and use it for signature verification. Signed-off-by: Sudhakar Kuppusamy --- grub-core/Makefile.am | 2 + grub-core/Makefile.core.def | 2 + grub-core

[PATCH v7 05/20] appended signatures: Import GNUTLS's ASN.1 description files

2025-08-19 Thread Sudhakar Kuppusamy
/blob/master/lib/gnutls.asn - https://github.com/gnutls/gnutls/blob/master/lib/pkix.asn The GNUTLS license is LGPLv2.1+, which is GPLv3 compatible, allowing us to import it without issue. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v7 14/20] powerpc_ieee1275: Introduce use_static_keys flag

2025-08-19 Thread Sudhakar Kuppusamy
tract the static keys from the GRUB ELF Note and stored in the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/kern/powerpc/ieee1275/platform_keystore.c | 12 +++- include/grub/powerpc/iee

[PATCH v7 17/20] appended signatures: Verification tests

2025-08-19 Thread Sudhakar Kuppusamy
These tests are run through all_functional_test and test a range of commands and behaviours. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/Makefile.core.def | 8

[PATCH v7 12/20] appended signatures: Create db and dbx lists

2025-08-19 Thread Sudhakar Kuppusamy
not add that certificate/certificate hash to the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 452 ++- include/grub/crypto.h| 1 + include/grub/efi

[PATCH v7 09/20] powerpc_ieee1275: Enter lockdown based on /ibm, secure-boot

2025-08-19 Thread Sudhakar Kuppusamy
sabled and enforced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- docs/grub.texi | 2 +- grub-core/Makefile.core.def| 1 + grub-core/kern/ieee1275/i

[PATCH v7 13/20] appended signatures: Using db and dbx lists for signature verification

2025-08-19 Thread Sudhakar Kuppusamy
Signature verification: verify the kernel against lists of hashes that are either in dbx or db list. If it is not in the dbx list then the trusted keys from the db list are used to verify the signature. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v7 00/20] Appended Signature Secure Boot Support for PowerPC

2025-08-19 Thread Sudhakar Kuppusamy
logs/chris-engel1/2020/11/20/powervm-introduces-the-platform-keystore Daniel Axtens (2): crypto: Move storage for grub_crypto_pk_* to crypto.c docs/grub: Document signing GRUB under UEFI Sudhakar Kuppusamy (16): powerpc-ieee1275: Add support for signing GRUB with an appended signature pgp:

[PATCH v7 06/20] appended signatures: Parse ASN1 node

2025-08-19 Thread Sudhakar Kuppusamy
require an extra NULL byte at the end - Bit strings because libtasn1 returns the length in bits, not bytes. If the function returns a non-NULL value, the caller must free it. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan

[PATCH v7 07/20] appended signatures: Parse PKCS#7 signedData

2025-08-19 Thread Sudhakar Kuppusamy
. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/commands/appendedsig/appendedsig.h | 36 ++ grub-core/commands/appendedsig/pkcs7.c | 454 +++ 2 files changed

[PATCH v7 08/20] appended signatures: Parse X.509 certificates

2025-08-19 Thread Sudhakar Kuppusamy
Usage extension and handle it by verifying that the certificate has a Code Signing usage. Signed-off-by: Javier Martinez Canillas # EKU support Reported-by: Michal Suchanek # key usage issue Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by

[PATCH v7 04/20] grub-install: Support embedding x509 certificates

2025-08-19 Thread Sudhakar Kuppusamy
D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- include/grub/kernel.h | 1 + include/grub/util/install.h | 3 +++ util/grub-install-common.c | 19 +- util

[PATCH v7 03/20] pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY

2025-08-19 Thread Sudhakar Kuppusamy
ertificate based PGP signature. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Daniel Kiper --- docs/grub.texi | 34 +- grub-core/commands/pgp.c | 2 +- include/grub/kernel.h|

Re: [PATCH v6 20/20] docs/grub: Document appended signature

2025-08-14 Thread Sudhakar Kuppusamy
Thank you Daniel. > On 14 Aug 2025, at 7:50 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:56PM +0530, Sudhakar Kuppusamy wrote: >> This explains how appended signatures can be used to form part of >> a secure boot chain, and documents the commands and va

Re: [PATCH v6 19/20] docs/grub: Document signing GRUB with an appended signature

2025-08-13 Thread Sudhakar Kuppusamy
Thank you Daniel. > On 13 Aug 2025, at 10:15 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:55PM +0530, Sudhakar Kuppusamy wrote: >> Signing GRUB for firmware that verifies an appended signature is a >> bit fiddly. I don't want people to have to figure

Re: [PATCH v6 16/20] appended signatures: Introduce GRUB commands to access db and dbx

2025-08-13 Thread Sudhakar Kuppusamy
Thank you Daniel. > On 13 Aug 2025, at 9:12 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:52PM +0530, Sudhakar Kuppusamy wrote: >> Introducing the following db and dbx commands >> >> 1. append_list_db: >> Show the list of trusted certificat

Re: [PATCH v6 15/20] appended signatures: Read default db keys from the ELF Note

2025-08-13 Thread Sudhakar Kuppusamy
> On 13 Aug 2025, at 8:13 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:51PM +0530, Sudhakar Kuppusamy wrote: >> If Secure Boot is enabled with dynamic key management mode and the >> use_static_keys flag is set, then read the static keys as a db default >

Re: [PATCH v6 10/20] appended signatures: Support verifying appended signatures

2025-08-13 Thread Sudhakar Kuppusamy
> On 13 Aug 2025, at 8:03 PM, Daniel Kiper wrote: > > On Tue, Aug 12, 2025 at 05:16:22PM +0530, Sudhakar Kuppusamy wrote: >>> On 12 Aug 2025, at 5:00 PM, Daniel Kiper wrote: >>> On Tue, Aug 12, 2025 at 10:30:55AM +0530, Sudhakar Kuppusamy wrote: >>>>

Re: [PATCH v6 10/20] appended signatures: Support verifying appended signatures

2025-08-12 Thread Sudhakar Kuppusamy
> On 12 Aug 2025, at 5:00 PM, Daniel Kiper wrote: > > On Tue, Aug 12, 2025 at 10:30:55AM +0530, Sudhakar Kuppusamy wrote: >> Thank you Daniel. >> >>> On 11 Aug 2025, at 9:24 PM, Daniel Kiper wrote: >>> On Tue, Jul 29, 2025 at 08:

Re: [PATCH v6 10/20] appended signatures: Support verifying appended signatures

2025-08-11 Thread Sudhakar Kuppusamy
Thank you Daniel. > On 11 Aug 2025, at 9:24 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:46PM +0530, Sudhakar Kuppusamy wrote: >> Building on the parsers and the ability to embed X.509 certificates, as >> well as the existing gcrypt functionality, add a

Re: [PATCH v6 12/20] appended signatures: Create db and dbx lists

2025-08-11 Thread Sudhakar Kuppusamy
Thank you Daniel. > On 11 Aug 2025, at 10:51 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:48PM +0530, Sudhakar Kuppusamy wrote: >> If secure boot is enabled with static key management mode, the trusted >> certificates will be extracted from the GRUB ELF Note

Re: [PATCH v6 11/20] powerpc_ieee1275: Read the db and dbx secure boot variables

2025-08-11 Thread Sudhakar Kuppusamy
Thank you Daniel. > On 11 Aug 2025, at 9:54 PM, Daniel Kiper wrote: > > On Tue, Jul 29, 2025 at 08:21:47PM +0530, Sudhakar Kuppusamy wrote: >> Enhancing the infrastructure to enable the Platform Keystore (PKS) feature, >> which provides access to the SB_VERSION, db

Re: [PATCH v4 04/23] pgp: Factor out rsa_pad

2025-07-31 Thread Sudhakar Kuppusamy
> On 24 Jul 2025, at 2:25 PM, Gary Lin wrote: > > On Wed, Jul 09, 2025 at 05:15:21PM +0530, Sudhakar Kuppusamy wrote: >> From: Daniel Axtens >> >> rsa_pad does the PKCS#1 v1.5 padding for the RSA signature scheme. >> We want to use it in other RSA si

[PATCH v6 20/20] docs/grub: Document appended signature

2025-07-29 Thread Sudhakar Kuppusamy
This explains how appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- docs/grub.texi | 232

[PATCH v6 16/20] appended signatures: Introduce GRUB commands to access db and dbx

2025-07-29 Thread Sudhakar Kuppusamy
append_add_dbx_hash executes, then the certificate/binary hash file must be signed. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Avnish Chouhan --- grub-core/commands/appendedsig/appendedsig.c | 377 ++- include/grub/file.h | 2 + 2 files changed

[PATCH v6 14/20] powerpc_ieee1275: Introduce use_static_keys flag

2025-07-29 Thread Sudhakar Kuppusamy
tract the static keys from the GRUB ELF Note and stored in the db list. Signed-off-by: Sudhakar Kuppusamy Reviewed-by: Stefan Berger Reviewed-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub-core/kern/powerpc/ieee1275/platform_keystore.c | 12 +++- include/grub/powerpc/iee

  1   2   3   4   >