cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
* [cip-dev][isar-cip-core][PATCH v4 0/7] Encrypt Partition in initramfs
@ 2023-03-06 12:39 Quirin Gylstorff
  2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 1/7] use bullseye backports for systemd-cryptenroll Quirin Gylstorff
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Quirin Gylstorff @ 2023-03-06 12:39 UTC (permalink / raw)
  To: cip-dev, christian.storm, jan.kiszka

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This encrypts a partition with LUKS and uses the TPM2 to unlock the partition during
boot. 

Adapt start-qemu to support tpm2.

The implementation uses systemd-cryptenroll to add the TPM protected
passphrase to the LUKS header. systemd-cryptenroll was added with systemd version > 248.

The following table shows the support of systemd-cryptenroll in Debian
release.

| Debian version | systemd-cryptenroll suppported |
| Buster(10)     | No                             |
| Bullseye(11)   | with backports                 |
| Bookworm(12)   | yes                            |

I am currently testing a adaptation for Debian 11 (Bullseye) with 
clevis instead of systemd-cryptenroll. If clevis works I will sent a
additional patch.

Changes v2:
 - rewrite for multiple partition
 - add rencrypt for populated partitions
 - encrypt /var and /home

Changes v3:
 - remove additional partition crypt_data
 - add Readme
 - fix KConfig
 - only systemd is from backports
 - start-qemu now checks .config.yaml for TPM2 support
 - correct whitespaces

Changes v4:
 - whitespaces
 - README add requirements for systemd 248
 - Kconfig add help information
 - adapt commit message of patch 4 (add information about extra-space)

Quirin Gylstorff (7):
  use bullseye backports for systemd-cryptenroll
  KConfig: add tpm option
  start-qemu.sh: Create a tpm2 device
  Add initramfs hook to encrypt a partition
  overlay: add prerequisite 'encrypt_partition'
  .gitlabci: Add ci build
  Add README for encrypted partitions

 .gitlab-ci.yml                                |  13 ++
 Kconfig                                       |  11 ++
 conf/distro/debian-bullseye-backports.list    |   1 +
 .../preferences.bullseye-backports.tpm.conf   |   4 +
 doc/README.tpm2.encryption.md                 |  55 +++++++
 kas/opt/tpm.yml                               |  20 +++
 .../files/encrypt_partition.env.tmpl          |   2 +
 .../files/encrypt_partition.hook              |  53 +++++++
 .../files/encrypt_partition.script            | 145 ++++++++++++++++++
 .../initramfs-crypt-hook_0.1.bb               |  40 +++++
 .../initramfs-overlay-hook/files/overlay.hook |   1 +
 .../files/overlay.script.tmpl                 |  12 +-
 .../initramfs-overlay-hook_0.1.bb             |   2 +-
 start-qemu.sh                                 |  27 +++-
 wic/x86-efibootguard.wks.in                   |   5 +-
 15 files changed, 378 insertions(+), 13 deletions(-)
 create mode 100644 conf/distro/debian-bullseye-backports.list
 create mode 100644 conf/distro/preferences.bullseye-backports.tpm.conf
 create mode 100644 doc/README.tpm2.encryption.md
 create mode 100644 kas/opt/tpm.yml
 create mode 100644 recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.env.tmpl
 create mode 100644 recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.hook
 create mode 100644 recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
 create mode 100644 recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb

-- 
2.39.2



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-09  7:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06 12:39 [cip-dev][isar-cip-core][PATCH v4 0/7] Encrypt Partition in initramfs Quirin Gylstorff
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 1/7] use bullseye backports for systemd-cryptenroll Quirin Gylstorff
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 2/7] KConfig: add tpm option Quirin Gylstorff
2023-03-06 17:27   ` Jan Kiszka
2023-03-07 18:32     ` Gylstorff Quirin
2023-03-09  7:32       ` Jan Kiszka
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 3/7] start-qemu.sh: Create a tpm2 device Quirin Gylstorff
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 4/7] Add initramfs hook to encrypt a partition Quirin Gylstorff
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 5/7] overlay: add prerequisite 'encrypt_partition' Quirin Gylstorff
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 6/7] .gitlabci: Add ci build Quirin Gylstorff
2023-03-06 12:39 ` [cip-dev][isar-cip-core][PATCH v4 7/7] Add README for encrypted partitions Quirin Gylstorff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).