Content-Type: multipart/mixed; boundary="===============3320683744071373645==" MIME-Version: 1.0 From: Chenxi Z Subject: [tpm2] How to use tpm2 tool to unload an external key Date: Wed, 21 Apr 2021 22:13:17 +0000 Message-ID: <20210421221317.2848.4149@ml01.vlan13.01.org> List-ID: To: tpm2@lists.01.org --===============3320683744071373645== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, I loaded an ecdsa P256 key, which was generated by openssl, into TPM. Once = the key is not longer needed for my use case, I would like to unload the ke= y. Can I know what tpm2 tool command that I can use to unload the external = key? I am assuming if I don't unload the key, the key context/memory will foreve= r be held by TPM (unless reboot). If I never release that and I keep loadin= g new keys into TPM, the TPM will eventually run out of memory. ref: https://github.com/tpm2-software/tpm2-tools/blob/master/man/tpm2_loade= xternal.1.md openssl ecparam -genkey -name prime256v1 -noout -out ec256-key-pair.pem tpm2_loadexternal -C n -G ecc -r ec256-key-pair.pem -c eckey.ctx Thanks Chenxi --===============3320683744071373645==--