Skip to content

Add --custom-tlv-pubkey-der option to signing tool#834

Open
mattia-moffa wants to merge 2 commits into
wolfSSL:masterfrom
mattia-moffa:20260724-custom-tlv-pubkey-der
Open

Add --custom-tlv-pubkey-der option to signing tool#834
mattia-moffa wants to merge 2 commits into
wolfSSL:masterfrom
mattia-moffa:20260724-custom-tlv-pubkey-der

Conversation

@mattia-moffa

Copy link
Copy Markdown
Member

Allows extracting a public key from a DER file and adding it in the same format as the keystore:

  • X||Y for ECC
  • Raw for Ed25519/Ed448
  • Public key DER for RSA

Fixes #828 (comment)

Allows extracting a public key from a DER file and adding it in the same
format as the keystore:

- `X||Y` for ECC
- Raw for Ed25519/Ed448
- Public key DER for RSA
@mattia-moffa mattia-moffa self-assigned this Jul 24, 2026
Copilot AI review requested due to automatic review settings July 24, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new signing-tool CLI option to populate custom manifest TLVs from a DER-encoded public key file, converting the key material into the same byte format used by wolfBoot’s keystore. This supports embedding application-level public keys into the signed manifest without manual ASN.1 manipulation.

Changes:

  • Add --custom-tlv-pubkey-der tag filename to tools/keytools/sign, including DER parsing for ECC/Ed25519/Ed448/RSA.
  • Extract and store public key material in keystore-compatible formats (ECC X||Y, EdDSA raw pubkey, RSA public key DER).
  • Document the new option and its behavior in docs/Signing.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/keytools/sign.c Implements DER public-key import/extraction and adds the new CLI option to create custom TLVs from it.
docs/Signing.md Documents --custom-tlv-pubkey-der, its tag constraints, and the stored-value formats per algorithm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/keytools/sign.c
Comment thread tools/keytools/sign.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants