Go to file
Peter Robinson d785af756a Fix the tpm2-policy dep
The tpm2-policy 0.4.0 release has been published so no need to
rely on a local checkout.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2021-04-06 12:51:48 +01:00
src Rebase on tss-esapi 5.0 and tpm2-policy 0.4 2021-04-06 09:45:14 +02:00
tests Add test that no use_policy is not fatal yet 2020-12-03 16:45:18 +00:00
.gitignore Generate a new key and signed policy during the test 2020-07-22 16:46:54 +02:00
Cargo.toml Fix the tpm2-policy dep 2021-04-06 12:51:48 +01:00
LICENSE Initial commit 2020-07-16 16:22:34 +02:00
README.md Add some policy instructions to the README 2020-07-22 16:38:36 +02:00

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.