| ▲ | wang_li 21 hours ago | ||||||||||||||||
I know the title says "in your TPM chip" but the method described does not store your private key in the TPM, it stores it in a PKCS keystore which is encrypted by a key in your TPM. In actual use the plaintext of your private ssh key still shows up in your ssh client for validation to the remote host. The recommended usage of a yubikey for ssh does something similar as otherwise your key consumes one of the limited number of slots on the key. | |||||||||||||||||
| ▲ | Liskni_si 21 hours ago | parent | next [-] | ||||||||||||||||
I really don't think this is true for FIDO2 like Yubikey. My understanding is that your ssh client gets a challenge from the server, reads the key "handle" from the private key file, and sends both to Yubikey. The device then combines its master key with the handle to get the actual private key, signs the challenge, and gives the result back to your ssh client. At no point does the private key leave the Yubikey. What am I missing? | |||||||||||||||||
| |||||||||||||||||
| ▲ | tiberious726 19 hours ago | parent | prev | next [-] | ||||||||||||||||
This article's method is bad, basically the same as systemd-creds (not itself bad, just extremely compatible), take a look at tpm-ssh-agent or gnupg for how to do that part the right way (the party they don't do right is bind/sign to pcrs, which is just low hanging fruit in today's day and age...) | |||||||||||||||||
| ▲ | knorker 20 hours ago | parent | prev [-] | ||||||||||||||||
I don't think this is right. Yes, with TPM and yubikey you have the option to store the per key material on disk, encrypted by the TPM. But the way this is then used is that the PKCS software sends that encrypted blob AND the requested operation, and gets only the output back. The CPU doesn't get the SSH private key back. Just the output of the RSA operation using the key. | |||||||||||||||||