Go to file
Vivian aafcd1bbf7 changed into a lib 2023-12-18 22:03:30 +01:00
.github/workflows chore: add clang-devel for ci build 2023-07-28 10:54:31 +01:00
src changed into a lib 2023-12-18 22:03:30 +01:00
tests Re-enable policy test 2021-12-08 15:24:45 +01:00
.envrc changed into a lib 2023-12-18 22:03:30 +01:00
.gitignore changed into a lib 2023-12-18 22:03:30 +01:00
Cargo.toml feat: bump version to 0.5.3 2023-07-28 10:54:36 +01:00
LICENSE relicense to MIT 2021-12-09 12:12:37 +01:00
README.md Add some policy instructions to the README 2020-07-22 16:38:36 +02:00
flake.lock changed into a lib 2023-12-18 22:03:30 +01:00
flake.nix changed into a lib 2023-12-18 22:03:30 +01:00

README.md

clevis-pin-tpm2

Rewritten Clevis TPM2 PIN

This rewrite supports all previously encrypted values of the PCR-only clevis TPM2 PIN. Additionally, it supports Authorized Policies to delegate authorization of PCR values to an external party.

Creating policies

A reference implementation has been made available for creating policies as parsed by this pin. To use this, first create a policy (see instructions in the repository) and take the output signed policy and the public key JSON. These files need to be available when the PIN runs, so if the pin is used to encrypt the filesystem root, it will probably need to be in /boot. Then run: $binary encrypt '{"policy_pubkey_path": "/boot/policy_pubkey.json", "policy_ref": "", "policy_path": "/boot/policy.json"}' <somefile. This results in an encrypted blob. During the encryption, the policy pubkey needs to exist, the policy does not.

To decrypt this blob, the file specified in the policy_path during encrypt needs to contain a policy that matches the policy_ref with any steps that would match the current PCRs of the system. If that's the case, $binary decrypt <blob will return the contents of the original file back.