]> git.ipfire.org Git - thirdparty/systemd.git/commit
tpm2-util: add generic helpers for sealing/unsealing data
authorLennart Poettering <lennart@poettering.net>
Mon, 23 Oct 2023 08:30:25 +0000 (10:30 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 3 Nov 2023 10:22:55 +0000 (11:22 +0100)
commitce80da02b87ad02fbf119e094869919a804a79b0
tree083f498e136ae1da6969ffd46abc21145e26ccac
parent48d060564a9f796a311cad366b1edc9f5ee91ec5
tpm2-util: add generic helpers for sealing/unsealing data

These helpers tpm2_seal_data()/tpm2_unseal_data() are useful for
sealing/unsealing data without any further semantics around them. This
is different from the existing tpm2_seal()/tpm2_unseal() which seal with
a specific policy and serialize in a specific way, as we use it for disk
encryption.

These new helpers are more generic, they do not serialize in a specific
way or imply policy, they are just the core of the sealing/unsealing.

(We should look into porting tpm2_seal()/tpm2_unseal() onto these new
helpers, but this isn#t trivial, since the classic serialization we use
uses a merged marshalling of private/public key, which we'd have to
change in one way or another)
src/shared/tpm2-util.c
src/shared/tpm2-util.h