Re: Derive encryption key from PIN

Ondrej Kozina <[email protected]> Tue, 14 Jul 2026 12:57:52 +0200
Newsgroups dev.linux.lists.cryptsetup
Message-ID <[email protected]>
Hi,

On 14/07/2026 12:27, oSumAtrIX wrote:
> Hello,
> 
> I found this email in the README of the cryptsetup GitLab repository.
> 
> I am reaching out because I noticed that the PIN used to unseal the
> decryption key from the TPM is not used to derive the decryption key.
> The PIN is merely used as a policy, when it can also function in a
> cryptographic context. The sealed key can further be encrypted with
> the PIN, so that even a full compromise of the TPM including the
> sealed key does not reveal the decryption key in cleartext. According
> to
> https://www.sstic.org/media/SSTIC2011/SSTIC-actes/bitlocker/SSTIC2011-Slides-bitlocker-bordes.pdf
> BitLocker implements a KDF from the TPM PIN, but it seems to be
> missing in LUKS.

What do we talk about? systemd-tpm2 cryptsetup plugin? IIUCT it uses 
secret stored in TPM2 to get LUKS2 keyslot passphrase or KEK. The KEK 
later enter KDF to derive keyslot encryption key. And the keyslot 
contains encrypted volume key (MEK).

Or, there's some other plugin or application that seals the actual 
volume key?!

If there's something that could be improved in systemd-tmp2 plugin, 
please open RFE on systemd. They maintain the plugins for cryptsetup.

Best regards
O.