8000 Integration with a TPM · Issue #285 · gitbls/sdm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Integration with a TPM #285
Open
Open
@ncul777

Description

@ncul777

Hi There,

I successfully managed to encrypt the room partition (Raspberry Pi 4B) using your script https://github.com/gitbls/sdm/blob/master/Docs/Disk-Encryption.md.
sudo sdm-cryptconfig --crypto xchacha

I'd like to use LetsTrust TPM to securely store the decryption key so that the root partition would auto decrypt/mount on boot (no need to manually enter password).
https://thepihut.com/products/letstrust-tpm-for-raspberry-pi?srsltid=AfmBOorMdJljiZzFQb3_5Vs4V3cKBwqbeUDvbIbudr7b5chUJCCtwSd-

I've tried to get it working but boot either continues to ask for password or shows initramfs prompt (if I have used update-initramfs as per step 7). I had successfully used the TPM to auto decrypt an encrypted file on /root, so it should be along these lines (after root has already been encrypted using sdm):

  1. Enable the tpm in /boot/firmware/config.txt
    dtoverlay=tpm-slb9670

  2. Install tpm packages

sudo apt --yes install libtss2-* tpm-udev tpm2-abrmd tpm2-tools
sudo usermod --append --groups tss $(whoami)
sudo reboot
  1. Reboot
    sudo reboot

  2. Test tpm
    tpm2 getcap properties-fixed

  3. Enroll the disk with tpm
    sudo systemd-cryptenroll --tpm2-device=auto

  1. Update /etc/crypttab
    cryptroot /dev/mmcblk0p2 none tpm2-device=auto,discard

  2. Update initramfs
    sudo update-initramfs -u

Maybe I need to include some tpm modules in /etc/initramfs-tools/modules?

So wondering

  1. Any suggestions / ideas how to debug / resolve?
  2. Could support be integrated in your scripts.

Any help much appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0