I understand the general operation of a TPM, and in particular the interest of using a pre-boot PIN: if someone gets access to the machine (turned off), turning on the computer will not be enough to get the keys stored in the TPM and thus decrypt the data.
I wonder how this PIN is used by the TPM? And how effective is it? For example, I know that it is possible to carry out physical attacks on the TPM, and some of these attacks can potentially extract secrets.
But naively, I imagine that if these secrets (let us say the master key of a BitLocker drive) are encrypted with the PIN, it is virtually impossible to obtain these secrets without knowing this PIN (unless attacking directly the encryption algorithm underlying). Is this how it works? Or the secrets are stored in clear, and the TPM releases them simply after checking that the PIN is correct?
Finally, I know that in a scenario where an attacker obtains total physical access, it is always possible to circumvent such measures (physical keylogger to retrieve the PIN, etc.). But the scenario I have in mind is that an attacker steals a laptop that is turned off (so no DMA attacks, cold boot attacks, etc.) with a disk encrypted with the key stored in the TPM with a PIN. Assuming this attacker is able to perform a physical attack (bypass anti-tamper protections, etc.) can they recover the secrets without knowing the PIN and without interaction with the legitimate user?