mail archive of the rauc mailing list
 help / color / mirror / Atom feed
From: Evan Edstrom <evan@evanedstrom.com>
To: rauc@pengutronix.de
Subject: [RAUC] RAUC bundle encryption, design question
Date: Mon, 20 Aug 2018 11:39:31 -0700	[thread overview]
Message-ID: <CANg8e8LQJAvwYxdHkQuzRbunK+YE8yg1VfcvoPRdX4pKP3hj3A@mail.gmail.com> (raw)

I am using RAUC for a commercial product, and one of the things we
need to accomplish is to encrypt our update bundles. I've manually
created an encrypted rauc bundle using a LUKS container. Once the
container is opened it can be mounted like normal as a squashfs
partition and used by RAUC.

This seems generally useful; if this is something you'd like to see in
the project I'd be happy to contribute and submit a pull request. I
wanted to seek your input before I begin about the proper scope for
this, as it could be achieved in many different ways. Here are the two
methods I've narrowed in on.

* Option 1:
Provide an optional "decryption handler" for the user to implement
which provides the bundle path and mount point. A user would implement
their decrypt and mount steps as needed. If the config file defines
this handler, the update process would essentially run the handler
instead of r_mount_loop() in bundle.c.

This gives a user the most flexibility as they're not locked into any
particular encryption method or even bundle format. Bundle creation gets
a little more tricky as there isn't a concept of handlers built in. Could have
an optional argument which provides a mounted and empty bundle.

* Option 2:
Implement encryption support directly into RAUC as a compile option.
This could create an encrypted bundle and decrypt and mount during
install time.

This is much easier to use and allows easy encrypted bundle creation,
but is quite a bit less flexible. It also adds a dependency, like
cryptsetup, to the project.


For either option, there is the possibility of inspecting a bundle
file's header and knowing whether to run the default mount function or
the handler. This would be useful if you thought clients should be
able to accept either encrypted or unencrypted bundles.

Perhaps there is a much better way to do this than I've thought of.
I'd love to hear your thoughts on this.

Best,
Evan Edstrom

_______________________________________________
RAUC mailing list

             reply	other threads:[~2018-08-20 18:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 18:39 Evan Edstrom [this message]
2018-08-21  8:03 ` Jan Lübbe
2018-08-22 20:27   ` Evan Edstrom
2018-08-23  9:03     ` Jan Lübbe
2018-08-23 19:13       ` Evan Edstrom

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=CANg8e8LQJAvwYxdHkQuzRbunK+YE8yg1VfcvoPRdX4pKP3hj3A@mail.gmail.com \
    --to=evan@evanedstrom.com \
    --cc=rauc@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox