From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 0/7] Add support for encrypted blobs
Date: Fri, 12 Apr 2019 12:14:55 +0200 [thread overview]
Message-ID: <20190412101502.11904-1-s.hauer@pengutronix.de> (raw)
This series adds support for encrypting data blobs and storing them in
environment variables. This blobs are encrypted using the CAAM on i.MX6
and the SCC engine on i.MX25. The keys used are tied to the hardware and
are only visible to the crypto engines and only in secure booting mode,
so ideally suited for storing secrets in a trusted environment.
Primary usage is anticipated mainly from C code, but there's also a
"blobgen" command which can be used to en/decrypt messages:
# blobgen -e -m user:foo -V encrypted "Hello Sascha"
# echo $encrypted
A0YHeGTElYQMsUfT7mtL6zow9i32XIGBkG5hBKryWFVbxtHz+3Rb9I+a/mPsNslV9ImlVVG2M/n3j9AP
# blobgen -d -m user:foo -V message $encrypted
# echo $message
Hello Sascha
Sascha
Sascha Hauer (1):
crypto/caam: Add missing include
Steffen Trumtrar (6):
lib: add base64 helpers
include: crypto: import des.h from kernel
include: crypto: import ablkcipher struct from kernel
lib: add blobgen framework
crypto: add new imx-scc driver
crypto: caam: add blobgen driver
commands/Kconfig | 10 +
commands/Makefile | 1 +
commands/blobgen.c | 122 +++++++
drivers/crypto/Kconfig | 1 +
drivers/crypto/Makefile | 1 +
drivers/crypto/caam/Makefile | 1 +
drivers/crypto/caam/caam-blobgen.c | 229 ++++++++++++
drivers/crypto/caam/ctrl.c | 9 +
drivers/crypto/caam/intern.h | 1 +
drivers/crypto/caam/rng_self_test.c | 1 +
drivers/crypto/imx-scc/Kconfig | 14 +
drivers/crypto/imx-scc/Makefile | 2 +
drivers/crypto/imx-scc/scc-blobgen.c | 159 +++++++++
drivers/crypto/imx-scc/scc.c | 504 +++++++++++++++++++++++++++
drivers/crypto/imx-scc/scc.h | 13 +
include/base64.h | 9 +
include/blobgen.h | 58 +++
include/crypto.h | 27 ++
include/crypto/des.h | 16 +
lib/Kconfig | 6 +
lib/Makefile | 2 +
lib/base64.c | 154 ++++++++
lib/blobgen.c | 223 ++++++++++++
23 files changed, 1563 insertions(+)
create mode 100644 commands/blobgen.c
create mode 100644 drivers/crypto/caam/caam-blobgen.c
create mode 100644 drivers/crypto/imx-scc/Kconfig
create mode 100644 drivers/crypto/imx-scc/Makefile
create mode 100644 drivers/crypto/imx-scc/scc-blobgen.c
create mode 100644 drivers/crypto/imx-scc/scc.c
create mode 100644 drivers/crypto/imx-scc/scc.h
create mode 100644 include/base64.h
create mode 100644 include/blobgen.h
create mode 100644 include/crypto.h
create mode 100644 include/crypto/des.h
create mode 100644 lib/base64.c
create mode 100644 lib/blobgen.c
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2019-04-12 10:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 10:14 Sascha Hauer [this message]
2019-04-12 10:14 ` [PATCH 1/7] crypto/caam: Add missing include Sascha Hauer
2019-04-12 10:14 ` [PATCH 2/7] lib: add base64 helpers Sascha Hauer
2019-04-12 10:14 ` [PATCH 3/7] include: crypto: import des.h from kernel Sascha Hauer
2019-04-12 10:14 ` [PATCH 4/7] include: crypto: import ablkcipher struct " Sascha Hauer
2019-04-12 10:15 ` [PATCH 5/7] lib: add blobgen framework Sascha Hauer
2019-04-12 10:15 ` [PATCH 6/7] crypto: add new imx-scc driver Sascha Hauer
2019-04-12 10:15 ` [PATCH 7/7] crypto: caam: add blobgen driver Sascha Hauer
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=20190412101502.11904-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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