All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Willem Janssen <j.w.janssen@lxtreme.nl>
To: buildroot@busybox.net
Subject: [Buildroot] fitImage: proposal to sign images into fitImage
Date: Mon, 22 Jul 2019 10:42:35 +0200	[thread overview]
Message-ID: <8709f741816ed0a3933a31e7da0b1784f0d44744.camel@lxtreme.nl> (raw)
In-Reply-To: <994ab8c3-bf81-2b91-946a-8281105bfc36@smile.fr>

On Mon, 2019-07-22 at 09:07 +0200, Micka?l Tansorier wrote:
> Hello,
> 
> In project, I worked to add option in builroot to sign kernel and 
> devicetree image for fitImage.
> 
> Uboot support fitImage signature check, but buildroot have no option to 
> build fitImage with specific signature.
> 
> I would like to propose patch, but I'm not sure about the best practice 
> to do that. Have you any suggestion ?
> I can send you my patch (draft) to improve it.

Cool, I think this could be a very useful addition to buildroot! You can just mail your
patch against the buildroot repo to this mailing list (see [1]) to get feedback on it.

> 
> My idea is to add variables to get path of `its` file, `dts` to describe 
> public key for uboot, and server where to download keys to sign in 
> Config.in.
> Then in `uboot.mk`:
>   - I download keys
>   - I replace kernel name, dtb name, and keys name in `its` file. (To 
> get right path to its).
>   - I replace keys name in `dts` file
>   - I compile `dts` to `dtb` with space to add pubic key
>   - I compile fitImage with `mkimage`

That is more or less what I do as well to create my own signed images (only using a custom
post-image script). Only, I use a small HSM which needs to be addressed through PKCS#11
which requires some tricks to work properly (I can expand on the details if needed).

One thing that we need to be careful of is the "key management", or how do we ensure that
the signing key is not lingering around for longer than necessary or might not even be
physically available (in case of a HSM).

Other than this, I think it would be a nice addition to buildroot!

Regards,

  Jan Willem


1. https://buildroot.org/downloads/manual/manual.html#patch-policy

  reply	other threads:[~2019-07-22  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22  7:07 [Buildroot] fitImage: proposal to sign images into fitImage Mickaël Tansorier
2019-07-22  8:42 ` Jan Willem Janssen [this message]
2019-07-22 10:01   ` Mickaël Tansorier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8709f741816ed0a3933a31e7da0b1784f0d44744.camel@lxtreme.nl \
    --to=j.w.janssen@lxtreme.nl \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.